window.__ModuleLoader__.load({ id: "dsh-brain", factory: (require) => { var module = { exports: {} }; var exports = module.exports; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); // \0rolldown/runtime.js var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __exportAll = (all, no_symbols) => { let target = {}; for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" }); return target; }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) { key = keys[i]; if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: ((k) => from[k]).bind(null, key), enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod)); let react = require("react"); react = __toESM(react, 1); let _deepseek_ai_dsh_client_ui_primitives = require("@deepseek-ai/dsh-client-ui-primitives"); let react_dom = require("react-dom"); let react_jsx_runtime = require("react/jsx-runtime"); // src-client/api.ts const API = { status: "/dsh-brain/status", capabilities: "/dsh-brain/capabilities", config: "/dsh-brain/config", login: "/dsh-brain/login", test: "/dsh-brain/test", flush: "/dsh-brain/flush", skills: "/dsh-brain/skills", market: "/dsh-brain/market", sync: "/dsh-brain/sync", clients: "/dsh-brain/clients", migrate: "/dsh-brain/migrate" }; function request(url, init) { var options = init || {}; options.cache = "no-store"; options.headers = options.body === void 0 ? { accept: "application/json" } : { accept: "application/json", "content-type": "application/json" }; return fetch(url, options).then(function(response) { return response.json().then(function(body) { return { status: response.status, body }; }, function() { return { status: response.status, body: null }; }); }); } function postJson(url, payload) { return request(url, { method: "POST", body: JSON.stringify(payload === void 0 ? {} : payload) }); } function messageOf(error) { if (error === null || error === void 0) return "未知错误"; if (typeof error === "string") return error; return typeof error.message === "string" ? error.message : String(error); } function statusText(status) { if (status === 404 || status === 405) return "插件后端还没加载这个接口(HTTP " + String(status) + "):请完全退出并重启 DSH 后再试。"; return "HTTP " + String(status); } function bodyError(result, fallback) { if (result.body !== null && result.body !== void 0 && typeof result.body.error === "string" && result.body.error !== "") return result.body.error; return fallback === void 0 ? statusText(result.status) : fallback; } function pickSettings(settings) { var source = settings === void 0 || settings === null ? {} : settings; return { enabled: source.enabled === true, baseUrl: String(source.baseUrl === void 0 ? "" : source.baseUrl), baseUrlConfigured: source.baseUrlConfigured !== false, baseUrlOrigin: String(source.baseUrlOrigin === void 0 ? "" : source.baseUrlOrigin), clientId: String(source.clientId === void 0 ? "" : source.clientId), requestTimeoutMs: String(source.requestTimeoutMs === void 0 ? 8e3 : source.requestTimeoutMs), defaultK: String(source.defaultK === void 0 ? 10 : source.defaultK), summaryEnabled: source.summaryEnabled === true, activityEnabled: source.activityEnabled === true, memoryEnabled: source.memoryEnabled === true, skillsDir: String(source.skillsDir === void 0 ? "" : source.skillsDir), skillsSyncEnabled: source.skillsSyncEnabled === true }; } function emptyTokens() { return { activity: "", memory: "", summary: "" }; } // src-client/styles.ts const styles = { root: { display: "flex", flexDirection: "column", gap: "18px", padding: "4px 2px 20px", fontSize: "13px", lineHeight: 1.55, minWidth: 0 }, tabs: { display: "flex", gap: "4px", padding: "3px", borderRadius: "13px", border: "1px solid rgba(127,127,127,0.22)", background: "rgba(127,127,127,0.06)", flexWrap: "wrap" }, tab: { flex: "1 1 auto", minWidth: "88px", font: "inherit", fontSize: "12.5px", padding: "7px 12px", borderRadius: "10px", border: "1px solid transparent", background: "transparent", color: "inherit", cursor: "pointer", whiteSpace: "nowrap" }, tabActive: { border: "1px solid rgba(127,127,127,0.30)", background: "rgba(127,127,127,0.14)", boxShadow: "0 1px 3px rgba(0,0,0,0.10)", fontWeight: 600 }, section: { display: "flex", flexDirection: "column", gap: "12px", border: "1px solid rgba(127,127,127,0.22)", borderRadius: "16px", padding: "18px 20px", minWidth: 0 }, sectionHead: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: "10px", flexWrap: "wrap" }, sectionTitle: { margin: 0, fontSize: "13.5px", fontWeight: 650, letterSpacing: "0.02em" }, hint: { margin: 0, fontSize: "11.5px", opacity: .58 }, grid: { display: "flex", flexWrap: "wrap", gap: "12px 18px" }, field: { display: "flex", flexDirection: "column", gap: "4px", flex: "1 1 auto", minWidth: "220px" }, label: { fontSize: "12px", opacity: .75 }, input: { font: "inherit", fontSize: "13px", padding: "8px 11px", borderRadius: "10px", border: "1px solid rgba(127,127,127,0.35)", background: "rgba(127,127,127,0.05)", color: "inherit", minWidth: 0, width: "100%", boxSizing: "border-box" }, checkboxRow: { display: "flex", alignItems: "flex-start", gap: "8px" }, actions: { display: "flex", gap: "10px", flexWrap: "wrap", alignItems: "center" }, button: { font: "inherit", fontSize: "13px", padding: "7px 16px", borderRadius: "10px", border: "1px solid rgba(127,127,127,0.4)", background: "transparent", color: "inherit", cursor: "pointer" }, buttonPrimary: { font: "inherit", fontSize: "13px", padding: "7px 18px", borderRadius: "10px", border: "1px solid transparent", background: "#3f3f46", boxShadow: "0 2px 6px -2px rgba(0,0,0,0.35)", color: "#ffffff", cursor: "pointer", fontWeight: 600 }, buttonDanger: { font: "inherit", fontSize: "13px", padding: "7px 16px", borderRadius: "10px", border: "1px solid rgba(220,38,38,0.5)", background: "rgba(220,38,38,0.14)", color: "inherit", cursor: "pointer" }, buttonSmall: { font: "inherit", fontSize: "12px", padding: "3px 8px", borderRadius: "8px", border: "1px solid transparent", background: "transparent", opacity: .85, color: "inherit", cursor: "pointer" }, pills: { display: "flex", flexWrap: "wrap", gap: "8px" }, pill: { display: "inline-flex", alignItems: "center", gap: "6px", padding: "3px 10px", borderRadius: "999px", border: "1px solid rgba(127,127,127,0.35)", fontSize: "12px", maxWidth: "100%", whiteSpace: "nowrap", overflow: "hidden", flex: "0 1 auto" }, table: { width: "100%", borderCollapse: "collapse", fontSize: "12px", tableLayout: "fixed" }, th: { textAlign: "left", fontWeight: 600, padding: "4px 8px 4px 0", borderBottom: "1px solid rgba(127,127,127,0.28)", whiteSpace: "nowrap" }, td: { padding: "4px 8px 4px 0", borderBottom: "1px solid rgba(127,127,127,0.14)", verticalAlign: "top", overflowWrap: "anywhere" }, mono: { fontFamily: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace", fontSize: "11px", opacity: .72, wordBreak: "break-all" }, ok: { borderColor: "rgba(22,163,74,0.55)", background: "rgba(22,163,74,0.12)" }, bad: { borderColor: "rgba(220,38,38,0.55)", background: "rgba(220,38,38,0.12)" }, warn: { borderColor: "rgba(217,119,6,0.55)", background: "rgba(217,119,6,0.12)" }, muted: {}, iconBtn: { width: "28px", height: "28px", display: "inline-flex", alignItems: "center", justifyContent: "center", fontSize: "13px", lineHeight: 1, padding: 0, borderRadius: "8px", border: "1px solid rgba(127,127,127,0.25)", background: "rgba(127,127,127,0.05)", color: "inherit", cursor: "pointer", flex: "0 0 auto" }, iconBtnDanger: { border: "1px solid rgba(220,38,38,0.40)", background: "rgba(220,38,38,0.08)" }, statsBar: { display: "flex", alignItems: "center", flexWrap: "wrap" }, stat: { display: "inline-flex", alignItems: "baseline", gap: "6px", paddingRight: "18px", marginRight: "18px", borderRight: "1px solid rgba(127,127,127,0.20)" }, statLast: { display: "inline-flex", alignItems: "baseline", gap: "6px" }, statNum: { fontSize: "17px", fontWeight: 700 }, banner: { padding: "10px 13px", borderRadius: "11px", border: "1px solid transparent", fontSize: "12.5px" }, row: { display: "flex", flexDirection: "column", gap: "6px", border: "1px solid rgba(127,127,127,0.15)", borderRadius: "11px", padding: "10px 12px", minWidth: 0 }, rowHead: { display: "flex", alignItems: "baseline", justifyContent: "space-between", gap: "8px", flexWrap: "wrap" }, rowTitle: { fontWeight: 600, overflowWrap: "anywhere" }, code: { fontFamily: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace", fontSize: "11.5px", whiteSpace: "pre-wrap", wordBreak: "break-word", maxHeight: "260px", overflow: "auto", margin: 0, padding: "10px", borderRadius: "8px", background: "rgba(127,127,127,0.1)" }, chips: { display: "flex", gap: "6px", flexWrap: "wrap" }, chip: { font: "inherit", fontSize: "12px", padding: "2px 10px", borderRadius: "999px", border: "1px solid rgba(127,127,127,0.35)", background: "transparent", color: "inherit", cursor: "pointer" }, chipActive: { border: "1px solid rgba(99,102,241,0.6)", background: "rgba(99,102,241,0.16)" }, nested: { display: "flex", flexDirection: "column", gap: "6px", paddingLeft: "10px", borderLeft: "2px solid rgba(127,127,127,0.18)", minWidth: 0 }, sourceCard: { display: "flex", flexDirection: "column", gap: "6px", border: "1px solid rgba(127,127,127,0.17)", borderRadius: "14px", padding: "12px 14px", minWidth: 0 }, groupRow: { display: "flex", flexDirection: "column", gap: "6px", border: "1px solid transparent", borderRadius: "11px", padding: "7px 9px", background: "transparent", minWidth: 0 }, skillRow: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: "8px", padding: "5px 8px", borderRadius: "8px", border: "1px solid transparent", minWidth: 0, flexWrap: "nowrap" }, clamp1: { display: "-webkit-box", WebkitLineClamp: "1", WebkitBoxOrient: "vertical", overflow: "hidden" }, clamp2: { display: "-webkit-box", WebkitLineClamp: "2", WebkitBoxOrient: "vertical", overflow: "hidden" }, sourceGlyph: { width: "20px", height: "20px", borderRadius: "6px", display: "inline-flex", alignItems: "center", justifyContent: "center", fontSize: "11px", fontWeight: 700, border: "1px solid rgba(127,127,127,0.22)", background: "rgba(127,127,127,0.10)", flex: "0 0 auto" }, folderGlyph: { fontSize: "12px", opacity: .85, flex: "0 0 auto" }, sourceTitle: { fontWeight: 600, fontSize: "13px", overflowWrap: "anywhere" } }; // src-client/components.tsx const h$14 = react.createElement; function Pill$1(props) { var tone = styles[props.tone] === void 0 ? styles.muted : styles[props.tone]; return h$14("span", { style: Object.assign({}, styles.pill, tone) }, h$14("span", { style: { opacity: .75, flex: "0 0 auto" } }, props.label), h$14("span", { style: { fontWeight: 600, overflow: "hidden", textOverflow: "ellipsis", minWidth: 0 } }, String(props.value))); } function Banner(props) { var tone = styles[props.tone] === void 0 ? styles.muted : styles[props.tone]; return h$14("div", { style: Object.assign({}, styles.banner, tone), role: props.role }, props.children); } function Field$1(props) { return h$14("label", { style: styles.field }, h$14("span", { style: styles.label }, props.label), h$14("input", { style: styles.input, type: props.type === void 0 ? "text" : props.type, value: props.value, placeholder: props.placeholder === void 0 ? "" : props.placeholder, spellCheck: false, autoComplete: "off", disabled: props.disabled === true, onChange: function(event) { props.onChange(event.target.value); } }), props.hint === void 0 ? null : h$14("span", { style: styles.hint }, props.hint)); } function Btn(props) { var base = props.variant === "primary" ? styles.buttonPrimary : props.variant === "danger" ? styles.buttonDanger : props.variant === "small" ? styles.buttonSmall : styles.button; var style = props.disabled === true ? Object.assign({}, base, { opacity: .45, cursor: "not-allowed" }) : base; return h$14("button", { type: "button", style, disabled: props.disabled === true, onClick: props.onClick, "aria-label": props.ariaLabel }, props.label); } function IconBtn(props) { var style = Object.assign({}, styles.iconBtn, props.danger === true ? styles.iconBtnDanger : null, props.disabled === true ? { opacity: .45, cursor: "not-allowed" } : null); return h$14("button", { type: "button", style, disabled: props.disabled === true, onClick: props.disabled === true ? void 0 : props.onClick, "aria-label": props.ariaLabel, title: props.ariaLabel }, props.glyph); } function Switch$8(props) { return h$14("div", { style: styles.tabs, role: "tablist", "aria-label": props.ariaLabel }, props.options.map(function(option) { var active = option.value === props.value; return h$14("button", { key: option.value, type: "button", role: "tab", "aria-selected": active, style: Object.assign({}, styles.tab, active ? styles.tabActive : null), onClick: function() { props.onChange(option.value); } }, option.label); })); } function Toggle(props) { var on = props.checked === true; var disabled = props.disabled === true; return h$14("button", { type: "button", role: "switch", "aria-checked": on, "aria-label": props.label, title: props.label, disabled, style: { width: "38px", height: "22px", flex: "0 0 auto", padding: "2px", borderRadius: "999px", border: "1px solid " + (on ? "rgba(0,0,0,0.25)" : "rgba(127,127,127,0.45)"), background: on ? "#3f3f46" : "rgba(127,127,127,0.28)", display: "flex", alignItems: "center", justifyContent: on ? "flex-end" : "flex-start", cursor: disabled ? "not-allowed" : "pointer", opacity: disabled ? .45 : 1, transition: "background 120ms ease" }, onClick: disabled ? void 0 : props.onChange }, h$14("span", { style: { width: "16px", height: "16px", borderRadius: "999px", background: "rgba(255,255,255,0.96)", boxShadow: "0 1px 2px rgba(0,0,0,0.25)", flex: "0 0 auto" } })); } function Section(props) { return h$14("div", { style: styles.section }, h$14("div", { style: styles.sectionHead }, h$14("h4", { style: styles.sectionTitle }, props.title), props.aside === void 0 ? null : h$14("div", { style: styles.actions }, props.aside)), props.hint === void 0 ? null : h$14("p", { style: styles.hint }, props.hint), props.children); } function CardBoundary(props) { react.Component.call(this, props); this.state = { failure: null }; } CardBoundary.prototype = Object.create(react.Component.prototype); CardBoundary.prototype.constructor = CardBoundary; CardBoundary.getDerivedStateFromError = function(failure) { return { failure }; }; CardBoundary.prototype.render = function() { if (this.state.failure !== null) return h$14("div", { style: Object.assign({}, styles.root) }, h$14("div", { style: Object.assign({}, styles.banner, styles.bad) }, "云端记忆设置卡渲染失败:" + messageOf(this.state.failure)), h$14("p", { style: styles.hint }, "插件本身仍在运行,可改用 /dsh-brain 页面配置。")); return this.props.children; }; // src-client/format.ts function formatTime(value) { if (typeof value !== "number" || value <= 0) return "—"; var date = new Date(value); var pad = function(n) { return n < 10 ? "0" + String(n) : String(n); }; return pad(date.getMonth() + 1) + "-" + pad(date.getDate()) + " " + pad(date.getHours()) + ":" + pad(date.getMinutes()) + ":" + pad(date.getSeconds()); } function formatIso(value) { if (typeof value !== "string" || value === "") return "—"; var stamp = Date.parse(value); if (!Number.isFinite(stamp)) return value; return formatTime(stamp); } function formatShort(value) { if (typeof value !== "number" || value <= 0) return "—"; var date = new Date(value); var pad = function(n) { return n < 10 ? "0" + String(n) : String(n); }; return pad(date.getMonth() + 1) + "-" + pad(date.getDate()) + " " + pad(date.getHours()) + ":" + pad(date.getMinutes()); } function memoryCategoryLabel(category) { if (typeof category !== "string" || category === "") return "无分类"; var map = { rule: "规则", preference: "偏好", identity: "身份" }; return map[category] === void 0 ? "其他" : map[category]; } function memorySourceLabel(source, createdAt) { if (typeof source !== "string" || source === "") return "本地记录"; if (source.indexOf("session:") === 0) { var stamp = typeof createdAt === "string" ? Date.parse(createdAt) : NaN; return Number.isFinite(stamp) ? formatShort(stamp) + " 的对话" : "对话 · 时间不可查"; } if (source === "mnemon") return "Mnemon · 来源待核实"; if (source === "memory_tool") return "助手写入"; if (source === "mnemon-native") return "Mnemon 写入"; if (source.indexOf("legacy:") === 0) return "旧数据导入"; if (source.indexOf("department:") === 0) return "部门空间"; if (source === "local") return "本地手动"; return "其他来源"; } function formatBytes(value) { if (typeof value !== "number" || value < 0) return "—"; if (value < 1024) return String(value) + " B"; if (value < 1048576) return (value / 1024).toFixed(1) + " KB"; return (value / 1048576).toFixed(2) + " MB"; } function readStored(key, fallback) { try { var raw = window.localStorage.getItem("dsh-brain:" + key); if (raw === null || raw === "") raw = window.localStorage.getItem("dsh-cloud-memory:" + key); return raw === null || raw === "" ? fallback : raw; } catch { return fallback; } } function store(key, value) { try { window.localStorage.setItem("dsh-brain:" + key, String(value)); } catch {} } const OUTCOME_LABELS = { recorded: "已上报", duplicate: "重复忽略", failed: "失败", queued: "待重试", skipped: "已跳过" }; const OUTCOME_TONES = { recorded: "ok", duplicate: "muted", failed: "bad", queued: "warn", skipped: "muted" }; const CHECK_TONES = { ok: "ok", unconfigured: "muted", invalid: "bad", forbidden: "bad", unreachable: "bad", error: "bad" }; const CHECK_LABELS = { ok: "可用", unconfigured: "未配置", invalid: "令牌失效", forbidden: "权限不足", unreachable: "不可达", error: "出错" }; const MCP_STATE_LABELS = { connected: "已连接", connecting: "连接中", disabled: "已停用", error: "异常", expired: "授权过期", unknown: "未知", needs_auth: "待授权" }; // src-client/bridge.ts const MCP_BRIDGE = "/mcp-connector/api"; const POLL_MS$2 = 1e4; const PROBE_TIMEOUT_MS = 5e3; function bridgeCall(method, params) { var controller = typeof AbortController === "function" ? new AbortController() : null; var timer = controller === null ? null : setTimeout(function() { controller.abort(); }, 2e4); return fetch(MCP_BRIDGE, { method: "POST", cache: "no-store", headers: { accept: "application/json", "content-type": "application/json" }, body: JSON.stringify({ method, params: params === void 0 ? {} : params }), signal: controller === null ? void 0 : controller.signal }).then(function(response) { if (timer !== null) clearTimeout(timer); return response.json().then(function(body) { return { status: response.status, body }; }, function() { return { status: response.status, body: null }; }); }, function(failure) { if (timer !== null) clearTimeout(timer); return { status: 0, body: null, error: messageOf(failure) }; }); } function bridgeMessage(result) { if (result.body !== null && typeof result.body.message === "string" && result.body.message !== "") return result.body.message; return "HTTP " + String(result.status) + (result.error === void 0 ? "" : ":" + result.error); } // src-client/sections/MarketSection.tsx const h$13 = react.createElement; function MarketSection(props) { var capabilities = props.capabilities || {}; var tuple = react.useState({ providers: null, provider: "", query: "", entries: [], nextCursor: null, cursor: 0, status: "idle", error: null, detail: null, plan: null, selected: {}, busy: "", notice: null }); var state = tuple[0]; var setState = tuple[1]; function patch(next) { setState(function(prev) { return Object.assign({}, prev, next); }); } var available = capabilities.features !== void 0 && capabilities.features.skillsMarketplace === true; react.useEffect(function() { if (available) loadProviders(); }, []); function loadProviders() { request(API.market + "/providers", { method: "GET" }).then(function(res) { if (res.body !== null && res.body !== void 0 && res.body.ok === true) { var list = Array.isArray(res.body.providers) ? res.body.providers : []; patch({ providers: list, provider: state.provider !== "" ? state.provider : list.length > 0 ? list[0].id : "" }); } else patch({ error: bodyError(res, "读取市场来源失败") }); }, function(error) { patch({ error: messageOf(error) }); }); } function search(append) { if (state.provider === "") return; var cursor = append === true ? state.cursor : 0; patch({ busy: "search", error: null, status: "loading" }); request(API.market + "/search?provider=" + encodeURIComponent(state.provider) + "&q=" + encodeURIComponent(state.query) + "&cursor=" + String(cursor), { method: "GET" }).then(function(res) { if (res.body !== null && res.body !== void 0 && res.body.ok === true) patch({ entries: append === true ? state.entries.concat(res.body.entries || []) : res.body.entries || [], nextCursor: res.body.nextCursor === void 0 ? null : res.body.nextCursor, cursor: res.body.nextCursor === void 0 ? cursor : res.body.nextCursor, status: "ready", busy: "", detail: null, plan: null }); else patch({ status: "error", busy: "", error: bodyError(res, "市场搜索失败") }); }, function(error) { patch({ status: "error", busy: "", error: messageOf(error) }); }); } function openDetail(entry) { patch({ busy: "detail", detail: null, plan: null, notice: null }); postJson(API.market + "/detail", { provider: state.provider, id: entry.id }).then(function(res) { if (res.body !== null && res.body !== void 0 && res.body.ok === true) patch({ detail: res.body, busy: "" }); else patch({ busy: "", error: bodyError(res, "读取条目详情失败") }); }, function(error) { patch({ busy: "", error: messageOf(error) }); }); } function makePlan() { if (state.detail === null) return; patch({ busy: "plan", plan: null, notice: null }); postJson(API.market + "/plan", { provider: state.provider, id: state.detail.id }).then(function(res) { if (res.body !== null && res.body !== void 0 && res.body.ok === true) { var selected = {}; (res.body.candidates || []).forEach(function(candidate) { if (candidate.conflict !== true && candidate.problem === void 0) selected[candidate.folder] = true; }); patch({ plan: res.body, selected, busy: "" }); } else patch({ busy: "", error: bodyError(res, "无法生成安装计划") }); }, function(error) { patch({ busy: "", error: messageOf(error) }); }); } function toggleFolder(folder) { var next = Object.assign({}, state.selected); next[folder] = next[folder] !== true; patch({ selected: next }); } function commitPlan() { if (state.plan === null) return; var folders = Object.keys(state.selected).filter(function(folder) { return state.selected[folder] === true; }); if (folders.length === 0) { patch({ notice: { tone: "warn", text: "请至少选中一个技能。" } }); return; } patch({ busy: "commit" }); postJson(API.market + "/commit", { planId: state.plan.planId, folders }).then(function(res) { if (res.body !== null && res.body !== void 0 && res.body.ok === true) { var skipped = Array.isArray(res.body.skipped) ? res.body.skipped.length : 0; patch({ busy: "", plan: null, detail: null, notice: { tone: "ok", text: "已安装:" + ((res.body.installed || []).join("、") || "无") + (skipped > 0 ? ";跳过 " + skipped + " 项" : "") } }); if (typeof props.onInstalled === "function") props.onInstalled(); } else patch({ busy: "", notice: { tone: "bad", text: bodyError(res, "安装失败") } }); }, function(error) { patch({ busy: "", notice: { tone: "bad", text: messageOf(error) } }); }); } if (!available) return h$13(Section, { title: "技能市场", hint: "本版没有配置经验证的市场来源。" }, h$13("p", { style: styles.hint }, "能力缺口:capabilities.features.skillsMarketplace = false,因此不显示任何搜索框或示例条目。")); var providerLabel = state.provider; if (state.providers !== null) state.providers.forEach(function(provider) { if (provider.id === state.provider) providerLabel = provider.label; }); var resultRows = state.entries.map(function(entry) { return h$13("div", { key: entry.id, style: styles.row }, h$13("div", { style: styles.rowHead }, h$13("span", { style: styles.rowTitle }, entry.name), h$13("div", { style: styles.pills }, entry.version === void 0 ? null : h$13(Pill$1, { label: "版本", value: String(entry.version), tone: "muted" }), h$13(Pill$1, { label: "技能", value: (entry.skills || []).length, tone: "muted" }), entry.author === void 0 ? null : h$13(Pill$1, { label: "作者", value: String(entry.author), tone: "muted" }))), h$13("p", { style: styles.hint }, entry.description === "" ? "(无描述)" : entry.description), h$13("div", { style: styles.actions }, h$13(Btn, { label: "查看详情", variant: "small", disabled: state.busy !== "", onClick: function() { openDetail(entry); } }))); }); var detailBox = null; if (state.detail !== null) { var details = Array.isArray(state.detail.skillDetails) ? state.detail.skillDetails : []; detailBox = h$13("div", { style: styles.nested }, h$13("p", { style: styles.hint }, "来源:" + String(state.detail.sourceRepo) + " · " + (state.detail.description || "")), h$13("div", { style: { display: "flex", flexDirection: "column", gap: "4px" } }, details.map(function(skill) { return h$13("div", { key: skill.folder, style: styles.rowHead }, h$13("span", { style: styles.rowTitle }, skill.name === void 0 ? skill.folder : skill.name), h$13("span", { style: styles.hint }, skill.ok === false ? "(无法读取 SKILL.md)" : String(skill.description || ""))); })), h$13("div", { style: styles.actions }, h$13(Btn, { variant: "primary", label: state.busy === "plan" ? "拉取中…" : "拉取安装计划", disabled: state.busy !== "", onClick: makePlan }))); } var planBox = null; if (state.plan !== null) { var candidates = Array.isArray(state.plan.candidates) ? state.plan.candidates : []; planBox = h$13("div", { style: styles.nested }, h$13("p", { style: styles.hint }, "已固定提交:" + (state.plan.commit === void 0 ? "克隆时记录实际提交" : String(state.plan.commit).slice(0, 12)) + ";只安装勾选项,冲突项默认不勾,不执行仓库脚本。"), candidates.length === 0 ? h$13("p", { style: styles.hint }, "该条目没有可安装的技能。") : null, h$13("div", { style: { display: "flex", flexDirection: "column", gap: "6px" } }, candidates.map(function(candidate) { return h$13("label", { key: candidate.folder, style: styles.checkboxRow }, h$13("input", { type: "checkbox", checked: state.selected[candidate.folder] === true, disabled: candidate.conflict === true || candidate.problem !== void 0, onChange: function() { toggleFolder(candidate.folder); } }), h$13("span", null, candidate.folder + " · " + String(candidate.files) + " 个文件 · " + formatBytes(candidate.bytes) + (candidate.conflict === true ? " · 已存在,跳过" : "") + (candidate.problem === void 0 ? "" : " · " + candidate.problem))); })), h$13("div", { style: styles.actions }, h$13(Btn, { variant: "primary", label: state.busy === "commit" ? "安装中…" : "安装选中", disabled: state.busy !== "", onClick: commitPlan }))); } return h$13(Section, { title: "技能市场", hint: "来自经验证的公开市场清单;安装走暂存计划、只装勾选项并固定提交。" }, h$13("div", { style: { display: "flex", flexDirection: "column", gap: "10px" } }, h$13("div", { style: styles.pills }, h$13(Pill$1, { label: "来源", value: String(providerLabel || "未配置"), tone: "muted" }), state.providers === null ? null : h$13(Pill$1, { label: "已接入", value: state.providers.length, tone: "ok" })), h$13("div", { style: { display: "flex", gap: "8px", alignItems: "flex-end", flexWrap: "wrap" } }, h$13("div", { style: { flex: "1 1 220px", minWidth: 0 } }, h$13(Field$1, { label: "搜索市场", value: state.query, placeholder: "例如 xlsx / pdf / design", onChange: function(value) { patch({ query: value }); } })), h$13(Btn, { variant: "primary", label: state.busy === "search" ? "搜索中…" : "搜索", disabled: state.busy !== "", onClick: function() { search(false); } })), state.error === null ? null : h$13(Banner, { tone: "bad" }, state.error), state.notice === null ? null : h$13(Banner, { tone: state.notice.tone }, state.notice.text), state.status === "ready" && state.entries.length === 0 ? h$13("p", { style: styles.hint }, "没有匹配的市场条目。") : null, h$13("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, resultRows), state.nextCursor === null ? null : h$13("div", { style: styles.actions }, h$13(Btn, { label: "加载更多", variant: "small", disabled: state.busy !== "", onClick: function() { search(true); } })), detailBox, planBox)); } // src-client/sections/SyncResolveSection.tsx const h$12 = react.createElement; function SyncResolveSection(props) { var tuple = react.useState({ status: "idle", data: null, busy: "", error: null, notice: null, pendingAll: null }); var state = tuple[0]; var setState = tuple[1]; function patch(next) { setState(function(prev) { return Object.assign({}, prev, next); }); } react.useEffect(function() { load(); }, []); function load() { patch({ status: "loading", error: null }); request(API.sync + "/status", { method: "GET" }).then(function(res) { if (res.body !== null && res.body !== void 0 && res.body.ok === true) patch({ status: "ready", data: res.body }); else patch({ status: "error", error: bodyError(res, "读取同步状态失败") }); }, function(error) { patch({ status: "error", error: messageOf(error) }); }); } function resolve(name, action, conflictId) { patch({ busy: name + ":" + action, notice: null }); postJson(API.sync + "/resolve", { name, action, conflictId }).then(function(res) { if (res.body !== null && res.body !== void 0 && res.body.ok === true) { patch({ busy: "", data: { stats: state.data === null ? null : state.data.stats, conflicts: res.body.conflicts || [] }, notice: { tone: "ok", text: name + ":" + (res.body.note || "已处理") } }); if (typeof props.onResolved === "function") props.onResolved(); } else patch({ busy: "", notice: { tone: "bad", text: bodyError(res, "处理冲突失败") } }); }, function(error) { patch({ busy: "", notice: { tone: "bad", text: messageOf(error) } }); }); } function runNow() { patch({ busy: "run" }); postJson(API.sync + "/run", {}).then(function(res) { if (res.body !== null && res.body !== void 0 && res.body.ok === true) patch({ busy: "", data: { stats: res.body.stats, conflicts: res.body.conflicts || [] }, notice: { tone: "ok", text: "已执行一次同步。" } }); else patch({ busy: "", notice: { tone: "bad", text: bodyError(res, "同步失败") } }); }, function(error) { patch({ busy: "", notice: { tone: "bad", text: messageOf(error) } }); }); } function resolveAll(action) { if (conflicts.length === 0) { patch({ pendingAll: null }); return; } patch({ busy: "all:" + action, notice: null }); postJson(API.sync + "/resolve-all", { action, conflictIds: conflicts.map(function(item) { return item.conflictId; }) }).then(function(res) { if (res.body !== null && res.body !== void 0 && res.body.ok === true) { var resolved = Array.isArray(res.body.resolved) ? res.body.resolved : []; var failed = Array.isArray(res.body.failed) ? res.body.failed : []; var text = "批量处理完成:成功 " + resolved.length + " 项" + (failed.length === 0 ? "。" : ",失败 " + failed.length + " 项(" + failed.map(function(item) { return item.name + ":" + item.error; }).join("、") + ")。"); patch({ busy: "", pendingAll: null, data: { stats: res.body.stats, conflicts: res.body.conflicts || [] }, notice: { tone: failed.length === 0 ? "ok" : "warn", text } }); if (typeof props.onResolved === "function") props.onResolved(); } else patch({ busy: "", notice: { tone: "bad", text: bodyError(res, "批量处理冲突失败") } }); }, function(error) { patch({ busy: "", notice: { tone: "bad", text: messageOf(error) } }); }); } var data = state.data; var stats = data === null || data === void 0 ? null : data.stats; var conflicts = data === null || data === void 0 || !Array.isArray(data.conflicts) ? [] : data.conflicts; var statPills = stats === null ? h$12("p", { style: styles.hint }, "同步引擎未启用或尚未运行。") : h$12("div", { style: styles.pills }, h$12(Pill$1, { label: "运行中", value: stats.running === true ? "是" : "否", tone: stats.running === true ? "warn" : "muted" }), h$12(Pill$1, { label: "上次运行", value: formatIso(stats.lastRunAt), tone: "muted" }), h$12(Pill$1, { label: "上传", value: (stats.uploaded || []).length, tone: "muted" }), h$12(Pill$1, { label: "下载", value: (stats.downloaded || []).length, tone: "muted" }), h$12(Pill$1, { label: "冲突", value: conflicts.length, tone: conflicts.length > 0 ? "warn" : "muted" })); var conflictRows = conflicts.map(function(conflict) { var local = conflict.local || {}; var cloud = conflict.cloud; return h$12("div", { key: conflict.name, style: styles.row }, h$12("div", { style: styles.rowHead }, h$12("span", { style: styles.rowTitle }, conflict.name), h$12("div", { style: styles.pills }, h$12(Pill$1, { label: "原因", value: String(conflict.reason), tone: "warn" }), h$12(Pill$1, { label: "本地", value: local.exists === true ? local.files + " 文件" : "缺失", tone: local.exists === true ? "muted" : "bad" }), h$12(Pill$1, { label: "云端", value: cloud === null ? "无" : "rev " + String(cloud.revision === void 0 ? "?" : cloud.revision), tone: cloud === null ? "muted" : "ok" }))), h$12("p", { style: styles.hint }, conflict.note), h$12("div", { style: styles.actions }, h$12(Btn, { label: "保留本地", variant: "small", disabled: state.busy !== "" || conflict.canKeepLocal !== true, onClick: function() { resolve(conflict.name, "keep_local", conflict.conflictId); } }), h$12(Btn, { label: "采用云端", variant: "small", disabled: state.busy !== "" || conflict.canTakeCloud !== true, onClick: function() { resolve(conflict.name, "take_cloud", conflict.conflictId); } }), h$12(Btn, { label: "手动合并", variant: "small", disabled: state.busy !== "", onClick: function() { resolve(conflict.name, "manual", conflict.conflictId); } }))); }); var batchRow = null; if (conflicts.length > 0) batchRow = h$12("div", { style: styles.actions }, h$12(Btn, { label: "全部保留本地", variant: "small", disabled: state.busy !== "" || !conflicts.some(function(item) { return item.canKeepLocal === true; }), onClick: function() { patch({ pendingAll: "keep_local", notice: null }); } }), h$12(Btn, { label: "全部采用云端", variant: "small", disabled: state.busy !== "" || !conflicts.some(function(item) { return item.canTakeCloud === true; }), onClick: function() { patch({ pendingAll: "take_cloud", notice: null }); } })); var confirmAllRow = null; if (state.pendingAll !== null && conflicts.length > 0) { var pendingText = state.pendingAll === "keep_local" ? "把全部本地版本上传为新版本" : "用云端版本覆盖全部本地(覆盖前自动备份)"; confirmAllRow = h$12("div", { style: styles.nested }, h$12("p", { style: styles.hint }, "确认" + pendingText + "?共 " + conflicts.length + " 项。"), h$12("div", { style: styles.actions }, h$12(Btn, { variant: "primary", label: state.busy === "all:keep_local" || state.busy === "all:take_cloud" ? "处理中…" : "确认批量", disabled: state.busy !== "", onClick: function() { resolveAll(state.pendingAll); } }), h$12(Btn, { variant: "small", label: "取消", disabled: state.busy !== "", onClick: function() { patch({ pendingAll: null }); } }))); } return h$12(Section, { title: "云端同步与冲突", hint: "同步先比内容与更新时间:一致直接认领,不同则自动采用较新的一边(覆盖云端前先备份本地);只有时间相同/缺失或目录结构不支持时才逐项询问,也可用批量按钮一次处理。", aside: h$12(Btn, { label: state.busy === "run" ? "同步中…" : "立即同步", variant: "small", disabled: state.busy !== "", onClick: runNow }) }, h$12("div", { style: { display: "flex", flexDirection: "column", gap: "10px" } }, state.error === null ? null : h$12(Banner, { tone: "bad" }, state.error), state.notice === null ? null : h$12(Banner, { tone: state.notice.tone }, state.notice.text), statPills, batchRow, confirmAllRow, conflicts.length === 0 ? h$12("p", { style: styles.hint }, "当前没有待处理冲突。") : h$12("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, conflictRows))); } // src-client/sections/McpCustomSection.tsx const h$11 = react.createElement; function McpCustomSection(props) { var open = react.useState(false); var tuple = react.useState({ transport: "streamable-http", name: "", serverName: "", url: "", command: "", args: "", cwd: "", authMode: "none", bearerToken: "", apiKeyHeader: "X-Api-Key", apiKeyValue: "", importJson: "", busy: "", notice: null }); var s = tuple[0]; var set = tuple[1]; function patch(next) { set(function(prev) { return Object.assign({}, prev, next); }); } function submit() { if (String(s.name).trim() === "") { patch({ notice: { tone: "warn", text: "请填写连接名称。" } }); return; } var params = { name: String(s.name).trim(), serverName: String(s.serverName).trim() || void 0, transport: s.transport, authMode: s.authMode }; if (s.transport === "stdio") { if (String(s.command).trim() === "") { patch({ notice: { tone: "warn", text: "stdio 连接需要启动命令。" } }); return; } params.command = String(s.command).trim(); params.args = String(s.args).split(/\s+/).filter(function(x) { return x !== ""; }); if (String(s.cwd).trim() !== "") params.cwd = String(s.cwd).trim(); } else { if (String(s.url).trim() === "") { patch({ notice: { tone: "warn", text: "HTTP 连接需要 URL。" } }); return; } params.url = String(s.url).trim(); if (s.authMode === "bearer") params.bearerToken = String(s.bearerToken); if (s.authMode === "api-key") { params.apiKeyHeader = String(s.apiKeyHeader); params.apiKeyValue = String(s.apiKeyValue); } } patch({ busy: "configure", notice: null }); bridgeCall("configure", params).then(function(res) { var ok = res.status === 200 && res.body !== null && res.body.ok === true; patch({ busy: "", notice: ok ? { tone: "ok", text: bridgeMessage(res) } : { tone: "bad", text: "新增失败:" + bridgeMessage(res) } }); if (ok && typeof props.onChanged === "function") props.onChanged(); }); } function importJson() { if (String(s.importJson).trim() === "") { patch({ notice: { tone: "warn", text: "请粘贴 mcpServers JSON。" } }); return; } patch({ busy: "import", notice: null }); bridgeCall("importJson", { json: s.importJson }).then(function(res) { var ok = res.status === 200 && res.body !== null && res.body.ok === true; patch({ busy: "", notice: ok ? { tone: "ok", text: bridgeMessage(res) } : { tone: "bad", text: "导入失败:" + bridgeMessage(res) } }); if (ok && typeof props.onChanged === "function") props.onChanged(); }); } return h$11(Section, { title: "新增 / 导入连接", hint: "HTTP 与 stdio 都由宿主校验并保存凭据;本卡不回显已有密钥。stdio 的启动命令由你显式填写,云端不会执行任何本机命令。", aside: h$11(Btn, { label: open[0] ? "收起" : "展开", ariaLabel: "展开新增连接", variant: "small", onClick: function() { open[1](!open[0]); } }) }, open[0] ? h$11("div", { style: { display: "flex", flexDirection: "column", gap: "10px" } }, h$11("div", { style: styles.grid }, h$11(Field$1, { label: "名称", value: s.name, onChange: function(v) { patch({ name: v }); } }), h$11(Field$1, { label: "Server 名(可选)", value: s.serverName, onChange: function(v) { patch({ serverName: v }); } }), h$11("div", { style: styles.field }, h$11("span", { style: styles.label }, "传输方式"), h$11("select", { value: s.transport, style: styles.input, onChange: function(e) { patch({ transport: e.target.value }); } }, h$11("option", { value: "streamable-http" }, "Streamable HTTP"), h$11("option", { value: "stdio" }, "stdio(本机进程)")))), s.transport === "stdio" ? h$11("div", { style: styles.grid }, h$11(Field$1, { label: "启动命令", value: s.command, placeholder: "npx / uvx / 本机可执行文件", onChange: function(v) { patch({ command: v }); } }), h$11(Field$1, { label: "参数(空格分隔)", value: s.args, onChange: function(v) { patch({ args: v }); } }), h$11(Field$1, { label: "工作目录(可选)", value: s.cwd, onChange: function(v) { patch({ cwd: v }); } })) : h$11("div", { style: { display: "flex", flexDirection: "column", gap: "10px" } }, h$11(Field$1, { label: "URL", value: s.url, placeholder: "https://…", onChange: function(v) { patch({ url: v }); } }), h$11("div", { style: styles.grid }, h$11("div", { style: styles.field }, h$11("span", { style: styles.label }, "鉴权"), h$11("select", { value: s.authMode, style: styles.input, onChange: function(e) { patch({ authMode: e.target.value }); } }, h$11("option", { value: "none" }, "无"), h$11("option", { value: "bearer" }, "Bearer Token"), h$11("option", { value: "api-key" }, "API Key"))), s.authMode === "bearer" ? h$11(Field$1, { label: "Bearer Token", type: "password", value: s.bearerToken, onChange: function(v) { patch({ bearerToken: v }); } }) : null, s.authMode === "api-key" ? h$11(Field$1, { label: "API Key 头", value: s.apiKeyHeader, onChange: function(v) { patch({ apiKeyHeader: v }); } }) : null, s.authMode === "api-key" ? h$11(Field$1, { label: "API Key 值", type: "password", value: s.apiKeyValue, onChange: function(v) { patch({ apiKeyValue: v }); } }) : null)), h$11("div", { style: styles.actions }, h$11(Btn, { variant: "primary", label: s.busy === "configure" ? "保存中…" : "校验并保存连接", disabled: s.busy !== "", onClick: submit })), h$11("p", { style: styles.hint }, "或粘贴 mcpServers JSON 批量导入:"), h$11("textarea", { value: s.importJson, rows: 5, style: Object.assign({}, styles.input, { fontFamily: "monospace", resize: "vertical" }), placeholder: "{\"mcpServers\":{\"name\":{\"url\":\"…\"}}}", onChange: function(e) { patch({ importJson: e.target.value }); } }), h$11("div", { style: styles.actions }, h$11(Btn, { label: s.busy === "import" ? "导入中…" : "导入 JSON", disabled: s.busy !== "", onClick: importJson })), s.notice === null ? null : h$11(Banner, { tone: s.notice.tone }, s.notice.text)) : null); } // src-client/sections/McpConfigSection.tsx const h$10 = react.createElement; function McpConfigSection(props) { var items = Array.isArray(props.items) ? props.items : []; var open = react.useState(false); var tuple = react.useState({ key: "", json: "", busy: "", notice: null, scopePreview: null, targetScope: "global", workspaceId: "", gov: null, policyPreview: null }); var s = tuple[0]; var set = tuple[1]; function patch(next) { set(function(prev) { return Object.assign({}, prev, next); }); } var selected = null; for (var i = 0; i < items.length; i += 1) if (items[i].key === s.key) selected = items[i]; react.useEffect(function() { bridgeCall("governance", {}).then(function(res) { if (res.body !== null && res.body.ok === true) patch({ gov: res.body.detail }); }); }, []); function choose(key) { patch({ key, json: "", scopePreview: null, policyPreview: null, notice: null }); if (key === "") return; bridgeCall("editableConnectionConfig", { key }).then(function(res) { if (res.body !== null && res.body.ok === true && res.body.detail !== void 0) patch({ json: String(res.body.detail.json === void 0 ? "" : res.body.detail.json) }); else patch({ json: "", notice: { tone: "warn", text: bridgeMessage(res) } }); }); } function save() { if (s.key === "") return; patch({ busy: "save" }); bridgeCall("reconfigureConnection", { key: s.key, json: s.json }).then(function(res) { var ok = res.body !== null && res.body.ok === true; patch({ busy: "", notice: ok ? { tone: "ok", text: bridgeMessage(res) } : { tone: "bad", text: "保存失败:" + bridgeMessage(res) } }); if (ok && typeof props.onChanged === "function") props.onChanged(); }); } function previewScope() { if (s.key === "") return; patch({ busy: "scope-preview" }); var params = { key: s.key, targetScope: s.targetScope, mode: "move" }; if (s.targetScope === "project") params.workspaceId = s.workspaceId; bridgeCall("previewConnectionScope", params).then(function(res) { var ok = res.body !== null && res.body.ok === true; patch({ busy: "", scopePreview: ok ? res.body.detail : null, notice: ok ? null : { tone: "bad", text: bridgeMessage(res) } }); if (ok && res.body.detail.canApply !== true) patch({ notice: { tone: "warn", text: bridgeMessage(res) } }); }); } function applyScope() { if (s.key === "" || s.scopePreview === null) return; patch({ busy: "scope-apply" }); var params = { key: s.key, targetScope: s.targetScope, mode: "move", expectedRevision: s.scopePreview.baseRevision }; if (s.targetScope === "project") params.workspaceId = s.workspaceId; bridgeCall("applyConnectionScope", params).then(function(res) { var ok = res.body !== null && res.body.ok === true; patch({ busy: "", notice: ok ? { tone: "ok", text: bridgeMessage(res) } : { tone: "bad", text: "作用域应用失败:" + bridgeMessage(res) }, scopePreview: null }); if (ok && typeof props.onChanged === "function") props.onChanged(); }); } function previewPolicy(effect) { if (selected === null) return; patch({ busy: "policy-preview" }); bridgeCall("previewPolicy", { scope: "connection", effect, connectorId: selected.connectorId }).then(function(res) { var ok = res.body !== null && res.body.ok === true; patch({ busy: "", policyPreview: ok ? res.body.detail : null, notice: ok ? { tone: "ok", text: bridgeMessage(res) } : { tone: "bad", text: "策略预览失败:" + bridgeMessage(res) } }); }); } function applyPolicy() { if (selected === null || s.policyPreview === null) return; patch({ busy: "policy-apply" }); bridgeCall("applyPolicy", { scope: "connection", effect: s.policyPreview.mutation.effect, connectorId: selected.connectorId, expectedRevision: s.policyPreview.baseRevision }).then(function(res) { var ok = res.body !== null && res.body.ok === true; patch({ busy: "", policyPreview: null, notice: ok ? { tone: "ok", text: bridgeMessage(res) } : { tone: "bad", text: "策略应用失败:" + bridgeMessage(res) } }); if (ok) bridgeCall("governance", {}).then(function(g) { if (g.body !== null && g.body.ok === true) patch({ gov: g.body.detail }); }); }); } var gov = s.gov; return h$10(Section, { title: "连接配置、范围与治理", hint: "配置编辑使用宿主的保留标记合并,空输入不会清空已有密钥;作用域与策略都带 revision 预览后再提交。", aside: h$10(Btn, { label: open[0] ? "收起" : "展开", ariaLabel: "展开连接配置", variant: "small", onClick: function() { open[1](!open[0]); } }) }, open[0] ? h$10("div", { style: { display: "flex", flexDirection: "column", gap: "12px" } }, itemSelect(items, s.key, choose), s.key === "" ? h$10("p", { style: styles.hint }, "选择一条连接后可编辑配置、调整范围或设置治理策略。") : h$10("div", { style: styles.nested }, h$10("p", { style: styles.hint }, "可编辑配置(保留标记 表示保留原密钥):"), h$10("textarea", { value: s.json, rows: 8, style: Object.assign({}, styles.input, { fontFamily: "monospace", resize: "vertical" }), onChange: function(e) { patch({ json: e.target.value }); } }), h$10("div", { style: styles.actions }, h$10(Btn, { variant: "primary", label: s.busy === "save" ? "保存中…" : "保存配置", disabled: s.busy !== "" || s.json === "", onClick: save })), h$10("p", { style: styles.hint }, "作用域(目标范围 + mode=move,凭据不复制):"), h$10("div", { style: styles.grid }, h$10("div", { style: styles.field }, h$10("span", { style: styles.label }, "目标范围"), h$10("select", { value: s.targetScope, style: styles.input, onChange: function(e) { patch({ targetScope: e.target.value }); } }, h$10("option", { value: "global" }, "全局"), h$10("option", { value: "project" }, "指定工作区"))), s.targetScope === "project" ? h$10(Field$1, { label: "工作区 id", value: s.workspaceId, onChange: function(v) { patch({ workspaceId: v }); } }) : null), h$10("div", { style: styles.actions }, h$10(Btn, { label: s.busy === "scope-preview" ? "预览中…" : "预览作用域", disabled: s.busy !== "", onClick: previewScope }), s.scopePreview === null ? null : h$10(Btn, { variant: "primary", label: s.busy === "scope-apply" ? "应用中…" : "应用作用域(rev " + String(s.scopePreview.baseRevision) + ")", disabled: s.busy !== "" || s.scopePreview.canApply !== true, onClick: applyScope })), s.scopePreview === null ? null : h$10("p", { style: styles.hint }, "影响:" + String(s.scopePreview.impact === void 0 ? "" : JSON.stringify(s.scopePreview.impact)) + ";可应用:" + (s.scopePreview.canApply === true ? "是" : "否") + ";凭据复制:否"), h$10("p", { style: styles.hint }, "治理(当前 connection 级):"), gov === null ? h$10("p", { style: styles.hint }, "治理文档未读取。") : h$10("div", { style: styles.pills }, h$10(Pill$1, { label: "revision", value: gov.revision, tone: "muted" }), h$10(Pill$1, { label: "规则", value: (gov.rules || []).length, tone: "muted" }), h$10(Pill$1, { label: "优先级", value: String(gov.precedenceLabel || "—"), tone: "muted" })), h$10("div", { style: styles.actions }, h$10(Btn, { label: "预览 allow", variant: "small", disabled: s.busy !== "" || selected === null, onClick: function() { previewPolicy("allow"); } }), h$10(Btn, { label: "预览 deny", variant: "small", disabled: s.busy !== "" || selected === null, onClick: function() { previewPolicy("deny"); } }), h$10(Btn, { label: "预览 inherit", variant: "small", disabled: s.busy !== "" || selected === null, onClick: function() { previewPolicy("inherit"); } }), s.policyPreview === null ? null : h$10(Btn, { variant: "primary", label: s.busy === "policy-apply" ? "应用中…" : "应用策略(rev " + String(s.policyPreview.baseRevision) + ")", disabled: s.busy !== "", onClick: applyPolicy }))), s.notice === null ? null : h$10(Banner, { tone: s.notice.tone }, s.notice.text)) : null); } function itemSelect(items, value, onChange) { return h$10("div", { style: styles.field }, h$10("span", { style: styles.label }, "连接"), h$10("select", { value, style: styles.input, onChange: function(e) { onChange(e.target.value); } }, h$10("option", { value: "" }, "选择连接…"), items.map(function(item) { return h$10("option", { key: item.key, value: item.key }, String(item.name || item.key) + "(" + String(item.transport || "") + ")"); }))); } // src-client/sections/ImportSection.tsx const h$9 = react.createElement; function ImportSection(props) { var onImported = props && typeof props.onImported === "function" ? props.onImported : null; var tuple = react.useState({ expanded: false, status: "idle", sources: [], open: {}, busy: "", notice: null, imported: {}, search: "", selection: [], progress: null }); var s = tuple[0]; var set = tuple[1]; function patch(next) { set(function(prev) { return Object.assign({}, prev, next); }); } function load() { patch({ status: "loading", notice: null }); request(API.skills + "/sources", { method: "GET" }).then(function(res) { if (res.body !== null && res.body !== void 0 && res.body.ok === true) patch({ status: "ready", sources: Array.isArray(res.body.sources) ? res.body.sources : [] }); else patch({ status: "error", notice: { tone: "bad", text: bodyError(res, "读取来源失败") } }); }, function(error) { patch({ status: "error", notice: { tone: "bad", text: messageOf(error) } }); }); } function openPanel() { patch({ expanded: true }); if (s.status === "idle" || s.status === "error") load(); } function closePanel() { patch({ expanded: false }); } function dshFolders() { var found = {}; s.sources.forEach(function(source) { if (!source.writable) return; (source.groups || []).forEach(function(group) { (group.skills || []).forEach(function(skill) { found[skill.folder] = true; }); }); }); return found; } function toggleSource(sourceId) { var next = Object.assign({}, s.open); next[sourceId] = !(s.open[sourceId] !== false); patch({ open: next }); } var mine = dshFolders(); var others = s.sources.filter(function(source) { return !source.writable; }); var needle = String(s.search).trim().toLowerCase(); function skillsOf(source) { var list = []; (source.groups || []).forEach(function(group) { (group.skills || []).forEach(function(skill) { list.push(skill); }); }); return list; } function importedYet(skill) { return mine[skill.folder] === true || s.imported[skill.folder] === true; } var candidates = []; others.forEach(function(source) { if (!source.exists) return; skillsOf(source).forEach(function(skill) { candidates.push({ source, skill }); }); }); var matches = needle === "" ? candidates : candidates.filter(function(entry) { return (String(entry.skill.name || "") + " " + String(entry.skill.folder || "") + " " + String(entry.skill.description || "")).toLowerCase().indexOf(needle) >= 0; }); var importable = matches.filter(function(entry) { return !importedYet(entry.skill); }); var alreadyCount = candidates.length - candidates.filter(function(entry) { return !importedYet(entry.skill); }).length; function keyOf(entry) { return String(entry.source.id) + ":" + String(entry.skill.folder); } var chosen = s.selection; function isChosen(entry) { return chosen.indexOf(keyOf(entry)) >= 0; } function chooseMany(list, on) { var next = chosen.slice(); list.forEach(function(entry) { var key = keyOf(entry); var at = next.indexOf(key); if (on === true && at < 0) next.push(key); if (on !== true && at >= 0) next.splice(at, 1); }); patch({ selection: next }); } var chosenEntries = candidates.filter(function(entry) { return chosen.indexOf(keyOf(entry)) >= 0 && !importedYet(entry.skill); }); function importSelected() { var targets = chosenEntries; if (targets.length === 0) return Promise.resolve(); patch({ busy: "batch", notice: null, progress: { done: 0, total: targets.length } }); var done = 0; var failures = []; var importedMap = Object.assign({}, s.imported); var chain = Promise.resolve(); targets.forEach(function(entry) { chain = chain.then(function() { return postJson(API.skills + "/import", { sourceId: entry.source.id, folder: entry.skill.folder }).then(function(res) { if (res.body !== null && res.body !== void 0 && res.body.ok === true) { done += 1; importedMap[entry.skill.folder] = true; } else failures.push(String(entry.skill.name) + "(" + bodyError(res, "失败") + ")"); patch({ progress: { done: done + failures.length, total: targets.length } }); }, function(error) { failures.push(String(entry.skill.name) + "(" + messageOf(error) + ")"); patch({ progress: { done: done + failures.length, total: targets.length } }); }); }); }); return chain.then(function() { patch({ busy: "", progress: null, selection: [], imported: importedMap, notice: { tone: failures.length === 0 ? "ok" : "warn", text: "已导入 " + String(done) + " / " + String(targets.length) + " 个技能到 DSH" + (failures.length === 0 ? "。" : ";失败:" + failures.join("、")) } }); if (onImported !== null) onImported(); load(); }); } if (!s.expanded) return h$9("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", gap: "8px", flexWrap: "wrap" } }, h$9(Btn, { label: "从其他软件导入", ariaLabel: "从其他软件导入", onClick: openPanel }), s.notice === null ? null : h$9(Banner, { tone: s.notice.tone }, s.notice.text)); function describe(skill) { var text = String(skill.description === void 0 || skill.description === null ? "" : skill.description).trim(); if (/^[>|][+-]?$/.test(text)) return ""; return text; } var blocks = others.map(function(source) { var all = skillsOf(source); var visible = matches.filter(function(entry) { return entry.source.id === source.id; }); var open = s.open[source.id] !== false; var selectable = visible.filter(function(entry) { return !importedYet(entry.skill); }); return h$9("div", { key: source.id, style: styles.row }, h$9("div", { style: styles.rowHead }, h$9("span", { style: { display: "inline-flex", alignItems: "center", gap: "8px", minWidth: 0 } }, h$9("span", { style: styles.sourceGlyph }, String(source.label).slice(0, 1)), h$9("span", { style: styles.sourceTitle }, String(source.label)), h$9("span", { style: styles.hint }, source.exists ? String(all.length) + " 个技能" + (needle === "" ? "" : " · 匹配 " + String(visible.length)) + " · 可导入 " + String(selectable.length) : "未安装")), source.exists ? h$9("div", { style: styles.actions }, h$9(Btn, { label: "全选本来源(" + String(selectable.length) + ")", ariaLabel: "全选本来源 " + String(source.label), variant: "small", disabled: selectable.length === 0 || s.busy !== "", onClick: function() { chooseMany(visible, true); } }), h$9(Btn, { label: open ? "收起" : "展开", variant: "small", onClick: function() { toggleSource(source.id); } })) : null), h$9("span", { style: styles.mono }, String(source.root)), !source.exists || !open ? null : visible.length === 0 ? h$9("p", { style: styles.hint }, needle === "" ? "这个来源里还没有技能。" : "没有匹配「" + s.search + "」的技能。") : h$9("div", { style: { display: "flex", flexDirection: "column", gap: "2px", maxHeight: "320px", overflow: "auto" } }, visible.map(function(entry) { var skill = entry.skill; var has = importedYet(skill); return h$9("label", { key: String(skill.folder), style: styles.checkboxRow }, h$9("input", { type: "checkbox", checked: has || isChosen(entry), disabled: has || s.busy !== "", "aria-label": "选择技能 " + String(skill.name), onChange: function(event) { chooseMany([entry], event.target.checked === true); } }), h$9("span", { style: { minWidth: 0, flex: "1 1 auto" } }, h$9("span", { style: styles.rowTitle }, String(skill.name)), describe(skill) === "" ? null : h$9("span", { style: Object.assign({}, styles.hint, styles.clamp1) }, describe(skill))), has ? h$9(Pill$1, { label: "DSH", value: "已导入", tone: "muted" }) : null); }))); }); return h$9(Section, { title: "从其他软件导入", hint: "把其他软件技能目录里的技能复制一份到 DSH,原目录不动;同名技能不能重复导入。", aside: h$9("div", { style: styles.actions }, h$9(Btn, { label: "刷新", variant: "small", onClick: load }), h$9(Btn, { label: "收起", variant: "small", onClick: closePanel })) }, s.status === "loading" ? h$9("p", { style: styles.hint }, "正在读取来源…") : others.length === 0 ? h$9("p", { style: styles.hint }, "没有检测到其他软件的技能目录。") : h$9("div", { style: styles.root }, h$9("div", { style: styles.pills }, h$9(Pill$1, { label: "来源", value: String(others.length), tone: "muted" }), h$9(Pill$1, { label: "可导入", value: String(candidates.length - alreadyCount), tone: "muted" }), s.search === "" ? null : h$9(Pill$1, { label: "匹配", value: String(matches.length), tone: matches.length === 0 ? "muted" : "ok" }), h$9(Pill$1, { label: "已选", value: String(chosenEntries.length), tone: chosenEntries.length === 0 ? "muted" : "ok" }), alreadyCount === 0 ? null : h$9(Pill$1, { label: "已在 DSH", value: String(alreadyCount), tone: "muted" })), h$9("div", { style: { display: "flex", gap: "8px", alignItems: "center", flexWrap: "wrap" } }, h$9("input", { type: "search", style: Object.assign({}, styles.input, { flex: "1 1 220px", minWidth: 0 }), value: s.search, placeholder: "搜索技能:名称 / 目录 / 描述", "aria-label": "搜索要导入的技能", onChange: function(event) { patch({ search: event.target.value }); } }), s.search === "" ? null : h$9(Btn, { label: "清空搜索", variant: "small", onClick: function() { patch({ search: "" }); } })), h$9("div", { style: Object.assign({}, styles.actions, { flexWrap: "wrap" }) }, h$9(Btn, { label: "全选匹配可导入(" + String(importable.length) + ")", ariaLabel: "全选匹配可导入", variant: "small", disabled: importable.length === 0 || s.busy !== "", onClick: function() { chooseMany(importable, true); } }), h$9(Btn, { label: "全选全部(" + String(candidates.length - alreadyCount) + ")", ariaLabel: "全选全部", variant: "small", disabled: candidates.length - alreadyCount === 0 || s.busy !== "", onClick: function() { chooseMany(candidates.filter(function(entry) { return !importedYet(entry.skill); }), true); } }), h$9(Btn, { label: "清空已选", ariaLabel: "清空已选", variant: "small", disabled: chosenEntries.length === 0, onClick: function() { patch({ selection: [] }); } }), h$9(Btn, { variant: "primary", label: s.busy === "batch" ? "导入中…" : "导入所选(" + String(chosenEntries.length) + ")", ariaLabel: "导入所选", disabled: s.busy !== "" || chosenEntries.length === 0, onClick: importSelected })), s.progress === null ? null : h$9("p", { style: styles.hint }, "正在导入:" + String(s.progress.done) + " / " + String(s.progress.total)), h$9("div", { style: { display: "flex", flexDirection: "column", gap: "10px" } }, blocks)), s.notice === null ? null : h$9(Banner, { tone: s.notice.tone }, s.notice.text)); } // src-client/SettingsCard.tsx const h$8 = react.createElement; function findCheck(source, id) { if (source === null || source === void 0 || !Array.isArray(source.checks)) return void 0; for (var index = 0; index < source.checks.length; index += 1) if (source.checks[index] !== null && typeof source.checks[index] === "object" && source.checks[index].id === id) return source.checks[index]; } function SettingsCard() { var snapshotState = react.useState(null); var snapshot = snapshotState[0]; var setSnapshot = snapshotState[1]; var draftState = react.useState(null); var draft = draftState[0]; var setDraft = draftState[1]; var tokenState = react.useState(emptyTokens()); var tokenDraft = tokenState[0]; var setTokenDraft = tokenState[1]; var identityState = react.useState(readStored("identity", "account")); var identity = identityState[0]; var setIdentity = identityState[1]; var loginState = react.useState({ username: "", password: "" }); var loginDraft = loginState[0]; var setLoginDraft = loginState[1]; var loginResultState = react.useState(null); var loginResult = loginResultState[0]; var setLoginResult = loginResultState[1]; var errorState = react.useState(null); var error = errorState[0]; var setError = errorState[1]; var noticeState = react.useState(null); var notice = noticeState[0]; var setNotice = noticeState[1]; var testState = react.useState(null); var testResult = testState[0]; var setTestResult = testState[1]; var busyState = react.useState(""); var busy = busyState[0]; var setBusy = busyState[1]; var tabState = react.useState(readStored("tab", "connection")); var tab = tabState[0]; var setTab = tabState[1]; var advancedState = react.useState(readStored("advanced", "closed") === "open"); var advanced = advancedState[0]; var setAdvanced = advancedState[1]; var skillsState = react.useState({ status: "idle", data: null, error: null, detail: null, uninstall: null, plan: null, selection: [], installUrl: "", search: "", filter: "all", busy: "" }); var skills = skillsState[0]; var setSkills = skillsState[1]; var mcpState = react.useState({ status: "idle", items: [], error: null, tools: {}, busy: "", confirm: null, search: "", filter: "all", selection: [], bulk: null, confirmBulk: false, details: {} }); var mcp = mcpState[0]; var setMcp = mcpState[1]; var treeState = react.useState({ status: "idle", data: null, error: null, busy: "", expanded: {}, openGroups: {}, edit: null, confirm: null, assign: null }); var tree = treeState[0]; var setTree = treeState[1]; function patchSkills(patch) { setSkills(function(previous) { return Object.assign({}, previous, patch); }); } function patchMcp(patch) { setMcp(function(previous) { return Object.assign({}, previous, patch); }); } function patchTree(patch) { setTree(function(previous) { return Object.assign({}, previous, patch); }); } var load = react.useCallback(function(keepDraft) { return request(API.status).then(function(result) { if (result.status !== 200 || result.body === null || result.body.ok !== true) { setError("读取插件状态失败(HTTP " + String(result.status) + "),请重启 DSH 后再试。"); return; } setError(null); setSnapshot(result.body); if (keepDraft !== true) setDraft(pickSettings(result.body.settings)); }).catch(function(failure) { setError("无法连接插件:" + messageOf(failure)); }); }, []); react.useEffect(function() { load(false); var timer = setInterval(function() { if (typeof document !== "undefined" && document.visibilityState === "hidden") return; load(true); }, POLL_MS$2); return function() { clearInterval(timer); }; }, [load]); var dirty = snapshot !== null && draft !== null && JSON.stringify(draft) !== JSON.stringify(pickSettings(snapshot.settings)); react.useEffect(function() { if (!dirty) return void 0; var guard = function(event) { event.preventDefault(); event.returnValue = "有未保存的改动"; return event.returnValue; }; window.addEventListener("beforeunload", guard); return function() { window.removeEventListener("beforeunload", guard); }; }, [dirty]); function patchDraft(patch) { setDraft(function(previous) { return Object.assign({}, previous, patch); }); } function patchTokens(patch) { setTokenDraft(function(previous) { return Object.assign({}, previous, patch); }); } function run(label, task) { setBusy(label); setNotice(null); return Promise.resolve().then(task).catch(function(failure) { setNotice({ tone: "bad", text: messageOf(failure) }); }).then(function() { setBusy(""); }); } function save() { return run("save", function() { var payload = { enabled: draft.enabled, baseUrl: draft.baseUrl, clientId: draft.clientId, requestTimeoutMs: Number(draft.requestTimeoutMs), defaultK: Number(draft.defaultK), summaryEnabled: draft.summaryEnabled, activityEnabled: draft.activityEnabled, memoryEnabled: draft.memoryEnabled, skillsSyncEnabled: draft.skillsSyncEnabled, skillsDir: String(draft.skillsDir).trim() }; if (tokenDraft.activity.trim() !== "") payload.activityToken = tokenDraft.activity.trim(); if (tokenDraft.memory.trim() !== "") payload.memoryToken = tokenDraft.memory.trim(); if (tokenDraft.summary.trim() !== "") payload.summaryToken = tokenDraft.summary.trim(); return request(API.config, { method: "PUT", body: JSON.stringify(payload) }).then(function(result) { if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error("保存失败:" + bodyError(result)); setTokenDraft(emptyTokens()); var cleared = Array.isArray(result.body.credentialsCleared) ? result.body.credentialsCleared : []; setNotice(cleared.length === 0 ? { tone: "ok", text: "已保存到本机配置文件。" } : { tone: "warn", text: "服务地址的 origin 已变更,旧地址的令牌已清除(" + cleared.join("、") + "),请重新登录或填写新令牌。" }); setSnapshot(result.body); setDraft(pickSettings(result.body.settings)); }); }); } function clearToken(which) { return run("clear-" + which, function() { var payload = which === "activity" ? { clearActivityToken: true } : which === "memory" ? { clearMemoryToken: true } : { clearSummaryToken: true }; return request(API.config, { method: "PUT", body: JSON.stringify(payload) }).then(function(result) { if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error("清除令牌失败:" + bodyError(result)); setNotice({ tone: "ok", text: "令牌已清除。" }); setSnapshot(result.body); setDraft(pickSettings(result.body.settings)); }); }); } function test() { return run("test", function() { setTestResult(null); return request(API.test, { method: "POST", body: "{}" }).then(function(result) { if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error("测试失败(HTTP " + String(result.status) + ")"); setTestResult(result.body); load(true); }); }); } function flush() { return run("flush", function() { return request(API.flush, { method: "POST", body: "{}" }).then(function(result) { if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error("重试失败(HTTP " + String(result.status) + ")"); setNotice({ tone: "ok", text: "已重试 " + String(result.body.sent) + " 条,剩余 " + String(result.body.remaining) + " 条。" }); load(true); }); }); } function login() { return run("login", function() { setLoginResult(null); var payload = { username: loginDraft.username.trim(), password: loginDraft.password }; if (payload.username === "" || payload.password === "") throw new Error("请填写用户名和密码"); return request(API.login, { method: "POST", body: JSON.stringify(payload) }).then(function(result) { if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error("登录失败:" + bodyError(result)); setLoginDraft({ username: payload.username, password: "" }); setLoginResult(result.body.login || null); setNotice({ tone: result.body.login !== null && result.body.login !== void 0 && result.body.login.partial === true ? "warn" : "ok", text: "登录成功,已写入可用的令牌。" }); setSnapshot(result.body); setDraft(pickSettings(result.body.settings)); }); }); } function switchIdentity(next) { setIdentity(next); store("identity", next); setLoginResult(null); setNotice(null); } function switchTab(next) { setTab(next); store("tab", next); if (next === "skills" && skills.status === "idle") loadSkills(); if (next === "skills" && tree.status === "idle") loadTree(); if (next === "mcp" && mcp.status === "idle") probeMcp(); } function toggleAdvanced() { setAdvanced(function(previous) { store("advanced", previous ? "closed" : "open"); return !previous; }); } react.useEffect(function() { if (tab === "skills" && skills.status === "idle") loadSkills(); if (tab === "skills" && tree.status === "idle") loadTree(); if (tab === "mcp" && mcp.status === "idle") probeMcp(); }, [ tab, skills.status, mcp.status, tree.status ]); function loadSkills() { patchSkills({ status: "loading", error: null }); return request(API.skills + "/api").then(function(result) { if (result.status !== 200 || result.body === null || result.body.ok !== true) { patchSkills({ status: "error", error: "读取技能列表失败:" + statusText(result.status) }); return; } patchSkills({ status: "ready", data: result.body, error: null }); }).catch(function(failure) { patchSkills({ status: "error", error: "无法读取技能列表:" + messageOf(failure) }); }); } function skillAction(path, payload, label) { patchSkills({ busy: label }); return postJson(API.skills + path, payload).then(function(result) { patchSkills({ busy: "" }); if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error(bodyError(result, statusText(result.status))); return result.body; }).catch(function(failure) { patchSkills({ busy: "" }); patchSkills({ error: messageOf(failure) }); setNotice({ tone: "bad", text: messageOf(failure) }); throw failure; }); } function loadTree() { patchTree({ status: "loading", error: null }); return request(API.skills + "/sources").then(function(result) { if (result.status !== 200 || result.body === null || result.body.ok !== true) { patchTree({ status: "error", error: "读取技能来源失败:" + statusText(result.status) }); return; } patchTree({ status: "ready", data: result.body, error: null }); }).catch(function(failure) { patchTree({ status: "error", error: "无法读取技能来源:" + messageOf(failure) }); }); } function treeAction(path, payload, label) { patchTree({ busy: label }); return postJson(API.skills + path, payload).then(function(result) { patchTree({ busy: "" }); if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error(bodyError(result, statusText(result.status))); return result.body; }).catch(function(failure) { patchTree({ busy: "" }); setNotice({ tone: "bad", text: messageOf(failure) }); return null; }); } function createGroup() { if (tree.edit === null) return Promise.resolve(); var name = String(tree.edit.value === void 0 ? "" : tree.edit.value).trim(); if (name === "") { setNotice({ tone: "bad", text: "请填写分类名。" }); return Promise.resolve(); } return treeAction("/groups/create", { sourceId: tree.edit.sourceId, name }, "create").then(function(body) { if (body === null) return; patchTree({ edit: null }); setNotice({ tone: "ok", text: "已创建分类「" + String(body.name) + "」。" }); return loadTree(); }); } function saveRename() { if (tree.edit === null) return Promise.resolve(); return treeAction("/groups/rename", { sourceId: tree.edit.sourceId, groupId: tree.edit.groupId, name: String(tree.edit.value).trim() }, "rename").then(function(body) { if (body === null) return; patchTree({ edit: null }); return loadTree(); }); } function deleteGroup(sourceId, groupId) { return treeAction("/groups/delete", { sourceId, groupId }, "delete").then(function(body) { if (body === null) return; patchTree({ confirm: null }); setNotice({ tone: "ok", text: "分类已删除," + String(body.released) + " 个技能回到「未分类」;没有删除任何文件。" }); return loadTree(); }); } function openAssign(source, group) { var renameKey = String(source.id) + ":" + group.id; if (tree.assign !== null && tree.assign.sourceId === source.id && tree.assign.groupId === group.id) { patchTree({ assign: null }); return; } patchTree({ openGroups: Object.assign({}, tree.openGroups, { [renameKey]: true }), assign: { sourceId: source.id, groupId: group.id, search: "", selection: (Array.isArray(group.skills) ? group.skills : []).map(function(skill) { return skill.folder; }) } }); } function saveAssign() { if (tree.assign === null) return Promise.resolve(); return treeAction("/groups/assign", { sourceId: tree.assign.sourceId, groupId: tree.assign.groupId, folders: tree.assign.selection }, "assign").then(function(body) { if (body === null) return; patchTree({ assign: null }); return loadTree(); }); } function toggleGroup(sourceId, groupId, enabled) { return treeAction("/groups/toggle", { sourceId, groupId, enabled }, "toggle-group").then(function(body) { if (body === null) return; if (body.cardOnly === true) setNotice({ tone: "warn", text: "这个来源由对应软件自行加载:开关只记录在本卡,不影响它自己的加载。" }); else { var failed = Array.isArray(body.failed) ? body.failed : []; setNotice({ tone: failed.length === 0 ? "ok" : "warn", text: "已" + (enabled ? "启用" : "停用") + " " + String(Array.isArray(body.applied) ? body.applied.length : 0) + " 项" + (failed.length === 0 ? "(新会话生效)。" : "," + String(failed.length) + " 项失败:" + failed.map(function(item) { return String(item.folder) + "(" + String(item.reason) + ")"; }).join("、")) }); } return loadTree(); }); } function openDetail(folder) { patchSkills({ detail: { folder, data: null, error: null } }); return skillAction("/detail", { folder }, "detail").then(function(body) { patchSkills({ detail: { folder, data: body, error: null } }); }, function() { patchSkills({ detail: { folder, data: null, error: "无法读取详情" } }); }); } function toggleSkill(folder, enabled) { return skillAction("/toggle", { folder, enabled }, "toggle").then(function(body) { setNotice({ tone: "ok", text: body.note === void 0 ? "已更新。" : String(body.note) }); return loadSkills(); }, function() {}); } function planUninstall(folder) { return skillAction("/uninstall/plan", { folder }, "uninstall").then(function(body) { patchSkills({ uninstall: body }); }, function() {}); } function confirmUninstall() { if (skills.uninstall === null) return Promise.resolve(); return skillAction("/remove", { folder: skills.uninstall.folder, token: skills.uninstall.token, confirmed: true }, "remove").then(function(body) { patchSkills({ uninstall: null }); setNotice({ tone: "ok", text: "已删除本机技能 " + String(body.folder) + "(" + String(body.files) + " 个文件)。" }); return loadSkills(); }, function() {}); } function prepareInstall() { var url = String(skills.installUrl).trim(); if (url === "") { setNotice({ tone: "bad", text: "请填写 git 仓库地址。" }); return Promise.resolve(); } return skillAction("/install/plan", { url }, "plan").then(function(body) { patchSkills({ plan: body, selection: (body.candidates || []).filter(function(candidate) { return candidate.conflict !== true && candidate.problem === void 0; }).map(function(candidate) { return candidate.folder; }) }); }, function() {}); } function commitInstall() { if (skills.plan === null) return Promise.resolve(); return skillAction("/install/commit", { planId: skills.plan.planId, folders: skills.selection }, "commit").then(function(body) { var installed = Array.isArray(body.installed) ? body.installed : []; var skipped = Array.isArray(body.skipped) ? body.skipped : []; patchSkills({ plan: null, selection: [] }); setNotice({ tone: skipped.length === 0 ? "ok" : "warn", text: "已安装 " + String(installed.length) + " 个技能" + (skipped.length === 0 ? "。" : ",跳过 " + String(skipped.length) + " 个:" + skipped.map(function(item) { return String(item.folder) + "(" + String(item.reason) + ")"; }).join("、")) }); return loadSkills(); }, function() {}); } function cancelInstall() { if (skills.plan === null) return Promise.resolve(); return skillAction("/install/cancel", { planId: skills.plan.planId }, "cancel").then(function() { patchSkills({ plan: null, selection: [] }); }, function() {}); } function mcpCall(method, params) { var controller = typeof AbortController === "function" ? new AbortController() : null; var timer = controller === null ? null : setTimeout(function() { controller.abort(); }, PROBE_TIMEOUT_MS); return fetch(MCP_BRIDGE, { method: "POST", cache: "no-store", headers: { accept: "application/json", "content-type": "application/json" }, body: JSON.stringify({ method, params: params === void 0 ? {} : params }), signal: controller === null ? void 0 : controller.signal }).then(function(response) { if (timer !== null) clearTimeout(timer); return response.json().then(function(body) { return { status: response.status, body }; }, function() { return { status: response.status, body: null }; }); }).catch(function(failure) { if (timer !== null) clearTimeout(timer); return { status: 0, body: null, error: messageOf(failure) }; }); } function probeMcp() { patchMcp({ status: "probe", error: null }); return mcpCall("status", {}).then(function(result) { if (result.status === 200 && result.body !== null && result.body.ok === true && result.body.detail !== void 0) { patchMcp({ status: "ok", items: Array.isArray(result.body.detail.items) ? result.body.detail.items : [], error: null }); return; } patchMcp({ status: "missing", items: [], error: result.status === 0 ? "探测超时或连接被拒绝" : "接口返回 HTTP " + String(result.status) + (result.body !== null && typeof result.body.message === "string" ? ":" + result.body.message : "") }); }); } function mcpAction(label, method, params) { patchMcp({ busy: label }); return mcpCall(method, params).then(function(result) { patchMcp({ busy: "" }); if (result.status !== 200 || result.body === null || result.body.ok !== true) { setNotice({ tone: "bad", text: "MCP 操作失败:" + (result.body !== null && typeof result.body.message === "string" ? result.body.message : "HTTP " + String(result.status)) }); return null; } setNotice({ tone: "ok", text: "MCP 操作已完成:" + label }); return result.body; }); } function loadTools(item) { return mcpAction("读取工具列表", "toolsList", { connectorId: item.connectorId, connectionKey: item.key, cachedOnly: true }).then(function(body) { if (body === null) return; var list = body.detail !== void 0 && Array.isArray(body.detail.tools) ? body.detail.tools : Array.isArray(body.tools) ? body.tools : []; patchMcp(function(previous) { var tools = Object.assign({}, previous.tools); tools[item.key] = { items: list, at: Date.now() }; return Object.assign({}, previous, { tools }); }); }); } function mcpSelected() { return Array.isArray(mcp.selection) ? mcp.selection : []; } function selectMcpMany(list, on) { var next = mcpSelected().slice(); list.forEach(function(item) { var at = next.indexOf(item.key); if (on === true && at < 0) next.push(item.key); if (on !== true && at >= 0) next.splice(at, 1); }); patchMcp({ selection: next, confirmBulk: false }); } function runMcpBulk(actionLabel, method, paramsOf) { var chosen = mcpSelected(); var targets = (Array.isArray(mcp.items) ? mcp.items : []).filter(function(item) { return chosen.indexOf(item.key) >= 0; }); if (targets.length === 0) return Promise.resolve(); patchMcp({ busy: "bulk", confirm: null, confirmBulk: false, bulk: { label: actionLabel, done: 0, total: targets.length } }); var failures = []; var chain = Promise.resolve(); targets.forEach(function(item) { chain = chain.then(function() { return mcpCall(method, paramsOf(item)).then(function(result) { if (!(result.status === 200 && result.body !== null && result.body.ok === true)) { var reason = result.body !== null && typeof result.body.message === "string" ? result.body.message : "HTTP " + String(result.status); failures.push(String(item.name === void 0 ? item.key : item.name) + "(" + reason + ")"); } patchMcp(function(previous) { var bulk = previous.bulk === null || previous.bulk === void 0 ? { label: actionLabel, done: 0, total: targets.length } : Object.assign({}, previous.bulk); bulk.done = (bulk.done === void 0 ? 0 : bulk.done) + 1; return Object.assign({}, previous, { bulk }); }); }, function(failure) { failures.push(String(item.name === void 0 ? item.key : item.name) + "(" + messageOf(failure) + ")"); }); }); }); return chain.then(function() { patchMcp({ busy: "", bulk: null, selection: [], confirmBulk: false }); setNotice({ tone: failures.length === 0 ? "ok" : "warn", text: actionLabel + "完成:成功 " + String(targets.length - failures.length) + " / " + String(targets.length) + " 项" + (failures.length === 0 ? "。" : ";失败:" + failures.join("、")) }); return probeMcp(); }); } if (error !== null && snapshot === null) return h$8("div", { style: styles.root }, h$8(Banner, { tone: "bad" }, error), h$8("div", { style: styles.actions }, h$8(Btn, { label: "重新加载", onClick: function() { load(false); } }))); if (snapshot === null || draft === null) return h$8("div", { style: styles.root }, h$8("p", { style: styles.hint }, "正在读取云端记忆插件状态…")); var reporter = snapshot.reporter === void 0 || snapshot.reporter === null ? {} : snapshot.reporter; var tokens = snapshot.tokens === void 0 || snapshot.tokens === null ? { activity: {}, memory: {}, summary: {} } : snapshot.tokens; var caps = snapshot.capabilities === void 0 || snapshot.capabilities === null ? { features: {} } : snapshot.capabilities; var features = caps.features === void 0 ? {} : caps.features; var checkSource = testResult !== null ? testResult : snapshot.lastCheck === null || snapshot.lastCheck === void 0 ? null : snapshot.lastCheck; var recent = Array.isArray(reporter.recent) ? reporter.recent.slice(0, 8) : []; var activityToken = tokens.activity === void 0 ? {} : tokens.activity; var memoryToken = tokens.memory === void 0 ? {} : tokens.memory; var summaryToken = tokens.summary === void 0 ? {} : tokens.summary; var tokenHint = function(view) { if (view.configured !== true) { if (view.source === "env") return "来自环境变量(DSH_BRAIN_*_TOKEN,绑定当前 origin)"; return; } if (view.source === "env") return "当前:" + String(view.masked) + "(来自环境变量,绑定当前 origin)"; return "当前:" + String(view.masked); }; var checkedAt = checkSource === null ? "—" : formatTime(checkSource.at === void 0 ? checkSource.checkedAt : checkSource.at); var connectivity = !draft.baseUrlConfigured ? { tone: "warn", text: "未配置服务" } : checkSource === null ? { tone: "muted", text: "未测试" } : findCheck(checkSource, "network") === void 0 ? { tone: "muted", text: "未测试" } : findCheck(checkSource, "network").state === "ok" ? { tone: "ok", text: "可达" } : { tone: "bad", text: "不可达" }; var header = h$8("div", { style: styles.section, key: "header" }, h$8("div", { style: styles.sectionHead }, h$8("h4", { style: styles.sectionTitle }, h$8("span", { style: { display: "inline-block", width: "9px", height: "9px", borderRadius: "3px", background: "linear-gradient(135deg, #6366f1, #8b5cf6)", marginRight: "8px", verticalAlign: "1px" } }), "云端记忆 · v" + String(caps.version === void 0 ? "—" : caps.version)), h$8("div", { style: styles.pills }, h$8(Pill$1, { label: "连接", value: connectivity.text, tone: connectivity.tone }), h$8(Pill$1, { label: "最后检查", value: checkedAt, tone: "muted" }), dirty ? h$8(Pill$1, { label: "草稿", value: "未保存", tone: "warn" }) : null)), h$8("div", { style: styles.pills }, h$8(Pill$1, { label: "已上报", value: reporter.recorded === void 0 ? 0 : reporter.recorded, tone: "ok" }), h$8(Pill$1, { label: "待重试", value: reporter.queued === void 0 ? 0 : reporter.queued, tone: reporter.queued > 0 ? "warn" : "muted" }), h$8(Pill$1, { label: "失败", value: reporter.failed === void 0 ? 0 : reporter.failed, tone: reporter.failed > 0 ? "bad" : "muted" }))); var tabBar = h$8(Switch$8, { key: "tabs", ariaLabel: "云端记忆管理页签", value: tab, onChange: switchTab, options: [ { value: "connection", label: "连接与上报" }, { value: "skills", label: "技能管理" }, { value: "mcp", label: "MCP 管理" } ] }); var noticeBox = notice === null ? null : h$8(Banner, { tone: notice.tone, role: "status", key: "notice" }, notice.text); var connectionTab = null; if (tab === "connection") { var changedOrigin = draft.baseUrlConfigured && draft.baseUrlOrigin !== "" && String(draft.baseUrl) !== "" && String(draft.baseUrl).indexOf(draft.baseUrlOrigin) !== 0; connectionTab = h$8("div", { style: styles.root, key: "connection" }, h$8(Section, { title: "身份验证", hint: "两种方式最终更新同一组配置;切换不会清除任何一种方式已保存的凭据,也不会自动发起请求。", aside: h$8(Switch$8, { ariaLabel: "身份验证方式", value: identity, onChange: switchIdentity, options: [{ value: "account", label: "账号登录" }, { value: "token", label: "手动令牌" }] }) }, identity === "account" ? h$8("div", { style: styles.nested }, h$8("p", { style: styles.hint }, "用云端面板的普通用户账号登录,插件会用一次性会话换取活动与记忆令牌并写入本机。密码只在这一次请求里使用:不保存、不写日志、不回显。"), h$8("div", { style: styles.grid }, h$8(Field$1, { label: "用户名", value: loginDraft.username, placeholder: "云端面板的账号", onChange: function(value) { setLoginDraft(function(previous) { return Object.assign({}, previous, { username: value }); }); } }), h$8(Field$1, { label: "密码", type: "password", value: loginDraft.password, placeholder: "只用于本次换取令牌", hint: "成功后自动清空", onChange: function(value) { setLoginDraft(function(previous) { return Object.assign({}, previous, { password: value }); }); } })), h$8("div", { style: styles.actions }, h$8(Btn, { variant: "primary", label: busy === "login" ? "登录中…" : "登录并获取令牌", disabled: busy !== "", onClick: login }), loginResult === null ? null : h$8("span", { style: styles.hint }, "当前账号:" + String(loginResult.user !== void 0 && loginResult.user !== null && loginResult.user.username !== void 0 ? loginResult.user.username : "未知") + (loginResult.warning === void 0 ? "" : "(" + String(loginResult.warning) + ")")))) : h$8("div", { style: styles.nested }, h$8("p", { style: styles.hint }, "三个令牌各有独立权限:activity:write 只用于上报,memory:write 同时允许检索与写入,summary:write 用于自动摘要(可选)。空值表示不修改;清除是独立动作。"), h$8("div", { style: styles.grid }, h$8(Field$1, { label: "活动上报令牌(activity:write)", type: "password", value: tokenDraft.activity, placeholder: activityToken.configured === true ? "已配置 " + String(activityToken.masked) + ",留空表示不修改" : "未配置", hint: tokenHint(activityToken), onChange: function(value) { patchTokens({ activity: value }); } }), h$8(Field$1, { label: "记忆读写令牌(memory:write)", type: "password", value: tokenDraft.memory, placeholder: memoryToken.configured === true ? "已配置 " + String(memoryToken.masked) + ",留空表示不修改" : "未配置", hint: tokenHint(memoryToken), onChange: function(value) { patchTokens({ memory: value }); } }), h$8(Field$1, { label: "摘要令牌(summary:write,可选)", type: "password", value: tokenDraft.summary, placeholder: summaryToken.configured === true ? "已配置 " + String(summaryToken.masked) + ",留空表示不修改" : "未配置", hint: tokenHint(summaryToken), onChange: function(value) { patchTokens({ summary: value }); } })), h$8("div", { style: styles.actions }, h$8(Btn, { label: "清除上报令牌", variant: "small", disabled: activityToken.configured !== true || busy !== "", onClick: function() { clearToken("activity"); } }), h$8(Btn, { label: "清除记忆令牌", variant: "small", disabled: memoryToken.configured !== true || busy !== "", onClick: function() { clearToken("memory"); } }), h$8(Btn, { label: "清除摘要令牌", variant: "small", disabled: summaryToken.configured !== true || busy !== "", onClick: function() { clearToken("summary"); } })))), h$8(Section, { title: "服务地址", hint: "账号登录会把密码发到该地址:仅接受 HTTPS(本机回环除外)。不同 origin 不会复用旧令牌。" }, h$8(Field$1, { label: "服务地址(baseUrl)", value: draft.baseUrl, placeholder: "https://<你的域名>/api/longmemory", hint: changedOrigin ? "地址已改成另一个 origin(当前 " + draft.baseUrlOrigin + "):保存后旧令牌会被清除,需要重新认证。" : "当前 origin:" + (draft.baseUrlOrigin === "" ? "未配置" : draft.baseUrlOrigin), onChange: function(value) { patchDraft({ baseUrl: value }); } }), advanced ? h$8("div", { style: styles.nested }, h$8("div", { style: styles.grid }, h$8(Field$1, { label: "客户端标识(client_id)", value: draft.clientId, onChange: function(value) { patchDraft({ clientId: value }); } }), h$8(Field$1, { label: "请求超时(毫秒)", type: "number", value: draft.requestTimeoutMs, onChange: function(value) { patchDraft({ requestTimeoutMs: value }); } })), h$8("div", { style: styles.checkboxRow }, h$8("input", { type: "checkbox", checked: draft.enabled, id: "dsh-brain-enabled", onChange: function(event) { patchDraft({ enabled: event.target.checked }); } }), h$8("label", { htmlFor: "dsh-brain-enabled", style: styles.label }, "启用每轮活动上报(只上报时间戳、会话 id 与状态,不上传对话内容)")), h$8("div", { style: styles.checkboxRow }, h$8("input", { type: "checkbox", checked: draft.summaryEnabled, id: "dsh-brain-summary", onChange: function(event) { patchDraft({ summaryEnabled: event.target.checked }); } }), h$8("label", { htmlFor: "dsh-brain-summary", style: styles.label }, "启用自动摘要(会把该轮对话文本上传为待确认提案;与上面的元数据上报是两件事)")), h$8("div", { style: styles.checkboxRow }, h$8("input", { type: "checkbox", checked: draft.activityEnabled, id: "dsh-brain-activity", onChange: function(event) { patchDraft({ activityEnabled: event.target.checked }); } }), h$8("label", { htmlFor: "dsh-brain-activity", style: styles.label }, "启用活动上报(细粒度开关;未显式设置时跟随总开关)"))) : h$8("div", { style: styles.actions }, h$8(Btn, { label: "高级设置", variant: "small", onClick: toggleAdvanced }))), h$8(Section, { title: "记忆配置", hint: "只影响记忆工具:开关未显式设置时跟随总开关,检索上限只限制单次返回条数。" }, h$8("div", { style: styles.grid }, h$8(Field$1, { label: "单次搜索返回上限(defaultK)", type: "number", value: draft.defaultK, hint: "只限制一次搜索返回多少条,不限制可搜索的历史范围。默认 10。", onChange: function(value) { patchDraft({ defaultK: value }); } })), h$8("div", { style: styles.checkboxRow }, h$8("input", { type: "checkbox", checked: draft.memoryEnabled, id: "dsh-brain-memory-enabled", onChange: function(event) { patchDraft({ memoryEnabled: event.target.checked }); } }), h$8("label", { htmlFor: "dsh-brain-memory-enabled", style: styles.label }, "启用记忆工具(memory_search / memory_read / memory_add)"))), features.skillsSync === false ? h$8("div", null) : h$8("div", null, h$8(Section, { title: "Skill 同步", hint: "同步由后台定时执行,这里只保存开关与目录;目录留空使用默认位置。" }, h$8(Field$1, { label: "技能目录(skillsDir,可选)", value: draft.skillsDir, placeholder: "默认 $DSH_HOME/skills", hint: "保存后下一次同步生效,无需重启。", onChange: function(value) { patchDraft({ skillsDir: value }); } }), h$8("div", { style: styles.checkboxRow }, h$8("input", { type: "checkbox", checked: draft.skillsSyncEnabled, id: "dsh-brain-skills-sync", onChange: function(event) { patchDraft({ skillsSyncEnabled: event.target.checked }); } }), h$8("label", { htmlFor: "dsh-brain-skills-sync", style: styles.label }, "启用云端技能同步(下载云端技能库、上传本机新技能)")))), h$8(Section, { title: "连接与权限检查", aside: h$8("div", { style: styles.actions }, h$8(Btn, { variant: "primary", label: busy === "save" ? "保存中…" : "保存", disabled: busy !== "", onClick: save }), h$8(Btn, { label: busy === "test" ? "测试中…" : "测试连接", disabled: busy !== "", onClick: test }), h$8(Btn, { label: "重试上报队列", disabled: busy !== "" || reporter.queued === void 0 || reporter.queued === 0, onClick: flush })) }, checkSource === null ? h$8("p", { style: styles.hint }, "还没有检查记录。点「测试连接」做一次只读检查:网络 → 活动权限 → 记忆权限 → 摘要权限。") : h$8("div", { style: styles.pills }, (checkSource.checks || []).map(function(check) { return h$8(Pill$1, { key: String(check.id), label: String(check.label === void 0 ? check.id : check.label), value: CHECK_LABELS[check.state] === void 0 ? String(check.state) : CHECK_LABELS[check.state], tone: CHECK_TONES[check.state] === void 0 ? "muted" : CHECK_TONES[check.state] }); })), checkSource === null ? null : h$8("div", { style: { display: "flex", flexDirection: "column", gap: "6px" } }, (checkSource.checks || []).map(function(check) { return h$8("div", { key: "detail-" + String(check.id), style: Object.assign({}, styles.banner, styles[CHECK_TONES[check.state]] === void 0 ? styles.muted : styles[CHECK_TONES[check.state]]) }, String(check.label === void 0 ? check.id : check.label) + ":" + String(check.message)); })), h$8("p", { style: styles.hint }, "鉴权通过只代表令牌有效,不代表已经成功写入一条上报;两者在下面分开显示。")), h$8(Section, { title: "最近上报" }, recent.length === 0 ? h$8("p", { style: styles.hint }, "还没有记录。发一条消息让它跑完一轮,这里就会出现一条。") : h$8("table", { style: styles.table }, h$8("thead", null, h$8("tr", null, h$8("th", { style: styles.th }, "时间"), h$8("th", { style: styles.th }, "结果"), h$8("th", { style: styles.th }, "turn_id"))), h$8("tbody", null, recent.map(function(row, index) { var outcome = String(row.outcome === void 0 ? "" : row.outcome); return h$8("tr", { key: String(row.turnId) + ":" + String(index) }, h$8("td", { style: styles.td }, formatTime(row.at)), h$8("td", { style: styles.td }, h$8("span", { style: Object.assign({}, styles.pill, styles[OUTCOME_TONES[outcome]] === void 0 ? styles.muted : styles[OUTCOME_TONES[outcome]]) }, OUTCOME_LABELS[outcome] === void 0 ? outcome : OUTCOME_LABELS[outcome])), h$8("td", { style: Object.assign({}, styles.td, styles.mono) }, String(row.turnId === void 0 ? "" : row.turnId))); }))), reporter.lastError === void 0 ? null : h$8("p", { style: styles.hint }, "最近一次错误:" + String(reporter.lastError))), h$8("p", { style: styles.hint }, "配置保存在 " + String(snapshot.settingsPath === void 0 ? "本机配置文件" : snapshot.settingsPath) + "。页面地址 /dsh-brain 仍然可用。")); } var skillsTab = null; if (tab === "skills") { var treeSources = tree.data !== null && Array.isArray(tree.data.sources) ? tree.data.sources : []; var keyword = String(skills.search).trim().toLowerCase(); var matchesSkill = function(skill) { if (keyword === "") return true; return (String(skill.folder) + " " + String(skill.name) + " " + String(skill.description)).toLowerCase().indexOf(keyword) >= 0; }; var visibleGroupsOf = function(source) { return (Array.isArray(source.groups) ? source.groups : []).map(function(group) { var visible = (Array.isArray(group.skills) ? group.skills : []).filter(matchesSkill); return Object.assign({}, group, { visible }); }).filter(function(group) { return group.visible.length > 0 || keyword === ""; }); }; var detailBox = null; if (skills.detail !== null) { var detail = skills.detail.data; detailBox = h$8("div", { style: styles.row }, h$8("div", { style: styles.rowHead }, h$8("span", { style: styles.rowTitle }, "详情:" + String(skills.detail.folder)), h$8(Btn, { label: "关闭", variant: "small", onClick: function() { patchSkills({ detail: null }); } })), detail === null ? h$8("p", { style: styles.hint }, skills.detail.error === null ? "正在读取…" : String(skills.detail.error)) : h$8("div", { style: styles.nested }, h$8("div", { style: styles.grid }, h$8(Field$1, { label: "目录", value: String(detail.dir), onChange: function() {} }), h$8(Field$1, { label: "SKILL.md 哈希", value: String(detail.skill !== void 0 ? detail.skill.skillSha256 : ""), onChange: function() {} })), h$8("p", { style: styles.hint }, "文件:" + String(Array.isArray(detail.files) ? detail.files.length : 0) + " 个,共 " + formatBytes(detail.totalBytes) + (detail.truncated ? "(SKILL.md 过长,已截断显示)" : "")), h$8("pre", { style: styles.code }, String(detail.skillMd === void 0 ? "" : detail.skillMd)), h$8("p", { style: styles.hint }, "文件清单:" + (Array.isArray(detail.files) ? detail.files.map(function(file) { return String(file.path) + (file.script ? "(脚本)" : ""); }).join("、") : "")))); } var uninstallBox = null; if (skills.uninstall !== null) uninstallBox = h$8("div", { style: Object.assign({}, styles.row, styles.warn) }, h$8("div", { style: styles.rowHead }, h$8("span", { style: styles.rowTitle }, "卸载确认:" + String(skills.uninstall.folder))), h$8("p", { style: styles.hint }, "将实际删除:" + String(skills.uninstall.dir) + ";影响:" + String(skills.uninstall.files) + " 个文件 / " + formatBytes(skills.uninstall.bytes) + (Array.isArray(skills.uninstall.scripts) && skills.uninstall.scripts.length > 0 ? ";含脚本:" + skills.uninstall.scripts.join("、") : "")), h$8("p", { style: styles.hint }, String(skills.uninstall.note)), h$8("div", { style: styles.actions }, h$8(Btn, { variant: "danger", label: tree.busy === "uninstall" ? "删除中…" : "确认删除(不可恢复)", disabled: tree.busy !== "", onClick: confirmUninstall }), h$8(Btn, { label: "取消", disabled: tree.busy !== "", onClick: function() { patchSkills({ uninstall: null }); } }))); var planBox = null; if (skills.plan !== null) { var candidates = Array.isArray(skills.plan.candidates) ? skills.plan.candidates : []; planBox = h$8("div", { style: styles.row }, h$8("div", { style: styles.rowHead }, h$8("span", { style: styles.rowTitle }, "安装预览:" + String(skills.plan.url))), h$8("p", { style: styles.hint }, "计划 " + String(skills.plan.planId) + " 有效到 " + formatTime(skills.plan.expiresAt) + "。默认不勾选冲突项;只安装勾选的技能,来源中的安装脚本不会执行。"), h$8("div", { style: { display: "flex", flexDirection: "column", gap: "6px" } }, candidates.map(function(candidate) { var selected = skills.selection.indexOf(candidate.folder) >= 0; var blocked = candidate.conflict === true || candidate.problem !== void 0; return h$8("label", { key: String(candidate.id), style: styles.checkboxRow }, h$8("input", { type: "checkbox", checked: selected, disabled: blocked, onChange: function(event) { var next = skills.selection.slice(); var at = next.indexOf(candidate.folder); if (event.target.checked && at < 0) next.push(candidate.folder); if (!event.target.checked && at >= 0) next.splice(at, 1); patchSkills({ selection: next }); } }), h$8("span", { style: { minWidth: 0 } }, h$8("span", { style: { fontWeight: 600 } }, String(candidate.name)), h$8("span", { style: styles.hint }, " · " + String(candidate.folder) + " · " + String(candidate.files) + " 个文件 · " + formatBytes(candidate.bytes) + (candidate.conflict === true ? " · 已存在(" + String(candidate.conflictLocation === "holding" ? "已停用目录" : "技能目录") + "),不覆盖" : "") + (candidate.problem === void 0 ? "" : " · " + String(candidate.problem)) + (Array.isArray(candidate.scripts) && candidate.scripts.length > 0 ? " · 含脚本:" + candidate.scripts.join("、") : "")))); })), h$8("div", { style: styles.actions }, h$8(Btn, { variant: "primary", label: tree.busy === "commit" ? "安装中…" : "安装所选(" + String(skills.selection.length) + ")", disabled: tree.busy !== "" || skills.selection.length === 0, onClick: commitInstall }), h$8(Btn, { label: "放弃计划", variant: "small", disabled: tree.busy !== "", onClick: cancelInstall }))); } var assignBox = null; if (tree.assign !== null) { var assignSource = treeSources.find(function(source) { return source.id === tree.assign.sourceId; }); var assignGroup = assignSource === void 0 ? void 0 : (assignSource.groups || []).find(function(group) { return group.id === tree.assign.groupId; }); var assignable = []; if (assignSource !== void 0) (assignSource.groups || []).forEach(function(group) { (group.skills || []).forEach(function(skill) { if (!assignable.some(function(item) { return item.folder === skill.folder; })) assignable.push(skill); }); }); var assignSearch = String(tree.assign.search === void 0 ? "" : tree.assign.search); var assignNeedle = assignSearch.trim().toLowerCase(); var filteredAssignable = assignNeedle === "" ? assignable : assignable.filter(function(skill) { return (String(skill.name || "") + " " + String(skill.folder || "") + " " + String(skill.description || "")).toLowerCase().indexOf(assignNeedle) >= 0; }); var selectedCount = tree.assign.selection.length; var matchedSelected = 0; filteredAssignable.forEach(function(skill) { if (tree.assign.selection.indexOf(skill.folder) >= 0) matchedSelected += 1; }); function setSelection(next) { patchTree({ assign: Object.assign({}, tree.assign, { selection: next }) }); } function setSelectionFilter(value) { patchTree({ assign: Object.assign({}, tree.assign, { search: value }) }); } function selectMany(list, on) { var next = tree.assign.selection.slice(); list.forEach(function(skill) { var at = next.indexOf(skill.folder); if (on && at < 0) next.push(skill.folder); if (!on && at >= 0) next.splice(at, 1); }); setSelection(next); } assignBox = h$8("div", { style: styles.row }, h$8("div", { style: styles.rowHead }, h$8("span", { style: styles.rowTitle }, "加入分类:" + String(assignGroup === void 0 ? "" : assignGroup.name)), h$8("div", { style: styles.pills }, h$8(Pill$1, { label: "可分配", value: String(assignable.length), tone: "muted" }), h$8(Pill$1, { label: "匹配", value: String(filteredAssignable.length), tone: filteredAssignable.length === 0 ? "muted" : "ok" }), h$8(Pill$1, { label: "已选", value: String(selectedCount), tone: selectedCount === 0 ? "muted" : "ok" }))), h$8("p", { style: styles.hint }, "先搜索再勾选,或直接「全选匹配结果」一次性加入;一个技能只会属于一个分类,取消勾选即回到「未分类」。"), h$8("div", { style: { display: "flex", gap: "8px", alignItems: "center", flexWrap: "wrap" } }, h$8("input", { type: "search", style: Object.assign({}, styles.input, { flex: "1 1 200px", minWidth: 0 }), value: assignSearch, autoFocus: true, placeholder: "搜索技能:名称 / 目录 / 描述", "aria-label": "搜索要加入分类的技能", onChange: function(event) { setSelectionFilter(event.target.value); } }), assignSearch !== "" ? h$8(Btn, { label: "清空搜索", variant: "small", onClick: function() { setSelectionFilter(""); } }) : null), h$8("div", { style: Object.assign({}, styles.actions, { flexWrap: "wrap" }) }, h$8(Btn, { label: "全选匹配结果(" + String(filteredAssignable.length) + ")", variant: "small", disabled: tree.busy !== "" || filteredAssignable.length === 0, onClick: function() { selectMany(filteredAssignable, true); } }), h$8(Btn, { label: "全选全部(" + String(assignable.length) + ")", variant: "small", disabled: tree.busy !== "" || assignable.length === 0 || selectedCount === assignable.length, onClick: function() { selectMany(assignable, true); } }), h$8(Btn, { label: "取消勾选匹配项(" + String(matchedSelected) + ")", variant: "small", disabled: tree.busy !== "" || matchedSelected === 0, onClick: function() { selectMany(filteredAssignable, false); } }), h$8(Btn, { label: "清空已选", variant: "small", disabled: tree.busy !== "" || selectedCount === 0, onClick: function() { setSelection([]); } })), filteredAssignable.length === 0 ? h$8("p", { style: styles.hint }, assignable.length === 0 ? "当前来源还没有可分配的技能。" : "没有匹配「" + assignSearch + "」的技能。换个关键词,或点「清空搜索」看全部。") : h$8("div", { style: { display: "flex", flexDirection: "column", gap: "4px", maxHeight: "260px", overflow: "auto" } }, filteredAssignable.map(function(skill) { var checked = tree.assign.selection.indexOf(skill.folder) >= 0; return h$8("label", { key: String(skill.folder), style: styles.checkboxRow }, h$8("input", { type: "checkbox", checked, onChange: function(event) { selectMany([skill], event.target.checked === true); } }), h$8("span", { style: { minWidth: 0 } }, String(skill.name) + " ", h$8("span", { style: styles.hint }, "· " + String(skill.folder) + (skill.description ? " · " + String(skill.description) : "")))); })), h$8("div", { style: styles.actions }, h$8(Btn, { variant: "primary", label: "保存分类(" + String(selectedCount) + ")", disabled: tree.busy !== "", onClick: function() { saveAssign(); } }), h$8(Btn, { label: "取消", disabled: tree.busy !== "", onClick: function() { patchTree({ assign: null }); } }))); } var renderSkillRow = function(source, skill) { var writable = source.writable === true; return h$8("div", { key: String(source.id) + ":" + String(skill.folder), style: styles.skillRow }, h$8("div", { style: { display: "flex", alignItems: "baseline", gap: "8px", minWidth: 0, flex: "1 1 auto", cursor: writable ? "pointer" : "default" }, title: writable ? "查看详情" : void 0, onClick: writable ? function() { openDetail(skill.folder); } : void 0 }, h$8("span", { style: Object.assign({}, styles.rowTitle, { flex: "0 0 auto" }) }, String(skill.name)), skill.description === "" ? null : h$8("span", { style: Object.assign({}, styles.hint, styles.clamp1, { minWidth: 0 }) }, String(skill.description))), h$8("div", { style: { display: "flex", alignItems: "center", gap: "6px", flex: "0 0 auto" } }, skill.enabledEditable !== true ? h$8("span", { style: styles.hint }, "只读") : null, writable ? h$8(IconBtn, { glyph: "🗑", danger: true, ariaLabel: "卸载 " + String(skill.name), disabled: tree.busy !== "", onClick: function() { planUninstall(skill.folder); } }) : null, skill.enabledEditable !== true ? null : h$8(Toggle, { checked: skill.enabled === true, disabled: tree.busy !== "", label: "技能 " + String(skill.name) + " 启停", onChange: function() { toggleSkill(skill.folder, skill.enabled !== true); } }))); }; var renderGroup = function(source, group) { var open = tree.openGroups[String(source.id) + ":" + group.id] === true; var renameKey = String(source.id) + ":" + group.id; var renaming = tree.edit !== null && tree.edit.kind === "rename" && tree.edit.key === renameKey; var confirming = tree.confirm === renameKey; var assigning = tree.assign !== null && tree.assign.sourceId === source.id && tree.assign.groupId === group.id; var groupSkills = group.visible === void 0 ? group.skills || [] : group.visible; return h$8("div", { key: renameKey, style: styles.groupRow }, h$8("div", { style: styles.rowHead }, h$8("div", { style: { display: "flex", alignItems: "center", gap: "6px", minWidth: 0, flexWrap: "wrap" } }, h$8(Btn, { label: open ? "▾" : "▸", variant: "small", ariaLabel: "展开或收起 " + String(group.name), onClick: function() { patchTree({ openGroups: Object.assign({}, tree.openGroups, { [renameKey]: !open }) }); } }), h$8("span", { style: styles.folderGlyph }, "📁"), renaming ? h$8("input", { style: Object.assign({}, styles.input, { width: "160px" }), value: tree.edit.value, autoFocus: true, onChange: function(event) { patchTree({ edit: Object.assign({}, tree.edit, { value: event.target.value }) }); } }) : h$8("span", { style: styles.rowTitle }, String(group.name)), h$8("span", { style: styles.hint }, String(group.total) + " 项 · " + String(group.enabledCount) + "/" + String(group.total) + " 启用"), group.cardOnly === true ? h$8(Pill$1, { label: "开关", value: "仅本卡", tone: "muted" }) : null), h$8("div", { style: styles.actions }, renaming ? h$8(Btn, { label: "保存", variant: "small", disabled: tree.busy !== "", onClick: saveRename }) : h$8(IconBtn, { glyph: "+", ariaLabel: "把技能加入 " + String(group.name), disabled: tree.busy !== "" || group.id === "unassigned", onClick: function() { openAssign(source, group); } }), renaming ? h$8(Btn, { label: "取消", variant: "small", onClick: function() { patchTree({ edit: null }); } }) : h$8(IconBtn, { glyph: "✎", ariaLabel: "重命名 " + String(group.name), disabled: tree.busy !== "" || group.id === "unassigned", onClick: function() { patchTree({ edit: { kind: "rename", key: renameKey, sourceId: source.id, groupId: group.id, value: String(group.name) } }); } }), confirming ? h$8(Btn, { label: "确认删除分类", variant: "danger", disabled: tree.busy !== "", onClick: function() { deleteGroup(source.id, group.id); } }) : h$8(IconBtn, { glyph: "🗑", danger: true, ariaLabel: "删除分类 " + String(group.name) + "(技能回到未分类)", disabled: tree.busy !== "" || group.id === "unassigned", onClick: function() { patchTree({ confirm: renameKey }); setNotice({ tone: "warn", text: "删除分类只删除分组记录,里面的技能会回到「未分类」,文件不会被删除。再点一次确认。" }); } }), group.enabledEditable === false ? null : h$8(Toggle, { checked: group.enabled !== false, disabled: tree.busy !== "", label: "分类 " + String(group.name) + " 启停", onChange: function() { toggleGroup(source.id, group.id, group.enabled === false); } }))), assigning ? h$8("div", { style: styles.nested }, assignBox) : null, open ? h$8("div", { style: styles.nested }, groupSkills.length === 0 ? assigning ? null : h$8("p", { style: styles.hint }, group.id === "unassigned" ? "没有未分类的技能。" : "这个分类还没有技能,点「+」加入。") : groupSkills.map(function(skill) { return renderSkillRow(source, skill); })) : null); }; var dshSource = treeSources.find(function(src) { return src.writable === true; }); skillsTab = h$8("div", { style: styles.root, key: "skills" }, h$8(ImportSection, { onImported: function() { loadTree(); loadSkills(); } }), h$8(Section, { title: "技能文件夹", hint: "按软件来源分组;展开来源与分类查看技能。" }, dshSource === void 0 ? null : h$8("div", { style: styles.statsBar }, h$8("span", { style: styles.stat }, h$8("span", { style: styles.statNum }, String(dshSource.total || 0)), h$8("span", { style: styles.hint }, "个技能")), h$8("span", { style: styles.stat }, h$8("span", { style: styles.statNum }, String(dshSource.enabledCount || 0)), h$8("span", { style: styles.hint }, "个已启用")), h$8("span", { style: styles.statLast }, h$8("span", { style: styles.statNum }, String((dshSource.total || 0) - (dshSource.enabledCount || 0))), h$8("span", { style: styles.hint }, "个已停用"))), h$8("div", { style: { display: "flex", gap: "8px", alignItems: "flex-end", flexWrap: "wrap" } }, h$8("div", { style: { flex: "1 1 220px", minWidth: 0 } }, h$8(Field$1, { label: "搜索", value: skills.search, placeholder: "按名称、目录或描述筛选", onChange: function(value) { patchSkills({ search: value }); } })), h$8(Btn, { label: tree.status === "loading" ? "刷新中…" : "刷新", variant: "small", disabled: tree.status === "loading", onClick: function() { loadTree(); loadSkills(); } })), tree.error === null ? null : h$8(Banner, { tone: "bad" }, tree.error), tree.status === "loading" && tree.data === null ? h$8("p", { style: styles.hint }, "正在读取技能来源…") : null, tree.status === "ready" && treeSources.length === 0 ? h$8("p", { style: styles.hint }, "没有探测到任何技能来源。") : null, dshSource === void 0 ? null : h$8("div", { style: { display: "flex", flexDirection: "column", gap: "2px" } }, visibleGroupsOf(dshSource).map(function(group) { return renderGroup(dshSource, group); }), tree.edit !== null && tree.edit.kind === "create" && tree.edit.sourceId === dshSource.id ? h$8("div", { style: Object.assign({}, styles.row, { flexDirection: "row", alignItems: "center", flexWrap: "wrap", marginTop: "6px" }) }, h$8("input", { style: Object.assign({}, styles.input, { width: "180px" }), placeholder: "分类名称,例如 QQ-Skill", value: tree.edit.value, autoFocus: true, onChange: function(event) { patchTree({ edit: Object.assign({}, tree.edit, { value: event.target.value }) }); } }), h$8(Btn, { label: "创建分类", variant: "primary", disabled: tree.busy !== "", onClick: createGroup }), h$8(Btn, { label: "取消", onClick: function() { patchTree({ edit: null }); } })) : h$8("div", { style: { marginTop: "6px" } }, h$8(Btn, { label: "+ 新建分类", variant: "small", disabled: tree.busy !== "", onClick: function() { patchTree({ edit: { kind: "create", sourceId: dshSource.id, value: "" } }); } }))), tree.data !== null && tree.data.note !== void 0 ? h$8("p", { style: styles.hint }, String(tree.data.note)) : null), detailBox, uninstallBox, h$8(Section, { title: "从 Git 仓库安装", hint: "先克隆到隔离暂存目录并列出候选技能,确认后才写入 DSH 技能目录;不执行仓库里的任何脚本,符号链接不会跟随。仓库地址只接受 https:// 或 file://。" }, h$8("div", { style: styles.grid }, h$8(Field$1, { label: "仓库地址", value: skills.installUrl, placeholder: "https://github.com//.git", onChange: function(value) { patchSkills({ installUrl: value }); } })), h$8("div", { style: styles.actions }, h$8(Btn, { variant: "primary", label: skills.busy === "plan" ? "拉取中…" : "拉取并预览", disabled: skills.busy !== "", onClick: prepareInstall })), planBox), h$8(MarketSection, { capabilities: caps, onInstalled: function() { loadTree(); loadSkills(); } }), h$8(SyncResolveSection, { onResolved: function() { loadSkills(); } })); } var mcpTab = null; if (tab === "mcp") { var items = Array.isArray(mcp.items) ? mcp.items : []; var mcpSearch = String(mcp.search === void 0 ? "" : mcp.search); var mcpNeedle = mcpSearch.trim().toLowerCase(); var mcpFilter = String(mcp.filter === void 0 ? "all" : mcp.filter); var mcpChosen = Array.isArray(mcp.selection) ? mcp.selection : []; var mcpBulk = mcp.bulk === null || mcp.bulk === void 0 ? null : mcp.bulk; var stateOf = function(item) { return String(item.connectionState === void 0 ? "unknown" : item.connectionState); }; var isProblem = function(item) { var state = stateOf(item); return state !== "connected" && state !== "disabled"; }; var haystackOf = function(item) { var state = stateOf(item); return [ item.name, item.key, item.transport, item.authMode, item.injectionLabel, MCP_STATE_LABELS[state] === void 0 ? state : MCP_STATE_LABELS[state], item.lastError, item.scope === void 0 || item.scope === null ? "" : item.scope.visibility ].map(function(value) { return String(value === void 0 || value === null ? "" : value); }).join(" ").toLowerCase(); }; var matchesMcp = function(item) { if (mcpFilter === "connected" && stateOf(item) !== "connected") return false; if (mcpFilter === "disabled" && !(item.enabled === false || stateOf(item) === "disabled")) return false; if (mcpFilter === "problem" && !isProblem(item)) return false; if (mcpNeedle === "") return true; return haystackOf(item).indexOf(mcpNeedle) >= 0; }; var visibleItems = items.filter(matchesMcp); var mcpCounts = { connected: items.filter(function(item) { return stateOf(item) === "connected"; }).length, disabled: items.filter(function(item) { return item.enabled === false || stateOf(item) === "disabled"; }).length, problem: items.filter(isProblem).length }; var matchedSelected = visibleItems.filter(function(item) { return mcpChosen.indexOf(item.key) >= 0; }).length; var bridgeBox = null; if (mcp.status === "missing") bridgeBox = h$8(Banner, { tone: "warn" }, "MCP 管理当前不可用:没有探测到宿主 dsh-mcp-connector 的公开接口(" + MCP_BRIDGE + ")。" + (mcp.error === null ? "" : "原因:" + String(mcp.error)) + "。自定义 MCP Server 的权威位置仍是「设置 → 插件配置 → MCP 服务器配置」,本卡不会修改它的托管配置。"); mcpTab = h$8("div", { style: styles.root, key: "mcp" }, h$8(Section, { title: "我的连接", hint: "数据来自宿主 dsh-mcp-connector 插件(同一 origin 的公开接口);本卡不保存任何 MCP 凭据,也不回显启动命令与密钥。", aside: h$8(Btn, { label: mcp.status === "probe" ? "探测中…" : "重新探测", variant: "small", disabled: mcp.busy !== "", onClick: probeMcp }) }, bridgeBox, mcp.status === "ok" && items.length === 0 ? h$8("p", { style: styles.hint }, "宿主还没有登记任何 MCP 连接。") : null, mcp.status === "ok" && items.length > 0 ? h$8("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, h$8("div", { style: styles.pills }, h$8(Pill$1, { label: "共", value: String(items.length), tone: "muted" }), h$8(Pill$1, { label: "匹配", value: String(visibleItems.length), tone: visibleItems.length === 0 ? "muted" : "ok" }), h$8(Pill$1, { label: "已选", value: String(mcpChosen.length), tone: mcpChosen.length === 0 ? "muted" : "ok" }), h$8(Pill$1, { label: "已连接", value: String(mcpCounts.connected), tone: "ok" }), h$8(Pill$1, { label: "异常", value: String(mcpCounts.problem), tone: mcpCounts.problem === 0 ? "muted" : "warn" })), h$8("div", { style: { display: "flex", gap: "8px", alignItems: "center", flexWrap: "wrap" } }, h$8("input", { type: "search", style: Object.assign({}, styles.input, { flex: "1 1 220px", minWidth: 0 }), value: mcpSearch, placeholder: "搜索连接:名称 / key / 传输 / 鉴权 / 状态", "aria-label": "搜索 MCP 连接", onChange: function(event) { patchMcp({ search: event.target.value }); } }), mcpSearch !== "" ? h$8(Btn, { label: "清空搜索", variant: "small", onClick: function() { patchMcp({ search: "" }); } }) : null), h$8("div", { style: Object.assign({}, styles.actions, { flexWrap: "wrap" }) }, h$8(Btn, { label: "筛选:全部(" + String(items.length) + ")", variant: mcpFilter === "all" ? "primary" : "small", onClick: function() { patchMcp({ filter: "all" }); } }), h$8(Btn, { label: "已连接(" + String(mcpCounts.connected) + ")", variant: mcpFilter === "connected" ? "primary" : "small", onClick: function() { patchMcp({ filter: "connected" }); } }), h$8(Btn, { label: "已停用(" + String(mcpCounts.disabled) + ")", variant: mcpFilter === "disabled" ? "primary" : "small", onClick: function() { patchMcp({ filter: "disabled" }); } }), h$8(Btn, { label: "异常(" + String(mcpCounts.problem) + ")", variant: mcpFilter === "problem" ? "primary" : "small", onClick: function() { patchMcp({ filter: "problem" }); } })), h$8("div", { style: Object.assign({}, styles.actions, { flexWrap: "wrap" }) }, h$8(Btn, { label: "全选匹配结果(" + String(visibleItems.length) + ")", ariaLabel: "全选匹配结果", variant: "small", disabled: visibleItems.length === 0, onClick: function() { selectMcpMany(visibleItems, true); } }), h$8(Btn, { label: "全选全部(" + String(items.length) + ")", ariaLabel: "全选全部", variant: "small", disabled: items.length === 0 || mcpChosen.length === items.length, onClick: function() { selectMcpMany(items, true); } }), h$8(Btn, { label: "取消勾选匹配项(" + String(matchedSelected) + ")", ariaLabel: "取消勾选匹配项", variant: "small", disabled: matchedSelected === 0, onClick: function() { selectMcpMany(visibleItems, false); } }), h$8(Btn, { label: "清空已选", ariaLabel: "清空已选", variant: "small", disabled: mcpChosen.length === 0, onClick: function() { patchMcp({ selection: [], confirmBulk: false }); } })), mcpChosen.length === 0 ? h$8("p", { style: styles.hint }, "勾选左侧连接后,这里会出现批量健康检查、启停、重连与移除。") : h$8("div", { style: Object.assign({}, styles.actions, { flexWrap: "wrap" }) }, h$8("span", { style: styles.hint }, "批量操作(已选 " + String(mcpChosen.length) + "):"), h$8(Btn, { label: "健康检查", ariaLabel: "批量健康检查", variant: "small", disabled: mcp.busy !== "", onClick: function() { runMcpBulk("批量健康检查", "healthCheck", function(item) { return { connectorId: item.connectorId }; }); } }), h$8(Btn, { label: "启用", ariaLabel: "批量启用", variant: "small", disabled: mcp.busy !== "", onClick: function() { runMcpBulk("批量启用", "setEnabled", function(item) { return { key: item.key, enabled: true }; }); } }), h$8(Btn, { label: "停用", ariaLabel: "批量停用", variant: "small", disabled: mcp.busy !== "", onClick: function() { runMcpBulk("批量停用", "setEnabled", function(item) { return { key: item.key, enabled: false }; }); } }), h$8(Btn, { label: "重连", ariaLabel: "批量重连", variant: "small", disabled: mcp.busy !== "", onClick: function() { runMcpBulk("批量重连", "reconnect", function(item) { return { key: item.key }; }); } }), mcp.confirmBulk === true ? h$8(Btn, { label: "确认移除(" + String(mcpChosen.length) + ")", ariaLabel: "确认批量移除", variant: "danger", disabled: mcp.busy !== "", onClick: function() { runMcpBulk("批量移除", "disconnect", function(item) { return { key: item.key }; }); } }) : h$8(Btn, { label: "移除…", ariaLabel: "批量移除", variant: "small", disabled: mcp.busy !== "", onClick: function() { patchMcp({ confirmBulk: true }); setNotice({ tone: "warn", text: "批量移除会断开所选 " + String(mcpChosen.length) + " 条连接定义;再点一次「确认移除」才执行。" }); } })), mcpBulk === null ? null : h$8("p", { style: styles.hint }, String(mcpBulk.label) + " 进行中:" + String(mcpBulk.done) + " / " + String(mcpBulk.total)), visibleItems.length === 0 ? h$8("p", { style: styles.hint }, "没有匹配「" + mcpSearch + "」的连接。换个关键词或切回「全部」筛选。") : null, visibleItems.map(function(item) { var state = stateOf(item); var tools = mcp.tools[item.key]; var details = mcp.details === null || mcp.details === void 0 ? {} : mcp.details; var open = details[item.key] === true; var label = String(item.name === void 0 ? item.key : item.name); return h$8("div", { key: String(item.key), style: styles.row }, h$8("div", { style: styles.rowHead }, h$8("label", { style: { display: "inline-flex", alignItems: "center", gap: "8px", minWidth: 0, flex: "1 1 auto" } }, h$8("input", { type: "checkbox", checked: mcpChosen.indexOf(item.key) >= 0, "aria-label": "选择连接 " + label, onChange: function(event) { selectMcpMany([item], event.target.checked === true); } }), h$8("span", { style: styles.rowTitle }, label), h$8(Pill$1, { label: "状态", value: MCP_STATE_LABELS[state] === void 0 ? state : MCP_STATE_LABELS[state], tone: state === "connected" ? "ok" : state === "disabled" ? "muted" : "warn" }), h$8(Pill$1, { label: "传输", value: String(item.transport === void 0 ? "—" : item.transport), tone: "muted" })), h$8(Btn, { label: open ? "收起" : "详情", ariaLabel: (open ? "收起详情 " : "详情 ") + label, variant: "small", onClick: function() { patchMcp({ details: Object.assign({}, details, { [String(item.key)]: !open }) }); } })), open ? h$8("div", { style: { display: "flex", flexDirection: "column", gap: "6px" } }, h$8("div", { style: styles.pills }, h$8(Pill$1, { label: "鉴权", value: String(item.authMode === void 0 ? "none" : item.authMode), tone: "muted" }), h$8(Pill$1, { label: "注入", value: String(item.injectionLabel === void 0 ? "—" : item.injectionLabel), tone: "muted" }), h$8(Pill$1, { label: "范围", value: item.scope === void 0 || item.scope === null ? "未知" : String(item.scope.visibility === void 0 ? JSON.stringify(item.scope) : item.scope.visibility), tone: "muted" }), h$8(Pill$1, { label: "健康检查", value: formatIso(item.healthCheckedAt), tone: "muted" })), item.lastError === null || item.lastError === void 0 ? null : h$8("p", { style: styles.hint }, "最近错误:" + String(item.lastError)), h$8("div", { style: styles.actions }, h$8(Btn, { label: "健康检查", ariaLabel: "健康检查 " + label, variant: "small", disabled: mcp.busy !== "", onClick: function() { mcpAction("健康检查 " + label, "healthCheck", { connectorId: item.connectorId }).then(function() { probeMcp(); }); } }), h$8(Btn, { label: "工具列表", ariaLabel: "工具列表 " + label, variant: "small", disabled: mcp.busy !== "", onClick: function() { loadTools(item); } }), h$8(Btn, { label: item.enabled === false ? "启用" : "停用", ariaLabel: "启停 " + label, variant: "small", disabled: mcp.busy !== "", onClick: function() { mcpAction(item.enabled === false ? "启用连接" : "停用连接", "setEnabled", { key: item.key, enabled: item.enabled === false }).then(function() { probeMcp(); }); } }), h$8(Btn, { label: "重连", ariaLabel: "重连 " + label, variant: "small", disabled: mcp.busy !== "", onClick: function() { mcpAction("重连", "reconnect", { key: item.key }).then(function() { probeMcp(); }); } }), mcp.confirm === item.key ? h$8(Btn, { label: "确认移除", ariaLabel: "确认移除 " + label, variant: "danger", disabled: mcp.busy !== "", onClick: function() { mcpAction("移除连接", "disconnect", { key: item.key }).then(function() { patchMcp({ confirm: null }); probeMcp(); }); } }) : h$8(Btn, { label: "移除连接…", ariaLabel: "移除连接 " + label, variant: "small", disabled: mcp.busy !== "", onClick: function() { patchMcp({ confirm: item.key }); setNotice({ tone: "warn", text: "再次点击「确认移除」才会断开该连接定义。" }); } })), tools === void 0 ? null : h$8("p", { style: styles.hint }, "工具缓存(" + formatTime(tools.at) + "):" + (tools.items.length === 0 ? "空" : tools.items.map(function(tool) { return String(tool.name === void 0 ? tool : tool.name); }).join("、")))) : null); }), h$8("p", { style: styles.hint }, "工具可见不等于业务可调用:连接状态与工具缓存分开显示。")) : null), h$8(McpCustomSection, { onChanged: probeMcp }), h$8(McpConfigSection, { items, onChanged: probeMcp })); } return h$8("div", { style: styles.root }, header, tabBar, noticeBox, error === null ? null : h$8(Banner, { tone: "bad" }, error), tab === "connection" ? connectionTab : tab === "skills" ? skillsTab : mcpTab); } // src-client/panel/brain-icon.tsx const BRAIN_ICON_PATHS = [ "M8 3.4C8 2.2 7.2 1.5 6.2 1.5C5.2 1.5 4.4 2.2 4.3 3.2C2.8 3.2 1.9 4.4 2.2 5.8C.9 6.8 1 8.8 2.4 9.6C2.1 11 3.1 12.2 4.5 12.2C4.8 14.7 8 14.9 8 12.3C8 14.9 11.2 14.7 11.5 12.2C12.9 12.2 13.9 11 13.6 9.6C15 8.8 15.1 6.8 13.8 5.8C14.1 4.4 13.2 3.2 11.7 3.2C11.6 2.2 10.8 1.5 9.8 1.5C8.8 1.5 8 2.2 8 3.4Z", "M8 3.4v8.9", "M4.3 3.2C4.2 4.1 4.7 4.8 5.5 5.1M11.7 3.2C11.8 4.1 11.3 4.8 10.5 5.1", "M2.4 9.6C3.2 10 4.4 9.7 4.8 8.8M13.6 9.6C12.8 10 11.6 9.7 11.2 8.8", "M4.5 12.2C4.4 11.2 4.9 10.5 5.7 10.2M11.5 12.2C11.6 11.2 11.1 10.5 10.3 10.2" ]; const h$7 = react.createElement; function BrainIcon({ size = 18, ...marker }) { return h$7("svg", { ...marker, "data-dsh-panel-entry": "dsh-brain", "data-dsh-plugin": "dsh-brain", "data-dsh-part": "sidebar-icon", "aria-hidden": "true", viewBox: "0 0 16 16", width: size, height: size, fill: "none", stroke: "currentColor", strokeWidth: "1", strokeLinecap: "round", strokeLinejoin: "round" }, BRAIN_ICON_PATHS.map((path) => h$7("path", { key: path, d: path }))); } // src-client/panel/workspace.ts function scopeParams(scope) { const params = new URLSearchParams({ scope: scope.scope }); if (scope.scope === "project") params.set("workspace", scope.workspace); return params; } // src-client/mnemon.ts const MNEMON = { runtime: "/dsh-brain/mnemon/runtime", list: "/dsh-brain/mnemon/list", status: "/dsh-brain/mnemon/status", search: "/dsh-brain/mnemon/search", documents: "/dsh-brain/mnemon/documents" }; /** The bridge keeps Mnemon's {ok:false,error:{code,message}} envelope. */ function envelopeError(result, fallback) { const err = result.body?.error; if (err !== null && typeof err === "object" && typeof err.message === "string" && err.message !== "") return err.message; if (err === "mnemon-project-workspace-required") return "无法确认 Mnemon 项目工作区。"; if (result.status === 503) return "Mnemon 读服务未接入:当前宿主没有 Mnemon,界面暂不显示记忆。"; return bodyError(result, fallback); } /** Runtime snapshot → newest-created-first list. No id/category/source exists. */ function runtimeEntriesToList(value) { const items = (Array.isArray(value?.entries) ? value.entries : []).map((entry, index) => ({ id: "mnemon_rt_" + String(index), scope: "global", content: String(entry?.content ?? ""), category: void 0, tags: [], source: "mnemon", revision: void 0, createdAt: typeof entry?.created_at === "string" ? entry.created_at : void 0, updatedAt: typeof entry?.updated_at === "string" ? entry.updated_at : void 0, target: typeof entry?.target === "string" ? entry.target : void 0, importance: typeof entry?.importance === "string" ? entry.importance : void 0, mnemon: true })); items.sort((a, b) => String(b.createdAt ?? "").localeCompare(String(a.createdAt ?? ""))); return items; } /** Global uses the runtime snapshot; project uses the selected Memory Spaces list. */ async function mnemonMemories(scope) { if (scope.scope === "project") { const params = scopeParams(scope); params.set("limit", "1000"); const result = await request(MNEMON.list + "?" + params.toString()); if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error(envelopeError(result, "读取 Mnemon 项目记忆失败")); const value = result.body.value ?? {}; const items = (Array.isArray(value.items) ? value.items : []).map((it, index) => ({ id: typeof it?.id === "string" && it.id !== "" ? it.id : "mnemon_sp_" + String(index), scope: "project", content: String(it?.content ?? ""), category: typeof it?.category === "string" ? it.category : void 0, tags: Array.isArray(it?.tags) ? it.tags.filter((t) => typeof t === "string") : [], source: "mnemon", revision: typeof it?.revision === "number" ? it.revision : void 0, createdAt: typeof it?.created_at === "string" ? it.created_at : typeof it?.createdAt === "string" ? it.createdAt : void 0, updatedAt: typeof it?.updated_at === "string" ? it.updated_at : typeof it?.updatedAt === "string" ? it.updatedAt : void 0, mnemon: true })); items.sort((a, b) => String(b.createdAt ?? "").localeCompare(String(a.createdAt ?? ""))); return { ok: true, total: typeof value.total === "number" ? value.total : items.length, items, categoriesAvailable: items.some((it) => it.category !== void 0) }; } return mnemonRuntimeAll(); } /** Full runtime list (no paging) for the overview's totals and 7-day trend. */ async function mnemonRuntimeAll() { const result = await request(MNEMON.runtime); if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error(envelopeError(result, "读取 Mnemon 记忆失败")); const items = runtimeEntriesToList(result.body.value); return { ok: true, total: items.length, items, categoriesAvailable: false }; } /** Mnemon status snapshot (storage root, sources, workspace mode). */ async function mnemonStatus(scope) { const query = scope?.scope === "project" ? "?" + scopeParams(scope).toString() : ""; const result = await request(MNEMON.status + query); if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error(envelopeError(result, "读取 Mnemon 状态失败")); return result.body.value ?? {}; } async function mnemonDocuments(scope) { const result = await request(MNEMON.documents + "?" + scopeParams(scope).toString()); if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error(envelopeError(result, "读取 Mnemon 文档失败")); const value = result.body.value ?? {}; return { documents: Array.isArray(value.items) ? value.items : Array.isArray(value.documents) ? value.documents : [] }; } // \0dsh-brain-css:src-client/panel/BrainPanel.module.css.mjs const css$21 = "/* Adapted from dsh-mnemon MnemonWorkspace.dshbrain_1xedgey.dshbrain_holtzx (MIT), see vendor/dsh-mnemon/LICENSE. */\n.dshbrain_1y11fqi {\n box-sizing: border-box;\n position: relative;\n z-index: 2;\n display: flex;\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n flex: 1 1 auto;\n padding-block-start: var(--dsh-frame-top-clearance, 0px);\n}\n\n.dshbrain_1y11fqi > * {\n min-width: 0;\n flex: 1 1 auto;\n}\n\n.dshbrain_131vunv {\n position: absolute;\n inset: 0 0 auto;\n height: var(--dsh-frame-top-clearance, 0px);\n}\n\n.dshbrain_oyvdy4 {\n display: flex;\n flex-direction: column;\n gap: 14px;\n padding: 18px 20px 24px;\n overflow: auto;\n font-size: 13px;\n line-height: 1.55;\n color: var(--dsw-alias-label-primary, inherit);\n}\n\n.dshbrain_of3f1r {\n display: flex;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n flex-wrap: wrap;\n}\n\n.dshbrain_vnw8w9 {\n display: flex;\n flex-direction: column;\n gap: 2px;\n min-width: 0;\n}\n\n.dshbrain_g8fis8 {\n margin: 0;\n font-size: 16px;\n font-weight: 650;\n letter-spacing: 0.01em;\n}\n\n.dshbrain_1milhhm {\n margin: 0;\n font-size: 11.5px;\n opacity: 0.58;\n}\n\n.dshbrain_xnx8bm {\n display: flex;\n gap: 4px;\n padding: 3px;\n border-radius: 13px;\n border: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.22));\n background: var(--dsw-alias-bg-subtle, rgba(127,127,127,0.06));\n flex-wrap: wrap;\n}\n\n.dshbrain_7mndvh {\n flex: 1 1 auto;\n min-width: 88px;\n font: inherit;\n font-size: 12.5px;\n padding: 7px 12px;\n border-radius: 10px;\n border: 1px solid transparent;\n background: transparent;\n color: inherit;\n cursor: pointer;\n white-space: nowrap;\n}\n\n.dshbrain_rvx7lj {\n border: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.30));\n background: var(--dsw-alias-interactive-bg-hover, rgba(127,127,127,0.14));\n box-shadow: 0 1px 3px rgba(0,0,0,0.10);\n font-weight: 600;\n}\n\n.dshbrain_1rfmkcf {\n display: flex;\n flex-direction: column;\n gap: 12px;\n min-width: 0;\n}\n\n.dshbrain_c36neh {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.dshbrain_1a7ley4 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n border: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.22));\n border-radius: 16px;\n padding: 16px 18px;\n min-width: 0;\n}\n\n.dshbrain_updgou {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.dshbrain_xwrsl5 {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 3px 10px;\n border-radius: 999px;\n border: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.35));\n font-size: 12px;\n white-space: nowrap;\n overflow: hidden;\n max-width: 100%;\n}\n\n.dshbrain_mvsf69 {\n opacity: 0.75;\n flex: 0 0 auto;\n}\n\n.dshbrain_1xby9uu {\n font-weight: 600;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n}\n\n.dshbrain_1bzyta0 { border-color: rgba(22,163,74,0.55); background: rgba(22,163,74,0.12); }\n.dshbrain_1hx5ob5 { border-color: rgba(220,38,38,0.55); background: rgba(220,38,38,0.12); }\n.dshbrain_amukxq { border-color: rgba(217,119,6,0.55); background: rgba(217,119,6,0.12); }\n.dshbrain_uf6ztt { }\n\n.dshbrain_1vi102j {\n margin: 0;\n font-size: 11.5px;\n opacity: 0.58;\n}\n\n.dshbrain_qmj948 {\n padding: 10px 13px;\n border-radius: 11px;\n border: 1px solid rgba(220,38,38,0.55);\n background: rgba(220,38,38,0.12);\n font-size: 12.5px;\n}\n\n/* ---- Overview v3 (artifacts/preview-overview-v3.dshbrain_1b429sz) ------------------- */\n/* Surfaces and text ride the host theme tokens; only translucent state tints\n (green/amber) are fixed, the same convention as .dshbrain_1bzyta0/.dshbrain_amukxq above, so both\n light and dark hosts stay readable. */\n\n.dshbrain_1q9il5y {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 10px;\n flex-wrap: wrap;\n}\n\n.dshbrain_oagb6v {\n margin: 0;\n font-size: 15px;\n font-weight: 700;\n}\n\n.dshbrain_jcli1h {\n display: flex;\n align-items: center;\n gap: 10px;\n flex-wrap: wrap;\n}\n\n.dshbrain_1a2ddj9 {\n margin: 0;\n font-size: 13.5px;\n font-weight: 650;\n}\n\n.dshbrain_1115a09 {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));\n gap: 0;\n padding: 0;\n overflow: hidden;\n background: var(--dsw-alias-bg-subtle, rgba(127,127,127,0.06));\n}\n\n.dshbrain_c3trnb {\n padding: 16px 18px;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.dshbrain_vv2nbb {\n margin: 0;\n font-size: 40px;\n line-height: 1.05;\n font-weight: 720;\n font-variant-numeric: tabular-nums;\n}\n\n.dshbrain_vv2nbb small {\n margin-left: 6px;\n font-size: 15px;\n font-weight: 600;\n opacity: 0.7;\n}\n\n.dshbrain_78nbcy {\n margin: 0;\n font-size: 12.5px;\n opacity: 0.85;\n}\n\n.dshbrain_78nbcy strong {\n color: rgba(22,163,74,0.95);\n}\n\n.dshbrain_t4lamf {\n display: flex;\n flex-direction: column;\n gap: 6px;\n align-items: flex-start;\n}\n\n.dshbrain_1ch1t27 {\n padding: 16px 18px;\n min-width: 0;\n border-left: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.22));\n display: flex;\n flex-direction: column;\n gap: 10px;\n justify-content: center;\n}\n\n.dshbrain_ukm6ev {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.dshbrain_3bylxp {\n height: 9px;\n display: flex;\n overflow: hidden;\n gap: 3px;\n border-radius: 8px;\n}\n\n.dshbrain_3bylxp span {\n min-width: 4px;\n}\n\n.dshbrain_1703oi3 { background: rgba(22,163,74,0.85); }\n.dshbrain_17a3a72 { background: rgba(22,163,74,0.45); }\n.dshbrain_17k2vw1 { background: rgba(127,127,127,0.45); }\n\n.dshbrain_15weix8 {\n display: flex;\n gap: 8px 18px;\n flex-wrap: wrap;\n margin: 0;\n padding: 0;\n list-style: none;\n font-size: 12.5px;\n}\n\n.dshbrain_15weix8 span {\n display: inline-block;\n width: 8px;\n height: 8px;\n margin-right: 6px;\n border-radius: 2px;\n}\n\n.dshbrain_1xdztoj {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));\n gap: 12px;\n}\n\n.dshbrain_1xdztoj > * {\n min-width: 0;\n}\n\n.dshbrain_1wbzl9q, .dshbrain_1p9g0za {\n padding: 16px 18px;\n}\n\n.dshbrain_x03n04 {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 22px 0;\n}\n\n.dshbrain_s9s46a {\n margin: 0;\n font-size: 15px;\n font-weight: 650;\n opacity: 0.6;\n}\n\n.dshbrain_nx4bax {\n margin: 10px 0 0;\n}\n\n.dshbrain_1jg0ih5 {\n position: relative;\n display: grid;\n grid-template-columns: repeat(7, minmax(0, 1fr));\n gap: 4px;\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.dshbrain_1jg0ih5::before {\n content: \"\";\n position: absolute;\n pointer-events: none;\n inset: 0 0 27px;\n border-bottom: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.30));\n background: repeating-linear-gradient(to top, transparent 0 calc(33.333% - 1px), var(--dsw-alias-border-subtle, rgba(127,127,127,0.14)) calc(33.333% - 1px) 33.333%);\n}\n\n.dshbrain_1jg0ih5 li {\n position: relative;\n display: flex;\n flex-direction: column;\n align-items: center;\n min-width: 0;\n}\n\n.dshbrain_1y1mwwd {\n position: relative;\n width: 100%;\n height: 121px;\n}\n\n.dshbrain_crtq12 {\n position: absolute;\n bottom: 0;\n left: 50%;\n transform: translateX(-50%);\n width: min(54%, 28px);\n height: var(--height);\n border-radius: 5px 5px 0 0;\n background: rgba(22,163,74,0.45);\n}\n\n.dshbrain_1jg0ih5 li:last-child .dshbrain_crtq12 {\n background: rgba(22,163,74,0.85);\n}\n\n.dshbrain_1asla79 {\n position: absolute;\n bottom: calc(var(--height) + 3px);\n left: 50%;\n transform: translateX(-50%);\n font-weight: 650;\n font-size: 12px;\n font-variant-numeric: tabular-nums;\n}\n\n.dshbrain_civ187 .dshbrain_1asla79 {\n opacity: 0.5;\n}\n\n.dshbrain_51ym0x {\n display: grid;\n place-items: center;\n height: 27px;\n font-size: 11px;\n white-space: nowrap;\n opacity: 0.6;\n}\n\n.dshbrain_1jg0ih5 li:last-child .dshbrain_51ym0x {\n opacity: 1;\n color: rgba(22,163,74,0.95);\n}\n\n.dshbrain_eqch83 {\n margin: 0;\n padding: 0;\n list-style: none;\n}\n\n.dshbrain_eqch83 li {\n display: grid;\n grid-template-columns: 8px minmax(0, 1fr);\n gap: 9px;\n padding: 9px 0;\n}\n\n.dshbrain_eqch83 li + li {\n border-top: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.22));\n}\n\n.dshbrain_1snjuqt {\n width: 7px;\n height: 7px;\n border-radius: 50%;\n background: rgba(22,163,74,0.75);\n margin-top: 7px;\n}\n\n.dshbrain_1g8mv01 { background: rgba(217,119,6,0.9); }\n.dshbrain_1azwkk0 { background: rgba(127,127,127,0.55); }\n\n.dshbrain_xq6feh {\n margin: 0;\n font-weight: 650;\n}\n\n.dshbrain_13jj2hh { color: rgba(217,119,6,0.95); }\n\n.dshbrain_qzg51m {\n padding: 16px 18px;\n}\n\n.dshbrain_1k9l3b8 {\n display: flex;\n flex-wrap: wrap;\n justify-content: space-between;\n align-items: baseline;\n gap: 6px 14px;\n}\n\n.dshbrain_1xrv1b3 {\n margin: 0;\n color: rgba(217,119,6,0.95);\n font-size: 12px;\n font-weight: 650;\n}\n\n.dshbrain_6a0tlg {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(min(96px, 100%), 1fr));\n margin: 12px 0 9px;\n gap: 8px 0;\n}\n\n.dshbrain_6a0tlg div {\n padding: 3px 12px;\n min-width: 0;\n}\n\n.dshbrain_6a0tlg div:first-child {\n padding-left: 0;\n}\n\n.dshbrain_6a0tlg div + div {\n border-left: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.22));\n}\n\n.dshbrain_6a0tlg dt {\n font-size: 12px;\n opacity: 0.6;\n}\n\n.dshbrain_6a0tlg dd {\n margin: 0;\n font-size: 16px;\n font-weight: 650;\n font-variant-numeric: tabular-nums;\n}\n\n.dshbrain_sv335t {\n opacity: 0.5;\n}\n\n.dshbrain_15l1hqc {\n padding: 0 18px;\n}\n\n.dshbrain_16gqcks {\n padding: 12px 0;\n font-weight: 600;\n cursor: pointer;\n}\n\n.dshbrain_16gqcks:focus-visible {\n outline: 2px solid rgba(22,163,74,0.8);\n outline-offset: 3px;\n border-radius: 3px;\n}\n\n.dshbrain_172zfx {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n gap: 7px 18px;\n margin: 0 0 14px;\n padding-top: 12px;\n border-top: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.22));\n font-size: 12.5px;\n}\n\n.dshbrain_172zfx dt {\n opacity: 0.6;\n}\n\n.dshbrain_172zfx dd {\n margin: 0;\n overflow-wrap: anywhere;\n}\n\n.dshbrain_u0dqm9 {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border: 0;\n}\n\n@media (max-width: 640px) {\n .dshbrain_1ch1t27 {\n border-left: 0;\n border-top: 1px solid var(--dsw-alias-border-subtle, rgba(127,127,127,0.22));\n }\n .dshbrain_6a0tlg div:nth-child(4) {\n padding-left: 0;\n border-left: 0;\n }\n}\n"; const tagId$17 = "src-client/panel/BrainPanel.module.css"; if (typeof document !== "undefined" && typeof document.querySelector === "function" && typeof document.createElement === "function") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$17) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$17; document.head.appendChild(tag); } if (tag.textContent !== css$21) tag.textContent = css$21; } var BrainPanel_module_css_default = { "module": "dshbrain_1xedgey", "css": "dshbrain_holtzx", "nativeWorkspace": "dshbrain_1y11fqi", "windowDragBand": "dshbrain_131vunv", "panelInner": "dshbrain_oyvdy4", "header": "dshbrain_of3f1r", "titleBlock": "dshbrain_vnw8w9", "title": "dshbrain_g8fis8", "subtitle": "dshbrain_1milhhm", "tabBar": "dshbrain_xnx8bm", "tab": "dshbrain_7mndvh", "tabActive": "dshbrain_rvx7lj", "content": "dshbrain_1rfmkcf", "overviewGrid": "dshbrain_c36neh", "card": "dshbrain_1a7ley4", "pills": "dshbrain_updgou", "pill": "dshbrain_xwrsl5", "pillLabel": "dshbrain_mvsf69", "pillValue": "dshbrain_1xby9uu", "ok": "dshbrain_1bzyta0", "bad": "dshbrain_1hx5ob5", "warn": "dshbrain_amukxq", "muted": "dshbrain_uf6ztt", "hint": "dshbrain_1vi102j", "error": "dshbrain_qmj948", "html": "dshbrain_1b429sz", "ovHeader": "dshbrain_1q9il5y", "ovTitle": "dshbrain_oagb6v", "ovHeadRight": "dshbrain_jcli1h", "ovCardTitle": "dshbrain_1a2ddj9", "ovSummary": "dshbrain_1115a09", "ovTotal": "dshbrain_c3trnb", "ovBig": "dshbrain_vv2nbb", "ovMeta": "dshbrain_78nbcy", "ovMetaBlock": "dshbrain_t4lamf", "ovMix": "dshbrain_1ch1t27", "ovMixBody": "dshbrain_ukm6ev", "mixBar": "dshbrain_3bylxp", "mixA": "dshbrain_1703oi3", "mixB": "dshbrain_17a3a72", "mixC": "dshbrain_17k2vw1", "mixKeys": "dshbrain_15weix8", "ovGrid": "dshbrain_1xdztoj", "ovTrend": "dshbrain_1wbzl9q", "ovChecks": "dshbrain_1p9g0za", "ovPlaceholder": "dshbrain_x03n04", "ovPlaceholderTitle": "dshbrain_s9s46a", "ovChart": "dshbrain_nx4bax", "plot": "dshbrain_1jg0ih5", "plotSlot": "dshbrain_1y1mwwd", "plotBar": "dshbrain_crtq12", "plotAmount": "dshbrain_1asla79", "plotZero": "dshbrain_civ187", "plotDay": "dshbrain_51ym0x", "rows": "dshbrain_eqch83", "dot": "dshbrain_1snjuqt", "dotWarn": "dshbrain_1g8mv01", "dotMuted": "dshbrain_1azwkk0", "rowName": "dshbrain_xq6feh", "rowNameWarn": "dshbrain_13jj2hh", "ovRecall": "dshbrain_qzg51m", "ovRecallHead": "dshbrain_1k9l3b8", "ovRecallState": "dshbrain_1xrv1b3", "recallMetrics": "dshbrain_6a0tlg", "recallMissing": "dshbrain_sv335t", "ovDiag": "dshbrain_15l1hqc", "ovDiagSummary": "dshbrain_16gqcks", "diagGrid": "dshbrain_172zfx", "srOnly": "dshbrain_u0dqm9" }; // src-client/panel/Overview.tsx const h$6 = react.createElement; const BUNDLE_LABELS = { cloudsync: "云同步", memory: "记忆", skills: "技能", mcp: "MCP", "settings-ui": "设置 UI", ui: "设置 UI", raw: "原话记录" }; const pad2 = (n) => n < 10 ? "0" + String(n) : String(n); const dayKeyOf = (d) => String(d.getFullYear()) + "-" + pad2(d.getMonth() + 1) + "-" + pad2(d.getDate()); function Pill(props) { const tone = props.tone === void 0 ? BrainPanel_module_css_default.muted : props.tone === "ok" ? BrainPanel_module_css_default.ok : props.tone === "bad" ? BrainPanel_module_css_default.bad : props.tone === "warn" ? BrainPanel_module_css_default.warn : BrainPanel_module_css_default.muted; return h$6("span", { className: BrainPanel_module_css_default.pill + " " + tone }, h$6("span", { className: BrainPanel_module_css_default.pillLabel }, props.label), h$6("span", { className: BrainPanel_module_css_default.pillValue }, String(props.value))); } function Overview(props) { const active = props.active !== false; const [status, setStatus] = react.useState(null); const [capabilities, setCapabilities] = react.useState(null); const [memory, setMemory] = react.useState(null); const [raw, setRaw] = react.useState(null); const [list, setList] = react.useState(null); const [error, setError] = react.useState(null); const [rawError, setRawError] = react.useState(null); const [listError, setListError] = react.useState(null); const [loadedAt, setLoadedAt] = react.useState(null); const [tick, setTick] = react.useState(0); react.useEffect(() => { if (!active) return; let cancelled = false; const load = async () => { const [statusSettled, capabilitiesSettled, memorySettled, rawSettled, listSettled] = await Promise.allSettled([ request(API.status), request(API.capabilities), mnemonStatus(), request("/dsh-brain/raw/status"), mnemonRuntimeAll() ]); if (cancelled) return; let anyOk = false; if (statusSettled.status === "fulfilled") { const result = statusSettled.value; if (result.status === 200 && result.body !== null && result.body.ok === true) { setStatus(result.body); setError(null); anyOk = true; } else setError("读取插件状态失败(HTTP " + String(result.status) + ")"); } else setError(messageOf(statusSettled.reason)); if (capabilitiesSettled.status === "fulfilled") { const result = capabilitiesSettled.value; if (result.status === 200 && result.body !== null && result.body.ok === true) { setCapabilities(result.body); anyOk = true; } } if (memorySettled.status === "fulfilled") { setMemory(memorySettled.value); anyOk = true; } if (rawSettled.status === "fulfilled") { const result = rawSettled.value; if (result.status === 200 && result.body !== null && result.body.ok === true) { setRaw(result.body); setRawError(null); anyOk = true; } else setRawError("HTTP " + String(result.status)); } else setRawError(messageOf(rawSettled.reason)); if (listSettled.status === "fulfilled") { setList(listSettled.value); setListError(null); anyOk = true; } else setListError(messageOf(listSettled.reason)); if (anyOk) setLoadedAt(Date.now()); }; load(); const timer = setInterval(() => { load(); }, 15e3); return () => { cancelled = true; clearInterval(timer); }; }, [active, tick]); const refresh = () => { setTick((value) => value + 1); }; const settings = status?.settings ?? {}; const reporter = status?.reporter ?? {}; const skills = status?.skills; const bundles = status?.bundles ?? {}; const bundleKeys = Object.keys(bundles).length === 0 ? [ "cloudsync", "memory", "skills", "mcp", "settings-ui" ] : Object.keys(bundles); const version = capabilities?.version ?? status?.capabilities?.version ?? "—"; const items = Array.isArray(list?.items) ? list.items : []; const total = list !== null && typeof list.total === "number" ? list.total : null; const fullCoverage = list !== null && total !== null && items.length === total; const hasCreated = items.length > 0 && items.every((item) => typeof item.createdAt === "string" && item.createdAt !== ""); const categoriesAvailable = list?.categoriesAvailable === true; let mix = null; if (fullCoverage && categoriesAvailable) { const counts = {}; for (const item of items) { const label = memoryCategoryLabel(item.category); counts[label] = (counts[label] ?? 0) + 1; } mix = Object.keys(counts).map((label) => ({ label, count: counts[label] })).sort((a, b) => b.count - a.count); } let trend = null; let todayAdded = null; let latestCreated = null; if (fullCoverage && (hasCreated || total === 0)) { const counts = {}; let latest = 0; for (const item of items) { const stamp = Date.parse(item.createdAt); if (!Number.isFinite(stamp)) continue; if (stamp > latest) latest = stamp; const key = dayKeyOf(new Date(stamp)); counts[key] = (counts[key] ?? 0) + 1; } latestCreated = latest > 0 ? latest : null; const now = /* @__PURE__ */ new Date(); trend = []; for (let i = 6; i >= 0; i -= 1) { const day = new Date(now.getFullYear(), now.getMonth(), now.getDate() - i); const key = dayKeyOf(day); trend.push({ key, label: i === 6 ? pad2(day.getMonth() + 1) + "/" + pad2(day.getDate()) : pad2(day.getDate()), full: String(day.getMonth() + 1) + " 月 " + String(day.getDate()) + " 日", count: counts[key] ?? 0 }); } todayAdded = trend[6].count; } const rows = []; if (rawError !== null) rows.push({ tone: "warn", name: "读取原话档案失败", meta: "可点右上「刷新」重试;详情见「原始记录」页签。" }); else if (raw === null) rows.push({ tone: "muted", name: "原话归档待核实", meta: "宿主未返回原话档案状态。" }); else if (raw.enabled === false) rows.push({ tone: "muted", name: "原话采集已关闭", meta: "在设置中开启后,对话原话会自动归档。" }); else if ((raw.records ?? 0) === 0) rows.push({ tone: "muted", name: "还没有原话记录", meta: "开启采集后,新的对话会自动归档到这里。" }); else rows.push({ tone: "ok", name: "原话已归档", meta: String(raw.sessions ?? 0) + " 个会话 · " + String(raw.records ?? 0) + " 条记录 · 最近 " + formatIso(raw.newestAt) }); if (status === null) rows.push({ tone: "muted", name: "自动摘要待核实", meta: "宿主未返回设置,无法确认摘要开关。" }); else if (settings.autoSummaryEnabled === false) rows.push({ tone: "muted", name: "自动摘要已关闭", meta: "在设置中开启后,会自动提炼对话要点。" }); else rows.push({ tone: "muted", name: "摘要处理进度待核实", meta: "累计会话与轮数需检查点统计,接口补齐后显示。" }); const lastChecks = Array.isArray(status?.lastCheck?.checks) ? status.lastCheck.checks : []; const lastFailed = lastChecks.filter((check) => check.state !== "ok" && check.state !== "unconfigured").length; if (error !== null) rows.push({ tone: "warn", name: "实时状态待核实", meta: "当前宿主未返回 Brain 状态。在目标宿主打开 Brain 后刷新,查看采集与召回状态。" }); else if (status?.lastCheck === null || status?.lastCheck === void 0) rows.push({ tone: "muted", name: "尚未检查", meta: "在「连接与上报」设置里运行一次连接检查,结果会显示在这里。" }); else if (lastFailed === 0) rows.push({ tone: "ok", name: "暂无已知异常", meta: "最近检查 " + formatTime(status.lastCheck.at) + (lastChecks.length === 0 ? "" : " · 全部通过") }); else rows.push({ tone: "warn", name: String(lastFailed) + " 项检查异常", meta: "最近检查 " + formatTime(status.lastCheck.at) + " · 详情见「连接与上报」设置。" }); const tokenText = status === null ? "暂不可读取" : (() => { const entries = [ ["上报", status.tokens?.activity], ["记忆", status.tokens?.memory], ["摘要", status.tokens?.summary] ]; if (entries.every(([, token]) => token?.configured === true)) return "上报、记忆、摘要均已配置"; return entries.map(([name, token]) => name + (token?.configured === true ? "已配置" : "未配置")).join(" · "); })(); const rawDetail = rawError !== null ? "暂不可读取" : raw === null ? "待核实" : raw.enabled === false ? "采集已关闭" : formatBytes(raw.bytes) + " · " + formatIso(raw.oldestAt) + " 至 " + formatIso(raw.newestAt); const skillReceipt = skills === void 0 || skills === null ? "暂无回执" : "下发 " + String(skills.downloaded?.length ?? 0) + " 条 · 上传 " + String(skills.uploaded?.length ?? 0) + " 条" + ((skills.conflicts?.length ?? 0) > 0 ? " · 待处理冲突 " + String(skills.conflicts.length) + " 条" : ""); const localMemoryText = memory === null ? "Mnemon 未接入" : (typeof memory.storage?.activeRoot === "string" ? String(memory.storage.activeRoot) : "已接入") + (typeof memory.workspaceContext?.mode === "string" ? " · 存储范围 " + String(memory.workspaceContext.mode) : ""); const diag = [ ["插件版本", version], ["原话档案", rawDetail], ["服务地址", status === null ? "暂不可读取" : settings.baseUrlConfigured === false ? "未配置" : settings.baseUrlOrigin || "已配置"], ["磁盘令牌配置", tokenText], ["服务默认召回条数", status === null ? "暂不可读取" : String(settings.defaultK ?? "—")], ["本地记忆召回条数", status === null ? "暂不可读取" : String(settings.localMemoryK ?? "未配置")], ["技能同步回执", skillReceipt], ["已上报回合", status === null ? "待核实" : String(reporter.recorded ?? 0)], ["Mnemon 存储", localMemoryText], ["bundle 开关", h$6("div", { className: BrainPanel_module_css_default.pills }, bundleKeys.map((key) => h$6(Pill, { key, label: BUNDLE_LABELS[key] ?? key, value: bundles[key] === true ? "启用" : bundles[key] === false ? "停用" : "未知", tone: bundles[key] === true ? "ok" : bundles[key] === false ? "bad" : "muted" })))] ]; const trendMax = trend === null ? 1 : Math.max(1, ...trend.map((day) => day.count)); return h$6("div", { className: BrainPanel_module_css_default.overviewGrid }, h$6("div", { className: BrainPanel_module_css_default.ovHeader }, h$6("h4", { className: BrainPanel_module_css_default.ovTitle }, "记忆概览"), h$6("div", { className: BrainPanel_module_css_default.ovHeadRight }, loadedAt === null ? null : h$6("p", { className: BrainPanel_module_css_default.hint }, "本机数据快照 " + formatTime(loadedAt)), h$6(Btn, { label: "刷新", variant: "small", onClick: refresh }))), error === null ? null : h$6("div", { className: BrainPanel_module_css_default.error }, error), h$6("section", { className: BrainPanel_module_css_default.card + " " + BrainPanel_module_css_default.ovSummary, "aria-labelledby": "ov-total-title" }, h$6("div", { className: BrainPanel_module_css_default.ovTotal }, h$6("h4", { id: "ov-total-title", className: BrainPanel_module_css_default.ovCardTitle }, "全局记忆"), list !== null ? h$6("p", { className: BrainPanel_module_css_default.ovBig }, String(total ?? "—"), h$6("small", {}, "条")) : h$6("p", { className: BrainPanel_module_css_default.ovBig }, "—"), list === null && listError !== null ? h$6("div", { className: BrainPanel_module_css_default.ovMetaBlock }, h$6("p", { className: BrainPanel_module_css_default.hint }, "全局记忆暂不可读(" + listError + ")"), h$6(Btn, { label: "重试", variant: "small", onClick: refresh })) : total === 0 ? h$6("p", { className: BrainPanel_module_css_default.ovMeta }, "Mnemon 里还没有记忆条目。") : h$6("p", { className: BrainPanel_module_css_default.ovMeta }, todayAdded === null ? "今日新增待核实" : h$6("strong", {}, "今日新增 " + String(todayAdded) + " 条"), latestCreated === null ? "" : " · 最近一条 " + formatTime(latestCreated).slice(6, 11))), h$6("div", { className: BrainPanel_module_css_default.ovMix }, h$6("h4", { className: BrainPanel_module_css_default.ovCardTitle }, "记忆分类"), mix === null ? h$6("p", { className: BrainPanel_module_css_default.hint }, list === null ? "分类统计暂不可读。" : !categoriesAvailable ? "分类待核实:Mnemon 记忆没有分类字段。" : "分类统计待核实。") : mix.length === 0 ? h$6("p", { className: BrainPanel_module_css_default.hint }, "暂无分类可显示。") : h$6("div", { className: BrainPanel_module_css_default.ovMixBody }, h$6("div", { className: BrainPanel_module_css_default.mixBar, "aria-hidden": "true" }, mix.map((entry, index) => h$6("span", { key: entry.label, className: index === 0 ? BrainPanel_module_css_default.mixA : index === 1 ? BrainPanel_module_css_default.mixB : BrainPanel_module_css_default.mixC, style: { flex: String(entry.count) } }))), h$6("ul", { className: BrainPanel_module_css_default.mixKeys }, mix.map((entry, index) => h$6("li", { key: entry.label }, h$6("span", { "aria-hidden": "true", className: index === 0 ? BrainPanel_module_css_default.mixA : index === 1 ? BrainPanel_module_css_default.mixB : BrainPanel_module_css_default.mixC }), entry.label + " " + String(entry.count) + " 条")))))), h$6("div", { className: BrainPanel_module_css_default.ovGrid }, h$6("section", { className: BrainPanel_module_css_default.card + " " + BrainPanel_module_css_default.ovTrend, "aria-labelledby": "ov-trend-title" }, h$6("h4", { id: "ov-trend-title", className: BrainPanel_module_css_default.ovCardTitle }, "最近 7 天新增"), trend === null ? h$6("div", { className: BrainPanel_module_css_default.ovPlaceholder }, h$6("p", { className: BrainPanel_module_css_default.ovPlaceholderTitle }, "待核实"), h$6("p", { className: BrainPanel_module_css_default.hint }, listError !== null ? "暂时无法统计新增记忆。" : "Mnemon 记忆带创建时间后,这里显示每日新增。")) : h$6("figure", { className: BrainPanel_module_css_default.ovChart }, h$6("ul", { className: BrainPanel_module_css_default.plot, "aria-label": "每日新增的全局记忆条数" }, trend.map((day) => h$6("li", { key: day.key, className: day.count === 0 ? BrainPanel_module_css_default.plotZero : "", style: { "--height": (day.count === 0 ? 0 : Math.max(3, day.count / trendMax * 100)) + "%" } }, h$6("span", { className: BrainPanel_module_css_default.srOnly }, day.full + "," + String(day.count) + " 条"), h$6("span", { className: BrainPanel_module_css_default.plotSlot, "aria-hidden": "true" }, day.count === 0 ? null : h$6("span", { className: BrainPanel_module_css_default.plotBar }), h$6("span", { className: BrainPanel_module_css_default.plotAmount }, String(day.count))), h$6("time", { className: BrainPanel_module_css_default.plotDay, "aria-hidden": "true", dateTime: day.key }, day.label)))), h$6("figcaption", { className: BrainPanel_module_css_default.hint }, total === 0 ? "近 7 天没有新增。" : "按现存记忆的创建日期统计,今天截至快照时间。"))), h$6("section", { className: BrainPanel_module_css_default.card + " " + BrainPanel_module_css_default.ovChecks, "aria-labelledby": "ov-checks-title" }, h$6("h4", { id: "ov-checks-title", className: BrainPanel_module_css_default.ovCardTitle }, "记录与处理"), h$6("ul", { className: BrainPanel_module_css_default.rows }, rows.map((row) => h$6("li", { key: row.name, className: row.tone === "warn" ? BrainPanel_module_css_default.rowAttention : "" }, h$6("span", { className: BrainPanel_module_css_default.dot + (row.tone === "warn" ? " " + BrainPanel_module_css_default.dotWarn : row.tone === "muted" ? " " + BrainPanel_module_css_default.dotMuted : ""), "aria-hidden": "true" }), h$6("div", {}, h$6("p", { className: BrainPanel_module_css_default.rowName + (row.tone === "warn" ? " " + BrainPanel_module_css_default.rowNameWarn : "") }, row.name), h$6("p", { className: BrainPanel_module_css_default.hint }, row.meta))))))), h$6("section", { className: BrainPanel_module_css_default.card + " " + BrainPanel_module_css_default.ovRecall, "aria-labelledby": "ov-recall-title" }, h$6("div", { className: BrainPanel_module_css_default.ovRecallHead }, h$6("h4", { id: "ov-recall-title", className: BrainPanel_module_css_default.ovCardTitle }, "最近一次召回"), h$6("p", { className: BrainPanel_module_css_default.ovRecallState }, "待核实")), h$6("dl", { className: BrainPanel_module_css_default.recallMetrics }, [ "命中条数", "高", "中", "未知分档", "召回时间" ].map((label) => h$6("div", { key: label }, h$6("dt", {}, label), h$6("dd", { className: BrainPanel_module_css_default.recallMissing }, h$6("span", { "aria-hidden": "true" }, "—"), h$6("span", { className: BrainPanel_module_css_default.srOnly }, "待核实"))))), h$6("p", { className: BrainPanel_module_css_default.hint }, "当前未能取得 Mnemon 的最近一次召回结果。")), h$6("details", { className: BrainPanel_module_css_default.card + " " + BrainPanel_module_css_default.ovDiag }, h$6("summary", { className: BrainPanel_module_css_default.ovDiagSummary }, "诊断详情"), h$6("dl", { className: BrainPanel_module_css_default.diagGrid }, diag.map(([term, value]) => [h$6("dt", { key: term + "-t" }, term), h$6("dd", { key: term + "-d" }, value)])))); } // src-client/panel/useApi.ts function useApi(loader, options = {}) { const visible = options.visible !== false; const loaderRef = react.useRef(loader); loaderRef.current = loader; const [state, setState] = react.useState({ status: "idle", data: null, error: null }); const reload = react.useCallback(() => { if (!visible) return; setState((previous) => ({ status: previous.data === null ? "loading" : "ready", data: previous.data, error: null })); loaderRef.current().then((data) => setState({ status: "ready", data, error: null }), (failure) => setState((previous) => ({ status: "error", data: previous.data, error: messageOf(failure) }))); }, [visible]); const dependencies = options.deps ?? []; react.useEffect(() => { if (!visible) return; reload(); if (options.pollMs === void 0) return; const timer = setInterval(reload, options.pollMs); return () => clearInterval(timer); }, [ visible, options.pollMs, reload, ...dependencies ]); return { ...state, reload, mutate: (data) => setState({ status: data === null ? "idle" : "ready", data, error: null }) }; } // src-client/panel/MemoryTab.tsx const h$5 = react.createElement; const PAGE_SIZE = 50; function MemoryTab(props) { const active = props.active !== false; const project = props.scope === "project"; const scope = scopeParams(props); const scopeLabel = project ? "项目" : "全局"; const [offset, setOffset] = react.useState(0); const [search, setSearch] = react.useState(""); const [searchOpen, setSearchOpen] = react.useState(false); const [notice, setNotice] = react.useState(null); const [pendingForget, setPendingForget] = react.useState(null); const [busy, setBusy] = react.useState(""); const searchExpanded = searchOpen || search !== ""; const searchRef = react.useRef(null); react.useEffect(() => { const node = searchRef.current; if (searchExpanded && node !== null && typeof node.focus === "function") node.focus(); }, [searchExpanded]); const status = useApi(() => mnemonStatus(props), { visible: active, pollMs: 15e3 }); const memories = useApi(() => mnemonMemories(props), { visible: active, pollMs: project ? 3e4 : void 0 }); const documents = useApi(async () => project ? mnemonDocuments(props) : { documents: [] }, { visible: active && project }); const available = memories.data?.items.length ?? 0; const lastOffset = Math.floor(Math.max(0, available - 1) / PAGE_SIZE) * PAGE_SIZE; const pageOffset = Math.min(offset, lastOffset); react.useEffect(() => { if (offset !== pageOffset) setOffset(pageOffset); }, [offset, pageOffset]); const items = memories.data?.items.slice(pageOffset, pageOffset + PAGE_SIZE) ?? []; const needle = String(search).trim().toLowerCase(); const filtered = needle === "" ? items : items.filter((item) => { return [ item.content, item.category, item.scope, ...Array.isArray(item.tags) ? item.tags : [] ].join(" ").toLowerCase().indexOf(needle) >= 0; }); const total = memories.data?.total; const countLabel = total === void 0 ? "—" : total > available ? "可浏览 " + String(available) + " 条 · Mnemon 报告 " + String(total) + " 条" : "共 " + String(available) + " 条"; const forget = async (item) => { setBusy(item.id); try { const result = await postJson("/dsh-brain/local-memory/forget", { id: item.id, expectedRevision: item.revision, ...Object.fromEntries(scope) }); if (result.status !== 200 || result.body === null || result.body.ok !== true) setNotice({ tone: "bad", text: bodyError(result, "删除失败") }); else { setNotice({ tone: "ok", text: "已删除记忆条目。" }); setPendingForget(null); memories.reload(); } } catch (failure) { setNotice({ tone: "bad", text: messageOf(failure) }); } finally { setBusy(""); } }; const storageRoot = status.data?.storage?.activeRoot; const workspaceMode = status.data?.workspaceContext?.mode; return h$5("div", { style: { display: "flex", flexDirection: "column", gap: "12px" } }, status.error === null ? null : h$5(Banner, { tone: "bad" }, status.error), h$5(Section, { title: scopeLabel + "记忆空间", aside: h$5(Btn, { label: "刷新", variant: "small", onClick: () => { status.reload(); memories.reload(); if (project) documents.reload(); } }) }, h$5(Pill$1, { label: "数据源", value: status.status === "loading" ? "读取中" : status.error !== null ? "读取失败" : "Mnemon 已接入", tone: status.error !== null ? "warn" : "ok" }), typeof storageRoot === "string" && storageRoot !== "" ? h$5("p", { style: styles.hint }, String(storageRoot)) : null, typeof workspaceMode === "string" && workspaceMode !== "" ? h$5("p", { style: styles.hint }, "存储范围:" + String(workspaceMode)) : null), h$5(Section, { title: total === void 0 ? "记忆条目" : "记忆条目(" + String(available) + ")", hint: "数据来自 Mnemon(本轮只读);搜索在当前页内过滤,暂不开放删除。", aside: h$5("div", { style: styles.actions }, searchExpanded ? h$5("input", { ref: searchRef, style: Object.assign({}, styles.input, { width: "200px", flex: "0 1 auto" }), type: "text", value: search, placeholder: "搜索当前页", spellCheck: false, autoComplete: "off", "aria-label": "搜索当前页", onChange: (event) => setSearch(event.target.value), onKeyDown: (event) => { if (event.key === "Escape" && search === "") setSearchOpen(false); }, onBlur: () => { if (search === "") setSearchOpen(false); } }) : h$5(IconBtn, { glyph: "🔍", ariaLabel: "搜索当前页", onClick: () => setSearchOpen(true) }), h$5(Btn, { label: "刷新", variant: "small", onClick: () => memories.reload() })) }, notice === null ? null : h$5(Banner, { tone: notice.tone }, notice.text), memories.error === null ? null : h$5(Banner, { tone: "bad" }, memories.error), memories.status === "loading" && items.length === 0 ? h$5("p", { style: styles.hint }, "正在读取记忆…") : null, filtered.length === 0 ? memories.data === null ? null : h$5("p", { style: styles.hint }, available === 0 && needle === "" ? "Mnemon 未返回记忆条目。" : "当前页没有匹配的记忆条目。") : h$5("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, filtered.map((item) => h$5("div", { key: item.id, style: styles.row }, h$5("div", { style: styles.rowHead }, h$5("div", { style: styles.pills }, h$5(Pill$1, { label: "归属", value: item.scope === "global" ? "全局" : item.scope === "project" ? "项目记忆" : "—", tone: "muted" }), h$5(Pill$1, { label: "分类", value: item.category === void 0 ? item.mnemon === true ? "待核实" : "无分类" : memoryCategoryLabel(item.category), tone: "muted" }), h$5(Pill$1, { label: "rev", value: item.revision ?? "—", tone: "muted" }), typeof item.createdAt === "string" && item.createdAt !== "" ? h$5(Pill$1, { label: "创建", value: formatIso(item.createdAt), tone: "muted" }) : h$5(Pill$1, { label: "更新", value: formatIso(item.updatedAt), tone: "muted" })), h$5("div", { style: styles.actions }, pendingForget === item.id ? null : h$5(Btn, { label: "删除…", variant: "small", disabled: item.mnemon === true, ariaLabel: item.mnemon === true ? "本轮只读,暂不支持删除 Mnemon 记忆" : void 0, onClick: () => { setPendingForget(item.id); setNotice(null); } }))), h$5("div", { style: styles.clamp2 }, String(item.content ?? "")), h$5("p", { style: styles.hint }, "来源:" + memorySourceLabel(item.source, item.createdAt)), Array.isArray(item.tags) && item.tags.length > 0 ? h$5("p", { style: styles.hint }, "标签:" + item.tags.join("、")) : null, pendingForget === item.id ? h$5("div", { style: styles.nested }, h$5("p", { style: styles.hint }, "确认删除这条记忆?此操作不可撤销。"), h$5("div", { style: styles.actions }, h$5(Btn, { variant: "danger", label: busy === item.id ? "删除中…" : "确认删除", disabled: busy !== "", onClick: () => { forget(item); } }), h$5(Btn, { variant: "small", label: "取消", disabled: busy !== "", onClick: () => setPendingForget(null) }))) : null))), h$5("div", { style: styles.actions }, h$5(Btn, { label: "上一页", variant: "small", disabled: pageOffset === 0, onClick: () => setOffset(pageOffset - PAGE_SIZE) }), h$5("span", { style: styles.hint }, "第 " + String(pageOffset / PAGE_SIZE + 1) + " 页 · " + countLabel), h$5(Btn, { label: "下一页", variant: "small", disabled: pageOffset >= lastOffset, onClick: () => setOffset(pageOffset + PAGE_SIZE) }))), project ? h$5(Section, { title: "文档(只读)", hint: "显示当前工作区的 Mnemon 文档标题与摘要。" }, documents.error === null ? null : h$5(Banner, { tone: "bad" }, documents.error), documents.status === "loading" ? h$5("p", { style: styles.hint }, "正在读取文档…") : null, documents.data === null ? null : documents.data.documents.length === 0 ? h$5("p", { style: styles.hint }, "当前项目还没有文档。") : h$5("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, documents.data.documents.map((doc) => h$5("div", { key: doc.id, style: styles.row }, h$5("div", { style: styles.rowHead }, h$5("span", { style: styles.rowTitle }, String(doc.title ?? doc.id)), h$5("div", { style: styles.pills }, h$5(Pill$1, { label: "rev", value: doc.revision ?? "—", tone: "muted" }), h$5(Pill$1, { label: "更新", value: formatIso(doc.updatedAt), tone: "muted" }))), h$5("div", { style: styles.clamp2 }, String(doc.content ?? "")))))) : null); } // src-client/panel/RawTab.tsx const h$4 = react.createElement; const ROLE_USER = "user"; const ROLE_ASSISTANT = "assistant"; function roleLabel(role) { return role === ROLE_USER ? "你" : role === ROLE_ASSISTANT ? "助手" : role; } function shortId(value) { const text = String(value ?? ""); if (text.length <= 18) return text || "—"; return text.slice(0, 10) + "…" + text.slice(-5); } function when$1(value) { if (typeof value === "number" && Number.isFinite(value)) return formatTime(value); if (typeof value === "string" && value !== "") { const parsed = Date.parse(value); return Number.isFinite(parsed) ? formatTime(parsed) : value; } return "—"; } function metric(label, value) { return h$4("div", { style: s.metric }, h$4("div", { style: s.metricLabel }, label), h$4("div", { style: s.metricValue }, String(value ?? "—"))); } const s = { page: { display: "flex", flexDirection: "column", gap: "14px" }, hero: { display: "flex", gap: "18px", flexWrap: "wrap", alignItems: "stretch", padding: "20px 22px", borderRadius: "18px", border: "1px solid rgba(127,127,127,0.22)", background: "linear-gradient(135deg, rgba(99,102,241,0.14), rgba(139,92,246,0.06) 58%, transparent)" }, heroText: { flex: "1 1 260px", minWidth: "240px", display: "flex", flexDirection: "column", gap: "5px" }, kicker: { fontSize: "10.5px", letterSpacing: ".16em", fontWeight: 700, color: "#6366f1", opacity: .9 }, heroTitle: { margin: 0, fontSize: "22px", lineHeight: 1.2, fontWeight: 720 }, heroSub: { margin: 0, fontSize: "12px", opacity: .62, lineHeight: 1.6, maxWidth: "540px" }, metrics: { display: "grid", gridTemplateColumns: "repeat(2, minmax(84px, 1fr))", gap: "8px", flex: "0 1 280px", minWidth: "220px" }, metric: { border: "1px solid rgba(127,127,127,0.18)", borderRadius: "12px", padding: "10px 12px", background: "rgba(127,127,127,0.07)" }, metricLabel: { fontSize: "10.5px", letterSpacing: ".08em", opacity: .55, fontWeight: 600 }, metricValue: { fontSize: "19px", fontWeight: 720, fontVariantNumeric: "tabular-nums", marginTop: "2px" }, toolbar: { display: "flex", gap: "8px", flexWrap: "wrap", alignItems: "center" }, searchBox: { display: "flex", alignItems: "center", gap: "8px", flex: "1 1 320px", minWidth: "240px", border: "1px solid rgba(127,127,127,0.28)", borderRadius: "12px", padding: "3px 10px", background: "rgba(127,127,127,0.05)" }, searchGlyph: { fontSize: "16px", opacity: .5, flex: "0 0 auto" }, searchInput: { font: "inherit", fontSize: "13px", padding: "7px 2px", border: "none", outline: "none", background: "transparent", color: "inherit", width: "100%", minWidth: 0 }, chips: { display: "flex", gap: "4px", padding: "2px", borderRadius: "9px", border: "1px solid rgba(127,127,127,0.18)" }, chip: { font: "inherit", fontSize: "11.5px", padding: "5px 9px", borderRadius: "7px", border: "1px solid transparent", background: "transparent", color: "inherit", cursor: "pointer" }, chipActive: { border: "1px solid rgba(99,102,241,0.45)", background: "rgba(99,102,241,0.14)", fontWeight: 600 }, layout: { display: "grid", gridTemplateColumns: "repeat(auto-fit, minmax(min(240px, 100%), 1fr))", gap: "12px", alignItems: "start" }, card: { border: "1px solid rgba(127,127,127,0.22)", borderRadius: "16px", padding: "16px", minWidth: 0, display: "flex", flexDirection: "column", gap: "10px" }, cardHead: { display: "flex", alignItems: "baseline", justifyContent: "space-between", gap: "8px", flexWrap: "wrap" }, cardTitle: { margin: 0, fontSize: "13.5px", fontWeight: 650 }, hint: { margin: 0, fontSize: "11.5px", opacity: .58, lineHeight: 1.55 }, sessionList: { display: "flex", flexDirection: "column", gap: "6px", maxHeight: "620px", overflow: "auto" }, session: { display: "flex", flexDirection: "column", gap: "5px", padding: "10px 11px", borderRadius: "11px", border: "1px solid rgba(127,127,127,0.14)", cursor: "pointer", background: "transparent" }, sessionActive: { border: "1px solid rgba(99,102,241,0.55)", background: "rgba(99,102,241,0.10)" }, sessionTitle: { fontWeight: 600, fontSize: "12.5px", overflowWrap: "anywhere" }, sessionMeta: { display: "flex", gap: "8px", flexWrap: "wrap", alignItems: "baseline", fontSize: "11px", opacity: .6 }, sessionSnippet: { fontSize: "11.5px", opacity: .72, overflow: "hidden", display: "-webkit-box", WebkitLineClamp: 2, WebkitBoxOrient: "vertical", lineHeight: 1.45 }, main: { display: "flex", flexDirection: "column", gap: "10px", minWidth: 0 }, resultList: { display: "flex", flexDirection: "column", gap: "6px" }, result: { display: "flex", flexDirection: "column", gap: "5px", padding: "10px 12px", borderRadius: "11px", border: "1px solid rgba(127,127,127,0.14)", cursor: "pointer" }, resultHead: { display: "flex", gap: "8px", flexWrap: "wrap", alignItems: "baseline" }, resultSnippet: { fontSize: "12px", lineHeight: 1.55, whiteSpace: "pre-wrap", overflowWrap: "anywhere" }, messageList: { display: "flex", flexDirection: "column", gap: "9px" }, message: { display: "flex", flexDirection: "column", gap: "5px", padding: "10px 12px", borderRadius: "11px", border: "1px solid rgba(127,127,127,0.12)", borderLeft: "3px solid rgba(99,102,241,0.65)", background: "rgba(127,127,127,0.035)" }, messageAssistant: { borderLeft: "3px solid rgba(16,185,129,0.7)" }, msgHead: { display: "flex", gap: "9px", flexWrap: "wrap", alignItems: "baseline" }, role: { fontSize: "11px", fontWeight: 700, padding: "1px 7px", borderRadius: "999px", background: "rgba(99,102,241,0.14)", color: "inherit" }, roleAssistant: { background: "rgba(16,185,129,0.14)" }, msgMeta: { fontSize: "10.5px", opacity: .52 }, msgText: { fontSize: "12.5px", lineHeight: 1.65, whiteSpace: "pre-wrap", overflowWrap: "anywhere" }, empty: { border: "1px dashed rgba(127,127,127,0.3)", borderRadius: "14px", padding: "26px 20px", textAlign: "center", color: "inherit", opacity: .72, fontSize: "12.5px" }, selectedBar: { display: "flex", alignItems: "baseline", gap: "8px", flexWrap: "wrap" } }; function RawTab(props) { const active = props.active !== false; const [query, setQuery] = react.useState(""); const [role, setRole] = react.useState(""); const [searchResult, setSearchResult] = react.useState(null); const [searchError, setSearchError] = react.useState(null); const [searching, setSearching] = react.useState(false); const [selected, setSelected] = react.useState(null); const [detail, setDetail] = react.useState(null); const [detailError, setDetailError] = react.useState(null); const [detailLoading, setDetailLoading] = react.useState(false); const status = useApi(async () => { const result = await request("/dsh-brain/raw/status"); if (result.status === 404) throw new Error("原始记录接口还没加载:请完全退出并重启 DSH。"); if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error("读取原始记录状态失败(HTTP " + String(result.status) + ")"); return result.body; }, { visible: active, pollMs: 15e3 }); const sessions = useApi(async () => { const result = await request("/dsh-brain/raw/sessions?limit=30"); if (result.status === 404) throw new Error("原始记录接口还没加载:请完全退出并重启 DSH。"); if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error("读取原始会话失败(HTTP " + String(result.status) + ")"); return result.body; }, { visible: active }); const runSearch = async () => { const value = query.trim(); if (value === "") { setSearchResult(null); setSearchError("先输入要搜索的关键词。"); return; } setSearching(true); setSearchError(null); try { const params = new URLSearchParams({ q: value, k: "30" }); if (role !== "") params.set("role", role); const result = await request("/dsh-brain/raw/search?" + params.toString()); if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error("搜索原始记录失败(HTTP " + String(result.status) + ")"); setSearchResult(result.body); } catch (failure) { setSearchError(messageOf(failure)); } finally { setSearching(false); } }; const openSession = async (sessionId, seq) => { setSelected({ sessionId, ...seq === void 0 ? {} : { seq } }); setDetail(null); setDetailError(null); setDetailLoading(true); try { const params = new URLSearchParams({ session_id: sessionId, limit: "100" }); if (seq !== void 0) params.set("seq", String(seq)); const result = await request("/dsh-brain/raw/session?" + params.toString()); if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error("读取会话失败(HTTP " + String(result.status) + ")"); setDetail(result.body); } catch (failure) { setDetailError(messageOf(failure)); } finally { setDetailLoading(false); } }; const sessionRows = Array.isArray(sessions.data?.sessions) ? sessions.data.sessions : []; const matches = Array.isArray(searchResult?.matches) ? searchResult.matches : []; const detailItems = Array.isArray(detail?.items) ? detail.items : []; const disabled = status.data?.enabled === false; return h$4("div", { style: s.page }, status.error === null ? null : h$4(Banner, { tone: "bad" }, status.error), disabled ? h$4(Banner, { tone: "warn" }, "原始记录层当前已停用:在「设置 → 插件」中启用 dsh-brain-raw 子插件后重启 DSH。") : null, h$4("div", { style: s.hero }, h$4("div", { style: s.heroText }, h$4("div", { style: s.kicker }, "RAW MEMORY · 原话档案"), h$4("h3", { style: s.heroTitle }, "原始记录"), h$4("p", { style: s.heroSub }, "这里不筛摘要、不改写,只按会话保存真实对话。记忆条目说不清时,回到原话里核对。")), h$4("div", { style: s.metrics }, metric("记录", status.status === "loading" ? "…" : status.data?.records ?? 0), metric("会话", status.status === "loading" ? "…" : status.data?.sessions ?? 0), metric("占用", status.status === "loading" ? "…" : formatBytes(status.data?.bytes ?? 0)), metric("保留", status.status === "loading" ? "…" : String(status.data?.retentionDays ?? "—") + " 天"))), status.data?.dir === void 0 ? null : h$4("p", { style: s.hint }, "保存目录:" + String(status.data.dir)), h$4("div", { style: s.toolbar }, h$4("div", { style: s.searchBox }, h$4("span", { style: s.searchGlyph }, "⌕"), h$4("input", { style: s.searchInput, type: "text", value: query, placeholder: "搜索原话,例如:预算、接口、苹果…", spellCheck: false, onChange: (event) => setQuery(event.target.value), onKeyDown: (event) => { if (event.key === "Enter") runSearch(); } })), h$4("div", { style: s.chips, role: "tablist", "aria-label": "原始记录角色筛选" }, [ ["", "全部"], ["user", "你"], ["assistant", "助手"] ].map((item) => h$4("button", { key: item[0], type: "button", role: "tab", "aria-selected": role === item[0], style: role === item[0] ? Object.assign({}, s.chip, s.chipActive) : s.chip, onClick: () => setRole(item[0]) }, item[1]))), h$4(Btn, { label: searching ? "搜索中…" : "搜索", variant: "primary", disabled: searching, onClick: () => { runSearch(); } }), searchResult === null ? null : h$4(Btn, { label: "清空结果", variant: "small", onClick: () => { setSearchResult(null); setSearchError(null); } })), searchError === null ? null : h$4(Banner, { tone: "bad" }, searchError), searchResult === null ? null : h$4("div", { style: s.card }, h$4("div", { style: s.cardHead }, h$4("h4", { style: s.cardTitle }, "搜索结果(" + String(searchResult.total ?? matches.length) + ")"), h$4("span", { style: s.hint }, searchResult.truncated === true ? "结果过多,已截断" : "点击结果查看原话")), matches.length === 0 ? h$4("div", { style: s.empty }, "没有找到匹配的原话。") : h$4("div", { style: s.resultList }, matches.map((item, index) => h$4("div", { key: String(item.sessionId) + ":" + String(item.seq ?? index) + ":" + String(index), style: s.result, onClick: () => { openSession(String(item.sessionId), typeof item.seq === "number" ? item.seq : void 0); } }, h$4("div", { style: s.resultHead }, h$4(Pill$1, { label: "角色", value: roleLabel(String(item.role)), tone: "muted" }), h$4(Pill$1, { label: "会话", value: shortId(item.sessionId), tone: "muted" }), item.seq === void 0 ? null : h$4(Pill$1, { label: "seq", value: item.seq, tone: "muted" }), h$4("span", { style: s.msgMeta }, when$1(item.time ?? item.createdAt))), h$4("div", { style: s.resultSnippet }, String(item.snippet ?? "")))))), h$4("div", { style: s.layout }, h$4("div", { style: s.card }, h$4("div", { style: s.cardHead }, h$4("h4", { style: s.cardTitle }, "最近会话"), h$4(Btn, { label: "刷新", variant: "small", onClick: () => { status.reload(); sessions.reload(); } })), sessions.error === null ? null : h$4(Banner, { tone: "bad" }, sessions.error), sessionRows.length === 0 ? h$4("div", { style: s.empty }, "还没有原始记录。重启 DSH 后,新的对话会开始采集。") : h$4("div", { style: s.sessionList }, sessionRows.map((item) => h$4("div", { key: String(item.sessionId), style: selected?.sessionId === item.sessionId ? Object.assign({}, s.session, s.sessionActive) : s.session, onClick: () => { openSession(String(item.sessionId)); } }, h$4("div", { style: s.sessionTitle }, shortId(item.sessionId)), h$4("div", { style: s.sessionMeta }, h$4("span", null, String(item.records ?? 0) + " 条"), h$4("span", null, when$1(item.lastAt)), h$4("span", null, formatBytes(item.bytes ?? 0))), item.latestSnippet === void 0 ? null : h$4("div", { style: s.sessionSnippet }, String(item.latestSnippet)))))), h$4("div", { style: s.card }, selected === null ? h$4("div", { style: s.empty }, "从左侧选择一个会话,或在上方搜索原话。") : h$4("div", { style: s.main }, h$4("div", { style: s.cardHead }, h$4("h4", { style: s.cardTitle }, "会话 " + shortId(selected.sessionId)), h$4("div", { style: s.chips }, h$4(Pill$1, { label: "总记录", value: detailLoading ? "…" : detail?.total ?? "—", tone: "muted" }), selected.seq === void 0 ? null : h$4(Pill$1, { label: "seq", value: selected.seq, tone: "muted" }), h$4(Btn, { label: "查看整个会话", variant: "small", onClick: () => { openSession(String(selected.sessionId)); } }))), detailError === null ? null : h$4(Banner, { tone: "bad" }, detailError), detailLoading ? h$4("p", { style: s.hint }, "正在读取原话…") : null, !detailLoading && detailError === null && detailItems.length === 0 ? h$4("div", { style: s.empty }, "这个会话还没有原始记录。") : null, detailItems.length === 0 ? null : h$4("div", { style: s.messageList }, detailItems.map((item, index) => h$4("div", { key: String(item.messageId ?? item.seq ?? index), style: item.role === ROLE_ASSISTANT ? Object.assign({}, s.message, s.messageAssistant) : s.message }, h$4("div", { style: s.msgHead }, h$4("span", { style: item.role === ROLE_ASSISTANT ? Object.assign({}, s.role, s.roleAssistant) : s.role }, roleLabel(String(item.role))), item.seq === void 0 ? null : h$4("span", { style: s.msgMeta }, "seq " + String(item.seq)), item.turn === void 0 ? null : h$4("span", { style: s.msgMeta }, "turn " + String(item.turn)), h$4("span", { style: s.msgMeta }, when$1(item.time ?? item.createdAt))), h$4("div", { style: s.msgText }, String(item.text ?? ""))))))))); } // src-client/panel/DepartmentTab.tsx const h$3 = react.createElement; const EMPTY_CREATE = { name: "", role: "", skills: "", allowedTools: "", readGlobal: true, readProject: true }; const ENDPOINTS = { list: "/dsh-brain/departments/list", create: "/dsh-brain/departments/create", update: "/dsh-brain/departments/update", disable: "/dsh-brain/departments/disable", checkpoint: "/dsh-brain/departments/checkpoint", recall: "/dsh-brain/departments/recall" }; function DepartmentTab(props) { const active = props.active !== false; const scope = scopeParams(props); const scopeLabel = props.scope === "global" ? "全局" : "项目"; const [notice, setNotice] = react.useState(null); const [busy, setBusy] = react.useState(""); const [form, setForm] = react.useState({ ...EMPTY_CREATE }); const [selectedId, setSelectedId] = react.useState(""); const [detail, setDetail] = react.useState({ role: "", currentTask: "", handoff: "" }); const [recallId, setRecallId] = react.useState(""); const [recallQuery, setRecallQuery] = react.useState(""); const [recallK, setRecallK] = react.useState("5"); const [recallHits, setRecallHits] = react.useState([]); const [recallBusy, setRecallBusy] = react.useState(false); const list = useApi(async () => { const result = await request(ENDPOINTS.list + "?" + scope.toString()); if (result.status !== 200 || result.body === null || result.body.ok !== true) throw new Error(bodyError(result, "读取部门列表失败")); return result.body; }, { visible: active, pollMs: 15e3 }); const departments = Array.isArray(list.data?.departments) ? list.data.departments : []; const selected = departments.filter((item) => item.id === selectedId)[0]; react.useEffect(() => { if (selected !== void 0) setDetail({ role: selected.role ?? "", currentTask: selected.currentTask ?? "", handoff: selected.handoff ?? "" }); }, [selectedId, list.data]); const handleFailure = (result, fallback) => { if (result.status === 409) { setNotice({ tone: "warn", text: "数据已变化,请刷新" }); list.reload(); return false; } setNotice({ tone: "bad", text: bodyError(result, fallback) }); return false; }; const create = async () => { if (String(form.name).trim() === "") { setNotice({ tone: "warn", text: "请填写部门名称。" }); return; } setBusy("create"); try { const result = await postJson(ENDPOINTS.create, { name: String(form.name).trim(), role: String(form.role).trim() || void 0, skills: String(form.skills).split(/[,,\s]+/).filter((value) => value !== ""), allowedTools: String(form.allowedTools).split(/[,,\s]+/).filter((value) => value !== ""), readGlobal: form.readGlobal === true, readProject: form.readProject === true, ...Object.fromEntries(scope) }); if (result.status !== 200 || result.body === null || result.body.ok !== true) { handleFailure(result, "创建部门失败"); return; } setNotice({ tone: "ok", text: result.body.created === false ? "同名部门已存在,已复用。" : "部门已创建。" }); setForm({ ...EMPTY_CREATE }); list.reload(); } catch (failure) { setNotice({ tone: "bad", text: messageOf(failure) }); } finally { setBusy(""); } }; const mutate = async (action) => { if (selected === void 0) return; setBusy(action); const payload = { id: selected.id, expectedRevision: selected.revision, ...Object.fromEntries(scope) }; if (action === "update") { payload.role = detail.role; payload.name = selected.name; } if (action === "checkpoint") { payload.currentTask = detail.currentTask; payload.handoff = detail.handoff; } try { const result = await postJson(action === "update" ? ENDPOINTS.update : action === "disable" ? ENDPOINTS.disable : ENDPOINTS.checkpoint, payload); if (result.status !== 200 || result.body === null || result.body.ok !== true) { handleFailure(result, "操作失败"); return; } setNotice({ tone: "ok", text: action === "update" ? "部门已更新。" : action === "checkpoint" ? "检查点已保存。" : "部门已停用。" }); list.reload(); } catch (failure) { setNotice({ tone: "bad", text: messageOf(failure) }); } finally { setBusy(""); } }; const recall = async () => { if (recallId === "") { setNotice({ tone: "warn", text: "请选择要召回的部门。" }); return; } setRecallBusy(true); setRecallHits([]); try { const result = await request(ENDPOINTS.recall + "?id=" + encodeURIComponent(recallId) + "&query=" + encodeURIComponent(recallQuery) + "&k=" + encodeURIComponent(recallK) + "&" + scope.toString()); if (result.status !== 200 || result.body === null || result.body.ok !== true) { handleFailure(result, "召回失败"); return; } setRecallHits(Array.isArray(result.body.hits) ? result.body.hits : []); } catch (failure) { setNotice({ tone: "bad", text: messageOf(failure) }); } finally { setRecallBusy(false); } }; return h$3("div", { style: { display: "flex", flexDirection: "column", gap: "12px" } }, notice === null ? null : h$3(Banner, { tone: notice.tone }, notice.text), list.error === null ? null : h$3(Banner, { tone: "bad" }, list.error), h$3(Section, { title: scopeLabel + "部门列表", aside: h$3(Btn, { label: "刷新", variant: "small", onClick: () => list.reload() }) }, departments.length === 0 ? h$3("p", { style: styles.hint }, "还没有部门。可在下方创建。") : h$3("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, departments.map((item) => h$3("div", { key: item.id, style: styles.row }, h$3("div", { style: styles.rowHead }, h$3("span", { style: styles.rowTitle }, String(item.name) + "(" + String(item.scope) + ")"), h$3("div", { style: styles.pills }, h$3(Pill$1, { label: "状态", value: item.active === true ? "启用" : "停用", tone: item.active === true ? "ok" : "bad" }), h$3(Pill$1, { label: "rev", value: item.revision ?? "—", tone: "muted" }))), h$3("p", { style: styles.hint }, "当前任务:" + String(item.currentTask ?? "—") + (item.handoff === void 0 ? "" : " · 交接:" + String(item.handoff))), h$3("div", { style: styles.actions }, h$3(Btn, { label: selectedId === item.id ? "收起详情" : "详情 / 编辑", variant: "small", onClick: () => setSelectedId(selectedId === item.id ? "" : item.id) }), h$3(Btn, { label: "设为召回对象", variant: "small", onClick: () => setRecallId(item.id) })), selectedId === item.id ? h$3("div", { style: styles.nested }, h$3("div", { style: styles.grid }, h$3(Field$1, { label: "角色", value: detail.role, onChange: (value) => setDetail({ ...detail, role: value }) }), h$3(Field$1, { label: "当前任务", value: detail.currentTask, onChange: (value) => setDetail({ ...detail, currentTask: value }) }), h$3(Field$1, { label: "交接说明", value: detail.handoff, onChange: (value) => setDetail({ ...detail, handoff: value }) })), h$3("div", { style: styles.actions }, h$3(Btn, { variant: "primary", label: busy === "update" ? "保存中…" : "保存角色", disabled: busy !== "", onClick: () => { mutate("update"); } }), h$3(Btn, { label: busy === "checkpoint" ? "保存中…" : "保存检查点", disabled: busy !== "", onClick: () => { mutate("checkpoint"); } }), h$3(Btn, { variant: "danger", label: busy === "disable" ? "停用中…" : "停用部门", disabled: busy !== "" || item.active !== true, onClick: () => { mutate("disable"); } })), h$3("p", { style: styles.hint }, "创建于 " + formatIso(item.createdAt) + " · 更新于 " + formatIso(item.updatedAt))) : null)))), h$3(Section, { title: "创建" + scopeLabel + "部门", hint: "同名部门会幂等复用,不会覆盖原角色。" }, h$3("div", { style: styles.grid }, h$3(Field$1, { label: "名称", value: form.name, onChange: (value) => setForm({ ...form, name: value }) }), h$3(Field$1, { label: "角色", value: form.role, onChange: (value) => setForm({ ...form, role: value }) }), h$3(Field$1, { label: "技能(逗号分隔)", value: form.skills, onChange: (value) => setForm({ ...form, skills: value }) }), h$3(Field$1, { label: "允许工具(逗号分隔)", value: form.allowedTools, onChange: (value) => setForm({ ...form, allowedTools: value }) })), h$3("div", { style: styles.checkboxRow }, h$3("label", null, h$3("input", { type: "checkbox", checked: form.readGlobal === true, onChange: (event) => setForm({ ...form, readGlobal: event.target.checked }) }), " 可读全局记忆"), h$3("label", null, h$3("input", { type: "checkbox", checked: form.readProject === true, onChange: (event) => setForm({ ...form, readProject: event.target.checked }) }), " 可读项目记忆")), h$3("div", { style: styles.actions }, h$3(Btn, { variant: "primary", label: busy === "create" ? "创建中…" : "创建部门", disabled: busy !== "", onClick: () => { create(); } }))), h$3(Section, { title: "部门召回", hint: "召回结果只展示服务端截断后的 contentSnippet(≤600 字符),并标注来源。" }, h$3("div", { style: styles.grid }, h$3("div", { style: styles.field }, h$3("span", { style: styles.label }, "部门"), h$3("select", { value: recallId, style: styles.input, onChange: (event) => setRecallId(event.target.value) }, h$3("option", { value: "" }, "选择部门…"), departments.map((item) => h$3("option", { key: item.id, value: item.id }, String(item.name))))), h$3(Field$1, { label: "查询", value: recallQuery, onChange: setRecallQuery }), h$3(Field$1, { label: "数量(1-5)", type: "number", value: recallK, onChange: setRecallK })), h$3("div", { style: styles.actions }, h$3(Btn, { label: recallBusy ? "召回中…" : "查询召回", disabled: recallBusy, onClick: () => { recall(); } })), recallHits.length === 0 ? h$3("p", { style: styles.hint }, "暂无召回结果。") : h$3("div", { style: { display: "flex", flexDirection: "column", gap: "8px" } }, recallHits.map((hit, index) => h$3("div", { key: String(index), style: styles.row }, h$3("div", { style: styles.rowHead }, h$3("div", { style: styles.pills }, h$3(Pill$1, { label: "来源", value: hit.origin ?? "—", tone: "muted" }), hit.record?.category === void 0 ? null : h$3(Pill$1, { label: "分类", value: hit.record.category, tone: "muted" }))), h$3("div", { style: styles.clamp2 }, String(hit.contentSnippet ?? hit.content ?? ""))))))); } // src-client/panel/BrainPanel.tsx const h$2 = react.createElement; const TABS$3 = [ { id: "overview", label: "概览" }, { id: "memory", label: "记忆" }, { id: "raw", label: "原始记录" }, { id: "departments", label: "部门" } ]; function BrainPanel() { const [tab, setTab] = react.useState("overview"); let content; if (tab === "overview") content = h$2(Overview); else if (tab === "memory") content = h$2(MemoryTab, { scope: "global" }); else if (tab === "raw") content = h$2(RawTab, {}); else content = h$2(DepartmentTab, { scope: "global" }); return h$2("div", { className: BrainPanel_module_css_default.nativeWorkspace, "data-dsh-plugin": "dsh-brain", "data-dsh-part": "brain-panel" }, h$2("div", { className: BrainPanel_module_css_default.windowDragBand, "data-window-drag": true, "aria-hidden": "true" }), h$2("div", { className: BrainPanel_module_css_default.panelInner }, h$2("div", { className: BrainPanel_module_css_default.header }, h$2("div", { className: BrainPanel_module_css_default.titleBlock }, h$2("h3", { className: BrainPanel_module_css_default.title }, "Brain"), h$2("p", { className: BrainPanel_module_css_default.subtitle }, "全局记忆、原始记录、部门与运行状态"))), h$2("div", { className: BrainPanel_module_css_default.tabBar, role: "tablist", "aria-label": "Brain 面板页签" }, TABS$3.map((item) => h$2("button", { key: item.id, type: "button", role: "tab", "aria-selected": tab === item.id, className: tab === item.id ? BrainPanel_module_css_default.tab + " " + BrainPanel_module_css_default.tabActive : BrainPanel_module_css_default.tab, onClick: () => setTab(item.id) }, item.label))), h$2("div", { className: BrainPanel_module_css_default.content }, content))); } // src-client/panel/register.ts const PANEL_ID = "dsh-brain"; function registerBrainPanel(ctx) { let stopNative; let disposed = false; try { stopNative = ctx.slots.inject("main", () => ctx.slots.inject("sidebar.panellist", () => { const icon = (props) => react.createElement(BrainIcon, { size: props?.size ?? 18 }); const stopMain = ctx.slots.register({ name: "main", key: PANEL_ID }, BrainPanel); let stopIcon; try { stopIcon = ctx.slots.register({ name: "sidebar.panellist", id: PANEL_ID, order: 30, label: () => "Brain", locale: "dsh-brain" }, icon); } catch (failure) { stopMain?.(); throw failure; } return () => { stopIcon?.(); stopMain?.(); }; })); } catch (failure) { if (typeof console !== "undefined") console.info("[dsh-brain] sidebar panel seats unavailable; the settings card fallback stays active: " + (failure instanceof Error ? failure.message : String(failure))); } return () => { if (disposed) return; disposed = true; try { stopNative?.(); } catch {} stopNative = void 0; }; } // \0dsh-brain-css:src-client/sidebar/ProjectMemory.module.css.mjs const css$20 = "/* Adapted from dsh-mnemon MnemonWorkspace.dshbrain_6gleqm.dshbrain_tp0sjt (MIT), see vendor/dsh-mnemon/LICENSE. */\n.dshbrain_ty34oh {\n display: flex;\n width: 100%;\n height: 100%;\n min-width: 0;\n min-height: 0;\n overflow: hidden;\n flex: 1 1 auto;\n color: var(--dsw-alias-label-primary, inherit);\n}\n\n.dshbrain_5jq582 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n width: 100%;\n min-width: 0;\n padding: 12px;\n overflow: auto;\n font-size: 12.5px;\n line-height: 1.5;\n}\n\n.dshbrain_1i1598j,\n.dshbrain_1feix73 {\n margin: 0;\n color: var(--dsw-alias-label-secondary, inherit);\n overflow-wrap: anywhere;\n}\n"; const tagId$16 = "src-client/sidebar/ProjectMemory.module.css"; if (typeof document !== "undefined" && typeof document.querySelector === "function" && typeof document.createElement === "function") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$16) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$16; document.head.appendChild(tag); } if (tag.textContent !== css$20) tag.textContent = css$20; } var ProjectMemory_module_css_default = { "module": "dshbrain_6gleqm", "css": "dshbrain_tp0sjt", "betterSidebarSeat": "dshbrain_ty34oh", "inner": "dshbrain_5jq582", "workspace": "dshbrain_1i1598j", "hint": "dshbrain_1feix73" }; // src-client/sidebar/ProjectMemoryView.tsx const h$1 = react.createElement; const TABS$2 = [{ id: "memory", label: "记忆与文档" }, { id: "departments", label: "部门" }]; function ProjectMemoryView(props) { const [tab, setTab] = react.useState("memory"); const { sessionId } = props; const directory = useApi(async () => { const result = await postJson("/sidebar/api/session.cwd", { sessionId }); const value = result.body?.value; const cwd = typeof value?.cwd === "string" ? value.cwd.trim() : ""; if (result.status !== 200 || result.body?.ok !== true || value?.sessionId !== sessionId || cwd === "") throw new Error("无法确认当前会话的项目目录。"); return cwd; }, { visible: props.visible !== false && sessionId !== void 0 }); const workspace = directory.error === null ? directory.data ?? void 0 : void 0; return h$1("div", { className: ProjectMemory_module_css_default.betterSidebarSeat, "data-dsh-plugin": "dsh-brain", "data-dsh-part": "better-sidebar-memory" }, h$1("div", { className: ProjectMemory_module_css_default.inner }, workspace === void 0 ? h$1("div", null, h$1("p", { className: ProjectMemory_module_css_default.hint }, directory.error ?? "等待当前会话的项目目录。"), directory.error === null ? null : h$1(Btn, { label: "重试", variant: "small", onClick: directory.reload })) : h$1(react.Fragment, null, h$1("p", { className: ProjectMemory_module_css_default.workspace, title: workspace }, workspace), h$1("div", { className: BrainPanel_module_css_default.tabBar, role: "tablist", "aria-label": "项目记忆页签" }, TABS$2.map((item) => h$1("button", { key: item.id, type: "button", role: "tab", "aria-selected": tab === item.id, className: tab === item.id ? BrainPanel_module_css_default.tab + " " + BrainPanel_module_css_default.tabActive : BrainPanel_module_css_default.tab, onClick: () => setTab(item.id) }, item.label))), tab === "memory" ? h$1(MemoryTab, { scope: "project", workspace, key: workspace, active: props.visible }) : h$1(DepartmentTab, { scope: "project", workspace, key: workspace, active: props.visible })))); } // src-client/sidebar/register.ts const BETTER_SIDEBAR_TAB_ID = "dsh-brain:memory"; function mountBrainSidebarTab(ctx) { let current; let disposed = false; const reconcile = () => { if (disposed) return; const service = typeof ctx?.get === "function" ? ctx.get("betterSidebar") : ctx?.betterSidebar; if (current?.service === service) return; current?.dispose(); current = void 0; if (service === void 0 || service === null || typeof service.registerTab !== "function") return; current = { service, dispose: service.registerTab({ id: BETTER_SIDEBAR_TAB_ID, title: () => "项目记忆", description: "查看和管理当前项目的记忆、文档与部门", icon: (size) => react.createElement(BrainIcon, { size }), order: 60, single: true, component: ({ scope, visible }) => { const cwd = scope?.cwd?.trim(); const sessionId = scope?.sessionId?.trim() || void 0; return react.createElement(ProjectMemoryView, { key: JSON.stringify([sessionId, cwd]), sessionId, visible }); } }) }; }; reconcile(); let unsubscribe; if (typeof ctx?.on === "function") try { unsubscribe = ctx.on("internal/service", (name) => { if (name === "betterSidebar") reconcile(); }); } catch { unsubscribe = void 0; } return () => { disposed = true; try { unsubscribe?.(); } catch {} try { current?.dispose(); } catch {} current = void 0; }; } // vendor/dsh-mnemon/src/host/view-protocol.ts const MNEMON_VIEW_CHANNEL = "/dsh-brain-mnemon-view"; const MNEMON_VIEW_WRITE_CHANNEL = "/dsh-brain-mnemon-view-settings"; // vendor/dsh-mnemon/src/host/memory-tools.ts const MEMORY_TOOLS = { mnemon_view_route: { kind: "read", label: "turnTail.tool.viewRoute" }, mnemon_view_action: { kind: "write", label: "turnTail.tool.viewAction" }, mnemon_memory_bodies: { sourceTypeId: "memory-spaces", operation: "inspect", kind: "inspect", page: "memory-spaces/spaces", label: "turnTail.tool.spaces" }, mnemon_recall: { sourceTypeId: "memory-spaces", operation: "recall", kind: "read", page: "memory-spaces/explore", label: "turnTail.tool.recall" }, mnemon_related: { sourceTypeId: "memory-spaces", operation: "related", kind: "read", page: "memory-spaces/explore", label: "turnTail.tool.related" }, mnemon_status: { sourceTypeId: "memory-spaces", operation: "inspect", kind: "inspect", page: "status", label: "turnTail.tool.status" }, mnemon_document_search: { sourceTypeId: "documents", operation: "search", kind: "read", page: "documents/library", label: "turnTail.tool.documentSearch" }, mnemon_document_create: { sourceTypeId: "documents", operation: "create", kind: "write", page: "documents/library", label: "turnTail.tool.documentCreate" }, mnemon_document_manage: { sourceTypeId: "documents", operation: "manage", kind: "write", page: "documents/library", label: "turnTail.tool.documentManage" }, mnemon_runtime_memory: { sourceTypeId: "runtime", operation: "mutate", kind: "write", page: "runtime/entries", label: "turnTail.tool.runtime" }, mnemon_remember: { sourceTypeId: "memory-spaces", operation: "remember", kind: "write", page: "memory-spaces/spaces", label: "turnTail.tool.remember" }, mnemon_link: { sourceTypeId: "memory-spaces", operation: "link", kind: "write", page: "memory-spaces/spaces", label: "turnTail.tool.link" }, mnemon_forget: { sourceTypeId: "memory-spaces", operation: "forget", kind: "write", page: "memory-spaces/spaces", label: "turnTail.tool.forget" }, mnemon_memory_body_create: { sourceTypeId: "memory-spaces", operation: "manage-spaces", kind: "write", page: "memory-spaces/spaces", label: "turnTail.tool.spaceCreate" }, mnemon_memory_body_update: { sourceTypeId: "memory-spaces", operation: "manage-spaces", kind: "write", page: "memory-spaces/spaces", label: "turnTail.tool.spaceUpdate" }, mnemon_memory_body_merge: { sourceTypeId: "memory-spaces", operation: "manage-spaces", kind: "write", page: "memory-spaces/spaces", label: "turnTail.tool.spaceMerge" } }; function memoryTool(name) { return Object.hasOwn(MEMORY_TOOLS, name) ? MEMORY_TOOLS[name] : void 0; } const BRANCH = /^[A-Za-z0-9][A-Za-z0-9._/-]*$/u; const HTTPS = /^https:\/\/[^\s/]+(?::\d+)?\/[^\s]+$/u; const SSH = /^ssh:\/\/[^\s/]+(?::\d+)?\/[^\s]+$/u; const SCP = /^[A-Za-z0-9._-]+@[A-Za-z0-9._-]+:[^\s]+$/u; const SCHEME = /^[A-Za-z][A-Za-z0-9+.-]*:\/\//u; const HTTPS_USER = /^https:\/\/([^/]*)@/u; const USER_TEXT = /^(?:[A-Za-z0-9._~!$&'()*+,;=-]|%[0-9A-Fa-f]{2})+$/u; const NOT_A_NAME = /[:@\s\p{Cc}]/u; const TOKEN_SHAPE = /^(?:gh[opsru]_|github_pat_|glpat-|gldt-|glcbt-|hf_|ATBB|ATCTT|ATATT)|^[0-9A-Fa-f]{32,}$|^[A-Za-z0-9]{52,}$/u; const USER_NAME_MAX = 100; const EMAIL = /^[^\s<>@]+@[^\s<>@]+$/u; const WINDOWS_DRIVE = /^[A-Za-z]:[\\/]/u; const CONTROL = /[\p{Cc}\u2028\u2029]/u; const GITHUB_REPOSITORY = /^(?!\.\.?$)[A-Za-z0-9._-]{1,100}$/u; function syncBranchValid(name) { return name !== "" && name.length <= 200 && BRANCH.test(name) && !name.includes("..") && !name.includes("//") && !name.includes("@{") && !name.includes("\\") && !name.startsWith("/") && !name.endsWith("/") && !name.endsWith(".") && !name.endsWith(".lock") && name !== "@"; } function syncDirectoryParts(value) { const raw = value.trim().replaceAll("\\", "/"); if (raw === "" || raw.length > 400 || /^[A-Za-z]:/u.test(raw)) return void 0; const parts = raw.split("/").filter((part) => part !== ""); return parts.length === 0 || parts.some((part) => part === "." || part === ".." || part.includes(":")) ? void 0 : parts; } function syncRepositoryProblem(url, localPath) { if (url === "" || url.length > 2e3 || /\s/u.test(url)) return "format"; if (SCHEME.test(url)) { if (!HTTPS.test(url) && !SSH.test(url)) return "format"; const user = HTTPS_USER.exec(url)?.[1]; return user === void 0 || syncUserName(user) ? void 0 : "credentials"; } return SCP.test(url) || localPath(url) ? void 0 : "format"; } function syncUserName(written) { if (!USER_TEXT.test(written)) return false; let name; try { name = decodeURIComponent(written); } catch { return false; } return name.length <= USER_NAME_MAX && !NOT_A_NAME.test(name) && !TOKEN_SHAPE.test(name); } function portableAbsolutePath(path) { return path.startsWith("/") || WINDOWS_DRIVE.test(path) || path.startsWith("\\\\"); } function syncEmailValid(email) { return email.length <= 320 && EMAIL.test(email); } function machineLabelValid(label) { return label !== "" && label.length <= 120 && !CONTROL.test(label); } function githubRepositoryNameValid(name) { return GITHUB_REPOSITORY.test(name); } // vendor/dsh-mnemon/src/host/protocol/channels.ts const MNEMON_READ_CHANNEL = "/dsh-brain-mnemon-read"; const MNEMON_ACTIVATION_CHANNEL = "/dsh-brain-mnemon-activation"; const MNEMON_WRITE_CHANNEL = "/dsh-brain-mnemon-write"; const MNEMON_PACK_CHANNEL = "/dsh-brain-mnemon-pack"; const MNEMON_SYNC_CHANNEL = "/dsh-brain-mnemon-sync"; const MNEMON_SYNC_TOKEN_ENV = "MNEMON_SYNC_GIT_TOKEN"; const MNEMON_SYNC_DEFAULT_AUTHOR_NAME = "dsh-brain-mnemon sync"; const MNEMON_SYNC_DEFAULT_AUTHOR_EMAIL = "mnemon@localhost"; const MNEMON_SETTINGS_CHANNEL = "/dsh-brain-mnemon-settings"; const MNEMON_REVIEW_CHANNEL = "/dsh-brain-mnemon-review"; const MNEMON_REMOTE_CHANNEL = "/api"; const MNEMON_REMOTE_NAMESPACE = "dshMnemon"; const MNEMON_REMOTE_READ_ENDPOINT = `${MNEMON_REMOTE_NAMESPACE}/read`; const MNEMON_REMOTE_ACTIVATION_ENDPOINT = `${MNEMON_REMOTE_NAMESPACE}/activation`; const MNEMON_REMOTE_WRITE_ENDPOINT = `${MNEMON_REMOTE_NAMESPACE}/write`; const MNEMON_REMOTE_PACK_ENDPOINT = `${MNEMON_REMOTE_NAMESPACE}/pack`; const MNEMON_REMOTE_SYNC_ENDPOINT = `${MNEMON_REMOTE_NAMESPACE}/sync`; const MNEMON_REMOTE_SETTINGS_ENDPOINT = `${MNEMON_REMOTE_NAMESPACE}/settings`; const MNEMON_REMOTE_VIEW_ENDPOINT = `${MNEMON_REMOTE_NAMESPACE}/view`; const MNEMON_REMOTE_VIEW_WRITE_ENDPOINT = `${MNEMON_REMOTE_NAMESPACE}/viewWrite`; const MNEMON_REMOTE_REVIEW_ENDPOINT = `${MNEMON_REMOTE_NAMESPACE}/review`; const MNEMON_SETTINGS_NAMESPACE = "mnemon"; const MNEMON_UI_SETTINGS_NAMESPACE = "mnemon-ui"; const MNEMON_SKILLS_SETTINGS_NAMESPACE = "mnemon-skills"; // vendor/dsh-mnemon/src/host/starter-components.ts const STARTER_COMPONENT_ROWS = [ { rowId: "mnemon-source-runtime", packageName: "dsh-brain-mnemon-source-runtime" }, { rowId: "mnemon-source-documents", packageName: "dsh-brain-mnemon-source-documents" }, { rowId: "mnemon-source-memory-spaces", packageName: "dsh-brain-mnemon-source-memory-spaces" }, { rowId: "mnemon-source-skills", packageName: "dsh-brain-mnemon-source-skills" }, { rowId: "mnemon-strategy-default-three-tier", packageName: "dsh-brain-mnemon-strategy-default-three-tier" }, { rowId: "mnemon-strategy-general", packageName: "dsh-brain-mnemon-strategy-general" }, { rowId: "mnemon-strategy-auto-capture", packageName: "dsh-brain-mnemon-strategy-auto-capture" }, { rowId: "mnemon-strategy-light-context", packageName: "dsh-brain-mnemon-strategy-light-context" }, { rowId: "mnemon-strategy-scoped", packageName: "dsh-brain-mnemon-strategy-scoped" } ]; // vendor/dsh-mnemon/src/host/display-mode.ts function normalizeDisplayMode(value) { if (value === void 0 || value === "sidebar") return "sidebar"; if (value === "builtin" || value === "buildin") return "builtin"; throw new Error("dsh-brain-mnemon: displayMode must be sidebar or builtin (legacy buildin is accepted)"); } // vendor/dsh-mnemon/src/host/protocol/config.ts function isWorkspaceStorageScope(scope) { return scope === "workspace" || scope === "workspaces"; } const DEFAULT_RUNTIME_MAINTENANCE_MAX_TOKENS = 8192; const DOCUMENTS_DEFAULT_LIMIT_BYTES = 10485760; const DOCUMENTS_MAX_LIMIT_BYTES = 104857600; const DEFAULT_IDLE_REVIEW = { enabled: true, silent: true, runtimeMemory: true, persistWatermark: false, provider: "spawn", fallback: "spawn", agentTeams: "pause", minIntervalMs: 3e5, maxPerSession: 20, maxContextChars: 24e3, maxTokens: 16384 }; const DEFAULT_SKILLS_CONFIG = Object.freeze({ evolution: false, allowCreate: true, allowUpdate: true, allowLinkedUpdates: false, targetScope: "user", autoBacktest: true, autoAdopt: false, autoAdoptDailyLimit: 2, autoAdoptTimeZone: "local", draftMaxTokens: 32768, draftRetryMaxTokens: 65536, hints: true, sidebar: false, reviewThreshold: 5, idleSeconds: 20, cooldownSeconds: 150, minConfidence: .6, expiryDays: 7, maxPendingPerSession: 5, casesPerRun: 8 }); function validSkillsTimeZone(value) { if (value === "local") return true; if (!value || value.length > 100) return false; try { new Intl.DateTimeFormat("en", { timeZone: value }).format(0); return true; } catch { return false; } } // vendor/dsh-mnemon/src/host/protocol/memory.ts function isDefaultSourceInstance(instanceKey, sourceTypeId) { if (!instanceKey.startsWith("source:")) return false; return instanceKey.endsWith(":mnemon-source-" + sourceTypeId) || instanceKey.endsWith(":dsh-brain-mnemon-source-" + sourceTypeId); } function namedToolInstance(instances, sourceTypeId) { return instances.find((source) => isDefaultSourceInstance(source.sourceInstanceKey, sourceTypeId)) ?? (instances.length === 1 ? instances[0] : void 0); } // vendor/dsh-mnemon/src/host/protocol/pack-sync-review.ts const MNEMON_PACK_COMPONENTS = [ "runtime", "documents", "memory-spaces" ]; // vendor/dsh-mnemon/src/client/component-ui.tsx const MNEMON_COMPONENT_SETTINGS_SLOT = "mnemon.component.settings"; const COMPONENT_SETTINGS_SECTIONS = { "dsh-brain-mnemon-source-memory-spaces": ["policy", "recall"], "dsh-brain-mnemon-source-skills": ["models", "market"] }; function supportsMemoryComponentSettingsSection(packageName, section) { return Object.hasOwn(COMPONENT_SETTINGS_SECTIONS, packageName) && COMPONENT_SETTINGS_SECTIONS[packageName].includes(section); } const MNEMON_COMPONENT_STATUS_SLOT = "mnemon.component.status"; const PACKAGE_NAME$1 = /^(@[a-z0-9-~][a-z0-9-._~]*\/)?[a-z0-9-~][a-z0-9-._~]*$/u; function installMemoryComponentUI(ctx, contribution) { return installRegions(ctx, contribution, {}); } function installMemoryComponentFallbackUI(ctx, contribution) { return installRegions(ctx, contribution, { priority: 100 }); } function installRegions(ctx, contribution, order) { const key = contribution.packageName; if (!PACKAGE_NAME$1.test(key)) throw new Error("memory component UI requires the package name of the component"); const { settings, status } = contribution; const register = ctx.slots.register; const disposers = []; if (settings !== void 0) disposers.push(ctx.slots.inject(MNEMON_COMPONENT_SETTINGS_SLOT, () => register.call(ctx.slots, { name: MNEMON_COMPONENT_SETTINGS_SLOT, key, ...order }, (props) => (0, react.createElement)(settings, props)))); if (status !== void 0) disposers.push(ctx.slots.inject(MNEMON_COMPONENT_STATUS_SLOT, () => register.call(ctx.slots, { name: MNEMON_COMPONENT_STATUS_SLOT, key, ...order }, (props) => (0, react.createElement)(status, props)))); if (disposers.length === 0) throw new Error("memory component UI contributes nothing: " + key); return () => { for (const dispose of disposers.reverse()) dispose(); }; } function createComponentRegionDirectory(ctx, region) { let version = -1; let snapshot = /* @__PURE__ */ new Set(); const read = () => { const current = ctx.slots.getVersion(region); if (current === version) return snapshot; version = current; snapshot = new Set(ctx.slots.entriesOfSlot(region).flatMap((entry) => entry.options.key === void 0 ? [] : [entry.options.key])); return snapshot; }; return { getSnapshot: read, subscribe: (listener) => ctx.slots.subscribe(region, () => { read(); listener(); }) }; } function createComponentSettingsDirectory(ctx) { return createComponentRegionDirectory(ctx, MNEMON_COMPONENT_SETTINGS_SLOT); } var ContributionBoundary = class extends react.Component { state = { failed: false }; static getDerivedStateFromError() { return { failed: true }; } componentDidCatch(error, info) { console.error(`dsh-brain-mnemon: the interface ${this.props.packageName} contributed failed`, error, info.componentStack); } render() { return this.state.failed ? null : this.props.children; } }; function renderComponentRegion(ctx, region, packageName, props) { const entry = ctx.slots.entriesOfSlot(region).find((candidate) => candidate.options.key === packageName); return entry === void 0 ? null : (0, react.createElement)(ContributionBoundary, { packageName, children: (0, react.createElement)(entry.component, props) }); } // vendor/dsh-mnemon/src/client/remote-rpc.ts const REMOTE_ENDPOINT = /* @__PURE__ */ new Map([ [MNEMON_READ_CHANNEL, MNEMON_REMOTE_READ_ENDPOINT], [MNEMON_ACTIVATION_CHANNEL, MNEMON_REMOTE_ACTIVATION_ENDPOINT], [MNEMON_WRITE_CHANNEL, MNEMON_REMOTE_WRITE_ENDPOINT], [MNEMON_PACK_CHANNEL, MNEMON_REMOTE_PACK_ENDPOINT], [MNEMON_SYNC_CHANNEL, MNEMON_REMOTE_SYNC_ENDPOINT], [MNEMON_REVIEW_CHANNEL, MNEMON_REMOTE_REVIEW_ENDPOINT], [MNEMON_SETTINGS_CHANNEL, MNEMON_REMOTE_SETTINGS_ENDPOINT], [MNEMON_VIEW_CHANNEL, MNEMON_REMOTE_VIEW_ENDPOINT], [MNEMON_VIEW_WRITE_CHANNEL, MNEMON_REMOTE_VIEW_WRITE_ENDPOINT] ]); function isClientRpcResult(value) { if (typeof value !== "object" || value === null || !Object.hasOwn(value, "ok")) return false; const candidate = value; if (candidate.ok === true) return Object.hasOwn(candidate, "value"); if (candidate.ok !== false || typeof candidate.error !== "object" || candidate.error === null) return false; return typeof candidate.error.message === "string"; } function isLoopbackHostname(hostname) { if (hostname === "localhost" || hostname === "[::1]") return true; const parts = hostname.split("."); return parts.length === 4 && parts[0] === "127" && parts.every((part) => /^\d{1,3}$/.test(part) && Number(part) <= 255); } const connectionRemoteAccess = /* @__PURE__ */ new WeakMap(); function bindConnectionRemoteAccess(connection, capability) { if (capability === void 0) { connectionRemoteAccess.delete(connection); return () => {}; } connectionRemoteAccess.set(connection, capability); return () => { if (connectionRemoteAccess.get(connection) === capability) connectionRemoteAccess.delete(connection); }; } function resolveRemoteOwnerState(capability) { if (capability === void 0) return void 0; const directOwner = typeof capability.isOwner === "function" ? capability.isOwner() : capability.isOwner ?? capability.owner; if (typeof directOwner === "boolean") return directOwner; if (typeof capability.principal === "string") return capability.principal === "owner"; if (typeof capability.getSnapshot === "function") { const snapshot = capability.getSnapshot(); if (typeof snapshot?.isOwner === "boolean") return snapshot.isOwner; if (typeof snapshot?.owner === "boolean") return snapshot.owner; if (typeof snapshot?.principal === "string") return snapshot.principal === "owner"; } const internalKind = capability.state?.snapshot?.kind; if (internalKind === "owner") return true; if (internalKind === "granted") return false; if (internalKind !== "closed" && typeof capability.source === "function") { const probe = capability.source("\0global", "", "__dsh_owner_probe__"); if (typeof probe === "boolean") return probe; if (probe !== null && typeof probe === "object") { if (typeof probe.getSnapshot === "function") return Boolean(probe.getSnapshot()); if (typeof probe.isOwner === "boolean") return probe.isOwner; if (typeof probe.allowed === "boolean") return probe.allowed; } } } function isApplicationPage(page) { const protocol = page?.protocol; return typeof protocol === "string" && protocol !== "" && protocol !== "http:" && protocol !== "https:"; } function isRemoteConnection(connection) { const page = globalThis.location; const ownerState = resolveRemoteOwnerState(connectionRemoteAccess.get(connection) ?? connection.remoteAccess); if (ownerState !== void 0) { if (!ownerState) return true; if (isApplicationPage(page)) return false; const hostname = page?.hostname; return typeof hostname === "string" && hostname !== "" && !isLoopbackHostname(hostname); } if (isApplicationPage(page)) { const transport = globalThis.__DSH_TRANSPORT__; return transport !== void 0 && transport !== null && transport.ownsHost !== true; } const hostname = page?.hostname; return typeof hostname === "string" && hostname !== "" && !isLoopbackHostname(hostname) || !connection.isLoopback; } async function callMnemonRpc(connection, channel, endpoint, payload, signal) { const remoteEndpoint = REMOTE_ENDPOINT.get(channel); if (!isRemoteConnection(connection) || remoteEndpoint === void 0) return signal === void 0 ? connection.rpc.call(channel, endpoint, payload) : connection.rpc.call(channel, endpoint, payload, signal); const remotePayload = { args: { endpoint, payload } }; const response = await (signal === void 0 ? connection.rpc.call(MNEMON_REMOTE_CHANNEL, remoteEndpoint, remotePayload) : connection.rpc.call(MNEMON_REMOTE_CHANNEL, remoteEndpoint, remotePayload, signal)); if (!response.ok) return response; if (!isClientRpcResult(response.value)) throw new Error("DSH API Gateway returned an invalid Mnemon response"); return response.value; } // vendor/dsh-mnemon/src/client/api.ts const MAX_TURN_ACTIVITY_SESSIONS = 32; const turnActivityCache = /* @__PURE__ */ new WeakMap(); function touchTurnActivityEntry(sessions, key, entry) { sessions.delete(key); sessions.set(key, entry); if (sessions.size <= MAX_TURN_ACTIVITY_SESSIONS) return; for (const [candidateKey, candidate] of sessions) if (candidateKey !== key && candidate.inFlight === void 0) { sessions.delete(candidateKey); if (sessions.size <= MAX_TURN_ACTIVITY_SESSIONS) return; } while (sessions.size > MAX_TURN_ACTIVITY_SESSIONS) { const oldest = sessions.keys().next().value; if (oldest === void 0 || oldest === key) break; sessions.delete(oldest); } } async function loadTurnActivities(connection, sessionId, requiredCursor) { let sessions = turnActivityCache.get(connection); if (sessions === void 0) { sessions = /* @__PURE__ */ new Map(); turnActivityCache.set(connection, sessions); } const key = sessionId ?? ""; let entry = sessions.get(key); if (entry === void 0) entry = { cursor: -1, activities: /* @__PURE__ */ new Map() }; touchTurnActivityEntry(sessions, key, entry); if (entry.cursor >= requiredCursor) return { cursor: entry.cursor, activities: [...entry.activities.values()] }; if (entry.inFlight !== void 0) { const snapshot = await entry.inFlight; return snapshot.cursor >= requiredCursor ? snapshot : loadTurnActivities(connection, sessionId, requiredCursor); } const request = callMnemonRpc(connection, MNEMON_READ_CHANNEL, "turn-activities", sessionId === void 0 ? {} : { sessionId }).then((response) => { if (!response.ok) throw new Error(response.error.message); const snapshot = response.value; entry.cursor = snapshot.cursor; entry.activities = new Map(snapshot.activities.map((activity) => [activity.turn, activity])); return snapshot; }).finally(() => { delete entry.inFlight; }); entry.inFlight = request; return request; } var MnemonClient = class { connection; sessionId; workspaceId; constructor(connection, sessionId, workspaceId) { this.connection = connection; this.sessionId = sessionId; this.workspaceId = workspaceId; } async call(channel, endpoint, payload) { const response = await callMnemonRpc(this.connection, channel, endpoint, payload); if (!response.ok) { const reason = response.error.details?.reason; throw Object.assign(new Error(response.error.message), typeof reason === "string" ? { reason } : {}); } return response.value; } scoped(payload = {}) { return { ...payload, ...this.sessionId === void 0 ? {} : { sessionId: this.sessionId }, ...this.workspaceId === void 0 ? {} : { workspaceId: this.workspaceId } }; } status() { return this.call(MNEMON_READ_CHANNEL, "status", this.scoped()); } statusSummary() { return this.call(MNEMON_READ_CHANNEL, "status-summary", this.scoped()); } memorySystem() { return this.call(MNEMON_READ_CHANNEL, "memory-system", this.scoped()); } viewDashboard() { return this.call(MNEMON_VIEW_CHANNEL, "dashboard", this.scoped()); } applyView(configuration) { return this.call(MNEMON_VIEW_WRITE_CHANNEL, "apply", this.scoped({ configuration, confirmed: true })); } sourceManagementCatalog() { return this.call(MNEMON_READ_CHANNEL, "source-management-catalog", this.scoped()); } readSourceManagement(sourceInstanceKey, operation, input = null) { return this.call(MNEMON_READ_CHANNEL, "source-management-read", this.scoped({ sourceInstanceKey, operation, input })); } mutateSourceManagement(sourceInstanceKey, operation, input, expectedRevision, confirmed) { return this.call(MNEMON_WRITE_CHANNEL, "source-management-mutate", this.scoped({ sourceInstanceKey, operation, input, expectedRevision, confirmed })); } assistSource(sourceInstanceKey, operation, input, expectedRevision, confirmed) { return this.call(operation === "activation" ? MNEMON_ACTIVATION_CHANNEL : confirmed ? MNEMON_WRITE_CHANNEL : MNEMON_READ_CHANNEL, "source-assistance", this.scoped({ sourceInstanceKey, operation, input, expectedRevision, confirmed })); } taskAgentModels(includeCatalog) { return this.call(MNEMON_READ_CHANNEL, "task-agent-models", this.scoped(includeCatalog === void 0 ? {} : { includeCatalog })); } versions() { return this.call(MNEMON_READ_CHANNEL, "versions", {}); } updateVersion(component) { return this.call(MNEMON_WRITE_CHANNEL, "version-update", { component }); } componentOperation(mode, endpoint, payload) { return this.call(mode === "read" ? MNEMON_READ_CHANNEL : MNEMON_WRITE_CHANNEL, endpoint, this.scoped(payload)); } async turnActivity(turn, cursor = 0) { return (await loadTurnActivities(this.connection, this.sessionId, cursor)).activities.find((activity) => activity.turn === turn) ?? null; } skillActivity() { return this.call(MNEMON_READ_CHANNEL, "skill-activity", { sessionId: this.sessionId }); } assistantMessageText(messageId) { return this.call(MNEMON_READ_CHANNEL, "assistant-message", { sessionId: this.sessionId, messageId }); } supervise(content, idempotencyKey) { return this.call(MNEMON_WRITE_CHANNEL, "supervise", this.scoped({ content, ...idempotencyKey === void 0 ? {} : { idempotencyKey } })); } packTarget() { return this.call(MNEMON_PACK_CHANNEL, "target", this.scoped()); } exportPack() { return this.call(MNEMON_PACK_CHANNEL, "export", this.scoped()); } inspectPack(base64, fileName) { return this.call(MNEMON_PACK_CHANNEL, "inspect", this.scoped({ base64, ...fileName === void 0 ? {} : { fileName } })); } importPack(base64) { return this.call(MNEMON_PACK_CHANNEL, "import", this.scoped({ base64 })); } reviewLedger() { return this.call(MNEMON_REVIEW_CHANNEL, "view", {}); } reconcile(guidance) { const text = guidance?.trim() ?? ""; return this.call(MNEMON_REVIEW_CHANNEL, "reconcile", this.scoped(text === "" ? {} : { guidance: text })); } reviewOpinion(id, text, author = "user") { return this.call(MNEMON_REVIEW_CHANNEL, "opinion", { id, text, author }); } decideReview(id, status) { return this.call(MNEMON_REVIEW_CHANNEL, "decide", { id, status }); } reopenReview(id) { return this.call(MNEMON_REVIEW_CHANNEL, "reopen", { id }); } applyReview(id, operations) { return this.call(MNEMON_REVIEW_CHANNEL, "apply", this.scoped({ id, ...operations === void 0 ? {} : { operations } })); } syncStatus() { return this.call(MNEMON_SYNC_CHANNEL, "status", this.scoped()); } configureSync(patch) { return this.call(MNEMON_SYNC_CHANNEL, "configure", this.scoped(patch)); } pushSync(message) { return this.call(MNEMON_SYNC_CHANNEL, "push", this.scoped({ ...message === void 0 ? {} : { message }, confirmed: true })); } previewSync() { return this.call(MNEMON_SYNC_CHANNEL, "preview", this.scoped()); } syncBackups(limit) { return this.call(MNEMON_SYNC_CHANNEL, "backups", this.scoped(limit === void 0 ? {} : { limit })); } syncDiff() { return this.call(MNEMON_SYNC_CHANNEL, "diff", this.scoped()); } pullSync(components, revive) { return this.call(MNEMON_SYNC_CHANNEL, "pull", this.scoped({ ...components === void 0 ? {} : { components }, ...revive === true ? { revive: true } : {}, confirmed: true })); } githubStatus() { return this.call(MNEMON_SYNC_CHANNEL, "github-status", this.scoped()); } githubStart() { return this.call(MNEMON_SYNC_CHANNEL, "github-start", this.scoped()); } githubPoll() { return this.call(MNEMON_SYNC_CHANNEL, "github-poll", this.scoped()); } githubCancel() { return this.call(MNEMON_SYNC_CHANNEL, "github-cancel", this.scoped()); } githubSignOut() { return this.call(MNEMON_SYNC_CHANNEL, "github-signout", this.scoped()); } githubRepositories() { return this.call(MNEMON_SYNC_CHANNEL, "github-repositories", this.scoped()); } githubCreateRepository(name, isPrivate) { return this.call(MNEMON_SYNC_CHANNEL, "github-create", this.scoped({ name, private: isPrivate })); } }; // vendor/dsh-mnemon/src/client/localized-text.ts const MNEMON_LOCALE_IDS = [ "en", "zh", "ja", "es", "fr", "de", "ru", "pt" ]; const MNEMON_LOCALE_SET = new Set(MNEMON_LOCALE_IDS); function normalizeLocale(language) { return language.trim().toLowerCase().replaceAll("_", "-"); } function isMnemonLocaleId(value) { return MNEMON_LOCALE_SET.has(value); } function matchMnemonLocale(language) { const base = normalizeLocale(language).split("-")[0] ?? ""; return isMnemonLocaleId(base) ? base : void 0; } function resolveMnemonLocale(preference) { return (typeof preference === "string" ? matchMnemonLocale(preference) : preference.map(normalizeLocale).find(isMnemonLocaleId)) ?? "en"; } function localeFallbackChain(snapshot) { const fallbacks = new Map(snapshot.locales.map(({ id, fallback }) => [normalizeLocale(id), fallback])); const chain = []; const seen = /* @__PURE__ */ new Set(); for (let id = snapshot.active; id !== void 0;) { const key = normalizeLocale(id); if (seen.has(key) || chain.length > 0 && !fallbacks.has(key)) break; seen.add(key); chain.push(id); id = fallbacks.get(key); } if (!seen.has("en")) chain.push("en"); return chain; } function pickLocalizedText(value, preference) { if (value == null) return ""; if (typeof value === "string") return value; const record = value; const entries = Object.entries(record); const findKey = (target) => { const exact = record[target]; if (typeof exact === "string" && exact !== "") return exact; return entries.find(([key, item]) => normalizeLocale(key) === target && typeof item === "string" && item !== "")?.[1]; }; const candidates = typeof preference === "string" ? [normalizeLocale(preference), normalizeLocale(preference).split("-")[0]] : preference.map(normalizeLocale); for (const id of candidates) { if (id === "") continue; const translated = findKey(id) ?? (id === "zh" ? findKey("zh-cn") : void 0); if (translated !== void 0) return translated; } const en = findKey("en"); if (en !== void 0) return en; return entries.find(([, item]) => typeof item === "string" && item !== "")?.[1] ?? ""; } // vendor/dsh-mnemon/src/client/component-copy.ts const SHIPPED_PACKAGES = new Set(STARTER_COMPONENT_ROWS.map((row) => row.packageName)); const EXPERIMENTAL_PACKAGES = /* @__PURE__ */ new Set(["dsh-brain-mnemon-source-skills"]); function isExperimental(entry) { return EXPERIMENTAL_PACKAGES.has(entry.packageName); } function isShipped(entry) { return SHIPPED_PACKAGES.has(entry.packageName); } function componentCopy(entry, preference) { return { label: pickLocalizedText(entry.label, preference), hint: pickLocalizedText(entry.description, preference) }; } function nameList(names, t) { return names.map((name) => t("config.quoted", { name })).join(t("config.listSeparator")); } // vendor/dsh-mnemon/src/client/component-model.ts const SHIPPED_SOURCE_PREFIX = "dsh-brain-mnemon-source-"; const ANY_STRATEGY = "*"; const running = (entry) => entry.enabled && entry.active; function componentModel(dashboard) { const mains = dashboard.entries.filter((entry) => entry.roles.includes("strategy") && entry.typeId !== void 0); const enhancements = dashboard.entries.filter((entry) => entry.roles.includes("strategy-extension")); const selected = mains.find((entry) => entry.typeId === dashboard.strategyTypeId); const others = mains.filter((entry) => entry !== selected && running(entry)); const composing = selected !== void 0 && running(selected) ? selected : others.length === 1 ? others[0] : void 0; return { mains, enhancements, selected, composing, idle: composing === selected ? others : [], contenders: composing === void 0 && others.length > 1 ? others : [] }; } function layerOf(entry) { if (!entry.roles.includes("source")) return void 0; if (entry.typeId !== void 0) return entry.typeId; return entry.packageName.startsWith(SHIPPED_SOURCE_PREFIX) ? entry.packageName.slice(24) : void 0; } function sourceOf(dashboard, layerId) { const sources = dashboard.entries.filter((entry) => entry.roles.includes("source")); return sources.find((entry) => entry.typeId === layerId) ?? sources.find((entry) => layerOf(entry) === layerId); } function provides(entry, capability) { return entry.provides.some((value) => value.id === capability); } function implicitCapabilities(dashboard) { const managed = new Set(dashboard.entries.map((entry) => entry.packageName)); return new Set(dashboard.sources.filter((source) => !managed.has(source.packageName)).flatMap((source) => ["source", "source." + source.role])); } function conflicts(left, right) { if (left === right) return false; if (left.provides.some((capability) => right.provides.some((other) => other.id === capability.id && (capability.exclusive || other.exclusive)))) return true; if (left.slot === void 0 || left.slot !== right.slot || !left.roles.includes("strategy-extension") || !right.roles.includes("strategy-extension")) return false; const [one, two] = [left.strategyTypeId ?? ANY_STRATEGY, right.strategyTypeId ?? ANY_STRATEGY]; return one === two || one === ANY_STRATEGY || two === ANY_STRATEGY; } function planSwitches(dashboard, asked) { const state = new Map(dashboard.entries.map((entry) => [entry.entryId, entry.enabled])); const implicit = implicitCapabilities(dashboard); const reasons = /* @__PURE__ */ new Map(); const wanted = new Map(asked.map(({ entry, enabled }) => [entry.entryId, enabled])); const on = (entry) => state.get(entry.entryId) === true; const set = (entry, enabled, reason) => { state.set(entry.entryId, enabled); if (reason !== void 0 && !wanted.has(entry.entryId)) reasons.set(entry.entryId, reason); }; const turnedOn = []; for (const { entry, enabled } of asked) { set(entry, enabled); if (enabled) turnedOn.push(entry); } for (let index = 0; index < turnedOn.length; index += 1) { const entry = turnedOn[index]; for (const other of dashboard.entries) if (on(other) && wanted.get(other.entryId) !== true && conflicts(entry, other)) set(other, false, "conflict"); for (const requirement of entry.requires) { if (implicit.has(requirement) || dashboard.entries.some((candidate) => on(candidate) && provides(candidate, requirement))) continue; const provider = dashboard.entries.find((candidate) => !on(candidate) && candidate.writable && wanted.get(candidate.entryId) !== false && provides(candidate, requirement) && !dashboard.entries.some((other) => on(other) && conflicts(candidate, other))); if (provider === void 0) continue; set(provider, true, "needed"); turnedOn.push(provider); } } const metBefore = (requirement) => implicit.has(requirement) || dashboard.entries.some((candidate) => candidate.enabled && provides(candidate, requirement)); const metNow = (requirement) => implicit.has(requirement) || dashboard.entries.some((candidate) => on(candidate) && provides(candidate, requirement)); for (let moved = true; moved;) { moved = false; for (const entry of dashboard.entries) { if (!on(entry) || !entry.enabled || !entry.requires.some((requirement) => metBefore(requirement) && !metNow(requirement))) continue; if (entry.roles.includes("strategy")) return { blocked: "last-source" }; set(entry, false, "dependent"); moved = true; } } return { changes: dashboard.entries.flatMap((entry) => { const enabled = state.get(entry.entryId); if (enabled === entry.enabled && !wanted.has(entry.entryId)) return []; const reason = reasons.get(entry.entryId); return [{ entry, enabled, ...reason === void 0 ? {} : { reason } }]; }) }; } function switchPlan(dashboard, entry, enabled) { return planSwitches(dashboard, [{ entry, enabled }]); } function mainPlan(dashboard, entry) { const others = dashboard.entries.filter((other) => other !== entry && other.enabled && other.roles.includes("strategy") && other.typeId !== void 0); return planSwitches(dashboard, [{ entry, enabled: true }, ...others.map((other) => ({ entry: other, enabled: false }))]); } function relationsOf(dashboard, entry) { const implicit = implicitCapabilities(dashboard); return { needs: entry.requires.map((requirement) => { const providers = dashboard.entries.filter((candidate) => candidate !== entry && provides(candidate, requirement)); return { requirement, providers, met: implicit.has(requirement) || providers.some((candidate) => candidate.enabled) }; }), neededBy: !entry.enabled ? [] : dashboard.entries.filter((candidate) => candidate !== entry && candidate.enabled && candidate.requires.some((requirement) => provides(entry, requirement) && !implicit.has(requirement) && !dashboard.entries.some((other) => other !== entry && other.enabled && provides(other, requirement)))), conflictsWith: dashboard.entries.filter((candidate) => conflicts(entry, candidate)) }; } function unmetRequirements(dashboard, entry) { const implicit = implicitCapabilities(dashboard); return entry.requires.flatMap((requirement) => implicit.has(requirement) || dashboard.entries.some((candidate) => candidate.enabled && provides(candidate, requirement)) ? [] : [{ requirement, providers: dashboard.entries.filter((candidate) => !candidate.enabled && provides(candidate, requirement)) }]); } function enhancementApplies(entry, composing) { return composing !== void 0 && (entry.strategyTypeId === void 0 || entry.strategyTypeId === ANY_STRATEGY || entry.strategyTypeId === composing.typeId); } const css$19 = "._v_wrq_page{box-sizing:border-box;width:100%;min-width:0;color:var(--dsw-alias-label-primary);flex-direction:column;gap:32px;font-family:inherit;display:flex}._v_wrq_surface{color:var(--dsw-alias-label-primary)}:where(._v_wrq_page,._v_wrq_surface) *,:where(._v_wrq_page,._v_wrq_surface) :before,:where(._v_wrq_page,._v_wrq_surface) :after{box-sizing:border-box}:where(._v_wrq_page,._v_wrq_surface) :where(button,input,select,textarea){color:inherit;font:inherit}._v_wrq_loading{min-height:200px;color:var(--dsw-alias-label-tertiary);text-align:center;place-items:center;margin:0;font-size:13px;line-height:20px;display:grid}._v_wrq_page>:not(._v_wrq_loading){animation:.14s cubic-bezier(.22,1,.36,1) both _v_wrq_settings-fade-in}@keyframes _v_wrq_settings-fade-in{0%{opacity:0}}._v_wrq_section{flex-direction:column;gap:4px;min-width:0;display:flex}._v_wrq_sectionHeading{grid-template-columns:minmax(0,1fr) auto;align-items:start;column-gap:12px;min-width:0;display:grid}._v_wrq_sectionHeading h2{grid-column:1;margin:0;font-size:14px;font-weight:500;line-height:20px}._v_wrq_sectionHeading p{max-width:66ch;color:var(--dsw-alias-label-tertiary);grid-column:1;margin:2px 0 0;font-size:12px;line-height:18px}._v_wrq_sectionHeading ._v_wrq_miniSpinner{grid-area:1/2}._v_wrq_sectionHeading>._v_wrq_boardLinks{grid-column:1;padding-top:6px}._v_wrq_componentListNote{max-width:72ch;color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}._v_wrq_appliesNow{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-xs);color:var(--dsw-alias-label-secondary);white-space:nowrap;grid-area:1/2;align-self:center;padding:1px 6px;font-size:11px;line-height:16px}._v_wrq_rows{flex-direction:column;min-width:0;display:flex}._v_wrq_settingRow,._v_wrq_toggleRow{border-bottom:.5px solid var(--dsw-alias-border-l2);flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:8px 16px;min-width:0;padding:14px 0;display:flex;position:relative}._v_wrq_rows>:last-child,._v_wrq_rows>._v_wrq_packRow:last-child>._v_wrq_settingRow{border-bottom:0}._v_wrq_rows>._v_wrq_packRow:last-child{padding-bottom:0}._v_wrq_settingRow[data-stacked]{flex-direction:column;align-items:stretch}._v_wrq_settingCopy{flex-direction:column;flex:auto;gap:2px;min-width:0;display:flex}._v_wrq_settingCopy strong,._v_wrq_settingCopy label{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}._v_wrq_settingCopy small{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}._v_wrq_rowTitleLine,._v_wrq_boardRowTitle{flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0;display:flex}._v_wrq_rowTitleLine [data-tone],._v_wrq_boardRowTitle [data-tone]{align-items:center;height:20px;padding:0 7px;line-height:1;display:inline-flex}._v_wrq_settingCopy code{font-family:var(--dsw-font-mono,var(--ds-font-family-code,ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace))}._v_wrq_settingControl{flex:none;justify-content:flex-end;align-items:center;gap:8px;min-width:0;display:flex}._v_wrq_settingRow[data-stacked] ._v_wrq_settingControl{flex:auto;justify-content:stretch}._v_wrq_switch{flex:none}._v_wrq_rowNote{min-width:0;color:var(--dsw-alias-label-secondary);flex-wrap:wrap;align-items:center;gap:4px 8px;padding-top:4px;font-size:12px;line-height:18px;display:flex}._v_wrq_groupCallout{margin:8px 0 4px}._v_wrq_boardSection{container-type:inline-size}._v_wrq_board{flex-direction:column;min-width:0;margin-top:10px;display:flex}._v_wrq_boardProblem{margin:0 0 4px}._v_wrq_boardLoading{min-height:40px;color:var(--dsw-alias-label-secondary);align-items:center;gap:8px;margin:0;font-size:13px;line-height:20px;display:flex}._v_wrq_boardGroup{flex-direction:column;min-width:0;padding-top:14px;display:flex}._v_wrq_boardGroupHead{justify-content:space-between;align-items:baseline;gap:8px;min-width:0;display:flex}._v_wrq_boardGroupHead h3{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;font-weight:500;line-height:18px}._v_wrq_boardGroupHead span{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-size:12px;line-height:18px}._v_wrq_pageLink{appearance:none;border-radius:var(--dsw-radius-sm);max-width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;padding:0;display:inline-flex}._v_wrq_pageLink>span{overflow-wrap:anywhere;min-width:0}._v_wrq_pageLink:hover>span{text-underline-offset:3px;text-decoration:underline}._v_wrq_settingCopy ._v_wrq_pageLink{width:fit-content;color:var(--dsw-alias-label-primary);font-size:14px;line-height:22px}._v_wrq_boardIconButton{border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--dsw-alias-label-secondary);cursor:pointer;background:0 0;border:0;flex:none;place-items:center;padding:0;transition:background-color .12s,color .12s;display:inline-grid}._v_wrq_boardIconButton:hover{color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}._v_wrq_boardIconButton:active{background:var(--dsw-alias-interactive-bg-active)}._v_wrq_boardLinks{flex-wrap:wrap;align-items:center;gap:4px;min-width:0;padding-top:4px;display:flex}._v_wrq_boardLink{appearance:none;border:.5px solid var(--dsw-alias-border-l3);corner-shape:round;max-width:100%;height:20px;color:var(--dsw-alias-label-tertiary);font:inherit;white-space:nowrap;cursor:pointer;background:0 0;border-radius:999px;align-items:center;gap:4px;padding:0 8px;font-size:11px;line-height:1;transition:color .12s,border-color .12s,background-color .12s;display:inline-flex}._v_wrq_boardLink[data-on]{color:var(--dsw-alias-label-secondary)}._v_wrq_boardLink:hover{border-color:var(--dsw-alias-border-l4);color:var(--dsw-alias-label-primary)}._v_wrq_boardLink>svg{flex:none}._v_wrq_boardLinksLabel{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._v_wrq_pageLink:focus-visible,._v_wrq_boardIconButton:focus-visible,._v_wrq_boardLink:focus-visible,._v_wrq_detailsBack:focus-visible,._v_wrq_boardSearch:focus-within{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}._v_wrq_boardSearch{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);min-width:0;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-base);align-items:center;gap:8px;margin:12px 0 0;padding:0 10px;display:flex}._v_wrq_boardSearch input{min-width:0;height:32px;color:var(--dsw-alias-label-primary);font:inherit;background:0 0;border:0;outline:none;flex:1;font-size:13px}._v_wrq_detailsDialog._v_wrq_detailsDialog{flex-direction:column;width:min(600px,100%);max-height:min(780px,100%);padding-bottom:0;display:flex;overflow:hidden}._v_wrq_detailsDialog>:not(._v_wrq_detailsScroll){flex-shrink:0}._v_wrq_detailsScroll._v_wrq_detailsScroll{flex-direction:column;flex:auto;min-height:0;padding-bottom:0;display:flex;overflow:hidden}._v_wrq_detailsScroll._v_wrq_detailsScroll>:last-child{overscroll-behavior:contain;border-top:.5px solid var(--dsw-alias-border-l2);scrollbar-width:thin;flex:auto;min-height:0;margin-top:14px;padding-top:16px;padding-bottom:24px;scroll-padding-top:16px;scroll-padding-bottom:24px;overflow-y:auto}._v_wrq_detailsBody{flex-direction:column;gap:14px;min-width:0;display:flex}._v_wrq_detailsHead{border:.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md);background:0 0;flex-direction:column;gap:6px;min-width:0;padding:9px 12px;display:flex}._v_wrq_detailsHeadLine{flex-wrap:wrap;align-items:center;gap:6px 8px;min-width:0;display:flex}._v_wrq_detailsHeadLine ._v_wrq_boardState{height:22px;line-height:1}._v_wrq_detailsHeadLine ._v_wrq_boardState>span{align-items:center;line-height:1;display:inline-flex}._v_wrq_detailsHeadLine [data-tone]{align-items:center;height:22px;padding:0 8px;line-height:1;display:inline-flex}._v_wrq_detailsPackage{border-radius:var(--dsw-radius-xs);min-width:0;max-width:100%;height:22px;color:var(--dsw-alias-label-tertiary);background:var(--dsw-alias-bg-module-platform);font-family:var(--dsw-font-mono,var(--ds-font-family-code,ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace));text-overflow:ellipsis;white-space:nowrap;align-items:center;padding:0 8px;font-size:11px;line-height:1;display:inline-flex;overflow:hidden}._v_wrq_detailsControl{align-items:center;min-height:22px;margin-left:auto;display:inline-flex}._v_wrq_detailsSection{border-top:.5px solid var(--dsw-alias-border-l2);flex-direction:column;gap:8px;min-width:0;padding-top:12px;display:flex}._v_wrq_detailsSection>h3{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;font-weight:500;line-height:18px}._v_wrq_detailsRelations{grid-template-columns:max-content minmax(0,1fr);align-items:center;gap:6px 14px;min-width:0;margin:0;font-size:13px;line-height:20px;display:grid}._v_wrq_detailsRelations>div{display:contents}._v_wrq_detailsRelations dt{color:var(--dsw-alias-label-tertiary);font-size:12px}._v_wrq_detailsRelations dd{min-width:0;color:var(--dsw-alias-label-primary);flex-wrap:wrap;align-items:center;gap:6px;margin:0;display:flex}._v_wrq_detailsName{appearance:none;border:.5px solid var(--dsw-alias-border-l2);corner-shape:round;height:24px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-layer-1);font:inherit;cursor:pointer;border-radius:999px;align-items:center;gap:6px;padding:0 10px;font-size:12px;line-height:1;transition:border-color .12s,color .12s,background-color .12s;display:inline-flex}._v_wrq_detailsName:hover{border-color:var(--dsw-alias-border-l4);color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}._v_wrq_detailsName:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}._v_wrq_detailsBack{appearance:none;border-radius:var(--dsw-radius-sm);width:fit-content;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border:0;align-items:center;gap:2px;margin:-4px 0 -6px -4px;padding:2px 4px;font-size:12px;line-height:18px;display:inline-flex}._v_wrq_detailsBack:hover{color:var(--dsw-alias-label-primary)}._v_wrq_detailsMissing{color:var(--dsw-alias-label-secondary)}._v_wrq_detailsEffect{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;line-height:18px}._v_wrq_detailsBody ._v_wrq_optionsPanel{background:0 0;border-radius:0;margin:0;padding:0}._v_wrq_componentRowPage{flex-direction:column;gap:16px;min-width:0;display:flex}._v_wrq_detailsContributed{border-top:.5px solid var(--dsw-alias-border-l2);flex-direction:column;gap:16px;min-width:0;padding-top:14px;display:flex}._v_wrq_panelSection{flex-direction:column;gap:8px;min-width:0;display:flex}._v_wrq_preferenceSection{flex-direction:column;gap:0;min-width:0;display:flex}._v_wrq_preferenceSection+._v_wrq_preferenceSection{margin-top:-16px}._v_wrq_preferenceSection ._v_wrq_rows>._v_wrq_settingRow:last-child,._v_wrq_preferenceSection ._v_wrq_rows>._v_wrq_toggleRow:last-child{border-bottom:.5px solid var(--dsw-alias-border-l2)}._v_wrq_panelHeading{grid-template-columns:minmax(0,1fr) auto;column-gap:12px;min-width:0;display:grid}._v_wrq_panelHeading h3{color:var(--dsw-alias-label-primary);margin:0;font-size:13px;font-weight:500;line-height:20px}._v_wrq_panelHeading p{color:var(--dsw-alias-label-tertiary);grid-column:1;margin:2px 0 0;font-size:12px;line-height:18px}._v_wrq_panelHeading ._v_wrq_miniSpinner{grid-area:1/2}._v_wrq_panelNote{color:var(--dsw-alias-label-secondary);margin:0;font-size:12px;line-height:18px}._v_wrq_panelActions{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;min-width:0;padding-top:8px;display:flex}._v_wrq_panelActions>span{min-width:0;color:var(--dsw-alias-label-secondary);flex:1;font-size:12px;line-height:18px}._v_wrq_panelActions>span._v_wrq_panelError,._v_wrq_panelError{color:var(--dsw-alias-state-error-primary)}._v_wrq_rows>._v_wrq_panelActions,._v_wrq_evolutionGroup>._v_wrq_panelActions{border-bottom:.5px solid var(--dsw-alias-border-l2);padding:10px 0}._v_wrq_rows>._v_wrq_panelNote,._v_wrq_evolutionGroup>._v_wrq_panelNote{padding:8px 0}._v_wrq_panelError{margin:0;font-size:12px;line-height:18px}._v_wrq_boardRow{border-bottom:.5px solid var(--dsw-alias-border-l2);flex-direction:column;min-width:0;padding:14px 0;transition:background-color .12s;display:flex}._v_wrq_boardRowLine{flex-wrap:nowrap;justify-content:space-between;align-items:center;gap:8px 16px;min-width:0;display:flex}._v_wrq_boardGroup>._v_wrq_boardRow:last-child,._v_wrq_boardOthersList>._v_wrq_boardRow:last-child{border-bottom:0;padding-bottom:4px}._v_wrq_boardMain{padding-top:12px}._v_wrq_boardEmpty{color:var(--dsw-alias-label-tertiary);margin:0;padding:12px 0 4px;font-size:12px;line-height:18px}._v_wrq_boardOthers{flex-direction:column;min-width:0;padding-top:10px;display:flex}._v_wrq_boardOthersToggle{border-radius:var(--dsw-radius-sm);width:fit-content;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;background:0 0;border:0;align-items:center;gap:6px;margin-left:-4px;padding:2px 4px;font-size:12px;font-weight:500;line-height:18px;display:inline-flex}._v_wrq_boardOthersToggle:hover{color:var(--dsw-alias-label-primary)}._v_wrq_boardOthersToggle>svg{transition:transform .14s;transform:rotate(-90deg)}._v_wrq_boardOthersToggle[aria-expanded=true]>svg{transform:rotate(0)}._v_wrq_boardOthersList{flex-direction:column;min-width:0;display:flex}._v_wrq_boardFootnote{color:var(--dsw-alias-label-tertiary);margin:12px 0 0;font-size:12px;line-height:18px}._v_wrq_optionsPanel{border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-module-platform);flex-direction:column;gap:14px;min-width:0;margin-top:12px;padding:14px 16px;display:flex}._v_wrq_optionField{flex-direction:column;gap:6px;min-width:0;display:flex}._v_wrq_optionLabel{justify-content:space-between;align-items:center;gap:8px;min-width:0;display:flex}._v_wrq_optionLabel label{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:20px}._v_wrq_optionDefault{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-xs);color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;padding:0 6px;font-size:11px;line-height:16px}._v_wrq_optionReset{border-radius:var(--dsw-radius-sm);color:var(--dsw-alias-state-business-primary);font:inherit;cursor:pointer;background:0 0;border:0;padding:0 4px;font-size:12px;line-height:18px}._v_wrq_optionReset:disabled{cursor:default;opacity:.5}._v_wrq_optionInput{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);width:100%;min-width:0;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-base);font:inherit;resize:vertical;outline:none;padding:7px 10px;font-size:13px;line-height:20px}._v_wrq_optionInput:focus-visible{border-color:var(--dsw-alias-state-business-primary)}._v_wrq_optionInput[aria-invalid=true]{border-color:var(--dsw-alias-state-error-primary)}._v_wrq_optionInput:disabled{opacity:.5}._v_wrq_optionHint{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}._v_wrq_optionHint[data-error]{color:var(--dsw-alias-state-error-primary)}._v_wrq_optionChoices{flex-wrap:wrap;gap:6px 16px;min-width:0;display:flex}._v_wrq_optionEmpty{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}._v_wrq_confirmDialog._v_wrq_confirmDialog{border-radius:var(--dsw-radius-lg)}._v_wrq_confirmCopy{color:var(--dsw-alias-label-secondary);margin:0;font-size:13px;line-height:20px}._v_wrq_boardControl{flex-wrap:nowrap;flex:none;justify-content:flex-end;align-items:center;gap:6px 12px;min-width:0;margin-left:auto;display:flex}._v_wrq_boardState{min-width:0;color:var(--dsw-alias-label-tertiary);white-space:nowrap;align-items:center;gap:6px;font-size:12px;line-height:18px;display:inline-flex}._v_wrq_boardState>span{align-items:center;line-height:1;display:inline-flex}._v_wrq_boardState[data-tone=warning],._v_wrq_boardState[data-tone=error]{color:var(--dsw-alias-label-secondary)}._v_wrq_boardValue{color:var(--dsw-alias-label-secondary);font-size:13px;line-height:20px}@container (width<=420px){._v_wrq_boardMain ._v_wrq_boardRowLine,._v_wrq_boardControl{flex-wrap:wrap}._v_wrq_boardMain ._v_wrq_boardControl{justify-content:stretch;width:100%}._v_wrq_boardMain ._v_wrq_boardControl>:last-child{flex:1}}@container (width<=180px){._v_wrq_boardSection ._v_wrq_sectionHeading p,._v_wrq_boardSection ._v_wrq_settingCopy small{display:none}._v_wrq_boardSection ._v_wrq_boardRow{padding:10px 0}._v_wrq_boardSection ._v_wrq_boardRowLine{grid-template-columns:minmax(0,1fr);gap:6px;display:grid}._v_wrq_boardSection ._v_wrq_settingCopy{min-width:0}._v_wrq_boardSection ._v_wrq_settingCopy strong{overflow-wrap:anywhere}._v_wrq_boardSection ._v_wrq_boardControl{justify-self:end}}._v_wrq_placeholderRow{border-bottom:.5px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:16px;min-height:70px;display:flex}._v_wrq_placeholderRow span{background:var(--dsw-alias-bg-module-platform);border-radius:6px;height:12px;animation:1.4s ease-in-out infinite _v_wrq_placeholder-pulse}._v_wrq_placeholderRow span:first-child{width:38%}._v_wrq_placeholderRow span:last-child{border-radius:10px;width:36px;height:20px}@keyframes _v_wrq_placeholder-pulse{50%{opacity:.45}}@media (prefers-reduced-motion:reduce){._v_wrq_boardOthersToggle>svg{transition:none}._v_wrq_placeholderRow span{animation:none}}._v_wrq_selector{appearance:none;border-radius:var(--dsw-radius-md);max-width:280px;height:36px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform);white-space:nowrap;cursor:pointer;border:0;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;transition:background-color .12s,color .12s;display:inline-flex}._v_wrq_selector>span{text-overflow:ellipsis;min-width:0;overflow:hidden}._v_wrq_selector>svg{color:var(--dsw-alias-label-tertiary);flex:none}._v_wrq_selector:hover:not(:disabled),._v_wrq_selector[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}._v_wrq_selector:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}._v_wrq_selector:disabled{cursor:default;opacity:.4}._v_wrq_selectMenu{min-width:220px}._v_wrq_selectOption{white-space:normal;gap:1px;min-width:0;display:grid}._v_wrq_selectOption>small{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}._v_wrq_directoryPickerRow{align-items:center;gap:8px;display:flex}._v_wrq_directoryPickerRow>input{flex:1}._v_wrq_directoryPickerRow>button{flex:none}._v_wrq_directoryInput{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);width:100%;min-width:0;height:34px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);font-family:var(--dsw-font-mono,var(--ds-font-family-code,ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace));outline:none;padding:0 12px;font-size:12px;line-height:20px}._v_wrq_directoryInput::placeholder{color:var(--dsw-alias-label-dimmed);font-family:var(--dsw-font-family);font-size:13px}._v_wrq_directoryInput:focus-visible{border-color:var(--dsw-alias-state-business-primary)}._v_wrq_directoryInput[aria-invalid=true]{border-color:var(--dsw-alias-state-error-primary)}._v_wrq_directoryInput:disabled{cursor:default;opacity:.5}._v_wrq_numberInput,._v_wrq_compactTextInput{box-sizing:border-box;border-radius:var(--dsw-radius-md);height:36px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform);font:inherit;border:.5px solid #0000;outline:none;padding:0 12px;font-size:13px;line-height:20px;transition:border-color .12s,background-color .12s}._v_wrq_numberInput:hover:not(:disabled):not(:focus-visible),._v_wrq_compactTextInput:hover:not(:disabled):not(:focus-visible){background:var(--dsw-alias-interactive-bg-hover)}._v_wrq_numberInput{text-align:right;font-variant-numeric:tabular-nums;-moz-appearance:textfield;width:128px}._v_wrq_numberInput::-webkit-inner-spin-button,._v_wrq_numberInput::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._v_wrq_compactTextInput{width:168px;font-family:var(--dsw-font-mono,var(--ds-font-family-code,ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace));text-align:left;font-size:12px}._v_wrq_alignedNumberInput{text-align:left;width:168px}._v_wrq_compactTextInput::placeholder{color:var(--dsw-alias-label-dimmed);font-family:var(--dsw-font-family);font-size:12px}._v_wrq_numberInput:focus-visible,._v_wrq_compactTextInput:focus-visible{border-color:var(--dsw-alias-state-business-primary);background:var(--dsw-alias-bg-base)}._v_wrq_numberInput[aria-invalid=true],._v_wrq_compactTextInput[aria-invalid=true]{border-color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-base)}._v_wrq_numberInput:disabled,._v_wrq_compactTextInput:disabled{cursor:default;opacity:.45}._v_wrq_inputEquiv{color:var(--dsw-alias-label-tertiary);font-family:var(--dsw-font-mono,var(--ds-font-family-code,ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace));font-variant-numeric:tabular-nums;white-space:nowrap;flex:none;align-items:center;padding:0 2px;font-size:12px;font-weight:400;line-height:1;display:inline-flex}._v_wrq_unitInput{box-sizing:border-box;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);border:.5px solid #0000;align-items:center;gap:6px;width:128px;height:36px;padding:0 12px;transition:border-color .12s,background-color .12s;display:inline-flex}._v_wrq_unitInput:hover:not(:has(>input:disabled)):not(:focus-within){background:var(--dsw-alias-interactive-bg-hover)}._v_wrq_unitInput:focus-within{border-color:var(--dsw-alias-state-business-primary);background:var(--dsw-alias-bg-base)}._v_wrq_unitInput:has(>input[aria-invalid=true]){border-color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-base)}._v_wrq_unitInput:has(>input:disabled){opacity:.45}._v_wrq_unitInput>input{width:100%;min-width:0;color:var(--dsw-alias-label-primary);font:inherit;text-align:right;font-variant-numeric:tabular-nums;-moz-appearance:textfield;background:0 0;border:0;outline:none;flex:auto;padding:0;font-size:13px;line-height:20px}._v_wrq_unitInput>input::-webkit-inner-spin-button,._v_wrq_unitInput>input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}._v_wrq_unitSuffix{color:var(--dsw-alias-label-tertiary);font-family:var(--dsw-font-mono,var(--ds-font-family-code,ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace));user-select:none;pointer-events:none;flex:none;align-items:center;font-size:11px;line-height:1;display:inline-flex}._v_wrq_settingsSubheading{border-top:.5px solid var(--dsw-alias-border-l2);color:var(--dsw-alias-label-tertiary);letter-spacing:.02em;margin:6px 0 2px;padding-top:16px;font-size:11px;font-weight:500;line-height:16px}._v_wrq_rows>._v_wrq_settingsSubheading:first-child{border-top:0;margin-top:0;padding-top:0}._v_wrq_rows>:has(+._v_wrq_settingsSubheading){border-bottom:0}._v_wrq_rowDetail{border-bottom:.5px solid var(--dsw-alias-border-l2);flex-direction:column;gap:10px;min-width:0;padding:0 0 14px;display:flex}._v_wrq_settingRow:has(+._v_wrq_rowDetail){border-bottom:0;padding-bottom:10px}._v_wrq_effectiveRoute{min-width:0;color:var(--dsw-alias-label-tertiary);justify-content:space-between;align-items:center;gap:12px;font-size:12px;line-height:18px;display:flex}._v_wrq_effectiveRoute code{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-xs);min-width:0;height:20px;color:var(--dsw-alias-label-secondary);font-family:var(--dsw-font-mono,var(--ds-font-family-code,ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace));text-overflow:ellipsis;white-space:nowrap;align-items:center;padding:0 7px;font-size:11px;line-height:1;display:inline-flex;overflow:hidden}._v_wrq_effectiveRoute small{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12px;line-height:18px;overflow:hidden}._v_wrq_routeValue{align-items:center;gap:8px;min-width:0;display:inline-flex}._v_wrq_warning{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;margin:0;font-size:12px;line-height:18px}._v_wrq_advanced{border-bottom:.5px solid var(--dsw-alias-border-l2);flex-direction:column;min-width:0;padding:4px 0;display:flex}._v_wrq_rows>._v_wrq_advanced:last-child,._v_wrq_evolutionGroup>._v_wrq_advanced:last-child,._v_wrq_panelSection>._v_wrq_advanced:last-child{border-bottom:0}._v_wrq_panelSection>._v_wrq_advanced{border-top:.5px solid var(--dsw-alias-border-l2)}._v_wrq_advanced>summary{border-radius:var(--dsw-radius-sm);width:fit-content;color:var(--dsw-alias-label-secondary);cursor:pointer;align-items:center;gap:6px;margin-left:-4px;padding:2px 4px;font-size:12px;font-weight:500;line-height:18px;list-style:none;display:inline-flex}._v_wrq_advanced>summary::-webkit-details-marker{display:none}._v_wrq_advanced>summary>svg{transition:transform .14s}._v_wrq_advanced[open]>summary>svg{transform:rotate(180deg)}._v_wrq_advanced>summary:hover{color:var(--dsw-alias-label-primary)}._v_wrq_advanced>._v_wrq_fieldGrid{padding-top:12px}._v_wrq_advancedToggle{appearance:none;border-radius:var(--dsw-radius-md);width:calc(100% + 16px);min-width:0;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;justify-content:space-between;align-items:center;gap:12px;margin:0 -8px;padding:9px 8px;transition:background-color .14s,color .12s;display:flex}._v_wrq_advancedToggle:hover{background:var(--dsw-alias-interactive-bg-hover)}._v_wrq_advancedToggle:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}._v_wrq_advancedHeading{gap:2px;min-width:0;display:grid}._v_wrq_advancedTitle{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}._v_wrq_advancedHint{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;font-weight:400;line-height:18px}._v_wrq_advancedMeta{color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:8px;display:inline-flex}._v_wrq_advancedBadge{border:.5px solid var(--dsw-alias-border-l2);corner-shape:round;height:20px;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:999px;align-items:center;padding:0 8px;font-size:11px;font-weight:500;line-height:1;display:inline-flex}._v_wrq_advancedMeta>svg{flex:none;transition:transform .16s cubic-bezier(.22,1,.36,1)}._v_wrq_advanced[data-open]>._v_wrq_advancedToggle ._v_wrq_advancedMeta>svg{transform:rotate(180deg)}._v_wrq_advancedBody{min-width:0}._v_wrq_advancedContent{flex-direction:column;gap:10px;min-width:0;padding:6px 0 10px;animation:.16s cubic-bezier(.22,1,.36,1) both _v_wrq_advanced-expand;display:flex}._v_wrq_advancedContent>._v_wrq_rows>._v_wrq_settingRow:first-child,._v_wrq_advancedContent>._v_wrq_rows>._v_wrq_toggleRow:first-child{padding-top:8px}._v_wrq_advancedContent>._v_wrq_rows>._v_wrq_settingRow:last-child,._v_wrq_advancedContent>._v_wrq_rows>._v_wrq_toggleRow:last-child{border-bottom:0;padding-bottom:6px}@keyframes _v_wrq_advanced-expand{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}._v_wrq_evolutionGroup{flex-direction:column;min-width:0;animation:.16s cubic-bezier(.22,1,.36,1) both _v_wrq_advanced-expand;display:flex}._v_wrq_evolutionGroup>:last-child{border-bottom:0}._v_wrq_nestedBudgetGroup{flex-direction:column;min-width:0;display:flex}._v_wrq_nestedBudgetGroup>._v_wrq_settingRow:has(+._v_wrq_panelActions){border-bottom:0;padding-bottom:4px}._v_wrq_nestedBudgetGroup>._v_wrq_panelActions{border-bottom:.5px solid var(--dsw-alias-border-l2);padding:8px 0 12px}._v_wrq_skillsSubgroup{border-bottom:.5px solid var(--dsw-alias-border-l2);flex-direction:column;gap:0;min-width:0;padding:0;display:flex}._v_wrq_rows>._v_wrq_skillsSubgroup:last-child{border-bottom:0;padding-bottom:4px}._v_wrq_skillsSubgroup>._v_wrq_settingRow{padding:14px 0}._v_wrq_skillsSubgroup>._v_wrq_settingRow:last-of-type{border-bottom:0}._v_wrq_marketHeader{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 12px;min-width:0;display:flex}._v_wrq_marketList{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);flex-direction:column;min-width:0;padding:0 12px;display:flex}._v_wrq_marketRow{border-bottom:.5px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:8px 12px;min-width:0;padding:10px 0;display:flex}._v_wrq_marketRow:last-child{border-bottom:0}._v_wrq_marketCopy{flex-direction:column;flex:auto;gap:2px;min-width:0;display:flex}._v_wrq_marketCopy>code{color:var(--dsw-alias-label-tertiary);font-family:var(--dsw-font-mono,var(--ds-font-family-code,ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace));text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:16px;overflow:hidden}._v_wrq_marketTitle{flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0;display:flex}._v_wrq_marketTitle>strong{font-size:13px;font-weight:500;line-height:20px}._v_wrq_marketCount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums;font-size:12px;line-height:18px}._v_wrq_marketControls{flex:none;align-items:center;gap:6px;display:flex}._v_wrq_marketAddRow{align-items:center;gap:8px;min-width:0;display:flex}._v_wrq_marketAddRow>input{flex:auto}._v_wrq_miniSpinner{border:2px solid var(--dsw-alias-border-l2);border-top-color:var(--dsw-alias-label-secondary);corner-shape:round;border-radius:50%;flex:none;width:14px;height:14px;margin-top:4px;animation:.7s linear infinite _v_wrq_settings-spin}@keyframes _v_wrq_settings-spin{to{transform:rotate(360deg)}}._v_wrq_providerList{flex-direction:column;gap:8px;min-width:0;margin-top:10px;display:flex}._v_wrq_providerRow{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);background:var(--dsw-alias-settings-card-fill);transition:border-color .12s,background-color .12s;overflow:hidden}._v_wrq_providerRow:hover{border-color:var(--dsw-alias-border-l3)}._v_wrq_providerRowHeader{align-items:center;gap:12px;min-width:0;padding:12px 14px;display:flex}summary._v_wrq_providerRowHeader{cursor:pointer;list-style:none}summary._v_wrq_providerRowHeader::-webkit-details-marker{display:none}._v_wrq_providerDisclosure{appearance:none;min-width:0;color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;outline:none;flex:1;align-items:center;gap:8px;padding:0;display:flex}._v_wrq_providerDisclosure:disabled{cursor:default}._v_wrq_providerDisclosure:focus-visible,summary._v_wrq_providerRowHeader:focus-visible{border-radius:var(--dsw-radius-md);box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary))}._v_wrq_providerIdentity{flex:1;align-items:center;gap:12px;min-width:0;display:flex}._v_wrq_providerIdentity>span{flex-direction:column;min-width:0;display:flex}._v_wrq_providerIdentity strong{font-size:14px;font-weight:500;line-height:22px}._v_wrq_providerIdentity small{color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden}._v_wrq_providerMark{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);flex:none;place-items:center;width:36px;height:36px;padding:6px;display:grid;overflow:hidden}._v_wrq_providerMark>img,._v_wrq_providerMark>svg{object-fit:contain;border-radius:4px;width:100%;height:100%;display:block}._v_wrq_providerEnableControl{flex:none;align-items:center;gap:10px;display:flex}._v_wrq_providerScopeTag{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-xs);color:var(--dsw-alias-label-secondary);flex:none;padding:1px 6px;font-size:11px;line-height:16px}._v_wrq_providerScopeTag[data-scope=workspace]{border-color:color-mix(in srgb, var(--dsw-alias-state-business-primary) 30%, transparent);color:var(--dsw-alias-state-business-primary)}._v_wrq_providerState{color:var(--dsw-alias-label-tertiary);white-space:nowrap;flex:none;align-items:center;gap:6px;font-size:12px;line-height:18px;display:inline-flex}._v_wrq_providerState:before{corner-shape:round;content:\"\";background:var(--dsw-alias-state-idle-primary);border-radius:50%;flex:none;width:6px;height:6px}._v_wrq_providerState[data-enabled]:before{background:var(--dsw-alias-state-success-primary)}._v_wrq_providerChevron{color:var(--dsw-alias-label-tertiary);flex:none;transition:transform .14s}._v_wrq_providerDisclosure[aria-expanded=true] ._v_wrq_providerChevron,details[open]>summary ._v_wrq_providerChevron{transform:rotate(180deg)}._v_wrq_providerToggle{cursor:pointer;display:inline-flex;position:relative}._v_wrq_providerInlineBody{padding:0 14px 14px}._v_wrq_providerToggleError{color:var(--dsw-alias-state-error-primary);margin:0;padding:0 14px 12px;font-size:12px;line-height:18px}._v_wrq_providerServiceForm,._v_wrq_editor{border-radius:var(--dsw-radius-lg);background:var(--dsw-alias-bg-module-platform);flex-direction:column;gap:12px;min-width:0;padding:14px 16px;display:flex}._v_wrq_providerServicePrompt,._v_wrq_editorNote{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}._v_wrq_workspacePaths{box-sizing:border-box;resize:vertical;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);width:100%;min-width:0;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);font-family:var(--dsw-font-mono,var(--ds-font-family-code,ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace));outline:none;padding:8px 10px;font-size:12px;line-height:20px;transition:border-color .12s}._v_wrq_workspacePaths::placeholder{color:var(--dsw-alias-label-dimmed)}._v_wrq_workspacePaths:focus-visible{border-color:var(--dsw-alias-state-business-primary)}._v_wrq_workspacePaths:disabled{cursor:default;opacity:.5}._v_wrq_editorHeading h3{margin:0;font-size:14px;font-weight:500;line-height:22px}._v_wrq_editorHeading p{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;margin:2px 0 0;font-size:12px;line-height:18px}._v_wrq_editor ._v_wrq_toggleRow{border-top:.5px solid var(--dsw-alias-border-l3);border-bottom:.5px solid var(--dsw-alias-border-l3);padding:10px 0}._v_wrq_embeddingTest{justify-content:space-between;align-items:center;gap:12px;min-width:0;display:flex}._v_wrq_embeddingTest>span{min-width:0;color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}._v_wrq_embeddingTest>span._v_wrq_error{color:var(--dsw-alias-state-error-primary)}._v_wrq_embeddingTest>button{white-space:nowrap;flex:none}._v_wrq_embeddingSpaces{flex-direction:column;gap:4px;min-width:0;display:flex}._v_wrq_embeddingSpaces>small,._v_wrq_embeddingSpaces>p{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;margin:0;font-size:12px;line-height:18px}._v_wrq_embeddingSpaces>ul{flex-direction:column;margin:0;padding:0;list-style:none;display:flex}._v_wrq_embeddingSpaces li{min-width:0;min-height:28px;color:var(--dsw-alias-label-secondary);flex-wrap:wrap;align-items:center;gap:0 12px;font-size:12px;line-height:20px;display:flex}._v_wrq_embeddingSpaceName{text-overflow:ellipsis;white-space:nowrap;flex:6em;min-width:0;overflow:hidden}._v_wrq_embeddingSpaceState{color:var(--dsw-alias-label-tertiary);white-space:nowrap;flex:none}._v_wrq_embeddingSpaceCount{font-variant-numeric:tabular-nums;flex:none;margin-left:auto}._v_wrq_embeddingSpaces li>button{white-space:nowrap;flex:none}._v_wrq_embeddingSpaces li[data-missing]>._v_wrq_embeddingSpaceCount{color:var(--dsw-alias-state-warn-label,var(--dsw-alias-label-secondary))}._v_wrq_embeddingSpaces li[data-failed]>._v_wrq_embeddingSpaceCount{min-width:0;color:var(--dsw-alias-state-error-primary);overflow-wrap:anywhere;flex:100%;margin-left:0}._v_wrq_embeddingFillOutcome{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;margin:0;font-size:12px;line-height:18px}._v_wrq_embeddingFillOutcome._v_wrq_error{color:var(--dsw-alias-state-error-primary)}._v_wrq_globalLocationSetting{flex-direction:column;min-width:0;display:flex}._v_wrq_providerServiceLocation{border-bottom:.5px solid var(--dsw-alias-border-l3);padding-bottom:12px}._v_wrq_providerServiceLocation>._v_wrq_nativeLocation{padding:0 0 12px}._v_wrq_providerLocationField{padding-top:2px}._v_wrq_nativeLocation{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 16px;min-width:0;display:flex}._v_wrq_inlineChoices{--dsh-segment-count:2;--dsh-segment-index:0;border-radius:var(--dsw-radius-md);background:var(--dsw-alias-interactive-bg-hover);flex:none;grid-auto-columns:1fr;grid-auto-flow:column;align-items:center;gap:2px;padding:4px;display:inline-grid;position:relative}._v_wrq_inlineChoices:before{content:\"\";width:calc((100% - 8px - 2px * (var(--dsh-segment-count) - 1)) / var(--dsh-segment-count));border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);height:calc(100% - 8px);box-shadow:var(--dsw-elevation-soft);transform:translateX(calc(var(--dsh-segment-index) * (100% + 2px)));pointer-events:none;transition:transform .16s cubic-bezier(.22,1,.36,1);position:absolute;top:4px;left:4px}._v_wrq_inlineChoices:has(>label:nth-child(2) input:checked){--dsh-segment-index:1}._v_wrq_inlineChoices label{z-index:1;cursor:pointer;position:relative}._v_wrq_inlineChoices input{z-index:1;opacity:0;width:100%;height:100%;cursor:inherit;margin:0;position:absolute;inset:0}._v_wrq_inlineChoices span{border-radius:var(--dsw-radius-sm);width:100%;height:28px;color:var(--dsw-alias-label-secondary);white-space:nowrap;justify-content:center;align-items:center;padding:0 12px;font-size:13px;font-weight:500;line-height:20px;transition:color .12s;display:inline-flex}._v_wrq_inlineChoices label:hover span,._v_wrq_inlineChoices input:checked+span{color:var(--dsw-alias-label-primary)}@supports not selector(:has(*)){._v_wrq_inlineChoices:before{display:none}._v_wrq_inlineChoices input:checked+span{background:var(--dsw-alias-bg-layer-1);box-shadow:var(--dsw-elevation-soft)}}._v_wrq_inlineChoices input:focus-visible+span{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary))}._v_wrq_inlineChoices input:disabled+span{cursor:default;opacity:.4}._v_wrq_fieldGrid,._v_wrq_providerSettingsGrid{grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));gap:12px;min-width:0;display:grid}._v_wrq_providerSettingsGrid,._v_wrq_directoryFields{grid-template-columns:minmax(0,1fr)}._v_wrq_fieldGrid>label,._v_wrq_providerFieldControl>label:not(._v_wrq_providerBoolean){min-width:0;color:var(--dsw-alias-label-primary);flex-direction:column;gap:6px;font-size:13px;font-weight:500;line-height:20px;display:flex}._v_wrq_fieldGrid input,._v_wrq_fieldGrid select,._v_wrq_providerFieldControl input:not([type=checkbox]),._v_wrq_providerFieldControl select{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);width:100%;min-width:0;height:34px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);font:inherit;outline:none;padding:0 12px;font-size:13px;font-weight:400;line-height:20px}._v_wrq_fieldGrid input[type=number]{font-variant-numeric:tabular-nums}._v_wrq_fieldGrid input::placeholder,._v_wrq_providerFieldControl input::placeholder{color:var(--dsw-alias-label-dimmed)}._v_wrq_fieldGrid select,._v_wrq_providerFieldControl select{appearance:none;cursor:pointer;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2381858C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-position:right 12px center;background-repeat:no-repeat;background-size:12px 12px;padding-right:32px}._v_wrq_fieldGrid select:disabled,._v_wrq_providerFieldControl select:disabled{cursor:default}._v_wrq_fieldGrid input:focus-visible,._v_wrq_fieldGrid select:focus-visible,._v_wrq_providerFieldControl input:focus-visible,._v_wrq_providerFieldControl select:focus-visible{border-color:var(--dsw-alias-state-business-primary)}._v_wrq_fieldGrid input[aria-invalid=true],._v_wrq_providerFieldControl input:invalid{border-color:var(--dsw-alias-state-error-primary)}._v_wrq_fieldGrid input:disabled,._v_wrq_fieldGrid select:disabled,._v_wrq_providerFieldControl input:disabled,._v_wrq_providerFieldControl select:disabled{opacity:.5}._v_wrq_providerFieldControl{flex-direction:column;justify-content:flex-end;gap:4px;min-width:0;display:flex}._v_wrq_providerBoolean{min-height:34px;color:var(--dsw-alias-label-primary);align-items:center;gap:8px;font-size:13px;display:flex}._v_wrq_providerBoolean input{width:16px;height:16px;accent-color:var(--dsw-alias-brand-primary);margin:0}._v_wrq_providerSecretInput{min-width:0;position:relative}._v_wrq_providerSecretInput>input{padding-right:40px}._v_wrq_providerSecretVisibility{appearance:none;border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;place-items:center;padding:0;display:grid;position:absolute;top:3px;right:3px}._v_wrq_providerSecretVisibility:hover:not(:disabled){color:var(--dsw-alias-label-primary);background:var(--dsw-alias-interactive-bg-hover)}._v_wrq_providerSecretVisibility:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}._v_wrq_providerSecretVisibility:disabled{cursor:default;opacity:.35}._v_wrq_providerSecretVisibility svg{width:16px;height:16px}._v_wrq_memoryConfigFooter{justify-content:space-between;align-items:center;gap:10px;min-height:36px;display:flex}._v_wrq_memoryConfigFooter>div{align-items:center;gap:6px;display:flex}._v_wrq_providerServiceFooter{align-items:flex-end;min-height:0}._v_wrq_configFeedback{flex:1;min-width:0;font-size:12px;line-height:18px}._v_wrq_scopeChanging,._v_wrq_providerTarget{color:var(--dsw-alias-label-tertiary);margin:0;font-size:12px;line-height:18px}._v_wrq_scopeChanging{border-radius:var(--dsw-radius-md);color:var(--dsw-alias-state-warn-label,var(--dsw-alias-label-secondary));background:var(--dsw-alias-state-warn-tertiary,var(--dsw-alias-bg-module-platform));padding:8px 12px}._v_wrq_providerLoadError{justify-content:space-between;align-items:center;gap:10px;font-size:12px;display:flex}._v_wrq_visuallyHidden{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}._v_wrq_location{align-items:baseline;gap:6px;min-width:0;display:flex}._v_wrq_locationRow{border-bottom:.5px solid var(--dsw-alias-border-l2);gap:10px;padding:14px 0}._v_wrq_rowActions{flex:none;align-items:center;gap:8px;display:flex}._v_wrq_packRow{flex-direction:column;gap:8px;min-width:0;padding-bottom:14px;display:flex}._v_wrq_packRow>._v_wrq_settingRow{border-bottom:0;padding-bottom:6px}._v_wrq_packRow:has(>._v_wrq_packFeedback:empty):not(:has(>._v_wrq_importBar))>._v_wrq_settingRow{padding-bottom:0}._v_wrq_rows>._v_wrq_packRow:not(:last-child){border-bottom:.5px solid var(--dsw-alias-border-l2)}._v_wrq_importBar{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:10px;min-width:0;padding:10px 12px;display:grid}._v_wrq_importBar>div{min-width:0;display:grid}._v_wrq_importBar strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}._v_wrq_importBar small{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._v_wrq_packFeedback{gap:4px;display:grid}._v_wrq_packFeedback:empty{display:none}._v_wrq_packFeedback p{overflow-wrap:anywhere;margin:0;font-size:12px;line-height:18px}._v_wrq_error{color:var(--dsw-alias-state-error-primary)}._v_wrq_readOnlyNotice{color:var(--dsw-alias-label-tertiary);margin:0 0 -20px;font-size:12px;line-height:18px}._v_wrq_packSuccess{color:var(--dsw-alias-state-success-primary)}._v_wrq_syncRow{flex-direction:column;gap:8px;min-width:0;padding-bottom:14px;display:flex}._v_wrq_syncRow>._v_wrq_settingRow,._v_wrq_syncRow>._v_wrq_toggleRow{border-bottom:0;padding-bottom:6px}._v_wrq_rows>._v_wrq_syncRow:not(:last-child){border-bottom:.5px solid var(--dsw-alias-border-l2)}._v_wrq_syncState{flex-wrap:wrap;align-items:center;gap:4px 10px;min-width:0;display:flex}._v_wrq_syncState>span{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}._v_wrq_syncSuccess{color:var(--dsw-alias-state-success-primary)}._v_wrq_syncPanel{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-xl);flex-direction:column;min-width:0;padding:2px 16px;display:flex}._v_wrq_syncPanel>._v_wrq_settingRow{padding:12px 0}._v_wrq_syncPanel>p{overflow-wrap:anywhere;margin:12px 0;font-size:12px;line-height:18px}._v_wrq_syncPanel>:last-child,._v_wrq_syncPanel>:last-child>._v_wrq_settingRow:last-child{border-bottom:0}._v_wrq_syncFeedbackLine{padding-top:2px;display:block}._v_wrq_syncWarning{border-radius:var(--dsw-radius-md);min-width:0;color:var(--dsw-alias-state-warn-label,var(--dsw-alias-label-secondary));background:var(--dsw-alias-state-warn-tertiary,var(--dsw-alias-bg-module-platform));flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px 12px;margin:10px 0 2px;padding:6px 6px 6px 12px;font-size:12px;line-height:18px;display:flex}._v_wrq_syncWarning>span{overflow-wrap:anywhere;min-width:0}._v_wrq_syncConnect{border-bottom:.5px solid var(--dsw-alias-border-l2);flex-direction:column;gap:4px;min-width:0;padding-bottom:14px;display:flex}._v_wrq_syncConnect>._v_wrq_settingRow{border-bottom:0;padding-bottom:4px}._v_wrq_syncRepositoryState{flex-direction:column;gap:2px;min-width:0;display:flex}._v_wrq_syncRepositoryName{min-width:0;color:var(--dsw-alias-label-secondary);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._v_wrq_syncStateLine{flex-wrap:wrap;align-items:center;gap:4px 6px;min-width:0;display:inline-flex}._v_wrq_syncStateLine[data-tone=error]>span{color:var(--dsw-alias-state-error-primary)}._v_wrq_syncInlineAction{appearance:none;color:var(--dsw-alias-label-secondary);font:inherit;cursor:pointer;text-decoration:underline;text-decoration-color:var(--dsw-alias-border-l4);text-underline-offset:2px;background:0 0;border:0;padding:0;font-size:12px;line-height:18px}._v_wrq_syncInlineAction:hover:not(:disabled){color:var(--dsw-alias-label-primary);text-decoration-color:currentColor}._v_wrq_syncInlineAction:disabled{cursor:default;opacity:.5}._v_wrq_syncInlineAction:focus-visible{border-radius:var(--dsw-radius-xs);box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}._v_wrq_syncFieldLabel{min-width:0;color:var(--dsw-alias-label-primary);justify-content:space-between;align-items:center;gap:8px;font-size:13px;font-weight:500;line-height:20px;display:flex}._v_wrq_syncFieldLabel>label{font:inherit}._v_wrq_fieldGrid>._v_wrq_syncFieldBox{flex-direction:column;gap:6px;min-width:0;display:flex}._v_wrq_fieldGrid label small{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;font-weight:400;line-height:18px}._v_wrq_fieldGrid label small._v_wrq_error{color:var(--dsw-alias-state-error-primary)}._v_wrq_editor ._v_wrq_error,._v_wrq_editor ._v_wrq_syncSuccess{overflow-wrap:anywhere;margin:0;font-size:12px;line-height:18px}._v_wrq_syncAccount{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;min-width:0;display:flex}._v_wrq_syncAccount>span{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;font-size:13px;line-height:20px}._v_wrq_syncDevice{gap:8px;min-width:0;display:grid}._v_wrq_syncCode{flex-wrap:wrap;align-items:center;gap:8px;min-width:0;display:flex}._v_wrq_syncCode>code{border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-1);font-family:var(--dsw-font-mono,var(--ds-font-family-code,ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace));letter-spacing:.08em;font-variant-numeric:tabular-nums;user-select:all;padding:4px 12px;font-size:16px;font-weight:500;line-height:24px}._v_wrq_syncPicker{gap:8px;min-width:0;display:grid}._v_wrq_syncRepositoryList{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-1);flex-direction:column;min-width:0;max-height:264px;margin:0;padding:0;list-style:none;display:flex;overflow:auto}._v_wrq_syncRepositoryList>li{border-bottom:.5px solid var(--dsw-alias-border-l2);min-width:0}._v_wrq_syncRepositoryList>li:last-child{border-bottom:0}._v_wrq_syncRepositoryList>li._v_wrq_editorNote{padding:10px 12px}._v_wrq_syncRepositoryOption{appearance:none;width:100%;min-width:0;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:6px;padding:8px 12px;font-size:13px;line-height:20px;display:flex}._v_wrq_syncRepositoryOption>span{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}._v_wrq_syncRepositoryOption:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._v_wrq_syncRepositoryOption:disabled{cursor:default;opacity:.5}._v_wrq_syncRepositoryOption[aria-current=true]>span{font-weight:500}._v_wrq_syncRepositoryOption:focus-visible{box-shadow:inset 0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}._v_wrq_syncAdvanced{flex-direction:column;gap:4px;min-width:0;padding-bottom:12px;display:flex}._v_wrq_syncDisclosure{appearance:none;width:100%;min-width:0;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:10px;padding:12px 0 8px;display:flex}._v_wrq_syncDisclosure>span{color:var(--dsw-alias-label-primary);flex:none;font-size:14px;line-height:22px}._v_wrq_syncDisclosure>small{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;flex:1;font-size:12px;line-height:18px;overflow:hidden}._v_wrq_syncDisclosure[aria-expanded=true] ._v_wrq_providerChevron{transform:rotate(180deg)}._v_wrq_syncDisclosure:focus-visible{border-radius:var(--dsw-radius-md);box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}._v_wrq_editor>._v_wrq_inlineChoices{align-self:flex-start}._v_wrq_syncChoice{justify-items:start;gap:8px;min-width:0;display:grid}._v_wrq_syncChoice>._v_wrq_fieldGrid{width:100%}._v_wrq_syncDialogBody{gap:12px;min-width:0;display:grid}._v_wrq_syncDialogNote{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;margin:0;font-size:12px;line-height:18px}._v_wrq_syncDialogBody>._v_wrq_error,._v_wrq_syncDialogBody>._v_wrq_syncSuccess{overflow-wrap:anywhere;margin:0;font-size:12px;line-height:18px}._v_wrq_syncHistoryList{margin:0;padding:0;list-style:none;display:grid}._v_wrq_syncHistoryEntry{border-bottom:.5px solid var(--dsw-alias-border-l2);gap:2px;min-width:0;padding:10px 0;display:grid}._v_wrq_syncHistoryEntry:first-child{padding-top:0}._v_wrq_syncHistoryEntry:last-child{border-bottom:0}._v_wrq_syncHistoryHead{flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0;display:flex}._v_wrq_syncHistoryHead>strong{font-size:13px;font-weight:500;line-height:20px}._v_wrq_syncHistoryHead>span{min-width:0;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;flex:1;font-size:12px;line-height:18px}._v_wrq_syncHistoryEntry>small{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}._v_wrq_syncHistoryEntry>._v_wrq_syncHistoryMessage{color:var(--dsw-alias-label-secondary)}._v_wrq_syncCompareList{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-md);margin:0;padding:0;list-style:none;display:grid}._v_wrq_syncCompareList>li{border-bottom:.5px solid var(--dsw-alias-border-l2);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:4px 12px;min-width:0;padding:10px 12px;display:flex}._v_wrq_syncCompareList>li:last-child{border-bottom:0}._v_wrq_syncCompareList>li>span{font-size:13px;line-height:20px}._v_wrq_syncCompareList>li>small{color:var(--dsw-alias-label-tertiary);text-align:right;overflow-wrap:anywhere;font-size:12px;line-height:18px}._v_wrq_syncCompareList>li>small[data-differs]{color:var(--dsw-alias-label-primary)}._v_wrq_syncCompareNote{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);gap:6px;min-width:0;padding:10px 12px;display:grid}._v_wrq_syncCompareNote>._v_wrq_rowActions{justify-content:flex-start;gap:4px}._v_wrq_syncConflictList{gap:6px;margin:0;padding:0;list-style:none;display:grid}._v_wrq_syncConflict{border-radius:var(--dsw-radius-sm);background:var(--dsw-alias-bg-layer-1);grid-template-columns:repeat(auto-fit,minmax(min(100%,220px),1fr));gap:8px;min-width:0;padding:8px 10px;display:grid}._v_wrq_syncConflict>span{overflow-wrap:anywhere;gap:2px;min-width:0;font-size:12px;line-height:18px;display:grid}._v_wrq_syncConflict>span>small{color:var(--dsw-alias-label-tertiary);font-size:11px;line-height:16px}._v_wrq_reviewList{gap:8px;display:grid}._v_wrq_reviewEntry{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);flex-direction:column;gap:6px;min-width:0;padding:10px 12px;display:flex}._v_wrq_reviewEntry>header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;min-width:0;display:flex}._v_wrq_reviewEntry>small{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}._v_wrq_reviewEntry>p{overflow-wrap:anywhere;margin:0;font-size:13px;line-height:20px}._v_wrq_reviewTitle{align-items:center;gap:8px;min-width:0;display:flex}._v_wrq_reviewTitle strong{overflow-wrap:anywhere;font-size:13px;font-weight:500;line-height:20px}._v_wrq_reviewOperations{gap:4px;margin:0;padding-left:18px;display:grid}._v_wrq_reviewOperations li{overflow-wrap:anywhere;font-size:12px;line-height:18px}._v_wrq_reviewOperations small{color:var(--dsw-alias-label-tertiary);display:block}._v_wrq_reviewOpinions{gap:4px;display:grid}._v_wrq_reviewOpinions>strong{font-size:12px;font-weight:500;line-height:18px}._v_wrq_reviewOpinions>small{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._v_wrq_reviewOpinions>div{overflow-wrap:anywhere;gap:6px;min-width:0;font-size:12px;line-height:18px;display:flex}._v_wrq_reviewOpinions>div strong{color:var(--dsw-alias-label-secondary);flex:none;font-weight:500}._v_wrq_reviewOpinionForm{align-items:center;gap:8px;min-width:0;display:flex}._v_wrq_reviewOpinionForm>input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);min-width:0;height:34px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);font:inherit;outline:none;flex:auto;padding:0 12px;font-size:13px;line-height:20px}._v_wrq_reviewOpinionForm>input:focus-visible{border-color:var(--dsw-alias-state-business-primary)}._v_wrq_reviewOpinionForm>input:disabled{cursor:default;opacity:.5}._v_wrq_reviewGuidance{gap:4px;display:grid}._v_wrq_reviewGuidance>label{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:500;line-height:18px}._v_wrq_reviewGuidance>input{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);width:100%;height:34px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3);font:inherit;outline:none;padding:0 12px;font-size:13px;line-height:20px}._v_wrq_reviewGuidance>input:focus-visible{border-color:var(--dsw-alias-state-business-primary)}._v_wrq_reviewGuidance>input:disabled{cursor:default;opacity:.5}._v_wrq_reviewGuidance>small{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}._v_wrq_reviewSelection{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px;min-width:0;display:flex}._v_wrq_reviewSelection>small,._v_wrq_reviewSelected{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._v_wrq_reviewOperations>li{gap:2px;display:grid}._v_wrq_reviewOperations>li>label{cursor:pointer;align-items:flex-start;gap:6px;min-width:0;display:flex}._v_wrq_reviewOperations>li>label>input{flex:none;margin:3px 0 0}._v_wrq_reviewOperations>li>label>input:disabled{cursor:default;opacity:.5}._v_wrq_reviewDetails{flex-direction:column;gap:6px;min-width:0;display:flex}._v_wrq_reviewDetails>p{overflow-wrap:anywhere;margin:0;font-size:13px;line-height:20px}._v_wrq_reviewOperationCheckbox{font-size:12px;line-height:18px}._v_wrq_reviewOperations>li[data-applied=true]{opacity:.55}._v_wrq_selector:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}@media (width<=620px){._v_wrq_page{gap:28px}._v_wrq_settingRow:has(._v_wrq_rowActions),._v_wrq_settingRow:has(._v_wrq_inlineChoices){flex-wrap:wrap}._v_wrq_rowActions{width:100%}._v_wrq_rowActions button{flex:1}._v_wrq_importBar{grid-template-columns:minmax(0,1fr) auto}._v_wrq_importBar>button:last-child{grid-column:1/-1}._v_wrq_reviewOpinionForm{flex-wrap:wrap}._v_wrq_reviewOpinionForm>input{flex:100%}._v_wrq_inlineChoices{width:100%}._v_wrq_inlineChoices label{flex:1}._v_wrq_inlineChoices span{justify-content:center;width:100%}._v_wrq_providerRowHeader{align-items:flex-start;gap:8px}._v_wrq_providerEnableControl{flex-wrap:wrap;justify-content:flex-end;gap:6px;max-width:132px}._v_wrq_providerState{text-overflow:ellipsis;max-width:120px;overflow:hidden}._v_wrq_numberInput,._v_wrq_unitInput{width:104px}._v_wrq_compactTextInput,._v_wrq_alignedNumberInput{width:144px}._v_wrq_memoryConfigFooter{flex-direction:column;align-items:stretch}._v_wrq_memoryConfigFooter>div:last-child{width:100%}._v_wrq_memoryConfigFooter button{flex:1}}@media (prefers-reduced-motion:reduce){._v_wrq_page>:not(._v_wrq_loading),._v_wrq_advancedContent,._v_wrq_evolutionGroup{animation:none}._v_wrq_providerChevron,._v_wrq_advanced>summary>svg,._v_wrq_advancedToggle,._v_wrq_advancedMeta>svg,._v_wrq_inlineChoices:before,._v_wrq_inlineChoices span,._v_wrq_numberInput,._v_wrq_unitInput,._v_wrq_compactTextInput,._v_wrq_workspacePaths,._v_wrq_nestedBudgetGroup,._v_wrq_detailsName,._v_wrq_boardIconButton,._v_wrq_boardLink,._v_wrq_boardRow,._v_wrq_providerRow,._v_wrq_selector{transition:none}._v_wrq_miniSpinner{animation:none}}"; const tagId$15 = "dsh-brain-mnemon/src/client/MnemonSettingsCard.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$15) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$15; document.head.appendChild(tag); } if (tag.textContent !== css$19) tag.textContent = css$19; } var MnemonSettingsCard_module_css_default = { "advanced": "_v_wrq_advanced", "advanced-expand": "_v_wrq_advanced-expand", "advancedBadge": "_v_wrq_advancedBadge", "advancedBody": "_v_wrq_advancedBody", "advancedContent": "_v_wrq_advancedContent", "advancedHeading": "_v_wrq_advancedHeading", "advancedHint": "_v_wrq_advancedHint", "advancedMeta": "_v_wrq_advancedMeta", "advancedTitle": "_v_wrq_advancedTitle", "advancedToggle": "_v_wrq_advancedToggle", "alignedNumberInput": "_v_wrq_alignedNumberInput", "appliesNow": "_v_wrq_appliesNow", "board": "_v_wrq_board", "boardControl": "_v_wrq_boardControl", "boardEmpty": "_v_wrq_boardEmpty", "boardFootnote": "_v_wrq_boardFootnote", "boardGroup": "_v_wrq_boardGroup", "boardGroupHead": "_v_wrq_boardGroupHead", "boardIconButton": "_v_wrq_boardIconButton", "boardLink": "_v_wrq_boardLink", "boardLinks": "_v_wrq_boardLinks", "boardLinksLabel": "_v_wrq_boardLinksLabel", "boardLoading": "_v_wrq_boardLoading", "boardMain": "_v_wrq_boardMain", "boardOthers": "_v_wrq_boardOthers", "boardOthersList": "_v_wrq_boardOthersList", "boardOthersToggle": "_v_wrq_boardOthersToggle", "boardProblem": "_v_wrq_boardProblem", "boardRow": "_v_wrq_boardRow", "boardRowLine": "_v_wrq_boardRowLine", "boardRowTitle": "_v_wrq_boardRowTitle", "boardSearch": "_v_wrq_boardSearch", "boardSection": "_v_wrq_boardSection", "boardState": "_v_wrq_boardState", "boardValue": "_v_wrq_boardValue", "compactTextInput": "_v_wrq_compactTextInput", "componentListNote": "_v_wrq_componentListNote", "componentRowPage": "_v_wrq_componentRowPage", "configFeedback": "_v_wrq_configFeedback", "confirmCopy": "_v_wrq_confirmCopy", "confirmDialog": "_v_wrq_confirmDialog", "detailsBack": "_v_wrq_detailsBack", "detailsBody": "_v_wrq_detailsBody", "detailsContributed": "_v_wrq_detailsContributed", "detailsControl": "_v_wrq_detailsControl", "detailsDialog": "_v_wrq_detailsDialog", "detailsEffect": "_v_wrq_detailsEffect", "detailsHead": "_v_wrq_detailsHead", "detailsHeadLine": "_v_wrq_detailsHeadLine", "detailsMissing": "_v_wrq_detailsMissing", "detailsName": "_v_wrq_detailsName", "detailsPackage": "_v_wrq_detailsPackage", "detailsRelations": "_v_wrq_detailsRelations", "detailsScroll": "_v_wrq_detailsScroll", "detailsSection": "_v_wrq_detailsSection", "directoryFields": "_v_wrq_directoryFields", "directoryInput": "_v_wrq_directoryInput", "directoryPickerRow": "_v_wrq_directoryPickerRow", "editor": "_v_wrq_editor", "editorHeading": "_v_wrq_editorHeading", "editorNote": "_v_wrq_editorNote", "effectiveRoute": "_v_wrq_effectiveRoute", "embeddingFillOutcome": "_v_wrq_embeddingFillOutcome", "embeddingSpaceCount": "_v_wrq_embeddingSpaceCount", "embeddingSpaceName": "_v_wrq_embeddingSpaceName", "embeddingSpaceState": "_v_wrq_embeddingSpaceState", "embeddingSpaces": "_v_wrq_embeddingSpaces", "embeddingTest": "_v_wrq_embeddingTest", "error": "_v_wrq_error", "evolutionGroup": "_v_wrq_evolutionGroup", "fieldGrid": "_v_wrq_fieldGrid", "globalLocationSetting": "_v_wrq_globalLocationSetting", "groupCallout": "_v_wrq_groupCallout", "importBar": "_v_wrq_importBar", "inlineChoices": "_v_wrq_inlineChoices", "inputEquiv": "_v_wrq_inputEquiv", "loading": "_v_wrq_loading", "location": "_v_wrq_location", "locationRow": "_v_wrq_locationRow", "marketAddRow": "_v_wrq_marketAddRow", "marketControls": "_v_wrq_marketControls", "marketCopy": "_v_wrq_marketCopy", "marketCount": "_v_wrq_marketCount", "marketHeader": "_v_wrq_marketHeader", "marketList": "_v_wrq_marketList", "marketRow": "_v_wrq_marketRow", "marketTitle": "_v_wrq_marketTitle", "memoryConfigFooter": "_v_wrq_memoryConfigFooter", "miniSpinner": "_v_wrq_miniSpinner", "nativeLocation": "_v_wrq_nativeLocation", "nestedBudgetGroup": "_v_wrq_nestedBudgetGroup", "numberInput": "_v_wrq_numberInput", "optionChoices": "_v_wrq_optionChoices", "optionDefault": "_v_wrq_optionDefault", "optionEmpty": "_v_wrq_optionEmpty", "optionField": "_v_wrq_optionField", "optionHint": "_v_wrq_optionHint", "optionInput": "_v_wrq_optionInput", "optionLabel": "_v_wrq_optionLabel", "optionReset": "_v_wrq_optionReset", "optionsPanel": "_v_wrq_optionsPanel", "packFeedback": "_v_wrq_packFeedback", "packRow": "_v_wrq_packRow", "packSuccess": "_v_wrq_packSuccess", "page": "_v_wrq_page", "pageLink": "_v_wrq_pageLink", "panelActions": "_v_wrq_panelActions", "panelError": "_v_wrq_panelError", "panelHeading": "_v_wrq_panelHeading", "panelNote": "_v_wrq_panelNote", "panelSection": "_v_wrq_panelSection", "placeholder-pulse": "_v_wrq_placeholder-pulse", "placeholderRow": "_v_wrq_placeholderRow", "preferenceSection": "_v_wrq_preferenceSection", "providerBoolean": "_v_wrq_providerBoolean", "providerChevron": "_v_wrq_providerChevron", "providerDisclosure": "_v_wrq_providerDisclosure", "providerEnableControl": "_v_wrq_providerEnableControl", "providerFieldControl": "_v_wrq_providerFieldControl", "providerIdentity": "_v_wrq_providerIdentity", "providerInlineBody": "_v_wrq_providerInlineBody", "providerList": "_v_wrq_providerList", "providerLoadError": "_v_wrq_providerLoadError", "providerLocationField": "_v_wrq_providerLocationField", "providerMark": "_v_wrq_providerMark", "providerRow": "_v_wrq_providerRow", "providerRowHeader": "_v_wrq_providerRowHeader", "providerScopeTag": "_v_wrq_providerScopeTag", "providerSecretInput": "_v_wrq_providerSecretInput", "providerSecretVisibility": "_v_wrq_providerSecretVisibility", "providerServiceFooter": "_v_wrq_providerServiceFooter", "providerServiceForm": "_v_wrq_providerServiceForm", "providerServiceLocation": "_v_wrq_providerServiceLocation", "providerServicePrompt": "_v_wrq_providerServicePrompt", "providerSettingsGrid": "_v_wrq_providerSettingsGrid", "providerState": "_v_wrq_providerState", "providerTarget": "_v_wrq_providerTarget", "providerToggle": "_v_wrq_providerToggle", "providerToggleError": "_v_wrq_providerToggleError", "readOnlyNotice": "_v_wrq_readOnlyNotice", "reviewDetails": "_v_wrq_reviewDetails", "reviewEntry": "_v_wrq_reviewEntry", "reviewGuidance": "_v_wrq_reviewGuidance", "reviewList": "_v_wrq_reviewList", "reviewOperationCheckbox": "_v_wrq_reviewOperationCheckbox", "reviewOperations": "_v_wrq_reviewOperations", "reviewOpinionForm": "_v_wrq_reviewOpinionForm", "reviewOpinions": "_v_wrq_reviewOpinions", "reviewSelected": "_v_wrq_reviewSelected", "reviewSelection": "_v_wrq_reviewSelection", "reviewTitle": "_v_wrq_reviewTitle", "routeValue": "_v_wrq_routeValue", "rowActions": "_v_wrq_rowActions", "rowDetail": "_v_wrq_rowDetail", "rowNote": "_v_wrq_rowNote", "rowTitleLine": "_v_wrq_rowTitleLine", "rows": "_v_wrq_rows", "scopeChanging": "_v_wrq_scopeChanging", "section": "_v_wrq_section", "sectionHeading": "_v_wrq_sectionHeading", "selectMenu": "_v_wrq_selectMenu", "selectOption": "_v_wrq_selectOption", "selector": "_v_wrq_selector", "settingControl": "_v_wrq_settingControl", "settingCopy": "_v_wrq_settingCopy", "settingRow": "_v_wrq_settingRow", "settings-fade-in": "_v_wrq_settings-fade-in", "settings-spin": "_v_wrq_settings-spin", "settingsSubheading": "_v_wrq_settingsSubheading", "skillsSubgroup": "_v_wrq_skillsSubgroup", "surface": "_v_wrq_surface", "switch": "_v_wrq_switch", "syncAccount": "_v_wrq_syncAccount", "syncAdvanced": "_v_wrq_syncAdvanced", "syncChoice": "_v_wrq_syncChoice", "syncCode": "_v_wrq_syncCode", "syncCompareList": "_v_wrq_syncCompareList", "syncCompareNote": "_v_wrq_syncCompareNote", "syncConflict": "_v_wrq_syncConflict", "syncConflictList": "_v_wrq_syncConflictList", "syncConnect": "_v_wrq_syncConnect", "syncDevice": "_v_wrq_syncDevice", "syncDialogBody": "_v_wrq_syncDialogBody", "syncDialogNote": "_v_wrq_syncDialogNote", "syncDisclosure": "_v_wrq_syncDisclosure", "syncFeedbackLine": "_v_wrq_syncFeedbackLine", "syncFieldBox": "_v_wrq_syncFieldBox", "syncFieldLabel": "_v_wrq_syncFieldLabel", "syncHistoryEntry": "_v_wrq_syncHistoryEntry", "syncHistoryHead": "_v_wrq_syncHistoryHead", "syncHistoryList": "_v_wrq_syncHistoryList", "syncHistoryMessage": "_v_wrq_syncHistoryMessage", "syncInlineAction": "_v_wrq_syncInlineAction", "syncPanel": "_v_wrq_syncPanel", "syncPicker": "_v_wrq_syncPicker", "syncRepositoryList": "_v_wrq_syncRepositoryList", "syncRepositoryName": "_v_wrq_syncRepositoryName", "syncRepositoryOption": "_v_wrq_syncRepositoryOption", "syncRepositoryState": "_v_wrq_syncRepositoryState", "syncRow": "_v_wrq_syncRow", "syncState": "_v_wrq_syncState", "syncStateLine": "_v_wrq_syncStateLine", "syncSuccess": "_v_wrq_syncSuccess", "syncWarning": "_v_wrq_syncWarning", "toggleRow": "_v_wrq_toggleRow", "unitInput": "_v_wrq_unitInput", "unitSuffix": "_v_wrq_unitSuffix", "visuallyHidden": "_v_wrq_visuallyHidden", "warning": "_v_wrq_warning", "workspacePaths": "_v_wrq_workspacePaths" }; // vendor/dsh-mnemon/src/client/locales/de.ts const coreDe = { "composer.expand": "Nachrichteneingabe anzeigen", "composer.collapse": "Nachrichteneingabe einklappen", "composer.collapsed": "Nachrichteneingabe eingeklappt", "tab.label": "Speichersystem", "nav.aria": "Mnemon-Seiten", "nav.status": "Status", "nav.runtime": "Laufzeitspeicher", "nav.runtimeDetail": "USER / MEMORY", "nav.documents": "Projektdokumente", "nav.documentsDetail": "Index & Archiv", "nav.spaces": "Speicherbereiche", "nav.spacesDetail": "Graph & Abruf", "common.refresh": "Aktualisieren", "common.openConfiguration": "Einstellungen öffnen", "common.loading": "Wird geladen…", "common.cancel": "Abbrechen", "common.close": "Schließen", "common.showing": "{visible} / {total} angezeigt", "common.showMore": "{count} weitere anzeigen", "header.backToConversation": "Zurück zum Chat", "header.configure": "Konfigurieren", "header.noticeSummary": "Hinweise {count} · {labels}", "header.noticeRemoteReadOnly": "Remote schreibgeschützt", "header.noticeIdleReview": "Leerlaufprüfung", "header.compositionHint": "Auswählen, um die Zusammensetzung in den Einstellungen zu ändern.", "header.checking": "Wird geprüft", "header.connected": "Verbunden", "header.unavailable": "Nicht verfügbar", "header.notReady": "Mnemon ist nicht bereit", "workspace.viewing": "Angezeigter Arbeitsbereich", "workspace.selectorAria": "Speicher-Arbeitsbereich zur Ansicht auswählen", "workspace.excluded": "Vom Speicher ausgeschlossen", "workspace.excludedDetail": "Dieser Arbeitsbereich und seine untergeordneten Agents nehmen nicht an Speicherinjektion, Tools oder automatischer Prüfung teil. Vorhandene Daten bleiben lesbar; entfernen Sie den Ausschluss zum Fortsetzen.", "workspace.excludeTitle": "Vom Speicher ausgeschlossene Arbeitsbereiche", "workspace.excludeHint": "Ein absoluter Arbeitsbereichspfad pro Zeile (~ und Symlinks unterstützt).", "workspace.excludeCount": "{count} ausgeschlossen", "workspace.excludeNone": "Keine", "workspace.excludePlaceholder": "/pfad/zum/privaten-arbeitsbereich", "workspace.excludeNote": "Gilt für künftige Runden; vorhandene Daten und Sitzungsverlauf bleiben unverändert.", "workspace.invalidExclusions": "{count} Ausschlusspfade sind ungültig oder nicht erreichbar und wurden ignoriert; prüfen Sie die Pfade in den Speichereinstellungen.", "workspace.unavailable": "Der aktuelle Arbeitsbereich konnte nicht ermittelt werden; Pfadausschlüsse wurden nicht angewendet.", "workspace.storageMode": "Speicherumfang", "workspace.storageModeAria": "Speicherumfang: {mode}", "workspace.mismatchTitle": "Das angezeigte Verzeichnis stimmt nicht mit dieser Sitzung überein", "workspace.mismatchShort": "Nicht der Unterhaltungs-Arbeitsbereich", "workspace.selectedRoot": "Ansicht: {root}", "workspace.effectiveRoot": "Aktiv: {root}", "workspace.align": "Angleichen", "workspace.remoteReadOnly": "Remote-Zugriff ist schreibgeschützt: Setzen Sie remoteAccess: trusted-host in der mnemon-Profilkonfiguration und starten Sie DSH neu, um den Speicher hier zu verwalten.", "sourcePage.instance": "Quellinstanz", "sourcePage.instanceAria": "Quellinstanz auswählen", "sourcePage.summaryAria": "Status- und Berechtigungsübersicht der Quelle", "sourcePage.package": "Paket", "sourcePage.availability": "Verfügbarkeit", "sourcePage.availability.ready": "Bereit", "sourcePage.availability.degraded": "Eingeschränkt", "sourcePage.availability.unavailable": "Nicht verfügbar", "sourcePage.role": "Semantische Rolle", "sourcePage.revision": "Aktuelle Revision", "sourcePage.permissions": "Autorisierte Fähigkeiten", "sourcePage.diagnostics": "Diagnose", "sourcePage.configuration": "Deklarative Konfiguration", "sourcePage.configurationDescription": "Felder stammen aus dem bereinigten Host-Verwaltungsdeskriptor; das Absenden wird für diese Instanz und Revision erneut autorisiert.", "sourcePage.configLoading": "Konfiguration wird geladen…", "sourcePage.configSave": "Speichern", "sourcePage.configSaving": "Wird gespeichert…", "sourcePage.configSaved": "Konfiguration übermittelt; Quellstatus wird aktualisiert.", "sourcePage.secretPlaceholder": "Leer lassen, um den bestehenden Schlüssel zu behalten", "sourcePage.unavailable": "Quelle ist nicht verfügbar", "sourcePage.unavailableDescription": "In diesem Geltungsbereich ist keine aufrufbare Instanz sichtbar. Das Host- und Headless-Speicherverhalten wird durch diese Seite nicht beeinflusst.", "turnTail.label": "Rundenspeicher", "turnTail.recall": "{count} abgerufen", "turnTail.write": "{count} geschrieben", "turnTail.documents": "Dokumentsuche {count}", "turnTail.inspect": "{count} geprüft", "turnTail.failed": "{count} fehlgeschlagen", "turnTail.toolList": "Speicher-Tools dieser Runde", "turnTail.more": "{count} weitere", "turnTail.openTool": "Speicherseite für {tool} öffnen", "turnTail.tool.recall": "Abruf aus Speicherbereichen", "turnTail.tool.related": "Verwandte Einträge", "turnTail.tool.documentSearch": "Dokumentsuche", "turnTail.tool.documentManage": "Dokumentaktualisierung", "turnTail.tool.documentCreate": "Neues Dokument", "turnTail.tool.runtime": "Laufzeitspeicher-Aktualisierung", "turnTail.tool.remember": "In Speicherbereichen gespeichert", "turnTail.tool.link": "Einträge verknüpft", "turnTail.tool.forget": "Eintrag gelöscht", "turnTail.tool.status": "Speicherstatus", "turnTail.tool.spaces": "Liste der Speicherbereiche", "turnTail.tool.spaceCreate": "Neuer Speicherbereich", "turnTail.tool.spaceUpdate": "Speicherbereich aktualisiert", "turnTail.tool.spaceMerge": "Speicherbereiche zusammengeführt", "turnTail.tool.viewRoute": "Speicherlesevorgang", "turnTail.tool.viewAction": "Speicheraktualisierung", "receipt.written": "Gespeichert", "receipt.updated": "Aktualisiert", "receipt.pending": "Übermittelt; der Anbieter bestätigt später", "receipt.skipped": "Übersprungen", "receipt.partial": "Teilweise gespeichert", "receipt.unfinished": "Nicht abgeschlossen", "receipt.failed": "Fehlgeschlagen", "receipt.view": "In Speicherbereichen anzeigen", "receipt.viewRuntime": "Im Laufzeitspeicher anzeigen", "receipt.unembedded": "Ohne Vektor gespeichert: Das Embedding ist fehlgeschlagen, sodass dieser Eintrag vorerst nicht am semantischen Abgleich teilnimmt. Sobald der Embedding-Dienst antwortet, können Sie ihn unter „Status testen“ in den Mnemon Native-Embedding-Einstellungen ergänzen.", "receipt.unembeddedNoService": "Noch kein Vektor: Es ist kein Embedding-Dienst verfügbar, sodass dieser Eintrag vorerst nicht am semantischen Abgleich teilnimmt; die Schlüsselwortsuche findet ihn weiterhin. Sobald ein Embedding-Dienst verbunden ist, können Sie ihn unter „Status testen“ in den Mnemon Native-Embedding-Einstellungen ergänzen.", "taskAgent.ready": "Task-Agent bereit", "taskAgent.unavailable": "Task-Agent nicht verfügbar", "saveAction.button": "Im Speicher sichern", "saveAction.tooltip": "Diese Antwort im Speicher sichern", "saveAction.title": "Im Speicher sichern", "saveAction.hint": "Der Task-Agent entscheidet über die Speicherung, verdichtet den Inhalt und schreibt ihn in einen Speicherbereich.", "saveAction.fetching": "Nachrichtentext wird extrahiert…", "saveAction.missing": "Dieser Nachrichtentext konnte nicht aus dem Sitzungsprotokoll extrahiert werden.", "saveAction.candidate": "Inhalt", "saveAction.truncated": "Diese Antwort ist lang; hier werden nur die ersten {limit} Zeichen geladen.", "saveAction.submit": "Speichern", "saveAction.submitting": "Wird gespeichert…", "saveAction.readOnly": "Diese Bereitstellung ist schreibgeschützt; Schreibvorgänge in den Speicher sind deaktiviert.", "saveAction.close": "Schließen", "saveAction.hintDirect": "Schreibt direkt in das ausgewählte Ziel.", "saveAction.to": "Speichern unter", "saveAction.to.agent": "Automatisch", "saveAction.to.agentDetail": "Agent entscheidet über die Speicherung und wählt einen passenden Speicherbereich", "saveAction.to.memory": "Arbeitsgedächtnis (MEMORY.md)", "saveAction.to.user": "Benutzerprofil (USER.md)", "saveAction.to.space": "Speicherbereich · {provider}", "saveAction.save": "Speichern", "saveAction.saving": "Wird gespeichert…", "saveAction.saved.runtime": "In {target} gespeichert · {count} Einträge", "saveAction.saved.runtimeMaintained": "Platz geschaffen und in {target} gespeichert · {count} Einträge", "saveAction.saved.space": "Im Speicherbereich „{space}“ gespeichert", "saveAction.saved.spacePending": "An den Speicherbereich „{space}“ übermittelt; der Anbieter bestätigt später", "saveAction.saved.spaceOther": "Antwort des Speicherbereichs „{space}“: {action}", "saveAction.saved.duplicate": "Bereits gespeichert; es wurde nichts doppelt geschrieben.", "saveAction.unavailable": "An diesem Ziel kann derzeit nicht geschrieben werden.", "saveAction.place.delimiter": "Einträge in {target} dürfen kein § enthalten; entfernen Sie es zum Speichern.", "saveAction.place.tooLong": "Dieser Text ist etwa {size} groß und überschreitet das Limit pro Eintrag in {target} ({limit}); bitte kürzen.", "saveAction.place.orAgent": " Oder lassen Sie den Agent entscheiden.", "saveAction.place.full": "{target} belegt {used} von {limit}. Vor dem Speichern wird Platz geschaffen: Etwa {keep} der vorhandenen Einträge bleiben erhalten, der Rest wird aus dem Arbeitsgedächtnis verschoben.", "saveAction.place.fullAll": "{target} belegt {used} von {limit}. Vor dem Speichern wird Platz geschaffen: Alle vorhandenen Einträge werden aus dem Arbeitsgedächtnis verschoben.", "saveAction.place.userCondense": "Das Benutzerprofil belegt {used} von {limit}. Vor dem Speichern verdichtet ein Task-Agent es auf etwa {keep}, ohne ein Archiv anzulegen.", "saveAction.place.userTooLong": "Dieser Text ist etwa {size} groß und überschreitet den Platz im Benutzerprofil nach der Bereinigung ({max}); bitte kürzen.", "saveAction.place.userFull": "Das Benutzerprofil ist voll, und zum Platzschaffen wird ein Task-Agent benötigt; entfernen Sie zuerst Einträge im Laufzeitspeicher oder wählen Sie ein anderes Ziel.", "saveAction.noPlace": "Derzeit kann kein Ziel diesen Text aufnehmen.", "status.title": "Systemstatus", "status.description": "Betriebszustand von dsh-brain-mnemon, Speicheranbietern und den einzelnen Speicherschichten.", "status.nominal": "System arbeitet normal", "status.workflowUnavailable": "Hintergrundwartung nicht verfügbar", "status.workflowIdleReview": "Leerlaufprüfung", "status.workflowRuntimeCapacity": "Kapazitätswartung des Laufzeitspeichers", "status.workflowUnsupported": "Die aktuelle Strategie steuert Folgendes nicht: {workflows}. Das Aktivieren der Prüfeinstellungen allein startet diese Aufgaben nicht. Wählen Sie im Speichersystem eine Strategie, die sie unterstützt, etwa die Schichtstrategie. Manuelle Aktionen bleiben verfügbar.", "status.reviewFailed": "Leerlaufprüfung fehlgeschlagen", "status.reviewFailedDetail": "Dieser Checkpoint wurde nicht abgeschlossen und wird nicht automatisch wiederholt. Spätere Prüfungen beachten Abklingzeit und Sitzungslimit.", "status.reviewPartial": "Einige Schreibvorgänge wurden ausgeführt. Prüfen Sie die folgenden Quittungen; sie wurden nicht rückgängig gemacht.", "status.reviewTeamPaused": "Die Leerlaufprüfung ist durch die Kompatibilitätseinstellung für Agent Teams pausiert. Um weiter zu prüfen, wählen Sie „Eingeschränkte Task-Agent-Prüfung“ unter Leerlaufprüfung auf der dsh-brain-mnemon-Seite unter Plugins. Einstellungen für Abruf und Zurückschreiben bleiben unverändert.", "status.reviewConfirmationPaused": "Die Schreibbestätigung für Speicher-Tools ist aktiviert, daher ist die Leerlaufprüfung pausiert. Sie können den Speicher weiterhin manuell bearbeiten.", "status.reviewToolAccessPaused": "Das für die automatische Prüfung erforderliche Abschluss-Tool ist derzeit nicht verfügbar. Dieser Checkpoint wurde ohne Verbrauch eines Versuchs übersprungen. Der Zugriff wird nach einer späteren geeigneten Runde erneut geprüft. Prüfen Sie die Tool-Einschränkungen oder Genehmigungseinstellungen dieser Sitzung.", "status.reviewWatermarkUsage": "Sitzungs-Prüfversuche: {attempts} / {max} ({restored} wiederhergestellt).", "status.reviewWatermarkNext": "Nächste Prüfung frühestens um {time}; ein neuer geeigneter Unterhaltungs-Checkpoint ist weiterhin erforderlich.", "status.reviewWatermarkPaused": "Automatische Prüfung pausiert: Dauerhafte Grenzwerte sind nicht verfügbar.", "status.reviewWatermarkRecovery": "Setzen Sie die Unterhaltung für einen erneuten Versuch fort. Besteht der Fehler fort, stoppen Sie alle Hosts, die dieses Speicherstammverzeichnis nutzen, bevor Sie den Zustand oder die Sperre dieser Sitzung unter state/idle-review prüfen. Das Löschen des Zustands setzt das Limit zurück.", "config.reviewPersistWatermark": "Prüflimits nach erneutem Öffnen beibehalten", "config.reviewPersistWatermarkHint": "Versuche und Abklingzeit pro Speicherstammverzeichnis und übergeordneter Sitzung speichern – einschließlich fehlgeschlagener oder abgebrochener Läufe.", "status.reviewRun": "Prüflauf: {id}", "status.reviewContextWindow": "Wählen Sie die begrenzte Checkpoint-Prüfung (spawn) oder ein Task-Agent-Modell, dessen Kontextfenster die übergeordnete Unterhaltung abdeckt.", "config.reviewTitle": "Leerlaufprüfung", "config.reviewDescription": "Räumt den Speicher auf, während die Unterhaltung ruht; Abruf und Schreibvorgänge funktionieren unabhängig davon", "config.reviewEnabled": "Leerlaufprüfung aktivieren", "config.reviewRuntimeMemory": "In Laufzeitspeicher schreiben", "config.reviewRuntimeMemoryHint": "Nur ausdrücklich genannte Präferenzen und Regeln; bei Deaktivierung erstellt die Prüfung nur Dokumente", "config.reviewSilent": "Leerlaufprüfungen im Hintergrund ausführen", "config.reviewSilentHint": "Wenn deaktiviert, erscheinen automatische Spawn-Prüfungen in der Subagent-Liste der Unterhaltung.", "config.reviewLimits": "Prüflimits", "config.reviewProvider": "Prüfmethode", "config.reviewSpawn": "Begrenzter Checkpoint (spawn)", "config.reviewSpawnHint": "Der Task-Agent liest einen begrenzten Checkpoint", "config.reviewFork": "Vollständiger Elternkontext (fork)", "config.reviewForkHint": "Der Task-Agent erhält den vollständigen Elternkontext", "config.reviewFallback": "Wenn fork nicht verfügbar ist (nur vor dem Start)", "config.reviewSkip": "Diese Prüfung überspringen", "config.reviewAgentTeams": "Kompatibilität mit Agent Teams", "config.reviewTeamPause": "Prüfung pausieren", "config.reviewTeamPauseHint": "Überspringt Prüfungen, während Agent Teams aktiv ist", "config.reviewTeamScoped": "Eingeschränkte Task-Agent-Prüfung", "config.reviewTeamScopedHint": "Ein eingeschränkter Task-Agent prüft ohne Teams-Tools", "config.review.minIntervalMs": "Mindestabstand zwischen Prüfungen (Sekunden)", "config.review.maxPerSession": "Maximale Versuche pro Sitzung", "config.review.maxContextChars": "Zeichenbudget für Spawn-Checkpoints", "config.review.maxTokens": "Ausgabe-Token-Limit des Modells pro Anfrage", "config.reviewLimitInvalid": "{field} muss zwischen {min} und {max} liegen", "status.checkRequired": "Prüfung erforderlich", "status.memoryOff": "Speicher nicht aktiv", "status.memoryOffDetail": "Unterhaltungen laufen ohne Speicher weiter.", "status.compositionStale": "Die letzte Komponentenänderung wurde nicht wirksam", "status.compositionStaleDetail": "Der Speicher läuft weiterhin in der vorherigen Zusammensetzung.", "status.strategyFallback": "Die gewählte Hauptstrategie läuft nicht", "status.strategyFallbackDetail": "Die einzig verfügbare Hauptstrategie setzt den Speicher vorerst zusammen.", "status.reasonNoStrategy": "Es läuft keine Hauptstrategie.", "status.reasonNoSource": "Es läuft keine Speicherquelle.", "status.reasonNotComposed": "Speicherkomponenten werden noch geladen.", "status.reasonSelectedStrategyOff": "Die gewählte Hauptstrategie läuft nicht, und mehr als eine andere könnte den Speicher zusammensetzen.", "status.reasonDependency": "{component} fehlt {requirement}.", "status.reasonConflict": "Einige Komponenten stehen in Konflikt zueinander.", "status.reasonRejected": "Die Zusammensetzung wurde abgelehnt: {detail}", "status.layerOffDetail": "In den Einstellungen wieder einschalten", "status.layerStoppedDetail": "Die Komponente ist eingeschaltet, läuft aber nicht", "status.layerMemoryOffDetail": "Verfügbar, sobald eine Hauptstrategie läuft", "status.rechecking": "Wird geprüft…", "status.aria": "Mnemon-Laufzeitstatus", "status.engine": "Speicher-Engine", "status.engineUnavailable": "Mnemon nicht verfügbar", "status.versionWaiting": "Wartet auf Version", "status.pluginChecking": "Plugin-Status wird geprüft", "status.pluginReady": "Plugin läuft normal", "status.nativeAria": "Status von Mnemon Native", "status.nativeCliMissing": "Mnemon CLI nicht gefunden", "status.providersTitle": "Speicheranbieter", "status.providersDescription": "Verbindungsstatus der laufenden Anbieter und ihrer Speicherbereiche.", "status.providersAria": "Status der Speicheranbieter", "status.providersEnabled": "{enabled} / {total} aktiviert", "status.providersOff": "{count} weitere Anbieter sind ausgeschaltet", "status.providerState.disabled": "Aus", "status.providerState.idle": "Dienst bereit · kein aktiver Speicherbereich", "status.providerState.healthy": "Verbindung intakt", "status.providerState.unhealthy": "Verbindung prüfen", "status.providerSpaces": "{active} / {total} Speicherbereiche aktiv", "versions.checkAction": "Versionen", "versions.title": "Versionen prüfen und aktualisieren", "versions.description": "Prüfen Sie Ihre Installation und aktualisieren Sie bei Bedarf. Klappen Sie dsh-brain-mnemon auf, um dessen Unterpakete zu verwalten.", "versions.missing": "Nicht installiert (optional)", "versions.restart": "Neustart erforderlich", "versions.local": "Lokale Version", "versions.modeNpmCli": "npm", "versions.hintNpm": "Verwaltet über npm. Aktualisieren Sie hier oder führen Sie mnemon update im Host-Terminal aus.", "versions.hintNpmMissing": "Der npm-Starter wurde gefunden, aber npm ist auf dem Host nicht verfügbar. Prüfen Sie die Node.js-Umgebung.", "versions.hintNpmUnmanaged": "Das aktuelle npm verwaltet diese globale CLI-Installation nicht. Verwenden Sie die ursprüngliche Node.js-Umgebung oder migrieren Sie unten.", "versions.hintUnreadable": "Die CLI wurde gefunden, aber ihre Version konnte nicht gelesen werden. Prüfen Sie den Befehl im Host-Terminal oder installieren Sie sie neu.", "versions.hintStarter": "Wird zusammen mit dem dsh-brain-mnemon Starter gepflegt. Aktualisieren Sie den Starter, um die getestete Paketkombination zu nutzen.", "versions.npmRecommended": "Installation und Wartung mit npm", "versions.npmMaintenance": "CLI über npm verwalten", "versions.npmInstall": "Mit npm installieren (empfohlen)", "versions.npmMigrate": "Zu npm wechseln (empfohlen)", "versions.npmRepair": "npm-Installation prüfen oder reparieren", "versions.npmRepairDetail": "Prüfen Sie oben den Installationsstatus. Führen Sie zur Neuinstallation diesen Befehl im Terminal des DSH Host aus (Node.js 22+).", "versions.npmUpdateDetail": "Führen Sie diesen Befehl für künftige Updates aus und wählen Sie dann „Erneut prüfen“, um die aktive Version zu bestätigen.", "versions.npmInstallDetail": "Nur Mnemon Native benötigt diese separate CLI. Führen Sie dazu diesen Befehl im Terminal des DSH Host aus (Node.js 22+).", "versions.npmMigrateDetail": "Um zu npm zu wechseln, führen Sie dies auf dem DSH Host aus (Node.js 22+).", "versions.npmVerify": "Prüfen Sie die installierte Version und wählen Sie dann „Erneut prüfen“:", "versions.npmNextSteps": "Nach der Installation: Version und aktiven Pfad prüfen", "versions.npmPath": "Stellen Sie das globale npm-bin-Verzeichnis an den Anfang von PATH. Falls MNEMON_CLI_PATH oder mnemon.cliPath gesetzt ist, verweisen Sie auf den neuen Starter. Starten Sie DSH nach Umgebungsänderungen neu und prüfen Sie oben den Pfad der Programmdatei.", "versions.installGuide": "Installationsanleitung", "versions.copy": "Kopieren", "versions.copied": "Kopiert", "versions.copyCommand": "Befehl kopieren: {command}", "versions.copyFailed": "Zwischenablage nicht verfügbar. Markieren Sie den Befehl und kopieren Sie ihn manuell.", "versions.readOnly": "Diese Verbindung ist schreibgeschützt. Sie können Versionen prüfen und Befehle kopieren; nutzen Sie für Updates eine Verbindung mit Verwaltungszugriff.", "versions.packages": "Unterpaket-Versionen ({count})", "versions.packagesOutdated": "{count} Updates verfügbar", "versions.packagesDetail": "Für Wartungsoptionen aufklappen", "versions.packagesHide": "Paketdetails einklappen", "versions.packagesHint": "Standardpakete werden mit dem Starter aktualisiert. Unabhängig in diesem Profil installierte Pakete lassen sich einzeln aktualisieren. Starten Sie DSH anschließend neu.", "versions.managedStarter": "Mit Starter verwaltet", "versions.managedProfile": "Vom Profil verwaltet", "versions.starterVersion": "Starter-Version", "versions.kind.source": "Quellen", "versions.kind.strategy": "Strategien", "versions.kind.provider": "Anbieter", "versions.checking": "Remote-Repositories werden auf neue Versionen geprüft…", "versions.checkingShort": "Wird geprüft…", "versions.recheck": "Erneut prüfen", "versions.failed": "Versionsvorgang fehlgeschlagen", "versions.timeout": "Zeitüberschreitung bei der Versionsprüfung. Prüfen Sie das Netzwerk und versuchen Sie es erneut.", "versions.current": "Aktuell", "versions.available": "Update verfügbar", "versions.unknown": "Nicht überprüfbar", "versions.installed": "Installiert", "versions.latest": "Neueste", "versions.executable": "Programmdatei", "versions.profileLocation": "Profil · {name}", "versions.sourceLocation": "Quellcode", "versions.linkSourceLocation": "Quellcode · Profil {name}", "versions.packageLocation": "Paketverzeichnis", "versions.update": "Aktualisieren", "versions.updating": "Wird aktualisiert…", "versions.updated": "{name} aktualisiert", "versions.alreadyCurrent": "Bereits auf der neuesten Version", "versions.restartRequired": "Starten Sie DSH neu, um den neuen dsh-brain-mnemon-Plugin-Code zu laden; beenden und öffnen Sie die Desktop-App vollständig neu.", "versions.pendingInstalledTitle": "dsh-brain-mnemon {version} ist installiert", "versions.pendingInstalledDetail": "Auf diesem Host läuft noch {running}. Starten Sie DSH neu, um die neue Version zu laden; beenden und öffnen Sie die Desktop-App vollständig neu.", "versions.pendingPackagesTitle": "{names} aktualisiert", "versions.pendingPackagesDetail": "Starten Sie DSH neu, um das Update zu laden; beenden und öffnen Sie die Desktop-App vollständig neu.", "versions.checkedAt": "Geprüft um {time}", "versions.latestUnavailable": "Die neueste Remote-Version ist nicht verfügbar. Prüfen Sie das Netzwerk und versuchen Sie es erneut.", "versions.modeHomebrew": "Homebrew", "versions.modeGo": "Go install", "versions.modeNpm": "DSH-Profil", "versions.modeLink": "Lokaler Link", "versions.modeManual": "Manuell", "versions.modeMissing": "Fehlt", "versions.hintHomebrew": "Verwaltet über Homebrew; ein verfügbares Release kann hier sicher aktualisiert werden.", "versions.hintBrewMissing": "Eine Homebrew-Installation wurde erkannt, aber der Befehl brew ist nicht verfügbar.", "versions.hintGo": "Verwaltet über go install; ein verfügbares Release kann hier sicher aktualisiert werden.", "versions.hintDsh": "Verwaltet vom aktuellen DSH-Profil. Updates nutzen den DSH-eigenen Plugin-Installer; starten Sie DSH anschließend neu.", "versions.hintPnpm": "Verwaltet vom aktuellen DSH-Profil; starten Sie DSH nach dem Update neu.", "versions.hintPnpmMissing": "Eine DSH-Profil-Installation wurde erkannt, aber der Host findet den Befehl pnpm nicht. Installieren Sie pnpm und starten Sie DSH neu, um hier zu aktualisieren.", "versions.hintLink": "Dies ist ein lokal verknüpfter Entwicklungs-Build. Ziehen und bauen Sie im Quellverzeichnis, um lokale Änderungen zu bewahren.", "versions.hintInstall": "Die Mnemon CLI ist nicht installiert. Nur Mnemon Native benötigt sie; installieren Sie sie bei Bedarf und legen Sie mnemon in PATH oder setzen Sie MNEMON_CLI_PATH / mnemon.cliPath.", "versions.hintManual": "Die Installationsquelle lässt sich nicht sicher bestimmen. Aktualisieren Sie über die ursprüngliche Installationsmethode.", "status.activeRatio": "{active} / {total} aktiv", "status.runtimeRatio": "{user} Benutzer · {memory} Projekt", "status.runtimeBytes": "{bytes} belegt", "status.runtimeWaiting": "Wartet", "status.runtimeWaitingDetail": "Wartet auf das Host-Speicherinventar", "status.directoryUnsynced": "Verzeichnis nicht synchronisiert", "status.activeMemories": "{count} aktive Einträge", "status.documentsWaiting": "Wartet auf Arbeitsbereich", "status.documentsSession": "Verfügbar nach Bindung einer aktiven Sitzung", "status.documentRatio": "{active} aktiv · {archived} archiviert", "status.documentUsage": "{used} / {limit} aktive Kapazität", "status.storageDomains": "Speicherdomänen", "status.storageDomainsText": "Wo Laufzeitspeicher, Speicherbereiche und Projektdokumente abgelegt werden.", "status.storageGlobal": "Global", "status.storageWorkspace": "Arbeitsbereich", "status.storageWorkspaces": "Zentrale Arbeitsbereiche", "status.storageCustom": "Benutzerdefiniert", "status.storageWaiting": "Verzeichnisse der Speicherdomänen werden gelesen…", "status.storageCustomUnset": "Kein benutzerdefiniertes Verzeichnis konfiguriert. Diese Ansicht zeigt nur ein bereits in DSH konfiguriertes und aktives benutzerdefiniertes Stammverzeichnis.", "status.storageWorkspaceUnavailable": "Die aktuelle Sitzung hat kein verfügbares Arbeitsbereichsverzeichnis.", "status.storageActiveRoot": "Aktuelles Lese-/Schreibstammverzeichnis", "status.storageAvailable": "Verzeichnis verfügbar", "status.storageNotCreated": "Verzeichnis noch nicht erstellt", "status.storageRuntime": "Laufzeitspeicher", "status.storageSpaces": "Speicherbereiche", "status.storageDocuments": "Projektdokumente", "status.storageState": "Hintergrundzustand", "status.storageReady": "Bereit", "status.storageEmpty": "Leer", "status.storageMissing": "Nicht erstellt", "status.storageInvalid": "Reparatur erforderlich", "status.storageItems": "Einträge", "status.storageRuntimeDetail": "USER {user} · MEMORY {memory}", "status.storageSpacesDetail": "{active} aktiv · {databases} Datenbanken", "status.storageDocumentsDetail": "{active} aktiv · {archived} archiviert", "status.storageStateReady": "Prüfmarken werden dauerhaft gespeichert", "status.storageStateVolatile": "Der Prüfstatus wird derzeit vom Host-Prozess gehalten", "status.storageFootnote": "Wechseln Sie den Speicherumfang unter Konfigurieren; vorhandene Daten bleiben an Ort und Stelle.", "config.aria": "Konfiguration des Speichersystems", "plugin.openWorkspace": "Öffnen", "config.interfaceTitle": "Oberfläche", "config.unsaved": "Ungespeicherte Änderungen", "config.ready": "Gespeichert und live angewendet", "config.displayTitle": "Speichersystem öffnen in", "config.displaySidebar": "Seitenleiste", "config.displaySidebarHint": "Eigenständige Seite, auf der auch andere Arbeitsbereiche angezeigt werden können", "config.displayBuiltin": "Unterhaltungs-Tab", "config.displayBuiltinHint": "Öffnet sich innerhalb der aktuellen Unterhaltung", "config.storageTitle": "Speicher", "storage.usedBy": "Verwendet von", "storage.usedByTitle": "„{component}“ speichert seine Daten hier", "storage.userProfileByWorkspace": "Jeder Arbeitsbereich hat sein eigenes Benutzerprofil.", "storage.userProfileShared": "Alle Arbeitsbereiche teilen ein Benutzerprofil. Das Arbeitsgedächtnis bleibt getrennt.", "storage.runtimeSettings": "Einstellungen für Laufzeitspeicher", "storage.default": "Standard", "storage.directoryExample": "Zum Beispiel ~/Documents/mnemon", "storage.thisWorkspace": "Dieser Arbeitsbereich", "storage.moveNote": "Der Speicher wechselt an den neuen Ort; vorhandene Daten bleiben am bisherigen Ort", "storage.chooseDirectory": "Verzeichnis wählen", "storage.pickFailed": "Die Verzeichnisauswahl konnte nicht geöffnet werden. Versuchen Sie es erneut oder geben Sie einen Pfad ein.", "config.scopeTitle": "Speicherumfang", "config.global": "Global", "config.workspace": "Arbeitsbereich", "config.workspaces": "Zentral · nach Arbeitsbereich getrennt", "config.workspacesHint": "Ein Stammverzeichnis mit einem Unterverzeichnis pro Arbeitsbereich, anhand des Pfads", "config.custom": "Benutzerdefiniert", "config.globalScopeHint": "Alle Arbeitsbereiche nutzen ein gemeinsames Verzeichnis", "config.workspaceScopeHint": "Jeder Arbeitsbereich führt sein eigenes .mnemon-Verzeichnis", "config.dataDirectory": "Datenverzeichnis", "config.runtimeSectionScope": "Umfang & Abruf", "config.runtimeDeferred": "Einträge mit niedriger Priorität bei Bedarf lesen", "config.runtimeDeferredHint": "Nicht angeheftete Einträge mit niedriger Priorität aus Prompts auslassen; Modelle rufen sie bei Bedarf ab.", "config.runtimeBm25Recall": "Arbeitsgedächtnis bei Bedarf durchsuchen (experimentell)", "config.runtimeBm25RecallLabel": "Arbeitsgedächtnis bei Bedarf durchsuchen", "config.runtimeBm25RecallHint": "Gleicht Arbeitsgedächtnis und Dokumenttitel mit jeder Runde ab; Benutzerprofil und angeheftete Einträge bleiben sichtbar.", "config.runtimeIndexPush": "Indizes für Speicherbereiche und Dokumente senden (experimentell)", "config.runtimeIndexPushLabel": "Indizes für Speicherbereiche und Dokumente senden", "config.runtimeIndexPushHint": "Gleicht Beschreibungen von Speicherbereichen und Dokumentzusammenfassungen in Schritt 1 ab; sendet nur kompakte Indizes, niemals Volltexte.", "config.runtimeUserScopeTitle": "Geltungsbereich des Benutzerprofils", "config.runtimeInheritance": "Laufzeitspeicher automatisch mit Subagents teilen", "config.runtimeInheritanceHint": "Neue Subagents erben Benutzerprofil und Arbeitsgedächtnis; laufende Aufgaben behalten ihren Kontext.", "config.runtimeUserScopeStorage": "Speicherumfang folgen", "config.runtimeUserScopeStorageHint": "Wird zusammen mit MEMORY.md gespeichert", "config.runtimeUserScopeGlobal": "Global geteilt", "config.runtimeUserScopeGlobalHint": "Von allen Arbeitsbereichen geteilt; MEMORY.md folgt weiterhin dem Speicherumfang", "config.runtimeSnapshotRefreshTitle": "Snapshot-Aktualisierung", "config.runtimeSnapshotRefreshOnChange": "Bei Änderung aktualisieren", "config.runtimeSnapshotRefreshOnChangeHint": "Projiziert geänderten Laufzeitspeicher in offenen Sitzungen in der nächsten Runde erneut", "config.runtimeSnapshotRefreshSessionStart": "Bei Sitzungsstart einfrieren", "config.runtimeSnapshotRefreshSessionStartHint": "Hält den anfänglichen Snapshot in offenen Sitzungen für stabilen Cache fest; neue Sitzungen und Abruf-Tools lesen weiterhin den aktuellen Speicher", "config.componentScopeStorage": "Speicherumfang folgen", "config.componentScopeGlobal": "Global geteilt", "config.componentScopeSwitchHint": "Durch den Wechsel des Umfangs ändert sich, wo Daten gelesen und geschrieben werden. Vorhandene Daten bleiben im ursprünglichen Verzeichnis und sind nach dem Zurückwechseln wieder sichtbar. Pack-Exporte und Git-Synchronisierung erfassen nur das aktuelle Speicherstammverzeichnis.", "config.documentsScopeSection": "Speicherumfang", "config.documentsScopeTitle": "Geltungsbereich für Projektdokumente", "config.documentsScopeStorageHint": "Wird im gewählten Speicherstammverzeichnis neben MEMORY.md abgelegt", "config.documentsScopeGlobalHint": "Von allen Arbeitsbereichen im globalen Stammverzeichnis geteilt; MEMORY.md folgt weiterhin dem Speicherumfang", "config.memorySpacesScopeTitle": "Geltungsbereich für Speicherbereiche", "config.memorySpacesScopeStorageHint": "Wird im gewählten Speicherstammverzeichnis neben MEMORY.md abgelegt", "config.memorySpacesScopeGlobalHint": "Von allen Arbeitsbereichen samt Anbieterverbindungen im globalen Stammverzeichnis geteilt; MEMORY.md folgt weiterhin dem Speicherumfang", "config.runtimeLimitsTitle": "Kapazitätslimits", "config.runtimeLimitsHint": "Standardwerte: {user} KiB Benutzerprofil, {memory} KiB Arbeitsgedächtnis.", "config.runtime.userLimitBytes": "Limit für Benutzerprofil (Bytes)", "config.runtime.memoryLimitBytes": "Limit für Arbeitsgedächtnis (Bytes)", "config.runtimeLimitsApply": "Wird live angewendet; das Senken eines Limits löscht keine vorhandenen Einträge", "config.runtimeLimitInvalid": "Setzen Sie „{field}“ auf eine ganze Zahl von 1 bis {max}.", "config.runtimeAdvanced": "Wartungslimits", "config.runtimeMaintenanceHint": "Ausgabeobergrenze pro Durchlauf für Migration und Komprimierung (Standard {defaultTokens} Tokens).", "config.runtime.maintenanceMaxTokens": "Ausgabe-Token-Limit für Wartung", "config.runtimeMaintenanceInvalid": "{field} muss zwischen {min} und {max} liegen", "config.documentsLimitsTitle": "Aktive Kapazität", "config.documentsLimitsHint": "Gesamtobergrenze für aktive Dokumente (Standard {defaultMiB} MiB, max. {maxMiB} MiB).", "config.documents.limitBytes": "Limit für aktive Dokumente (Bytes)", "config.documentsLimitsApply": "Wird live angewendet; das Senken des Limits löscht keine vorhandenen Dokumente", "config.documentsLimitInvalid": "Setzen Sie „{field}“ auf eine ganze Zahl von 1 bis {max}.", "config.enhancementsRefreshFailed": "Die Einstellung wurde aktualisiert, aber ihr Status konnte nicht aktualisiert werden. Öffnen Sie diese Seite erneut.", "config.strategyTitle": "Hauptstrategie", "config.strategyFailed": "Die Hauptstrategie konnte nicht gewechselt werden. Die vorherige Auswahl bleibt erhalten; versuchen Sie es erneut.", "config.appliesNow": "Wirkt sofort", "config.quoted": "„{name}“", "config.listSeparator": ", ", "config.sentenceGap": " ", "config.enableStrategy": "„{strategy}“ einschalten", "config.useStrategy": "„{strategy}“ verwenden", "config.stopStrategies": "{strategies} ausschalten", "config.enableComponentNamed": "„{component}“ einschalten", "board.title": "Speicherzusammensetzung", "board.description": "Der Speicher jeder Runde setzt sich aus diesen Komponenten zusammen", "board.loading": "Speicherzusammensetzung wird gelesen…", "board.componentsUnavailable": "Speicherkomponenten können derzeit nicht gelesen werden; hier lassen sich nur die Speicherschichten umschalten.", "board.sources": "Speicherquellen", "board.enhancements": "Erweiterungen", "board.running": "Läuft", "board.off": "Aus", "board.notRunning": "Läuft nicht", "board.needs": "Benötigt „{component}“", "board.needsMissing": "Benötigt eine nicht installierte Komponente", "board.unused": "Wird von dieser Strategie nicht verwendet", "board.strategyMissing": "Die ausgewählte Hauptstrategie ist nicht installiert.", "board.turningOn": "Wird eingeschaltet…", "board.turningOff": "Wird ausgeschaltet…", "board.noMainMissing": "Speicher nicht aktiv: Die ausgewählte Hauptstrategie ist nicht installiert", "board.noMainOff": "Speicher nicht aktiv: Die Hauptstrategie „{strategy}“ ist ausgeschaltet", "board.noMainWaiting": "Speicher nicht aktiv: „{strategy}“ ist eingeschaltet, läuft aber noch nicht", "board.contenders": "Speicher nicht aktiv: Die ausgewählte Strategie „{strategy}“ läuft nicht, und {strategies} können sie nicht gemeinsam ersetzen", "board.fallback": "Die ausgewählte Strategie „{selected}“ läuft nicht; „{composing}“ setzt den Speicher vorerst zusammen", "board.fallbackMissing": "Die ausgewählte Hauptstrategie ist nicht installiert; „{composing}“ setzt den Speicher vorerst zusammen", "board.noSource": "Speicher nicht aktiv: Es läuft keine Speicherquelle", "board.memoryOff": "Speicher nicht aktiv: Diese Zusammensetzung kann nicht bereitgestellt werden", "board.stale": "Die letzte Änderung wurde nicht wirksam; der Speicher läuft weiterhin wie zuvor zusammengesetzt", "board.idle": "Läuft ebenfalls, trägt aber nichts bei: {strategies}", "board.switching": "Wird umgeschaltet…", "board.composing": "Setzt Speicher zusammen", "board.lastSource": "Läuft · einzige Quelle", "board.enabledCount": "{on} von {total} aktiv", "board.experimental": "Experimentell", "board.search": "Komponenten suchen", "board.searchEmpty": "Keine Komponente passt zu „{query}“.", "details.open": "Details zu „{component}“", "details.shipped": "Mitgeliefert", "details.installed": "Installierte Erweiterung", "details.relations": "Beziehungen", "details.needs": "Benötigt", "details.needsAny": "Benötigt eine davon", "details.needsMissing": "Keine installierte Komponente stellt {capability} bereit", "details.neededBy": "Benötigt von", "details.conflicts": "Nicht kompatibel mit", "details.options": "Optionen", "details.effectOn": "Beim Einschalten wird ebenfalls eingeschaltet: {names}", "details.effectOnReplace": "Beim Einschalten wird ausgeschaltet: {names}", "details.effectOnMixed": "Beim Einschalten wird ebenfalls eingeschaltet: {on}; ausgeschaltet: {off}", "details.effectOff": "Beim Ausschalten wird ebenfalls ausgeschaltet: {names}", "details.effectLast": "Einzige laufende Quelle; bleibt eingeschaltet", "details.currentMain": "Aktuelle Hauptstrategie", "details.useMain": "Als Hauptstrategie verwenden", "details.back": "Zurück zu „{component}“", "config.strategyWorkflowNote": "Läuft nur, wenn von der Hauptstrategie unterstützt (z. B. Schichtstrategie); Einstellungen bleiben erhalten.", "threeTier.offNote": "Dieses Plugin ist deaktiviert. Hintergrundaufgaben erfordern zudem eine unterstützende Hauptstrategie.", "board.otherEnhancements": "Erweiterungen für andere Hauptstrategien ({count})", "board.more": "Weitere Komponenten in der Plugin-Liste hinzufügen", "board.relationNeeds": "Benötigt „{component}“", "board.relationNeededBy": "„{component}“ hängt davon ab", "options.aria": "Optionen von „{component}“", "options.emptySourcesTitle": "Keine Speicherquellen ausgewählt", "options.emptySourcesConfirm": "Es sind keine Speicherquellen ausgewählt. Beim Speichern wird der Agent-Zugriff auf Laufzeitspeicher, Dokumente und Speicherbereiche deaktiviert. Um die automatische Auswahl wiederherzustellen, brechen Sie ab und setzen Sie diese Option auf Standard zurück. Leere Auswahl speichern?", "options.apply": "Anwenden", "options.fix": "Zuerst die markierten Optionen korrigieren", "options.applying": "Wird angewendet…", "options.default": "Standard", "options.reset": "Auf Standard zurücksetzen", "options.integer": "Ganze Zahl eingeben", "options.between": "Ganze Zahl von {min} bis {max} eingeben", "options.atLeast": "Ganze Zahl von mindestens {min} eingeben", "options.atMost": "Ganze Zahl von höchstens {max} eingeben", "options.tooLong": "Höchstens {max} Zeichen", "options.listLimit": "Bis zu {count} eindeutige Einträge mit je höchstens {length} Zeichen", "options.listHint": "Ein Eintrag pro Zeile.", "options.noSources": "Derzeit ist keine Speicherquelle zur Auswahl verfügbar.", "options.sourceUnavailable": "{source} (derzeit nicht verfügbar)", "feedback.memoryOff": "Speicher nicht aktiv: Es läuft keine Hauptstrategie", "feedback.memoryRestored": "Speicher wieder aktiv, zusammengesetzt von „{strategy}“", "feedback.fallback": "„{selected}“ ist aus; „{composing}“ setzt den Speicher vorerst zusammen", "feedback.fallbackMissing": "Die gewählte Hauptstrategie ist nicht installiert; „{composing}“ setzt den Speicher vorerst zusammen", "feedback.switchedMain": "Gewechselt zu „{strategy}“", "feedback.switchedMainOff": "Gewechselt zu „{strategy}“ und {others} ausgeschaltet", "feedback.switchedMainWith": "Gewechselt zu „{strategy}“ und das benötigte {others} eingeschaltet", "feedback.switchedMainMixed": "Gewechselt zu „{strategy}“: {on} eingeschaltet und {off} ausgeschaltet", "feedback.externalMain": "Die Hauptstrategie ist jetzt „{strategy}“", "feedback.idleMain": "„{component}“ läuft ebenfalls, trägt aber nichts bei", "feedback.sourceOn": "„{component}“ eingeschaltet; diese Schicht liest und schreibt wieder", "feedback.sourceOff": "„{component}“ ausgeschaltet; diese Schicht liest und schreibt nicht mehr", "feedback.componentOn": "„{component}“ eingeschaltet", "feedback.componentOff": "„{component}“ ausgeschaltet", "feedback.externalSourceOn": "„{component}“ wurde eingeschaltet; diese Schicht liest und schreibt wieder", "feedback.externalSourceOff": "„{component}“ wurde ausgeschaltet; diese Schicht liest und schreibt nicht mehr", "feedback.externalComponentOn": "„{component}“ wurde eingeschaltet", "feedback.externalComponentOff": "„{component}“ wurde ausgeschaltet", "feedback.several": "{count} Komponenten aktualisiert", "feedback.enabledWith": "„{component}“ und das benötigte {others} eingeschaltet", "feedback.disabledWith": "„{component}“ und das davon abhängige {others} ausgeschaltet", "feedback.enabledReplacing": "„{component}“ eingeschaltet und das inkompatible {others} ausgeschaltet", "feedback.enabledMixed": "„{component}“ eingeschaltet: außerdem {on} eingeschaltet und {off} ausgeschaltet", "feedback.optionsSaved": "Optionen von „{component}“ aktualisiert", "feedback.externalOptions": "Die Optionen von „{component}“ wurden geändert", "feedback.externalSeveral": "{count} Komponenten geändert", "feedback.undo": "Rückgängig", "feedback.undone": "Rückgängig gemacht; die vorherigen Einstellungen sind wieder aktiv", "feedback.show": "Anzeigen", "feedback.retry": "Erneut versuchen", "feedback.failed": "Die Änderung konnte nicht angewendet werden; die vorherigen Einstellungen bleiben erhalten.", "feedback.layerResumed": "„{layer}“ läuft wieder", "config.componentListNote": "In der Komponentenliste unten ist dsh-brain-mnemon/bundle der Gruppierungseintrag des Starters; der Status „Aus“ hat keine Auswirkung.", "layers.disabledBadge": "Aus", "layers.disabledTitle": "{layer} ist ausgeschaltet", "layers.disabledDescription": "Diese Speicherschicht nimmt nicht an der Speicherverarbeitung teil.", "layers.disabledText": "Vorhandene Daten bleiben erhalten; zum Fortsetzen in den Einstellungen wieder aktivieren.", "layers.stoppedBadge": "Läuft nicht", "layers.stoppedTitle": "{layer} läuft nicht", "layers.stoppedDescription": "Die Komponente für diese Schicht ist eingeschaltet, läuft aber nicht.", "layers.stoppedText": "Vorhandene Daten bleiben erhalten; wird fortgesetzt, sobald die Komponente läuft.", "layers.memoryOffBadge": "Nicht aktiv", "layers.memoryOffTitle": "{layer} ist nicht aktiv", "layers.memoryOffDescription": "Der Speicher ist nicht aktiv, daher ist diese Schicht nicht verfügbar.", "layers.memoryOffText": "Vorhandene Daten bleiben erhalten; stellen Sie zum Fortsetzen in den Einstellungen eine Hauptstrategie wieder her.", "config.nativeName": "Mnemon Native", "config.backgroundTitle": "Hintergrundaufgaben", "config.backgroundDescription": "Erfassung, Archivierung und Prüfung laufen im Hintergrund, sofern die Hauptstrategie sie unterstützt.", "config.memoryWriting": "Speicher-Schreibvorgänge", "config.confirmWrites": "Schreibvorgänge von Speicher-Tools bestätigen", "config.confirmWritesHint": "Vor dem Hinzufügen, Bearbeiten oder Löschen von Einträgen durch Modelle über Tools in DSH nachfragen.", "config.confirmWritesBadge": "Pausiert Leerlaufprüfung", "config.taskAgentSectionTitle": "Task-Agent", "config.taskAgentSectionDescription": "Steuert Hintergrundwartung, „Im Speicher sichern“, Bereichs-Routing und Synchronisierungsprüfung.", "config.taskAgentTitle": "Task-Agent-Modell", "config.taskAgentInherit": "Global folgen", "config.taskAgentInheritHint": "Dem Modell für neue Sitzungen folgen", "config.taskAgentConversation": "Unterhaltung folgen", "config.taskAgentConversationHint": "Dem Modell der aktuellen Unterhaltung folgen", "config.taskAgentFixed": "Benutzerdefiniert", "config.taskAgentFixedHint": "Ein Modell auswählen", "config.taskAgentProvider": "Modellanbieter", "config.taskAgentModel": "Modell", "config.taskAgentImageInput": "Bildeingabe", "config.taskAgentEffective": "Aktuell verwendet", "config.taskAgentSource.fixed": "Benutzerdefiniert", "config.taskAgentSource.session": "Aktuelle Unterhaltung", "config.taskAgentSource.dsh-default": "Modell für neue Sitzungen", "config.taskAgentSource.active-agent": "Eine offene Unterhaltung", "config.taskAgentLoading": "Modellverzeichnis wird geladen", "config.taskAgentUnavailable": "Derzeit ist keine Anbieter-/Modell-Route verfügbar", "config.taskAgentLoadFailed": "Modellverzeichnis konnte nicht geladen werden: {error}", "config.taskAgentPartial": "{count} Anbieter konnten nicht gelesen werden; die übrigen Optionen bleiben verfügbar.", "config.taskAgentRetry": "Erneut lesen", "config.customAbsolute": "Verwenden Sie einen absoluten Pfad oder einen Pfad beginnend mit ~/", "config.saveFailed": "Speichern fehlgeschlagen: {error}", "config.readOnly": "Plugin-Einstellungen sind in dieser Bereitstellung schreibgeschützt.", "config.remoteReadOnly": "Plugin-Einstellungen sind bei Remote-Zugriff schreibgeschützt: Setzen Sie remoteAccess: trusted-host in der mnemon-Profilkonfiguration und starten Sie DSH neu, um sie hier zu ändern.", "config.unavailable": "Einstellungen des Speichersystems konnten nicht geladen werden. Prüfen Sie, ob der Host dieser Web-Bereitstellung den Einstellungs-RPC gewährt.", "config.discard": "Verwerfen", "config.interactionTurnBar": "Rundenspeicher-Leiste", "config.interactionTurnBarHint": "Zeigt Abrufe und Schreibvorgänge jeder Runde unter der Antwort an", "config.interactionSaveAction": "Aktion „Im Speicher sichern“", "config.interactionSaveActionHint": "Eine Antwort manuell sichern; sie wird nach Ihrer Bestätigung an das gewählte Ziel geschrieben", "config.packTitle": "Sicherung und Migration", "config.packUnavailable": "Dieser DSH Host stellt den Mnemon-ZIP-Sicherungskanal nicht bereit.", "config.packExporting": "Wird exportiert…", "config.packInspecting": "Wird geprüft…", "config.packImporting": "Wird importiert…", "config.packExported": "{file} ({size}) exportiert.", "config.packFailed": "ZIP-Vorgang fehlgeschlagen: {error}", "config.packSimpleDescription": "Ein ZIP-Archiv der obigen Komponenten, ohne Drittanbieter oder Zugangsdaten", "config.packImportZip": "ZIP importieren", "config.packExportZip": "ZIP exportieren", "config.packChooseZip": "Mnemon-Sicherungs-ZIP wählen", "config.packUnnamedZip": "Mnemon-Sicherung.zip", "config.packZipReady": "Geprüft · {components} Komponenten · {items} Einträge · {size}", "config.packImportZipAction": "Sicher importieren", "config.packImportedWhole": "ZIP sicher in {root} zusammengeführt.", "config.syncTitle": "Git-Synchronisierung", "config.syncSimpleDescription": "Synchronisiert die obigen Komponenten mit einem Git-Repository, ohne Drittanbieter oder Zugangsdaten", "config.syncLoading": "Synchronisierungsstatus wird gelesen…", "config.syncUnavailable": "Dieser DSH Host stellt den Mnemon-Repository-Synchronisierungskanal nicht bereit.", "config.syncUnavailableReason": "Synchronisierungsstatus konnte nicht gelesen werden: {error}", "config.syncGitMissing": "Die Synchronisierung erfordert Git {required} oder neuer", "config.syncRecheck": "Erneut prüfen", "config.syncFixCredentials": "Zugangsdaten festlegen", "config.syncRepository": "Repository", "config.syncRepositoryHint": "Wählen Sie das Git-Repository, das Ihren Speicher aufbewahrt", "config.syncChange": "Ändern", "config.syncDisconnect": "Trennen", "config.syncDisconnectTitle": "Dieses Repository trennen?", "config.syncDisconnectBody": "Der Speicher wird nicht mehr mit {repository} synchronisiert und die automatische Synchronisierung wird ausgeschaltet. Weder hier noch im Repository wird etwas gelöscht; ein gespeichertes Zugriffstoken wird entfernt.", "config.syncDisconnected": "Repository getrennt.", "config.syncStateChecking": "Repository wird geprüft…", "config.syncStateConnected": "Verbunden", "config.syncStateNewBranch": "Verbunden · die erste Synchronisierung erstellt den Branch {branch}", "config.syncNoCredential": "Zum Pushen ist eine GitHub-Anmeldung oder ein Zugriffstoken erforderlich", "config.syncNoCredentialToken": "Zum Pushen ist ein Zugriffstoken erforderlich", "config.syncIssueAuthHttps": "Zugangsdaten erforderlich; melden Sie sich mit GitHub an oder fügen Sie ein Zugriffstoken hinzu", "config.syncIssueAuthToken": "Zugangsdaten erforderlich; fügen Sie ein Zugriffstoken hinzu", "config.syncIssueRejectedGitHub": "GitHub hat die Anmeldung abgelehnt; melden Sie sich erneut an oder prüfen Sie den Zugriff auf dieses Repository", "config.syncIssueRejectedGitHubToken": "GitHub hat das gespeicherte Zugriffstoken abgelehnt; ersetzen Sie es", "config.syncIssueRejectedGitHubEnvironment": "GitHub hat das Token in {env} abgelehnt; ersetzen Sie es", "config.syncIssueRejected": "Der Host hat das gespeicherte Token abgelehnt; ersetzen Sie es oder geben Sie den erwarteten Benutzernamen in der Adresse an", "config.syncIssueRejectedEnvironment": "Der Host hat das Token in {env} abgelehnt; ersetzen Sie es", "config.syncIssueAuthSsh": "SSH-Authentifizierung fehlgeschlagen; prüfen Sie den SSH-Schlüssel dieses Computers", "config.syncIssueAuth": "Zugriff auf dieses Repository wurde verweigert", "config.syncIssueNotFound": "Repository nicht gefunden; prüfen Sie Adresse und Zugriffsrechte", "config.syncIssueNotFoundGitHub": "Repository nicht gefunden; prüfen Sie die Adresse – ein privates Repository erfordert Anmeldung oder Token", "config.syncIssueNetwork": "Repository nicht erreichbar; prüfen Sie Netzwerk oder Proxy", "config.syncIssueTimeout": "Das Repository hat nicht rechtzeitig geantwortet", "config.syncIssueUnknown": "Repository konnte nicht gelesen werden: {error}", "config.syncViaGitHub": "über GitHub @{login}", "config.syncViaGitHubAnonymous": "über GitHub-Anmeldung", "config.syncViaToken": "mit Zugriffstoken", "config.syncViaEnvironment": "mit Umgebungsvariable {env}", "config.syncViaSsh": "mit SSH-Schlüssel", "config.syncConnectWith": "Verbinden über", "config.syncModeGitHub": "GitHub-Konto", "config.syncModeAddress": "Repository-Adresse", "config.syncRepoUrl": "Repository-Adresse", "config.syncRepoUrlPlaceholder": "https://…, git@host:pfad oder ein absoluter lokaler Pfad", "config.syncRepoUrlInvalid": "Verwenden Sie eine https://- oder ssh://-URL, git@host:pfad oder einen absoluten lokalen Pfad", "config.syncRepoUrlCredentials": "In der Adresse darf nur ein Benutzername stehen; geben Sie das Token unter „Zugriffstoken“ ein", "config.syncToken": "Zugriffstoken", "config.syncTokenOptional": "Optional", "config.syncTokenSaved": "Gespeichert; neues Token zum Ersetzen eingeben", "config.syncTokenEnvironment": "Verwendet Umgebungsvariable {env}", "config.syncTokenHint": "Nur eine HTTPS-Adresse benötigt ein Token; es verbleibt auf diesem Computer", "config.syncTokenRemove": "Entfernen", "config.syncTokenRemoved": "Zugriffstoken entfernt.", "config.syncConnect": "Verbinden", "config.syncConnecting": "Wird verbunden…", "config.syncSave": "Speichern", "config.syncSaving": "Wird gespeichert…", "config.syncGitHubHint": "Melden Sie sich an, um ein Repository auszuwählen oder zu erstellen; die Freigabe verbleibt auf diesem Computer", "config.syncGitHubReadOnly": "Der Zugangsdatenspeicher ist schreibgeschützt; eine Anmeldung kann nicht gespeichert werden", "config.syncGitHubSignIn": "Mit GitHub anmelden", "config.syncGitHubStarting": "Gerätecode wird angefordert…", "config.syncGitHubCode": "Geben Sie diesen Gerätecode auf GitHub ein:", "config.syncGitHubCopyOpen": "Kopieren und GitHub öffnen", "config.syncGitHubCopied": "Kopiert; auf der geöffneten Seite einfügen – danach geht es automatisch weiter", "config.syncGitHubOpenBlocked": "Der Browser hat keine neue Seite geöffnet; rufen Sie {url} selbst auf", "config.syncGitHubWaiting": "Wartet auf Autorisierung… es geht automatisch weiter", "config.syncGitHubSignedIn": "Angemeldet als @{login}", "config.syncGitHubSignOut": "Abmelden", "config.syncGitHubFailed": "GitHub-Anmeldung fehlgeschlagen: {error}", "config.syncGitHubExpired": "Der Gerätecode ist abgelaufen; starten Sie die Anmeldung erneut", "config.syncGitHubDenied": "Die Autorisierung wurde abgelehnt", "config.syncGitHubExpiredGrant": "Die GitHub-Freigabe ist nicht mehr gültig; melden Sie sich erneut an", "config.syncGitHubSignInAgain": "Erneut anmelden", "config.syncRepositoryLabel": "Repository", "config.syncRepositorySearch": "Repositories durchsuchen oder neuen Namen eingeben", "config.syncRepositoriesLoading": "Repositories werden gelesen…", "config.syncRepositoriesFailed": "Repositories konnten nicht gelesen werden: {error}", "config.syncRepositoriesRetry": "Erneut versuchen", "config.syncRepositoriesNone": "Dieses Konto hat noch kein Repository; geben Sie einen Namen ein, um eines zu erstellen", "config.syncRepositoriesEmpty": "Kein passendes Repository", "config.syncRepositoriesMore": "{count} weitere Repositories; tippen zum Eingrenzen", "config.syncRepositoryPrivate": "Privat", "config.syncRepositoryPublic": "Öffentlich", "config.syncRepositoryNoPush": "Kein Push-Zugriff", "config.syncRepositoryCurrent": "Aktuell", "config.syncRepositoryCreate": "Privates Repository {name} erstellen", "config.syncRepositoryCreating": "Wird erstellt…", "config.syncRepositoryNameInvalid": "Ein Repository-Name darf Buchstaben, Ziffern, Punkte, Bindestriche und Unterstriche enthalten", "config.syncPublicTitle": "Öffentliches Repository verwenden?", "config.syncPublicBody": "{name} ist öffentlich: Jeder kann den dorthin synchronisierten Speicher lesen.", "config.syncPublicConfirm": "Trotzdem verwenden", "config.syncRowTitle": "Synchronisierung", "config.syncNever": "Eine Synchronisierung führt zuerst den Speicher aus dem Repository hier zusammen und pusht dann den Stand dieses Computers", "config.syncLast": "Zuletzt synchronisiert {time}", "config.syncLastMerge": "Zuletzt zusammengeführt {time}", "config.syncCheck": "Remote prüfen", "config.syncNow": "Jetzt synchronisieren", "config.syncNowRunning": "Wird synchronisiert…", "config.syncDone": "Synchronisiert; {commit} gepusht.", "config.runtimeMergeArchived": "{count} überzählige Einträge wurden lokal in runtime/archived/import-overflow gesichert und nicht ins Arbeitsgedächtnis geladen.", "config.syncDoneMerged": "Synchronisiert: {count} Remote-Einträge zusammengeführt und {commit} gepusht.", "config.syncUpToDate": "Aktuell; das Repository entspricht diesem Computer.", "config.syncUpToDateMerged": "{count} Remote-Einträge zusammengeführt; das Repository ist aktuell.", "config.syncPushFailed": "Hier committet, aber der Push wurde nicht abgeschlossen: {reason}", "config.syncFailed": "Synchronisierung fehlgeschlagen: {error}", "config.syncReasonBusy": "Eine andere Synchronisierung läuft noch; versuchen Sie es gleich erneut", "config.syncReasonNoRepository": "Kein Repository verbunden", "config.syncReasonGitMissing": "Git ist auf diesem Computer nicht verfügbar", "config.syncReasonRemoteEmpty": "Das Repository enthält noch keine Sicherung; synchronisieren Sie zuerst einmal", "config.syncReasonRejected": "Ein anderes Gerät hat das Repository während der Synchronisierung aktualisiert; synchronisieren Sie erneut", "config.syncAuto": "Automatische Synchronisierung", "config.syncAutoOff": "Aus", "config.syncAutoHour": "Stündlich", "config.syncAutoHours": "Alle {hours} Stunden", "config.syncAutoDay": "Täglich", "config.syncAutoDays": "Alle {days} Tage", "config.syncAutoHintOff": "Synchronisiert nur, wenn Sie auf „Jetzt synchronisieren“ klicken", "config.syncAutoHintOn": "Synchronisiert in diesem Intervall im Hintergrund, genau wie „Jetzt synchronisieren“", "config.syncAutoNext": "Nächste um {time}", "config.syncAutoLast": "Letzte um {time}", "config.syncAutoFailed": "Die letzte automatische Synchronisierung ist fehlgeschlagen: {error}", "config.syncHistory": "Sicherungsverlauf", "config.syncHistoryHint": "Jede Synchronisierung hinterlässt eine Version im Repository", "config.syncHistoryView": "Ansehen", "config.syncHistoryLoading": "Wird gelesen…", "config.syncHistoryEmpty": "Das Repository enthält noch keine Sicherung.", "config.syncHistoryMore": "Ältere Versionen laden", "config.syncHistoryCapped": "Hier werden nur die neuesten {count} Versionen aufgelistet", "config.syncHistoryFrom": "von {machine}", "config.syncHistoryUnknownMachine": "unbenannter Computer", "config.syncComponentRuntime": "Laufzeitspeicher", "config.syncComponentDocuments": "Projektdokumente", "config.syncComponentSpaces": "Speicherbereiche", "config.syncCountRuntime": "{count} Laufzeitspeicher-Einträge", "config.syncCountDocuments": "{count} Dokumente", "config.syncCountSpaces": "{count} Speicherbereiche", "config.syncCompareTitle": "Mit Remote vergleichen", "config.syncCompareLoading": "Remote wird gelesen…", "config.syncCompareRemote": "Die Remote-Version stammt von {machine} · {time}", "config.syncCompareSame": "Identisch", "config.syncCompareDiffers": "Weicht ab", "config.syncCompareRuntime": "{remote} nur auf Remote · {local} nur hier", "config.syncCompareConflicts": "{count} unterschiedlich verfasst", "config.syncCompareAllSame": "Dieser Computer und Remote stimmen überein; es gibt nichts zu synchronisieren.", "config.syncCompareTruncated": "Es bestehen mehr Unterschiede, als diese Zahlen zeigen.", "config.syncCompareRemovals": "Remote hat {count} Löschungen erfasst; eine Synchronisierung wendet sie hier an.", "config.syncCompareConflictNote": "{count} Themen sind unterschiedlich formuliert: Eine Synchronisierung behält beide bei, und der Speicherabgleich kann sie später zusammenführen.", "config.syncCompareShowConflicts": "Anzeigen", "config.syncCompareGoReview": "Zum Speicherabgleich", "config.syncCompareHeldBack": "{count} Remote-Einträge wurden hier früher gelöscht; eine Synchronisierung lässt sie außen vor.", "config.syncCompareRevive": "Wiederherstellen", "config.syncCompareReviving": "Wird wiederhergestellt…", "config.syncCompareRevived": "{count} Einträge wiederhergestellt.", "config.syncDiffHere": "Hier", "config.syncDiffThere": "Remote", "config.syncMergeOnly": "Nur hier zusammenführen", "config.syncMerging": "Wird zusammengeführt…", "config.syncMerged": "Remote {commit} zusammengeführt.", "config.syncMergedCount": "{count} Remote-Einträge zusammengeführt.", "config.syncAdvanced": "Erweitert", "config.syncBranch": "Branch", "config.syncSubdir": "Verzeichnis im Repository", "config.syncDefaultValue": "Standard {value}", "config.syncBranchInvalid": "Kein gültiger Branch-Name", "config.syncSubdirInvalid": "Verwenden Sie ein relatives Verzeichnis innerhalb des Repositories", "config.syncAuthor": "Commit-Autor", "config.syncAuthorDefault": "Standard", "config.syncAuthorMachine": "Git dieses Computers", "config.syncAuthorCustom": "Benutzerdefiniert", "config.syncAuthorDefaultNote": "Nutzt die Git-Identität dieses Computers; fällt auf {identity} zurück, wenn nicht konfiguriert", "config.syncAuthorMachineNote": "Nutzt die Git-Identität dieses Computers, sonst die Standardidentität", "config.syncAuthorName": "Name", "config.syncAuthorEmail": "E-Mail", "config.syncAuthorEmailInvalid": "Keine gültige E-Mail-Adresse", "config.syncAdvancedNote": "Nach dem Speichern schreibt die nächste Synchronisierung in den neuen Branch oder das neue Verzeichnis", "config.syncMachineName": "Name dieses Computers", "config.syncMachineHostname": "Hostname", "config.syncMachineCustom": "Benutzerdefiniert", "config.syncMachineNameLabel": "Name", "config.syncMachineHostnameNote": "Verwendet den Hostnamen; im Sicherungsverlauf erscheint „von {name}“", "config.syncMachineCustomNote": "Im Sicherungsverlauf erscheint „von {name}“", "config.syncMachineNameInvalid": "Höchstens 120 Zeichen in einer Zeile", "config.syncMachineRenameNote": "Nach dem Speichern verwenden spätere Synchronisierungen den neuen Namen; ältere Versionen behalten ihren bisherigen", "config.syncAdvancedSaved": "Erweiterte Einstellungen gespeichert.", "config.reconcileTitle": "Speicherabgleich", "config.reconcileDescription": "Ein Modell liest den zusammengeführten Speicher und schlägt Änderungen vor; nichts wird geschrieben, bevor Sie es prüfen", "review.reconcile": "Abgleichen", "review.reconciling": "Wird abgeglichen…", "review.refresh": "Aktualisieren", "review.empty": "Nichts zu prüfen", "review.pending": "{count} zur Prüfung ausstehend", "review.failed": "Lesen des Prüfprotokolls fehlgeschlagen: {error}", "review.planned": "{operations} Vorschläge vorbereitet; nichts wird geschrieben, bevor Sie sie annehmen.", "review.none": "Das Modell hat keinen Änderungsbedarf im zusammengeführten Speicher gefunden.", "review.statusPending": "Ausstehend", "review.statusAccepted": "Angenommen", "review.statusRejected": "Abgelehnt", "review.expand": "Öffnen", "review.collapse": "Schließen", "review.accept": "Annehmen", "review.reject": "Ablehnen", "review.apply": "Anwenden", "review.applying": "Wird angewendet…", "review.reopen": "Wieder öffnen", "review.applied": "{count} Änderungen angewendet.", "review.appliedAt": "Angewendet um {time}", "review.appliedCount": "{count} von {total} Vorgängen ausgeführt", "review.applyFailed": "Anwenden fehlgeschlagen: {error}", "review.meta": "{count} Änderungen · von {machine} · {time}", "review.foreign": "Betrifft Speicher von: {machines}", "review.opinions": "Anmerkungen", "review.noOpinions": "Noch keine Anmerkungen", "review.authorUser": "Sie", "review.authorAgent": "Modell", "review.opinionPlaceholder": "Hinterlassen Sie eine Anmerkung für den nächsten Abgleich", "review.opinionSend": "Anmerkung hinzufügen", "review.opinionAdded": "Ihre Anmerkung wurde gespeichert.", "review.opAdd": "{target}-Speichereintrag hinzufügen: {content}", "review.opReplace": "{target}-Speichereintrag umschreiben: „{from}“ wird zu „{to}“", "review.opRemove": "{target}-Speichereintrag entfernen: {text}", "review.opArchive": "Dokument {id} archivieren", "review.targetMemory": "Projekt", "review.targetUser": "Benutzer", "review.guidanceLabel": "Ziel des Abgleichs", "review.guidanceHint": "Optional: Beschreiben Sie, was dieser Abgleich erreichen soll; das Modell liest den Hinweis, erhält dadurch jedoch keine zusätzlichen Rechte", "review.guidancePlaceholder": "Zum Beispiel: Zwei Präferenzen sagen dasselbe aus, zu einer zusammenführen", "review.guided": "Nach Ihren Vorgaben geplant", "review.remoteEntries": "{count} Einträge vom Branch gelesen, die dieser Installation fehlen", "review.selectAll": "Alle", "review.selectNone": "Keine", "review.selectHint": "Wählen Sie die anzuwendenden Änderungen aus; nicht markierte bleiben für die nächste Runde bestehen", "review.selected": "{count} von {total} ausgewählt", "review.applyCount": "{count} anwenden", "review.noSelection": "Wählen Sie mindestens eine Änderung aus.", "review.history": "Angewendete Pläne ({count})", "review.historyTitle": "Angewendete Pläne", "review.historyHint": "Diese Pläne wurden bereits ausgeführt und bleiben zur Einsicht erhalten. Das erneute Öffnen macht bereits geschriebene Änderungen nicht rückgängig.", "review.historyEmpty": "Es wurde noch kein Plan ausgeführt.", "review.rejectedHint": "Dieser Plan wurde abgelehnt; hinterlassen Sie eine Anmerkung und öffnen Sie ihn erneut, oder lassen Sie die KI neu planen.", "skills.label": "Skills", "skills.groupSurface": "Oberflächen", "skills.groupPlacement": "Speicherort & Updates", "skills.groupEvolution": "Automatisierung", "skills.groupGeneration": "Modelle & Generierung", "skills.groupSources": "Markt & Verzeichnisse", "skills.badgeDefault": "Standard", "skills.badgeCustom": "Benutzerdefiniert · {count}", "skills.parametersBadge": "Schwelle {threshold} · {idle}s", "skills.evolution": "Selbstevolution", "skills.allowCreate": "Neue Skills vorschlagen", "skills.allowCreateHint": "Prüfungen erlauben, neue Skills vorzuschlagen; bestehende Vorschläge können weiterhin manuell bearbeitet werden", "skills.allowUpdate": "Skill-Verbesserungen vorschlagen", "skills.allowUpdateHint": "Prüfungen erlauben, vorhandene Skills zu verbessern; Prüfungen pausieren, wenn beide Vorschlagstypen aus sind", "skills.targetScope": "Ziel für neue Skills", "skills.roots.title": "Verzeichnisse für neue Skills", "skills.roots.hint": "Gilt für Erstellung, Entwürfe und Markt-Installationen und überschreibt das obige Ziel.", "skills.roots.enabled": "Erstellungsverzeichnisse anpassen", "skills.roots.default": "Standard-Erstellungsverzeichnis", "skills.roots.invalid": "Wählen Sie mindestens ein Verzeichnis aus und schließen Sie das Standardverzeichnis ein.", "skills.root.project-dsh": "Projekt .dsh/skills", "skills.root.project-agents": "Projekt .agents/skills", "skills.root.user-dsh": "Benutzer .dsh/skills", "skills.root.user-agents": "Benutzer .agents/skills", "skills.allowLinkedUpdates": "Aktualisierung verknüpfter Skills erlauben", "skills.allowLinkedUpdatesHint": "Aktualisierungen schreiben direkt in Symlink-Ziele über alle teilenden Agents hinweg; nur für vertrauenswürdige Pfade aktivieren.", "skills.targetScopeHint": "Standardmäßig Benutzer; „Speicherumfang folgen“ ordnet Arbeitsbereich-Umfänge dem Projekt zu, bei Übernahme änderbar.", "skills.targetScope.user": "Benutzer", "skills.targetScope.project": "Projekt", "skills.targetScope.storage": "Speicherumfang folgen", "skills.evolutionHint": "Unterhaltungen prüfen und Skill-Aktualisierungen vorschlagen; Aufgabensitzungen werden lokal gespeichert.", "skills.autoAdoptDailyLimit": "Automatische Kandidaten pro Tag", "skills.autoAdoptTimeZone": "Zeitzone für Tageskontingent", "skills.autoBudgetHint": "Pro Kalendertag in dieser Zeitzone (0 pausiert die automatische Verarbeitung); manuelle Aktionen bleiben offen.", "skills.autoBudgetInvalid": "Geben Sie eine ganze Zahl von 0 bis 100 und eine gültige IANA-Zeitzone oder local an.", "skills.autoAdopt": "Neue Vorschläge automatisch übernehmen", "skills.autoAdoptHint": "Erfordert Backtests; übernimmt nur bei null Regressionen in Text-Testfällen (bis zu 2 Wiederholungen).", "skills.autoBacktest": "Entwürfe per Backtest prüfen", "skills.autoBacktestHint": "Vergleicht einen neuen Entwurf anhand seiner Testfälle mit der aktuellen Version", "skills.parameters": "Prüfparameter", "skills.draftGeneration": "Entwurfserstellung", "skills.draftMaxTokens": "Ausgabe-Token-Limit für Entwürfe", "skills.draftRetryMaxTokens": "Ausgabe-Token-Limit bei Wiederholung", "skills.draftBudgetHint": "Umfasst Reasoning und vollständige SKILL.md; wiederholt bei Abschneiden einmal, wenn das Wiederholungslimit höher ist.", "skills.reviewThreshold": "Prüfschwelle", "skills.idleSeconds": "Leerlaufwartezeit (s)", "skills.cooldownSeconds": "Prüfintervall (s)", "skills.minConfidence": "Mindestkonfidenz", "skills.expiryDays": "Ablauf von Vorschlägen (Tage)", "skills.maxPendingPerSession": "Ausstehend pro Unterhaltung", "skills.casesPerRun": "Testfälle pro Backtest", "skills.invalid": "{field} muss zwischen {min} und {max} liegen", "skills.hints": "In der Unterhaltung", "skills.hintsHint": "Genutzte Skills einer Runde und neue Vorschläge darunter anzeigen", "skills.sidebar": "Eintrag in der Seitenleiste", "skills.sidebarHint": "Skills als eigenen Eintrag in der Seitenleiste anzeigen statt im Speichersystem", "skills.models": "Standardmodelle", "skills.modelsHint": "Folgt der Task-Agent-Route, wenn auf Automatisch eingestellt.", "skills.modelAuto": "Automatisch (Task-Agent folgen)", "skills.draftModel": "Modell für Evolutionsentwürfe", "skills.draftModelHint": "Schreibt und überarbeitet Skill-Entwürfe für Vorschläge", "skills.runModel": "Modell für Evaluationsläufe", "skills.runModelHint": "Führt Backtest-Fälle aus und bewertet die Ergebnisse", "skills.directories": "Skill-Verzeichnisse", "skills.directoriesHint": "Leer lassen, um die Standard-Benutzerverzeichnisse für Skills zu verwenden.", "skills.dshHome": "DSH-Stammverzeichnis", "skills.agentsHome": "Gemeinsames Agents-Verzeichnis", "skills.market": "Marktquellen", "skills.marketHint": "Skill-Marktkataloge und Suchindizes verwalten.", "skills.marketRefresh": "Aktualisieren", "skills.marketRefreshing": "Wird aktualisiert…", "skills.marketAddPlaceholder": "GitHub-Repo, Index-URL oder lokaler Pfad", "skills.marketAdd": "Hinzufügen", "skills.marketAdding": "Wird hinzugefügt…", "skills.marketRemove": "Entfernen", "skills.marketBuiltin": "Integriert", "skills.marketSkillCount": "{count} Skills", "skills.marketEmpty": "Keine Marktquellen konfiguriert.", "skills.statusCount": "{count} Skills", "skills.statusOn": "Selbstevolution aktiv · {waiting} ausstehend", "skills.statusIdle": "Selbstevolution aktiv", "skills.statusOff": "Selbstevolution aus", "skillTail.label": "Runden-Skills", "skillTail.reviewing": "Wird geprüft", "skillTail.suggested": "{count} vorgeschlagen", "skillTail.failed": "Prüfung fehlgeschlagen", "skillTail.openSkill": "{name} in Skills öffnen", "skillTail.openSuggestions": "Vorschläge in Skills öffnen" }; // vendor/dsh-mnemon/src/client/locales/en.ts const coreEn = { "composer.expand": "Show message input", "composer.collapse": "Collapse message input", "composer.collapsed": "Message input collapsed", "tab.label": "Memory System", "nav.aria": "Mnemon pages", "nav.status": "Status", "nav.runtime": "Runtime Memory", "nav.runtimeDetail": "USER / MEMORY", "nav.documents": "Project Documents", "nav.documentsDetail": "Index & archive", "nav.spaces": "Memory Spaces", "nav.spacesDetail": "Graph & recall", "common.refresh": "Refresh", "common.openConfiguration": "Open settings", "common.loading": "Loading…", "common.cancel": "Cancel", "common.close": "Close", "common.showing": "Showing {visible} / {total}", "common.showMore": "Show {count} more", "header.backToConversation": "Back to chat", "header.configure": "Configure", "header.noticeSummary": "Notices {count} · {labels}", "header.noticeRemoteReadOnly": "Remote read only", "header.noticeIdleReview": "Idle review", "header.compositionHint": "Select to change the composition in the configuration.", "header.checking": "Checking", "header.connected": "Connected", "header.unavailable": "Unavailable", "header.notReady": "Mnemon is not ready", "workspace.viewing": "Viewing workspace", "workspace.selectorAria": "Select a memory workspace to inspect", "workspace.excluded": "Memory excluded", "workspace.excludedDetail": "This workspace and its child agents do not participate in memory injection, tools, or automatic review. Existing data remains readable; remove the exclusion to resume.", "workspace.excludeTitle": "Workspaces excluded from memory", "workspace.excludeHint": "One absolute workspace path per line (~ and symlinks supported).", "workspace.excludeCount": "{count} excluded", "workspace.excludeNone": "None", "workspace.excludePlaceholder": "/path/to/private-workspace", "workspace.excludeNote": "Applies to future turns; existing data and session history stay untouched.", "workspace.invalidExclusions": "{count} exclusion paths are invalid or unavailable and were ignored; check the paths in storage settings.", "workspace.unavailable": "The current workspace could not be identified; path exclusions were not applied.", "workspace.storageMode": "Storage scope", "workspace.storageModeAria": "Storage scope: {mode}", "workspace.mismatchTitle": "The inspected directory is not aligned with this session", "workspace.mismatchShort": "Not conversation workspace", "workspace.selectedRoot": "Viewing: {root}", "workspace.effectiveRoot": "Effective: {root}", "workspace.align": "Align", "workspace.remoteReadOnly": "Remote access is read only: set remoteAccess: trusted-host in the mnemon profile configuration and restart DSH to manage memory here.", "sourcePage.instance": "Source instance", "sourcePage.instanceAria": "Select Source instance", "sourcePage.summaryAria": "Source status and permission summary", "sourcePage.package": "Package", "sourcePage.availability": "Availability", "sourcePage.availability.ready": "Ready", "sourcePage.availability.degraded": "Degraded", "sourcePage.availability.unavailable": "Unavailable", "sourcePage.role": "Semantic role", "sourcePage.revision": "Current revision", "sourcePage.permissions": "Authorized capabilities", "sourcePage.diagnostics": "Diagnostics", "sourcePage.configuration": "Declarative configuration", "sourcePage.configurationDescription": "Fields come from the sanitized Host management descriptor; submission is re-authorized against this instance and revision.", "sourcePage.configLoading": "Loading configuration…", "sourcePage.configSave": "Save", "sourcePage.configSaving": "Saving…", "sourcePage.configSaved": "Configuration submitted; refreshing Source status.", "sourcePage.secretPlaceholder": "Leave blank to keep the existing secret", "sourcePage.unavailable": "Source is unavailable", "sourcePage.unavailableDescription": "No callable instance is visible in this scope. Host and Headless memory behavior are unaffected by this page.", "turnTail.label": "Turn memory", "turnTail.recall": "recalled {count}", "turnTail.write": "wrote {count}", "turnTail.documents": "document search {count}", "turnTail.inspect": "inspected {count}", "turnTail.failed": "failed {count}", "turnTail.toolList": "Memory tools this turn", "turnTail.more": "{count} more", "turnTail.openTool": "Open the Memory page for {tool}", "turnTail.tool.recall": "Memory Spaces recall", "turnTail.tool.related": "Related memories", "turnTail.tool.documentSearch": "Document search", "turnTail.tool.documentManage": "Document update", "turnTail.tool.documentCreate": "New document", "turnTail.tool.runtime": "Runtime memory update", "turnTail.tool.remember": "Saved to Memory Spaces", "turnTail.tool.link": "Linked memories", "turnTail.tool.forget": "Deleted a memory", "turnTail.tool.status": "Memory status", "turnTail.tool.spaces": "Memory Space list", "turnTail.tool.spaceCreate": "New Memory Space", "turnTail.tool.spaceUpdate": "Memory Space update", "turnTail.tool.spaceMerge": "Merged Memory Spaces", "turnTail.tool.viewRoute": "Memory read", "turnTail.tool.viewAction": "Memory update", "receipt.written": "Saved", "receipt.updated": "Updated", "receipt.pending": "Submitted; the Provider confirms later", "receipt.skipped": "Skipped", "receipt.partial": "Partly saved", "receipt.unfinished": "Not finished", "receipt.failed": "Failed", "receipt.view": "View in Memory Spaces", "receipt.viewRuntime": "View in Runtime Memory", "receipt.unembedded": "Saved without a vector: embedding did not succeed, so this memory is left out of semantic matching for now. Once the embedding service answers, fill it in from Test status in the Mnemon Native embedding settings.", "receipt.unembeddedNoService": "No vector yet: no embedding service is available, so this memory is left out of semantic matching for now; keyword search still finds it. Once an embedding service is connected, fill it in from Test status in the Mnemon Native embedding settings.", "taskAgent.ready": "Task Agent ready", "taskAgent.unavailable": "Task Agent unavailable", "saveAction.button": "Save to memory", "saveAction.tooltip": "Save this reply to memory", "saveAction.title": "Save to memory", "saveAction.hint": "Task Agent decides whether to save, then distills and writes to a Memory Space.", "saveAction.fetching": "Extracting message text…", "saveAction.missing": "Could not extract this message text from the session log.", "saveAction.candidate": "Content", "saveAction.truncated": "This reply is long; only the first {limit} characters are loaded here.", "saveAction.submit": "Save", "saveAction.submitting": "Saving…", "saveAction.readOnly": "This deployment is read only; memory writes are disabled.", "saveAction.close": "Close", "saveAction.hintDirect": "Writes directly to the selected target.", "saveAction.to": "Save to", "saveAction.to.agent": "Auto", "saveAction.to.agentDetail": "Agent decides whether to save and matches a Memory Space", "saveAction.to.memory": "Working memory (MEMORY.md)", "saveAction.to.user": "User profile (USER.md)", "saveAction.to.space": "Memory Space · {provider}", "saveAction.save": "Save", "saveAction.saving": "Saving…", "saveAction.saved.runtime": "Saved to {target} · {count} entries", "saveAction.saved.runtimeMaintained": "Made room and saved to {target} · {count} entries", "saveAction.saved.space": "Saved to the Memory Space {space}", "saveAction.saved.spacePending": "Submitted to the Memory Space {space}; the Provider confirms it later", "saveAction.saved.spaceOther": "The Memory Space {space} answered: {action}", "saveAction.saved.duplicate": "Already saved; nothing was written twice.", "saveAction.unavailable": "This place cannot take writes now.", "saveAction.place.delimiter": "Entries in {target} cannot contain §; remove it to save.", "saveAction.place.tooLong": "This text is about {size}, more than one entry in {target} holds ({limit}); shorten it.", "saveAction.place.orAgent": " Or let the Agent decide.", "saveAction.place.full": "{target} holds {used} of {limit}. Saving first makes room: about {keep} of the existing entries stay, and the rest move out of working memory.", "saveAction.place.fullAll": "{target} holds {used} of {limit}. Saving first makes room: every existing entry moves out of working memory.", "saveAction.place.userCondense": "The user profile holds {used} of {limit}. Before saving, a task Agent condenses it to about {keep}, keeping no archive.", "saveAction.place.userTooLong": "This text is about {size}, more than the user profile can take after making room ({max}); shorten it.", "saveAction.place.userFull": "The user profile is full, and making room in it needs a task Agent; remove entries in Runtime Memory first, or choose another place.", "saveAction.noPlace": "No place can take this text now.", "status.title": "System Status", "status.description": "How dsh-brain-mnemon, memory Providers and each storage layer are running.", "status.nominal": "System nominal", "status.workflowUnavailable": "Background maintenance unavailable", "status.workflowIdleReview": "Idle review", "status.workflowRuntimeCapacity": "Runtime capacity maintenance", "status.workflowUnsupported": "The current Strategy does not drive: {workflows}. Enabling review settings alone does not start these tasks. Select a Strategy that supports them, such as the Layered Strategy, in Memory System. Manual actions remain available.", "status.reviewFailed": "Idle review failed", "status.reviewFailedDetail": "This checkpoint did not complete and will not be replayed automatically. Later reviews respect the cooldown and session limit.", "status.reviewPartial": "Some writes committed. Reconcile the receipts below; they were not rolled back.", "status.reviewTeamPaused": "Idle review is paused by the Agent Teams compatibility setting. To keep reviewing, select “Scoped task Agent review” under Idle review on the dsh-brain-mnemon page under Plugins. Recall and writeback settings are unchanged.", "status.reviewConfirmationPaused": "Memory write confirmation is enabled, so idle memory review is paused. You can still edit memory manually.", "status.reviewToolAccessPaused": "The completion tool required by automatic review is currently unavailable. This checkpoint was skipped without consuming an attempt. Access will be checked again after a later eligible conversation turn. Check this session’s tool restrictions or approval settings.", "status.reviewWatermarkUsage": "Session review attempts: {attempts} / {max} ({restored} restored).", "status.reviewWatermarkNext": "Next review no earlier than {time}; a new eligible conversation checkpoint is still required.", "status.reviewWatermarkPaused": "Automatic review paused: persistent limits are unavailable.", "status.reviewWatermarkRecovery": "Continue the conversation to retry. If the error persists, stop Hosts using this storage root before inspecting this session’s state or lock under state/idle-review. Deleting the state resets the limit.", "config.reviewPersistWatermark": "Keep review limits after reopening", "config.reviewPersistWatermarkHint": "Keep attempts and cooldown per storage root and parent session, including failed or cancelled runs.", "status.reviewRun": "Review run: {id}", "status.reviewContextWindow": "Choose bounded checkpoint review (spawn), or a task Agent model whose context window covers the parent conversation.", "config.reviewTitle": "Idle review", "config.reviewDescription": "Tidies memory while the conversation is idle; recall and writes work either way", "config.reviewEnabled": "Enable idle review", "config.reviewRuntimeMemory": "Write runtime memory", "config.reviewRuntimeMemoryHint": "Only preferences and rules you stated; when off, review creates Documents only", "config.reviewSilent": "Run idle reviews silently", "config.reviewSilentHint": "When off, automatic spawn reviews appear in the conversation subagent list.", "config.reviewLimits": "Review limits", "config.reviewProvider": "Review method", "config.reviewSpawn": "Bounded checkpoint (spawn)", "config.reviewSpawnHint": "The task Agent reads a bounded checkpoint", "config.reviewFork": "Full parent context (fork)", "config.reviewForkHint": "The task Agent has the full parent context", "config.reviewFallback": "When fork is unavailable (before startup only)", "config.reviewSkip": "Skip this review", "config.reviewAgentTeams": "Agent Teams compatibility", "config.reviewTeamPause": "Pause review", "config.reviewTeamPauseHint": "Skips review while Agent Teams runs", "config.reviewTeamScoped": "Scoped task Agent review", "config.reviewTeamScopedHint": "A scoped task Agent reviews, without Teams tools", "config.review.minIntervalMs": "Minimum review interval (seconds)", "config.review.maxPerSession": "Maximum attempts per session", "config.review.maxContextChars": "Spawn checkpoint character budget", "config.review.maxTokens": "Model output token limit per request", "config.reviewLimitInvalid": "{field} must be between {min} and {max}", "status.checkRequired": "Check required", "status.memoryOff": "Memory not in use", "status.memoryOffDetail": "Conversations continue without memory.", "status.compositionStale": "The latest component change did not take effect", "status.compositionStaleDetail": "Memory still runs as composed before.", "status.strategyFallback": "The selected main strategy is not running", "status.strategyFallbackDetail": "The only available main strategy composes memory for now.", "status.reasonNoStrategy": "No main strategy is running.", "status.reasonNoSource": "No memory source is running.", "status.reasonNotComposed": "Memory components are still loading.", "status.reasonSelectedStrategyOff": "The selected main strategy is not running, and more than one other could compose memory.", "status.reasonDependency": "{component} is missing {requirement}.", "status.reasonConflict": "Some components conflict.", "status.reasonRejected": "The composition was refused: {detail}", "status.layerOffDetail": "Turn it back on in the configuration", "status.layerStoppedDetail": "Its component is on but not running", "status.layerMemoryOffDetail": "Available once a main strategy runs", "status.rechecking": "Checking…", "status.aria": "Mnemon runtime status", "status.engine": "Memory engine", "status.engineUnavailable": "Mnemon unavailable", "status.versionWaiting": "Waiting for version", "status.pluginChecking": "Checking plugin status", "status.pluginReady": "Plugin running normally", "status.nativeAria": "Mnemon Native status", "status.nativeCliMissing": "Mnemon CLI not found", "status.providersTitle": "Memory providers", "status.providersDescription": "Connection status of the running Providers and their Memory Spaces.", "status.providersAria": "Memory provider status", "status.providersEnabled": "{enabled} / {total} enabled", "status.providersOff": "{count} more Providers are off", "status.providerState.disabled": "Off", "status.providerState.idle": "Service ready · no active Memory Space", "status.providerState.healthy": "Connection healthy", "status.providerState.unhealthy": "Connection needs attention", "status.providerSpaces": "{active} / {total} Memory Spaces running", "versions.checkAction": "Versions", "versions.title": "Check and update versions", "versions.description": "Review your installation and update when needed. Expand dsh-brain-mnemon to maintain its subpackages.", "versions.missing": "Not installed (optional)", "versions.restart": "Restart needed", "versions.local": "Local version", "versions.modeNpmCli": "npm", "versions.hintNpm": "Managed by npm. Update here or run mnemon update in the Host terminal.", "versions.hintNpmMissing": "The npm launcher was found, but npm is unavailable on the Host. Check the Node.js environment.", "versions.hintNpmUnmanaged": "The current npm does not own this global CLI installation. Use its original Node.js environment or migrate below.", "versions.hintUnreadable": "The CLI was found, but its version could not be read. Check the command in the Host terminal or reinstall it.", "versions.hintStarter": "Maintained with the dsh-brain-mnemon Starter. Update the Starter to use its tested package combination.", "versions.npmRecommended": "npm installation and maintenance", "versions.npmMaintenance": "Maintain the CLI with npm", "versions.npmInstall": "Install with npm (recommended)", "versions.npmMigrate": "Switch to npm (recommended)", "versions.npmRepair": "Check or repair the npm installation", "versions.npmRepairDetail": "Check the installation status above. To reinstall, run this command in the terminal on the DSH Host (Node.js 22+).", "versions.npmUpdateDetail": "Run this command for future updates, then choose Check again to verify the active version.", "versions.npmInstallDetail": "Only Mnemon Native needs this separate CLI. To use it, run this command in the terminal on the DSH Host (Node.js 22+).", "versions.npmMigrateDetail": "To switch to npm, run this on the DSH Host (Node.js 22+).", "versions.npmVerify": "Verify the installed version, then choose Check again:", "versions.npmNextSteps": "After installation: verify the version and active path", "versions.npmPath": "Put the npm global bin directory first on PATH. If MNEMON_CLI_PATH or mnemon.cliPath is set, point it to the new launcher. Restart DSH after changing its environment and verify the executable path above.", "versions.installGuide": "Installation guide", "versions.copy": "Copy", "versions.copied": "Copied", "versions.copyCommand": "Copy command: {command}", "versions.copyFailed": "Clipboard unavailable. Select the command and copy it manually.", "versions.readOnly": "This connection is read-only. You can check versions and copy commands; use a connection with management access to update here.", "versions.packages": "Subpackage versions ({count})", "versions.packagesOutdated": "{count} updates available", "versions.packagesDetail": "Expand for maintenance options", "versions.packagesHide": "Collapse package details", "versions.packagesHint": "Default packages update with the Starter. Packages installed independently in this Profile can update individually. Restart DSH afterward.", "versions.managedStarter": "Maintained with Starter", "versions.managedProfile": "Managed by Profile", "versions.starterVersion": "Starter pin", "versions.kind.source": "Sources", "versions.kind.strategy": "Strategies", "versions.kind.provider": "Providers", "versions.checking": "Checking remote repositories for new versions…", "versions.checkingShort": "Checking…", "versions.recheck": "Check again", "versions.failed": "Version operation failed", "versions.timeout": "The version check timed out. Check the network and try again.", "versions.current": "Up to date", "versions.available": "Update available", "versions.unknown": "Cannot verify", "versions.installed": "Installed", "versions.latest": "Latest", "versions.executable": "Executable", "versions.profileLocation": "Profile · {name}", "versions.sourceLocation": "Source", "versions.linkSourceLocation": "Source · Profile {name}", "versions.packageLocation": "Package directory", "versions.update": "Update", "versions.updating": "Updating…", "versions.updated": "{name} updated", "versions.alreadyCurrent": "Already on the latest version", "versions.restartRequired": "Restart DSH to load the new dsh-brain-mnemon plugin code; in the desktop app, quit and reopen it.", "versions.pendingInstalledTitle": "dsh-brain-mnemon {version} is installed", "versions.pendingInstalledDetail": "This Host still runs {running}. Restart DSH to load it; in the desktop app, quit and reopen it.", "versions.pendingPackagesTitle": "{names} updated", "versions.pendingPackagesDetail": "Restart DSH to load the update; in the desktop app, quit and reopen it.", "versions.checkedAt": "Checked at {time}", "versions.latestUnavailable": "The remote latest version is unavailable. Check the network and try again.", "versions.modeHomebrew": "Homebrew", "versions.modeGo": "Go install", "versions.modeNpm": "DSH Profile", "versions.modeLink": "Local link", "versions.modeManual": "Manual", "versions.modeMissing": "Missing", "versions.hintHomebrew": "Managed by Homebrew; an available release can be safely updated here.", "versions.hintBrewMissing": "A Homebrew installation was detected, but the brew command is unavailable.", "versions.hintGo": "Managed by go install; an available release can be safely updated here.", "versions.hintDsh": "Managed by the current DSH Profile. Updates use DSH's own plugin installer; restart DSH afterwards.", "versions.hintPnpm": "Managed by the current DSH Profile; restart DSH after updating.", "versions.hintPnpmMissing": "A DSH Profile installation was detected, but the Host cannot find the pnpm command. Install pnpm and restart DSH to update here.", "versions.hintLink": "This is a local linked development build. Pull and build in the source directory to preserve local changes.", "versions.hintInstall": "Mnemon CLI is not installed. Only Mnemon Native needs it; to use Native, install it and place mnemon on PATH, or set MNEMON_CLI_PATH / mnemon.cliPath.", "versions.hintManual": "The installation source cannot be identified safely. Update it using the original installation method.", "status.activeRatio": "{active} / {total} active", "status.runtimeRatio": "{user} user · {memory} project", "status.runtimeBytes": "{bytes} used", "status.runtimeWaiting": "Waiting", "status.runtimeWaitingDetail": "Awaiting the Host storage inventory", "status.directoryUnsynced": "Directory not synchronized", "status.activeMemories": "{count} active memories", "status.documentsWaiting": "Waiting for workspace", "status.documentsSession": "Available after binding a live session", "status.documentRatio": "{active} active · {archived} archived", "status.documentUsage": "{used} / {limit} active capacity", "status.storageDomains": "Storage Domains", "status.storageDomainsText": "Where runtime memory, Memory Spaces and Project Documents are stored.", "status.storageGlobal": "Global", "status.storageWorkspace": "Workspace", "status.storageWorkspaces": "Centralized workspaces", "status.storageCustom": "Custom", "status.storageWaiting": "Reading storage-domain directories…", "status.storageCustomUnset": "No custom directory is configured. This view exposes only a custom root already configured and active in DSH.", "status.storageWorkspaceUnavailable": "The current session has no available workspace directory.", "status.storageActiveRoot": "Current read/write root", "status.storageAvailable": "Directory available", "status.storageNotCreated": "Directory not created", "status.storageRuntime": "Runtime Memory", "status.storageSpaces": "Memory Spaces", "status.storageDocuments": "Project Documents", "status.storageState": "Background State", "status.storageReady": "Ready", "status.storageEmpty": "Empty", "status.storageMissing": "Not created", "status.storageInvalid": "Repair needed", "status.storageItems": "items", "status.storageRuntimeDetail": "USER {user} · MEMORY {memory}", "status.storageSpacesDetail": "{active} active · {databases} databases", "status.storageDocumentsDetail": "{active} active · {archived} archived", "status.storageStateReady": "Review watermarks are persisted", "status.storageStateVolatile": "Review state is currently owned by the Host process", "status.storageFootnote": "Switch storage scope in Configure; existing data stays in place.", "config.aria": "Memory system configuration", "plugin.openWorkspace": "Open", "config.interfaceTitle": "Interface", "config.unsaved": "Unsaved changes", "config.ready": "Saved and applied live", "config.displayTitle": "Memory System opens in", "config.displaySidebar": "Sidebar", "config.displaySidebarHint": "A standalone page that can show other workspaces", "config.displayBuiltin": "Conversation tab", "config.displayBuiltinHint": "Opens inside the current conversation", "config.storageTitle": "Storage", "storage.usedBy": "Used by", "storage.usedByTitle": "“{component}” keeps its data here", "storage.userProfileByWorkspace": "Each workspace has its own user profile.", "storage.userProfileShared": "All workspaces share a user profile. Working memory stays separate.", "storage.runtimeSettings": "Runtime memory settings", "storage.default": "Default", "storage.directoryExample": "For example ~/Documents/mnemon", "storage.thisWorkspace": "This workspace", "storage.moveNote": "Memory moves to the new location; existing data stays where it is", "storage.chooseDirectory": "Choose directory", "storage.pickFailed": "Could not open the directory chooser. Try again or enter a path.", "config.scopeTitle": "Storage scope", "config.global": "Global", "config.workspace": "Workspace", "config.workspaces": "Centralized · isolated by workspace", "config.workspacesHint": "One root with a subdirectory per workspace, by its path", "config.custom": "Custom", "config.globalScopeHint": "All workspaces share one directory", "config.workspaceScopeHint": "Each workspace keeps its own .mnemon directory", "config.dataDirectory": "Data directory", "config.runtimeSectionScope": "Scope & recall", "config.runtimeDeferred": "Read low-priority memory on demand", "config.runtimeDeferredHint": "Omit unpinned low-priority entries from prompts; models fetch them on demand.", "config.runtimeBm25Recall": "Search working memory on demand (experimental)", "config.runtimeBm25RecallLabel": "Search working memory on demand", "config.runtimeBm25RecallHint": "Match working memories and Document titles to each turn; user profile and pinned items stay visible.", "config.runtimeIndexPush": "Push Memory Space and Document indexes (experimental)", "config.runtimeIndexPushLabel": "Push Memory Space and Document indexes", "config.runtimeIndexPushHint": "Match Memory Space descriptions and Document summaries on step 1; pushes compact indexes only, never full bodies.", "config.runtimeUserScopeTitle": "User profile scope", "config.runtimeInheritance": "Automatically share Runtime memory with subagents", "config.runtimeInheritanceHint": "New subagents inherit user profile and working memory; running tasks keep their context.", "config.runtimeUserScopeStorage": "Follow storage scope", "config.runtimeUserScopeStorageHint": "Kept with MEMORY.md", "config.runtimeUserScopeGlobal": "Shared globally", "config.runtimeUserScopeGlobalHint": "Shared by every workspace; MEMORY.md still follows the storage scope", "config.runtimeSnapshotRefreshTitle": "Snapshot refresh", "config.runtimeSnapshotRefreshOnChange": "Refresh on change", "config.runtimeSnapshotRefreshOnChangeHint": "Project updated runtime memory into open sessions on the next turn", "config.runtimeSnapshotRefreshSessionStart": "Freeze at session start", "config.runtimeSnapshotRefreshSessionStartHint": "Keep the initial snapshot fixed in open sessions for cache stability; new sessions and recall tools still read live memory", "config.componentScopeStorage": "Follow storage scope", "config.componentScopeGlobal": "Shared globally", "config.componentScopeSwitchHint": "Switching scope changes where data is read and written. Existing data stays in its original directory. Switch back to view it. Pack exports and Git sync cover only the current storage root.", "config.documentsScopeSection": "Storage scope", "config.documentsScopeTitle": "Project Documents scope", "config.documentsScopeStorageHint": "Kept in the selected storage root alongside MEMORY.md", "config.documentsScopeGlobalHint": "Shared by every workspace in the global root; MEMORY.md still follows the storage scope", "config.memorySpacesScopeTitle": "Memory Spaces scope", "config.memorySpacesScopeStorageHint": "Kept in the selected storage root alongside MEMORY.md", "config.memorySpacesScopeGlobalHint": "Shared by every workspace with its Provider connections in the global root; MEMORY.md still follows the storage scope", "config.runtimeLimitsTitle": "Capacity limits", "config.runtimeLimitsHint": "Defaults: {user} KiB user profile, {memory} KiB working memory.", "config.runtime.userLimitBytes": "User profile limit (bytes)", "config.runtime.memoryLimitBytes": "Working memory limit (bytes)", "config.runtimeLimitsApply": "Applies live; lowering a limit does not delete existing entries", "config.runtimeLimitInvalid": "Set {field} to a whole number from 1 to {max}.", "config.runtimeAdvanced": "Maintenance limits", "config.runtimeMaintenanceHint": "Per-run output ceiling for migration and compaction (default {defaultTokens} tokens).", "config.runtime.maintenanceMaxTokens": "Maintenance output token limit", "config.runtimeMaintenanceInvalid": "{field} must be between {min} and {max}", "config.documentsLimitsTitle": "Active capacity", "config.documentsLimitsHint": "Total ceiling for active Documents (default {defaultMiB} MiB, max {maxMiB} MiB).", "config.documents.limitBytes": "Active documents limit (bytes)", "config.documentsLimitsApply": "Applies live; lowering the limit does not delete existing documents", "config.documentsLimitInvalid": "Set {field} to a whole number from 1 to {max}.", "config.enhancementsRefreshFailed": "The setting was updated, but its status could not be refreshed. Reopen this page.", "config.strategyTitle": "Main strategy", "config.strategyFailed": "Could not switch the main strategy. The previous choice is kept; try again.", "config.appliesNow": "Applies at once", "config.quoted": "“{name}”", "config.listSeparator": ", ", "config.sentenceGap": " ", "config.enableStrategy": "Turn on “{strategy}”", "config.useStrategy": "Use “{strategy}”", "config.stopStrategies": "Turn off {strategies}", "config.enableComponentNamed": "Turn on “{component}”", "board.title": "Memory composition", "board.description": "Each turn's memory is composed from these components", "board.loading": "Reading the memory composition…", "board.componentsUnavailable": "Memory components cannot be read right now; only the memory layers can be switched here.", "board.sources": "Memory sources", "board.enhancements": "Enhancements", "board.running": "Running", "board.off": "Off", "board.notRunning": "Not running", "board.needs": "Needs “{component}”", "board.needsMissing": "Needs a component that is not installed", "board.unused": "Not used by this strategy", "board.strategyMissing": "The selected main strategy is not installed.", "board.turningOn": "Turning on…", "board.turningOff": "Turning off…", "board.noMainMissing": "Memory is not in use: the selected main strategy is not installed", "board.noMainOff": "Memory is not in use: the main strategy “{strategy}” is off", "board.noMainWaiting": "Memory is not in use: “{strategy}” is on but not running yet", "board.contenders": "Memory is not in use: the selected “{strategy}” is not running, and {strategies} cannot stand in for it together", "board.fallback": "The selected “{selected}” is not running; “{composing}” composes memory for now", "board.fallbackMissing": "The selected main strategy is not installed; “{composing}” composes memory for now", "board.noSource": "Memory is not in use: no memory source is running", "board.memoryOff": "Memory is not in use: this composition cannot be served", "board.stale": "The latest change did not take effect; memory still runs as composed before", "board.idle": "Also running, composing nothing: {strategies}", "board.switching": "Switching…", "board.composing": "Composing memory", "board.lastSource": "Running · the only source", "board.enabledCount": "{on} of {total} on", "board.experimental": "Experimental", "board.search": "Search components", "board.searchEmpty": "No component matches “{query}”.", "details.open": "Details of “{component}”", "details.shipped": "Shipped", "details.installed": "Installed extension", "details.relations": "Relations", "details.needs": "Needs", "details.needsAny": "Needs one of", "details.needsMissing": "No installed component provides {capability}", "details.neededBy": "Needed by", "details.conflicts": "Cannot run beside", "details.options": "Options", "details.effectOn": "Turning on also turns on: {names}", "details.effectOnReplace": "Turning on turns off: {names}", "details.effectOnMixed": "Turning on also turns on: {on}; turns off: {off}", "details.effectOff": "Turning off also turns off: {names}", "details.effectLast": "The only running source; it stays on", "details.currentMain": "Current main strategy", "details.useMain": "Use as main strategy", "details.back": "Back to “{component}”", "config.strategyWorkflowNote": "Runs only when supported by the main strategy (such as Layered); settings are preserved.", "threeTier.offNote": "This plugin is disabled. Background tasks also require a supporting main Strategy.", "board.otherEnhancements": "Enhancements for other main strategies ({count})", "board.more": "Add more components from the Plugins list", "board.relationNeeds": "Needs “{component}”", "board.relationNeededBy": "“{component}” depends on it", "options.aria": "Options of “{component}”", "options.emptySourcesTitle": "No memory sources selected", "options.emptySourcesConfirm": "No memory sources are selected. Saving disables Agent access to runtime memory, documents and memory spaces. To restore automatic selection, cancel and reset this option to default. Save an empty selection?", "options.apply": "Apply", "options.fix": "Fix the marked options first", "options.applying": "Applying…", "options.default": "Default", "options.reset": "Reset to default", "options.integer": "Enter a whole number", "options.between": "Enter a whole number from {min} to {max}", "options.atLeast": "Enter a whole number of at least {min}", "options.atMost": "Enter a whole number of at most {max}", "options.tooLong": "At most {max} characters", "options.listLimit": "Up to {count} unique items of at most {length} characters each", "options.listHint": "One item per line.", "options.noSources": "No memory source to choose from right now.", "options.sourceUnavailable": "{source} (unavailable now)", "feedback.memoryOff": "Memory is not in use: no main strategy is running", "feedback.memoryRestored": "Memory is back, composed by “{strategy}”", "feedback.fallback": "“{selected}” is off; “{composing}” composes memory for now", "feedback.fallbackMissing": "The selected main strategy is not installed; “{composing}” composes memory for now", "feedback.switchedMain": "Switched to “{strategy}”", "feedback.switchedMainOff": "Switched to “{strategy}” and turned off {others}", "feedback.switchedMainWith": "Switched to “{strategy}” and turned on {others}, which it needs", "feedback.switchedMainMixed": "Switched to “{strategy}”: turned on {on} and turned off {off}", "feedback.externalMain": "The main strategy is now “{strategy}”", "feedback.idleMain": "“{component}” is running too, but composes nothing", "feedback.sourceOn": "Turned on “{component}”; its layer reads and writes again", "feedback.sourceOff": "Turned off “{component}”; its layer stops reading and writing", "feedback.componentOn": "Turned on “{component}”", "feedback.componentOff": "Turned off “{component}”", "feedback.externalSourceOn": "“{component}” was turned on; its layer reads and writes again", "feedback.externalSourceOff": "“{component}” was turned off; its layer stops reading and writing", "feedback.externalComponentOn": "“{component}” was turned on", "feedback.externalComponentOff": "“{component}” was turned off", "feedback.several": "Updated {count} components", "feedback.enabledWith": "Turned on “{component}” and {others}, which it needs", "feedback.disabledWith": "Turned off “{component}” and {others}, which depended on it", "feedback.enabledReplacing": "Turned on “{component}” and turned off {others}, which cannot run beside it", "feedback.enabledMixed": "Turned on “{component}”: also turned on {on} and turned off {off}", "feedback.optionsSaved": "Updated the options of “{component}”", "feedback.externalOptions": "The options of “{component}” changed", "feedback.externalSeveral": "{count} components changed", "feedback.undo": "Undo", "feedback.undone": "Undone; the previous settings are back", "feedback.show": "Show", "feedback.retry": "Retry", "feedback.failed": "Could not apply the change; the previous settings are kept.", "feedback.layerResumed": "“{layer}” is running again", "config.componentListNote": "In the component list below, dsh-brain-mnemon/bundle is the Starter's grouping entry; it shows as off without affecting anything.", "layers.disabledBadge": "Off", "layers.disabledTitle": "{layer} is off", "layers.disabledDescription": "This memory layer is not participating in memory processing.", "layers.disabledText": "Existing data is kept; re-enable in settings to resume.", "layers.stoppedBadge": "Not running", "layers.stoppedTitle": "{layer} is not running", "layers.stoppedDescription": "The component for this layer is on but not running.", "layers.stoppedText": "Existing data is kept; resumes once the component is running.", "layers.memoryOffBadge": "Not in use", "layers.memoryOffTitle": "{layer} is not in use", "layers.memoryOffDescription": "Memory is not in use, so this layer is unavailable.", "layers.memoryOffText": "Existing data is kept; restore a main strategy in settings to resume.", "config.nativeName": "Mnemon Native", "config.backgroundTitle": "Background tasks", "config.backgroundDescription": "Capture, archiving, and review run in the background when supported by the main strategy.", "config.memoryWriting": "Memory writes", "config.confirmWrites": "Confirm memory tool writes", "config.confirmWritesHint": "Ask via DSH before models add, edit, or delete memory via tools.", "config.confirmWritesBadge": "Pauses idle review", "config.taskAgentSectionTitle": "Task Agent", "config.taskAgentSectionDescription": "Drives background maintenance, Save to Memory, Space routing, and sync review.", "config.taskAgentTitle": "Task Agent model", "config.taskAgentInherit": "Follow global", "config.taskAgentInheritHint": "Follow the new-session model", "config.taskAgentConversation": "Follow the conversation", "config.taskAgentConversationHint": "Follow the model the current conversation uses", "config.taskAgentFixed": "Custom", "config.taskAgentFixedHint": "Choose a model", "config.taskAgentProvider": "Model provider", "config.taskAgentModel": "Model", "config.taskAgentImageInput": "Image input", "config.taskAgentEffective": "Will currently use", "config.taskAgentSource.fixed": "Custom", "config.taskAgentSource.session": "Current conversation", "config.taskAgentSource.dsh-default": "New-session model", "config.taskAgentSource.active-agent": "An open conversation", "config.taskAgentLoading": "Loading model directory", "config.taskAgentUnavailable": "No Provider / Model route is currently available", "config.taskAgentLoadFailed": "Could not load the model directory: {error}", "config.taskAgentPartial": "{count} providers could not be read; the remaining options are still available.", "config.taskAgentRetry": "Read again", "config.customAbsolute": "Use an absolute path or one that starts with ~/", "config.saveFailed": "Save failed: {error}", "config.readOnly": "Plugin settings are read-only in this deployment.", "config.remoteReadOnly": "Plugin settings are read only over remote access: set remoteAccess: trusted-host in the mnemon profile configuration and restart DSH to change them here.", "config.unavailable": "Memory System settings could not be loaded. Check whether the Host grants the settings RPC to this Web deployment.", "config.discard": "Discard", "config.interactionTurnBar": "Turn memory bar", "config.interactionTurnBarHint": "Shows each turn's recall and writes below the reply", "config.interactionSaveAction": "Save to memory action", "config.interactionSaveActionHint": "Save a reply by hand; it goes where you choose after you confirm", "config.packTitle": "Backup and migration", "config.packUnavailable": "This DSH host does not provide the Mnemon ZIP backup channel.", "config.packExporting": "Exporting…", "config.packInspecting": "Inspecting…", "config.packImporting": "Importing…", "config.packExported": "Exported {file} ({size}).", "config.packFailed": "ZIP operation failed: {error}", "config.packSimpleDescription": "A ZIP of the components above, without third-party providers or credentials", "config.packImportZip": "Import ZIP", "config.packExportZip": "Export ZIP", "config.packChooseZip": "Choose a Mnemon backup ZIP", "config.packUnnamedZip": "Mnemon backup.zip", "config.packZipReady": "Verified · {components} components · {items} items · {size}", "config.packImportZipAction": "Safe import", "config.packImportedWhole": "Safely merged the ZIP into {root}.", "config.syncTitle": "Git sync", "config.syncSimpleDescription": "Syncs the components above to a Git repository, without third-party providers or credentials", "config.syncLoading": "Reading the sync status…", "config.syncUnavailable": "This DSH host does not provide the Mnemon repository sync channel.", "config.syncUnavailableReason": "Could not read the sync status: {error}", "config.syncGitMissing": "Syncing needs Git {required} or newer", "config.syncRecheck": "Check again", "config.syncFixCredentials": "Set credentials", "config.syncRepository": "Repository", "config.syncRepositoryHint": "Choose the Git repository that keeps your memory", "config.syncChange": "Change", "config.syncDisconnect": "Disconnect", "config.syncDisconnectTitle": "Disconnect this repository?", "config.syncDisconnectBody": "Memory stops syncing to {repository}, and automatic sync turns off. Nothing is deleted here or in the repository; a saved access token is removed.", "config.syncDisconnected": "Disconnected the repository.", "config.syncStateChecking": "Checking the repository…", "config.syncStateConnected": "Connected", "config.syncStateNewBranch": "Connected · the first sync creates the {branch} branch", "config.syncNoCredential": "pushing needs a GitHub sign-in or an access token", "config.syncNoCredentialToken": "pushing needs an access token", "config.syncIssueAuthHttps": "Needs credentials; sign in with GitHub or add an access token", "config.syncIssueAuthToken": "Needs credentials; add an access token", "config.syncIssueRejectedGitHub": "GitHub rejected the sign-in; sign in again or check its access to this repository", "config.syncIssueRejectedGitHubToken": "GitHub rejected the saved access token; replace it", "config.syncIssueRejectedGitHubEnvironment": "GitHub rejected the token in {env}; replace it", "config.syncIssueRejected": "The host rejected the saved token; replace it, or name the user it expects in the address", "config.syncIssueRejectedEnvironment": "The host rejected the token in {env}; replace it", "config.syncIssueAuthSsh": "SSH authentication failed; check this computer's SSH key", "config.syncIssueAuth": "Access to this repository was refused", "config.syncIssueNotFound": "Repository not found; check the address and your access", "config.syncIssueNotFoundGitHub": "Repository not found; check the address, as a private repository needs a sign-in or a token", "config.syncIssueNetwork": "Cannot reach the repository; check the network or proxy", "config.syncIssueTimeout": "The repository did not answer in time", "config.syncIssueUnknown": "Cannot read the repository: {error}", "config.syncViaGitHub": "via GitHub @{login}", "config.syncViaGitHubAnonymous": "via a GitHub sign-in", "config.syncViaToken": "with an access token", "config.syncViaEnvironment": "with the {env} environment variable", "config.syncViaSsh": "with an SSH key", "config.syncConnectWith": "Connect with", "config.syncModeGitHub": "GitHub account", "config.syncModeAddress": "Repository address", "config.syncRepoUrl": "Repository address", "config.syncRepoUrlPlaceholder": "https://…, git@host:path, or an absolute local path", "config.syncRepoUrlInvalid": "Use an https:// or ssh:// URL, git@host:path, or an absolute local path", "config.syncRepoUrlCredentials": "Only a user name may go in the address; enter the token under Access token", "config.syncToken": "Access token", "config.syncTokenOptional": "Optional", "config.syncTokenSaved": "Saved; type a new one to replace it", "config.syncTokenEnvironment": "Using the {env} environment variable", "config.syncTokenHint": "Only an HTTPS address needs a token; it stays on this computer", "config.syncTokenRemove": "Remove", "config.syncTokenRemoved": "Removed the access token.", "config.syncConnect": "Connect", "config.syncConnecting": "Connecting…", "config.syncSave": "Save", "config.syncSaving": "Saving…", "config.syncGitHubHint": "Sign in to pick or create a repository; the grant stays on this computer", "config.syncGitHubReadOnly": "The credentials store is read-only, so a sign-in cannot be saved", "config.syncGitHubSignIn": "Sign in with GitHub", "config.syncGitHubStarting": "Requesting a device code…", "config.syncGitHubCode": "Enter this device code on GitHub:", "config.syncGitHubCopyOpen": "Copy and open GitHub", "config.syncGitHubCopied": "Copied; paste it on the page that opened, and this continues on its own", "config.syncGitHubOpenBlocked": "The browser did not open a new page; visit {url} yourself", "config.syncGitHubWaiting": "Waiting for authorization… this continues on its own", "config.syncGitHubSignedIn": "Signed in as @{login}", "config.syncGitHubSignOut": "Sign out", "config.syncGitHubFailed": "GitHub sign-in failed: {error}", "config.syncGitHubExpired": "The device code expired; start the sign-in again", "config.syncGitHubDenied": "The authorization was denied", "config.syncGitHubExpiredGrant": "The GitHub grant is no longer valid; sign in again", "config.syncGitHubSignInAgain": "Sign in again", "config.syncRepositoryLabel": "Repository", "config.syncRepositorySearch": "Search repositories, or type a new name", "config.syncRepositoriesLoading": "Reading repositories…", "config.syncRepositoriesFailed": "Could not read repositories: {error}", "config.syncRepositoriesRetry": "Retry", "config.syncRepositoriesNone": "This account has no repository yet; type a name to create one", "config.syncRepositoriesEmpty": "No matching repository", "config.syncRepositoriesMore": "{count} more repositories; type to narrow the list", "config.syncRepositoryPrivate": "Private", "config.syncRepositoryPublic": "Public", "config.syncRepositoryNoPush": "No push access", "config.syncRepositoryCurrent": "Current", "config.syncRepositoryCreate": "Create the private repository {name}", "config.syncRepositoryCreating": "Creating…", "config.syncRepositoryNameInvalid": "A repository name holds letters, digits, dots, dashes and underscores", "config.syncPublicTitle": "Use a public repository?", "config.syncPublicBody": "{name} is public: anyone can read the memory synced to it.", "config.syncPublicConfirm": "Use it anyway", "config.syncRowTitle": "Sync", "config.syncNever": "A sync merges the repository's memory here, then pushes this computer's", "config.syncLast": "Last synced {time}", "config.syncLastMerge": "Last merged {time}", "config.syncCheck": "Check remote", "config.syncNow": "Sync now", "config.syncNowRunning": "Syncing…", "config.syncDone": "Synced; pushed {commit}.", "config.runtimeMergeArchived": "{count} overflow memories were preserved locally in runtime/archived/import-overflow and kept out of working memory.", "config.syncDoneMerged": "Synced: merged {count} remote memories and pushed {commit}.", "config.syncUpToDate": "Up to date; the repository matches this computer.", "config.syncUpToDateMerged": "Merged {count} remote memories; the repository is up to date.", "config.syncPushFailed": "Committed here, but the push did not finish: {reason}", "config.syncFailed": "Sync failed: {error}", "config.syncReasonBusy": "Another sync is still running; try again shortly", "config.syncReasonNoRepository": "No repository is connected", "config.syncReasonGitMissing": "This computer's Git is unavailable", "config.syncReasonRemoteEmpty": "The repository holds no backup yet; sync once first", "config.syncReasonRejected": "Another device updated the repository during the sync; sync again", "config.syncAuto": "Automatic sync", "config.syncAutoOff": "Off", "config.syncAutoHour": "Every hour", "config.syncAutoHours": "Every {hours} hours", "config.syncAutoDay": "Every day", "config.syncAutoDays": "Every {days} days", "config.syncAutoHintOff": "Syncs only when you press Sync now", "config.syncAutoHintOn": "Syncs in the background at this interval, exactly as Sync now does", "config.syncAutoNext": "Next at {time}", "config.syncAutoLast": "Last at {time}", "config.syncAutoFailed": "The last automatic sync failed: {error}", "config.syncHistory": "Backup history", "config.syncHistoryHint": "Every sync leaves a version in the repository", "config.syncHistoryView": "View", "config.syncHistoryLoading": "Reading…", "config.syncHistoryEmpty": "The repository holds no backup yet.", "config.syncHistoryMore": "Load earlier versions", "config.syncHistoryCapped": "Only the latest {count} versions are listed here", "config.syncHistoryFrom": "from {machine}", "config.syncHistoryUnknownMachine": "an unnamed computer", "config.syncComponentRuntime": "Runtime Memory", "config.syncComponentDocuments": "Project Documents", "config.syncComponentSpaces": "Memory Spaces", "config.syncCountRuntime": "{count} runtime memories", "config.syncCountDocuments": "{count} documents", "config.syncCountSpaces": "{count} memory spaces", "config.syncCompareTitle": "Compare with the remote", "config.syncCompareLoading": "Reading the remote…", "config.syncCompareRemote": "The remote version is from {machine} · {time}", "config.syncCompareSame": "Same", "config.syncCompareDiffers": "Differs", "config.syncCompareRuntime": "{remote} only on the remote · {local} only here", "config.syncCompareConflicts": "{count} written differently", "config.syncCompareAllSame": "This computer and the remote match; there is nothing to sync.", "config.syncCompareTruncated": "More differences exist than these counts show.", "config.syncCompareRemovals": "The remote recorded {count} deletions; a sync applies them here.", "config.syncCompareConflictNote": "{count} subjects are written differently: a sync keeps both, and Memory reconciliation can merge them later.", "config.syncCompareShowConflicts": "Show", "config.syncCompareGoReview": "Go to Memory reconciliation", "config.syncCompareHeldBack": "{count} remote memories were deleted here earlier; a sync keeps them out.", "config.syncCompareRevive": "Bring them back", "config.syncCompareReviving": "Bringing back…", "config.syncCompareRevived": "Brought back {count} memories.", "config.syncDiffHere": "Here", "config.syncDiffThere": "Remote", "config.syncMergeOnly": "Merge here only", "config.syncMerging": "Merging…", "config.syncMerged": "Merged remote {commit}.", "config.syncMergedCount": "Merged {count} remote memories.", "config.syncAdvanced": "Advanced", "config.syncBranch": "Branch", "config.syncSubdir": "Directory in the repository", "config.syncDefaultValue": "Default {value}", "config.syncBranchInvalid": "Not a valid branch name", "config.syncSubdirInvalid": "Use a relative directory inside the repository", "config.syncAuthor": "Commit author", "config.syncAuthorDefault": "Default", "config.syncAuthorMachine": "This computer's Git", "config.syncAuthorCustom": "Custom", "config.syncAuthorDefaultNote": "Uses this computer's Git identity; falls back to {identity} when unconfigured", "config.syncAuthorMachineNote": "Uses this computer's Git identity, else the default one", "config.syncAuthorName": "Name", "config.syncAuthorEmail": "Email", "config.syncAuthorEmailInvalid": "Not an email address", "config.syncAdvancedNote": "After saving, the next sync writes to the new branch or directory", "config.syncMachineName": "This computer's name", "config.syncMachineHostname": "Host name", "config.syncMachineCustom": "Custom", "config.syncMachineNameLabel": "Name", "config.syncMachineHostnameNote": "Uses the host name; backup history shows “from {name}”", "config.syncMachineCustomNote": "Backup history shows “from {name}”", "config.syncMachineNameInvalid": "Up to 120 characters on one line", "config.syncMachineRenameNote": "After saving, later syncs use the new name; earlier versions keep theirs", "config.syncAdvancedSaved": "Saved the advanced settings.", "config.reconcileTitle": "Memory reconciliation", "config.reconcileDescription": "A model reads the merged memory and proposes changes; nothing is written until you review it", "review.reconcile": "Reconcile", "review.reconciling": "Reconciling…", "review.refresh": "Refresh", "review.empty": "Nothing to review", "review.pending": "{count} awaiting review", "review.failed": "Reading the review ledger failed: {error}", "review.planned": "Prepared {operations} proposals; nothing is written until you accept them.", "review.none": "The model found nothing to change in the merged memory.", "review.statusPending": "Pending", "review.statusAccepted": "Accepted", "review.statusRejected": "Rejected", "review.expand": "Open", "review.collapse": "Close", "review.accept": "Accept", "review.reject": "Reject", "review.apply": "Apply", "review.applying": "Applying…", "review.reopen": "Reopen", "review.applied": "Applied {count} changes.", "review.appliedAt": "Applied at {time}", "review.appliedCount": "{count} of {total} operations have run", "review.applyFailed": "Applying failed: {error}", "review.meta": "{count} changes · from {machine} · {time}", "review.foreign": "Touches memory from: {machines}", "review.opinions": "Opinions", "review.noOpinions": "No opinion yet", "review.authorUser": "You", "review.authorAgent": "Model", "review.opinionPlaceholder": "Leave an opinion for the next reconciliation", "review.opinionSend": "Add opinion", "review.opinionAdded": "Your opinion was recorded.", "review.opAdd": "Add {target} memory: {content}", "review.opReplace": "Rewrite {target} memory: “{from}” becomes “{to}”", "review.opRemove": "Remove {target} memory: {text}", "review.opArchive": "Archive document {id}", "review.targetMemory": "project", "review.targetUser": "user", "review.guidanceLabel": "What to accomplish", "review.guidanceHint": "Optional: state what you want this reconciliation to do; the model reads it without gaining any authority from it", "review.guidancePlaceholder": "For example: two preferences say the same thing, merge them into one", "review.guided": "Planned with your guidance", "review.remoteEntries": "Read {count} entries from the branch this installation lacks", "review.selectAll": "All", "review.selectNone": "None", "review.selectHint": "Check the changes to apply; unchecked ones stay for the next round", "review.selected": "{count} of {total} selected", "review.applyCount": "Apply {count}", "review.noSelection": "Select at least one change.", "review.history": "Applied plans ({count})", "review.historyTitle": "Applied plans", "review.historyHint": "These plans already ran; they are kept for reading. Reopening one does not undo what it wrote.", "review.historyEmpty": "No plan has run yet.", "review.rejectedHint": "This plan was rejected; leave an opinion and reopen it, or ask the AI to plan again.", "skills.label": "Skills", "skills.groupSurface": "Surfaces", "skills.groupPlacement": "Placement & updates", "skills.groupEvolution": "Automation", "skills.groupGeneration": "Models & generation", "skills.groupSources": "Market & directories", "skills.badgeDefault": "Default", "skills.badgeCustom": "Custom · {count}", "skills.parametersBadge": "Threshold {threshold} · {idle}s", "skills.evolution": "Self-evolution", "skills.allowCreate": "Suggest new skills", "skills.allowCreateHint": "Allow reviews to propose new skills; existing suggestions can still be handled manually", "skills.allowUpdate": "Suggest skill improvements", "skills.allowUpdateHint": "Allow reviews to improve existing skills; reviews pause when both suggestion types are off", "skills.targetScope": "New skill destination", "skills.roots.title": "New skill directories", "skills.roots.hint": "Applies to creation, drafts, and market installs, overriding the destination above.", "skills.roots.enabled": "Customize creation directories", "skills.roots.default": "Default creation directory", "skills.roots.invalid": "Select at least one directory and include the default in the choices.", "skills.root.project-dsh": "Project .dsh/skills", "skills.root.project-agents": "Project .agents/skills", "skills.root.user-dsh": "User .dsh/skills", "skills.root.user-agents": "User .agents/skills", "skills.allowLinkedUpdates": "Allow linked skill updates", "skills.allowLinkedUpdatesHint": "Updates write directly to symlink targets across sharing Agents; enable for trusted paths only.", "skills.targetScopeHint": "Defaults to User; Follow storage maps workspace scopes to Project, changeable on adopt.", "skills.targetScope.user": "User", "skills.targetScope.project": "Project", "skills.targetScope.storage": "Follow storage", "skills.evolutionHint": "Review conversations and propose skill updates; task sessions are kept locally.", "skills.autoAdoptDailyLimit": "Automatic candidates per day", "skills.autoAdoptTimeZone": "Daily quota time zone", "skills.autoBudgetHint": "Per calendar day in this time zone (0 pauses auto-processing); manual actions stay open.", "skills.autoBudgetInvalid": "Use an integer from 0 to 100 and a valid IANA time zone or local.", "skills.autoAdopt": "Automatically adopt new suggestions", "skills.autoAdoptHint": "Requires backtests; adopts only with zero text-case regressions (up to 2 retries).", "skills.autoBacktest": "Backtest drafts", "skills.autoBacktestHint": "Compare a new draft with the current version on its test cases", "skills.parameters": "Review parameters", "skills.draftGeneration": "Draft generation", "skills.draftMaxTokens": "Draft output token limit", "skills.draftRetryMaxTokens": "Retry output token limit", "skills.draftBudgetHint": "Includes reasoning and full SKILL.md; retries once on truncation when retry limit is higher.", "skills.reviewThreshold": "Review threshold", "skills.idleSeconds": "Idle wait (s)", "skills.cooldownSeconds": "Review interval (s)", "skills.minConfidence": "Minimum confidence", "skills.expiryDays": "Suggestion expiry (days)", "skills.maxPendingPerSession": "Pending per conversation", "skills.casesPerRun": "Cases per backtest", "skills.invalid": "{field} must be between {min} and {max}", "skills.hints": "In the conversation", "skills.hintsHint": "Show the skills a turn used and new suggestions under it", "skills.sidebar": "Sidebar entry", "skills.sidebarHint": "Show Skills as its own sidebar entry instead of in the Memory System", "skills.models": "Default models", "skills.modelsHint": "Follows the Task Agent route when set to Automatic.", "skills.modelAuto": "Automatic (follow Task Agent)", "skills.draftModel": "Evolution draft model", "skills.draftModelHint": "Writes and revises skill drafts for suggestions", "skills.runModel": "Evaluation run model", "skills.runModelHint": "Runs backtest cases and grades results", "skills.directories": "Skill directories", "skills.directoriesHint": "Leave empty to use default user skill directories.", "skills.dshHome": "DSH home", "skills.agentsHome": "Shared Agents home", "skills.market": "Market sources", "skills.marketHint": "Manage skill market catalogs and search indexes.", "skills.marketRefresh": "Refresh", "skills.marketRefreshing": "Refreshing…", "skills.marketAddPlaceholder": "GitHub repo, index URL, or local path", "skills.marketAdd": "Add", "skills.marketAdding": "Adding…", "skills.marketRemove": "Remove", "skills.marketBuiltin": "Built-in", "skills.marketSkillCount": "{count} skills", "skills.marketEmpty": "No market sources configured.", "skills.statusCount": "{count} skills", "skills.statusOn": "Self-evolution on · {waiting} waiting", "skills.statusIdle": "Self-evolution on", "skills.statusOff": "Self-evolution off", "skillTail.label": "Turn skills", "skillTail.reviewing": "Reviewing", "skillTail.suggested": "suggested {count}", "skillTail.failed": "Review failed", "skillTail.openSkill": "Open {name} in Skills", "skillTail.openSuggestions": "Open the suggestions in Skills" }; // vendor/dsh-mnemon/src/client/locales/es.ts const coreEs = { "composer.expand": "Mostrar entrada de mensajes", "composer.collapse": "Contraer entrada de mensajes", "composer.collapsed": "Entrada de mensajes contraída", "tab.label": "Sistema de memoria", "nav.aria": "Páginas de Mnemon", "nav.status": "Estado", "nav.runtime": "Memoria de ejecución", "nav.runtimeDetail": "USER / MEMORY", "nav.documents": "Documentos del proyecto", "nav.documentsDetail": "Índice y archivo", "nav.spaces": "Espacios de memoria", "nav.spacesDetail": "Grafo y recuperación", "common.refresh": "Actualizar", "common.openConfiguration": "Abrir configuración", "common.loading": "Cargando…", "common.cancel": "Cancelar", "common.close": "Cerrar", "common.showing": "Mostrando {visible} / {total}", "common.showMore": "Mostrar {count} más", "header.backToConversation": "Volver al chat", "header.configure": "Configurar", "header.noticeSummary": "Avisos {count} · {labels}", "header.noticeRemoteReadOnly": "Remoto solo lectura", "header.noticeIdleReview": "Revisión en inactividad", "header.compositionHint": "Selecciona para cambiar la composición en la configuración.", "header.checking": "Comprobando", "header.connected": "Conectado", "header.unavailable": "No disponible", "header.notReady": "Mnemon no está listo", "workspace.viewing": "Espacio de trabajo visible", "workspace.selectorAria": "Seleccionar un espacio de trabajo de memoria para inspeccionar", "workspace.excluded": "Memoria excluida", "workspace.excludedDetail": "Este espacio de trabajo y sus subagentes no participan en la inyección de memoria, las herramientas ni la revisión automática. Los datos existentes siguen siendo legibles; elimina la exclusión para reanudar.", "workspace.excludeTitle": "Espacios de trabajo excluidos de la memoria", "workspace.excludeHint": "Una ruta absoluta de espacio de trabajo por línea (se admiten ~ y enlaces simbólicos).", "workspace.excludeCount": "{count} excluidos", "workspace.excludeNone": "Ninguno", "workspace.excludePlaceholder": "/ruta/al/espacio-de-trabajo-privado", "workspace.excludeNote": "Se aplica a turnos futuros; los datos existentes y el historial de sesión permanecen intactos.", "workspace.invalidExclusions": "{count} rutas de exclusión no son válidas o no están disponibles y se ignoraron; comprueba las rutas en la configuración de almacenamiento.", "workspace.unavailable": "No se pudo identificar el espacio de trabajo actual; no se aplicaron las exclusiones de rutas.", "workspace.storageMode": "Ámbito de almacenamiento", "workspace.storageModeAria": "Ámbito de almacenamiento: {mode}", "workspace.mismatchTitle": "El directorio inspeccionado no coincide con esta sesión", "workspace.mismatchShort": "No es el espacio de trabajo de la conversación", "workspace.selectedRoot": "Viendo: {root}", "workspace.effectiveRoot": "Efectivo: {root}", "workspace.align": "Alinear", "workspace.remoteReadOnly": "El acceso remoto es de solo lectura: establece remoteAccess: trusted-host en la configuración del perfil de mnemon y reinicia DSH para gestionar la memoria aquí.", "sourcePage.instance": "Instancia de Fuente", "sourcePage.instanceAria": "Seleccionar instancia de Fuente", "sourcePage.summaryAria": "Resumen de estado y permisos de la Fuente", "sourcePage.package": "Paquete", "sourcePage.availability": "Disponibilidad", "sourcePage.availability.ready": "Lista", "sourcePage.availability.degraded": "Degradada", "sourcePage.availability.unavailable": "No disponible", "sourcePage.role": "Rol semántico", "sourcePage.revision": "Revisión actual", "sourcePage.permissions": "Capacidades autorizadas", "sourcePage.diagnostics": "Diagnóstico", "sourcePage.configuration": "Configuración declarativa", "sourcePage.configurationDescription": "Los campos provienen del descriptor de gestión saneado del Host; el envío se vuelve a autorizar para esta instancia y revisión.", "sourcePage.configLoading": "Cargando configuración…", "sourcePage.configSave": "Guardar", "sourcePage.configSaving": "Guardando…", "sourcePage.configSaved": "Configuración enviada; actualizando el estado de la Fuente.", "sourcePage.secretPlaceholder": "Déjalo en blanco para conservar el secreto actual", "sourcePage.unavailable": "La Fuente no está disponible", "sourcePage.unavailableDescription": "No hay ninguna instancia invocable visible en este ámbito. El comportamiento de la memoria del Host y Headless no se ve afectado por esta página.", "turnTail.label": "Memoria del turno", "turnTail.recall": "recuperó {count}", "turnTail.write": "escribió {count}", "turnTail.documents": "búsqueda de documentos {count}", "turnTail.inspect": "inspeccionó {count}", "turnTail.failed": "falló {count}", "turnTail.toolList": "Herramientas de memoria en este turno", "turnTail.more": "{count} más", "turnTail.openTool": "Abrir la página de memoria para {tool}", "turnTail.tool.recall": "Recuperación en Espacios de memoria", "turnTail.tool.related": "Memorias relacionadas", "turnTail.tool.documentSearch": "Búsqueda de documentos", "turnTail.tool.documentManage": "Actualización de documento", "turnTail.tool.documentCreate": "Nuevo documento", "turnTail.tool.runtime": "Actualización de memoria de ejecución", "turnTail.tool.remember": "Guardado en Espacios de memoria", "turnTail.tool.link": "Memorias enlazadas", "turnTail.tool.forget": "Memoria eliminada", "turnTail.tool.status": "Estado de la memoria", "turnTail.tool.spaces": "Lista de Espacios de memoria", "turnTail.tool.spaceCreate": "Nuevo Espacio de memoria", "turnTail.tool.spaceUpdate": "Actualización de Espacio de memoria", "turnTail.tool.spaceMerge": "Espacios de memoria fusionados", "turnTail.tool.viewRoute": "Lectura de memoria", "turnTail.tool.viewAction": "Actualización de memoria", "receipt.written": "Guardado", "receipt.updated": "Actualizado", "receipt.pending": "Enviado; el Proveedor confirmará más tarde", "receipt.skipped": "Omitido", "receipt.partial": "Guardado parcialmente", "receipt.unfinished": "Sin completar", "receipt.failed": "Error", "receipt.view": "Ver en Espacios de memoria", "receipt.viewRuntime": "Ver en Memoria de ejecución", "receipt.unembedded": "Guardada sin vector: el embedding falló, por lo que esta memoria queda fuera de la coincidencia semántica por ahora. Cuando el servicio de embeddings responda, complétalo desde «Probar estado» en la configuración de embeddings de Mnemon Native.", "receipt.unembeddedNoService": "Sin vector aún: no hay ningún servicio de embeddings disponible, por lo que esta memoria queda fuera de la coincidencia semántica por ahora; la búsqueda por palabras clave sigue encontrándola. Cuando conectes un servicio de embeddings, complétalo desde «Probar estado» en la configuración de embeddings de Mnemon Native.", "taskAgent.ready": "Agente de tareas listo", "taskAgent.unavailable": "Agente de tareas no disponible", "saveAction.button": "Guardar en memoria", "saveAction.tooltip": "Guardar esta respuesta en la memoria", "saveAction.title": "Guardar en memoria", "saveAction.hint": "El Agente de tareas decide si guardar, luego sintetiza y escribe en un Espacio de memoria.", "saveAction.fetching": "Extrayendo texto del mensaje…", "saveAction.missing": "No se pudo extraer el texto de este mensaje del registro de sesión.", "saveAction.candidate": "Contenido", "saveAction.truncated": "Esta respuesta es extensa; aquí solo se cargan los primeros {limit} caracteres.", "saveAction.submit": "Guardar", "saveAction.submitting": "Guardando…", "saveAction.readOnly": "Esta implementación es de solo lectura; las escrituras de memoria están deshabilitadas.", "saveAction.close": "Cerrar", "saveAction.hintDirect": "Escribe directamente en el destino seleccionado.", "saveAction.to": "Guardar en", "saveAction.to.agent": "Automático", "saveAction.to.agentDetail": "El Agente decide si guardar y elige el Espacio de memoria", "saveAction.to.memory": "Memoria de trabajo (MEMORY.md)", "saveAction.to.user": "Perfil de usuario (USER.md)", "saveAction.to.space": "Espacio de memoria · {provider}", "saveAction.save": "Guardar", "saveAction.saving": "Guardando…", "saveAction.saved.runtime": "Guardado en {target} · {count} entradas", "saveAction.saved.runtimeMaintained": "Se liberó espacio y se guardó en {target} · {count} entradas", "saveAction.saved.space": "Guardado en el Espacio de memoria {space}", "saveAction.saved.spacePending": "Enviado al Espacio de memoria {space}; el Proveedor confirmará más tarde", "saveAction.saved.spaceOther": "El Espacio de memoria {space} respondió: {action}", "saveAction.saved.duplicate": "Ya estaba guardado; no se escribió por duplicado.", "saveAction.unavailable": "Este destino no admite escrituras en este momento.", "saveAction.place.delimiter": "Las entradas en {target} no pueden contener §; elimínalo para guardar.", "saveAction.place.tooLong": "Este texto ocupa unos {size}, más de lo que admite una entrada en {target} ({limit}); acórtalo.", "saveAction.place.orAgent": " O deja que decida el Agente.", "saveAction.place.full": "{target} ocupa {used} de {limit}. Antes de guardar se liberará espacio: se conservarán unas {keep} de las entradas existentes y el resto saldrá de la memoria de trabajo.", "saveAction.place.fullAll": "{target} ocupa {used} de {limit}. Antes de guardar se liberará espacio: todas las entradas existentes saldrán de la memoria de trabajo.", "saveAction.place.userCondense": "El perfil de usuario ocupa {used} de {limit}. Antes de guardar, un Agente de tareas lo condensará a unos {keep}, sin conservar archivo.", "saveAction.place.userTooLong": "Este texto ocupa unos {size}, más de lo que puede admitir el perfil de usuario tras liberar espacio ({max}); acórtalo.", "saveAction.place.userFull": "El perfil de usuario está lleno y liberar espacio requiere un Agente de tareas; elimina primero entradas en Memoria de ejecución o elige otro destino.", "saveAction.noPlace": "Ningún destino puede aceptar este texto ahora.", "status.title": "Estado del sistema", "status.description": "Cómo funcionan dsh-brain-mnemon, los Proveedores de memoria y cada capa de almacenamiento.", "status.nominal": "Sistema operativo", "status.workflowUnavailable": "Mantenimiento en segundo plano no disponible", "status.workflowIdleReview": "Revisión en inactividad", "status.workflowRuntimeCapacity": "Mantenimiento de capacidad en ejecución", "status.workflowUnsupported": "La Estrategia actual no ejecuta: {workflows}. Activar los ajustes de revisión por sí solo no inicia estas tareas. Selecciona una Estrategia compatible, como la Estrategia por capas, en Sistema de memoria. Las acciones manuales siguen disponibles.", "status.reviewFailed": "Error en la revisión en inactividad", "status.reviewFailedDetail": "Este punto de control no se completó y no se repetirá automáticamente. Las revisiones posteriores respetan el enfriamiento y el límite por sesión.", "status.reviewPartial": "Algunas escrituras se confirmaron. Concilia los recibos a continuación; no se revirtieron.", "status.reviewTeamPaused": "La revisión en inactividad está en pausa por el ajuste de compatibilidad con Agent Teams. Para seguir revisando, selecciona «Revisión con Agente de tareas acotado» en Revisión en inactividad en la página de dsh-brain-mnemon en Plugins. Los ajustes de recuperación y escritura permanecen sin cambios.", "status.reviewConfirmationPaused": "La confirmación de escritura de memoria está activada, por lo que la revisión en inactividad está en pausa. Aún puedes editar la memoria manualmente.", "status.reviewToolAccessPaused": "La herramienta de finalización requerida por la revisión automática no está disponible ahora. Se omitió este punto de control sin consumir un intento. El acceso se volverá a comprobar tras un turno elegible posterior. Revisa las restricciones de herramientas o los ajustes de aprobación de esta sesión.", "status.reviewWatermarkUsage": "Intentos de revisión en la sesión: {attempts} / {max} ({restored} restaurados).", "status.reviewWatermarkNext": "Próxima revisión no antes de las {time}; aún se requiere un nuevo punto de control de conversación elegible.", "status.reviewWatermarkPaused": "Revisión automática en pausa: los límites persistentes no están disponibles.", "status.reviewWatermarkRecovery": "Continúa la conversación para reintentar. Si el error persiste, detén los Hosts que usen esta raíz de almacenamiento antes de inspeccionar el estado o el bloqueo de esta sesión en state/idle-review. Eliminar el estado restablece el límite.", "config.reviewPersistWatermark": "Conservar límites de revisión al reabrir", "config.reviewPersistWatermarkHint": "Conserva los intentos y el tiempo de enfriamiento por raíz de almacenamiento y sesión principal, incluidas las ejecuciones fallidas o canceladas.", "status.reviewRun": "Ejecución de revisión: {id}", "status.reviewContextWindow": "Elige la revisión por punto de control acotado (spawn) o un modelo de Agente de tareas cuya ventana de contexto cubra la conversación principal.", "config.reviewTitle": "Revisión en inactividad", "config.reviewDescription": "Ordena la memoria cuando la conversación está inactiva; la recuperación y las escrituras funcionan de igual modo", "config.reviewEnabled": "Habilitar revisión en inactividad", "config.reviewRuntimeMemory": "Escribir en Memoria de ejecución", "config.reviewRuntimeMemoryHint": "Solo preferencias y reglas que hayas indicado; al desactivarlo, la revisión solo crea Documentos", "config.reviewSilent": "Ejecutar revisiones en inactividad en silencio", "config.reviewSilentHint": "Al desactivarlo, las revisiones automáticas por spawn aparecen en la lista de subagentes de la conversación.", "config.reviewLimits": "Límites de revisión", "config.reviewProvider": "Método de revisión", "config.reviewSpawn": "Punto de control acotado (spawn)", "config.reviewSpawnHint": "El Agente de tareas lee un punto de control acotado", "config.reviewFork": "Contexto principal completo (fork)", "config.reviewForkHint": "El Agente de tareas dispone del contexto principal completo", "config.reviewFallback": "Cuando fork no está disponible (solo antes del inicio)", "config.reviewSkip": "Omitir esta revisión", "config.reviewAgentTeams": "Compatibilidad con Agent Teams", "config.reviewTeamPause": "Pausar revisión", "config.reviewTeamPauseHint": "Omite la revisión mientras Agent Teams está en ejecución", "config.reviewTeamScoped": "Revisión con Agente de tareas acotado", "config.reviewTeamScopedHint": "Un Agente de tareas acotado realiza la revisión, sin herramientas de Teams", "config.review.minIntervalMs": "Intervalo mínimo de revisión (segundos)", "config.review.maxPerSession": "Máximo de intentos por sesión", "config.review.maxContextChars": "Presupuesto de caracteres del punto de control spawn", "config.review.maxTokens": "Límite de tokens de salida del modelo por solicitud", "config.reviewLimitInvalid": "{field} debe estar entre {min} y {max}", "status.checkRequired": "Revisión necesaria", "status.memoryOff": "Memoria sin uso", "status.memoryOffDetail": "Las conversaciones continúan sin memoria.", "status.compositionStale": "El último cambio de componentes no surtió efecto", "status.compositionStaleDetail": "La memoria sigue funcionando con la composición anterior.", "status.strategyFallback": "La estrategia principal seleccionada no está en ejecución", "status.strategyFallbackDetail": "La única estrategia principal disponible compone la memoria por ahora.", "status.reasonNoStrategy": "No hay ninguna estrategia principal en ejecución.", "status.reasonNoSource": "No hay ninguna fuente de memoria en ejecución.", "status.reasonNotComposed": "Los componentes de memoria todavía se están cargando.", "status.reasonSelectedStrategyOff": "La estrategia principal seleccionada no está en ejecución y hay más de una alternativa para componer la memoria.", "status.reasonDependency": "A {component} le falta {requirement}.", "status.reasonConflict": "Algunos componentes están en conflicto.", "status.reasonRejected": "Se rechazó la composición: {detail}", "status.layerOffDetail": "Vuelve a activarla en la configuración", "status.layerStoppedDetail": "Su componente está activado pero no se está ejecutando", "status.layerMemoryOffDetail": "Disponible cuando se ejecute una estrategia principal", "status.rechecking": "Comprobando…", "status.aria": "Estado de ejecución de Mnemon", "status.engine": "Motor de memoria", "status.engineUnavailable": "Mnemon no disponible", "status.versionWaiting": "Esperando versión", "status.pluginChecking": "Comprobando estado del plugin", "status.pluginReady": "Plugin funcionando con normalidad", "status.nativeAria": "Estado de Mnemon Native", "status.nativeCliMissing": "No se encontró Mnemon CLI", "status.providersTitle": "Proveedores de memoria", "status.providersDescription": "Estado de conexión de los Proveedores en ejecución y sus Espacios de memoria.", "status.providersAria": "Estado de los proveedores de memoria", "status.providersEnabled": "{enabled} / {total} habilitados", "status.providersOff": "{count} Proveedores más están desactivados", "status.providerState.disabled": "Desactivado", "status.providerState.idle": "Servicio listo · sin Espacio de memoria activo", "status.providerState.healthy": "Conexión correcta", "status.providerState.unhealthy": "La conexión requiere atención", "status.providerSpaces": "{active} / {total} Espacios de memoria en ejecución", "versions.checkAction": "Versiones", "versions.title": "Comprobar y actualizar versiones", "versions.description": "Revisa tu instalación y actualiza cuando sea necesario. Expande dsh-brain-mnemon para mantener sus subpaquetes.", "versions.missing": "No instalado (opcional)", "versions.restart": "Reinicio necesario", "versions.local": "Versión local", "versions.modeNpmCli": "npm", "versions.hintNpm": "Gestionado por npm. Actualiza aquí o ejecuta mnemon update en la terminal del Host.", "versions.hintNpmMissing": "Se encontró el lanzador de npm, pero npm no está disponible en el Host. Comprueba el entorno de Node.js.", "versions.hintNpmUnmanaged": "El npm actual no administra esta instalación global del CLI. Usa su entorno original de Node.js o migra más abajo.", "versions.hintUnreadable": "Se encontró el CLI, pero no se pudo leer su versión. Comprueba el comando en la terminal del Host o reinstálalo.", "versions.hintStarter": "Se mantiene con dsh-brain-mnemon Starter. Actualiza Starter para usar su combinación de paquetes verificada.", "versions.npmRecommended": "Instalación y mantenimiento con npm", "versions.npmMaintenance": "Mantener el CLI con npm", "versions.npmInstall": "Instalar con npm (recomendado)", "versions.npmMigrate": "Cambiar a npm (recomendado)", "versions.npmRepair": "Comprobar o reparar la instalación de npm", "versions.npmRepairDetail": "Comprueba el estado de instalación arriba. Para reinstalar, ejecuta este comando en la terminal del Host de DSH (Node.js 22+).", "versions.npmUpdateDetail": "Ejecuta este comando en futuras actualizaciones y luego elige «Comprobar de nuevo» para verificar la versión activa.", "versions.npmInstallDetail": "Solo Mnemon Native necesita este CLI independiente. Para usarlo, ejecuta este comando en la terminal del Host de DSH (Node.js 22+).", "versions.npmMigrateDetail": "Para cambiar a npm, ejecuta esto en el Host de DSH (Node.js 22+).", "versions.npmVerify": "Verifica la versión instalada y luego elige «Comprobar de nuevo»:", "versions.npmNextSteps": "Tras la instalación: verifica la versión y la ruta activa", "versions.npmPath": "Coloca el directorio global bin de npm primero en PATH. Si MNEMON_CLI_PATH o mnemon.cliPath está definido, apúntalo al nuevo lanzador. Reinicia DSH tras cambiar su entorno y verifica la ruta del ejecutable arriba.", "versions.installGuide": "Guía de instalación", "versions.copy": "Copiar", "versions.copied": "Copiado", "versions.copyCommand": "Copiar comando: {command}", "versions.copyFailed": "Portapapeles no disponible. Selecciona el comando y cópialo manualmente.", "versions.readOnly": "Esta conexión es de solo lectura. Puedes comprobar versiones y copiar comandos; usa una conexión con acceso de gestión para actualizar aquí.", "versions.packages": "Versiones de subpaquetes ({count})", "versions.packagesOutdated": "{count} actualizaciones disponibles", "versions.packagesDetail": "Expandir para ver opciones de mantenimiento", "versions.packagesHide": "Contraer detalles de paquetes", "versions.packagesHint": "Los paquetes predeterminados se actualizan con Starter. Los paquetes instalados de forma independiente en este Perfil pueden actualizarse por separado. Reinicia DSH después.", "versions.managedStarter": "Mantenido con Starter", "versions.managedProfile": "Gestionado por Perfil", "versions.starterVersion": "Fijado por Starter", "versions.kind.source": "Fuentes", "versions.kind.strategy": "Estrategias", "versions.kind.provider": "Proveedores", "versions.checking": "Comprobando nuevas versiones en repositorios remotos…", "versions.checkingShort": "Comprobando…", "versions.recheck": "Comprobar de nuevo", "versions.failed": "Error en la operación de versión", "versions.timeout": "La comprobación de versiones agotó el tiempo de espera. Comprueba la red e inténtalo de nuevo.", "versions.current": "Actualizado", "versions.available": "Actualización disponible", "versions.unknown": "No se puede verificar", "versions.installed": "Instalada", "versions.latest": "Última", "versions.executable": "Ejecutable", "versions.profileLocation": "Perfil · {name}", "versions.sourceLocation": "Código fuente", "versions.linkSourceLocation": "Código fuente · Perfil {name}", "versions.packageLocation": "Directorio del paquete", "versions.update": "Actualizar", "versions.updating": "Actualizando…", "versions.updated": "{name} actualizado", "versions.alreadyCurrent": "Ya estás en la última versión", "versions.restartRequired": "Reinicia DSH para cargar el nuevo código del plugin dsh-brain-mnemon; en la app de escritorio, ciérrala por completo y vuelve a abrirla.", "versions.pendingInstalledTitle": "dsh-brain-mnemon {version} está instalado", "versions.pendingInstalledDetail": "Este Host sigue ejecutando {running}. Reinicia DSH para cargarlo; en la app de escritorio, ciérrala por completo y vuelve a abrirla.", "versions.pendingPackagesTitle": "{names} actualizados", "versions.pendingPackagesDetail": "Reinicia DSH para cargar la actualización; en la app de escritorio, ciérrala por completo y vuelve a abrirla.", "versions.checkedAt": "Comprobado a las {time}", "versions.latestUnavailable": "La última versión remota no está disponible. Comprueba la red e inténtalo de nuevo.", "versions.modeHomebrew": "Homebrew", "versions.modeGo": "go install", "versions.modeNpm": "Perfil de DSH", "versions.modeLink": "Enlace local", "versions.modeManual": "Manual", "versions.modeMissing": "Faltante", "versions.hintHomebrew": "Gestionado por Homebrew; una versión disponible puede actualizarse aquí de forma segura.", "versions.hintBrewMissing": "Se detectó una instalación de Homebrew, pero el comando brew no está disponible.", "versions.hintGo": "Gestionado por go install; una versión disponible puede actualizarse aquí de forma segura.", "versions.hintDsh": "Gestionado por el Perfil actual de DSH. Las actualizaciones usan el instalador de plugins de DSH; reinicia DSH después.", "versions.hintPnpm": "Gestionado por el Perfil actual de DSH; reinicia DSH después de actualizar.", "versions.hintPnpmMissing": "Se detectó una instalación de Perfil de DSH, pero el Host no encuentra el comando pnpm. Instala pnpm y reinicia DSH para actualizar aquí.", "versions.hintLink": "Esta es una compilación de desarrollo enlazada localmente. Actualiza y compila en el directorio fuente para conservar los cambios locales.", "versions.hintInstall": "Mnemon CLI no está instalado. Solo Mnemon Native lo necesita; para usar Native, instálalo y coloca mnemon en PATH, o define MNEMON_CLI_PATH / mnemon.cliPath.", "versions.hintManual": "No se puede identificar el origen de instalación de forma segura. Actualízalo con el método de instalación original.", "status.activeRatio": "{active} / {total} activos", "status.runtimeRatio": "{user} usuario · {memory} proyecto", "status.runtimeBytes": "{bytes} usados", "status.runtimeWaiting": "Esperando", "status.runtimeWaitingDetail": "Esperando el inventario de almacenamiento del Host", "status.directoryUnsynced": "Directorio sin sincronizar", "status.activeMemories": "{count} memorias activas", "status.documentsWaiting": "Esperando espacio de trabajo", "status.documentsSession": "Disponible tras vincular una sesión activa", "status.documentRatio": "{active} activos · {archived} archivados", "status.documentUsage": "{used} / {limit} capacidad activa", "status.storageDomains": "Dominios de almacenamiento", "status.storageDomainsText": "Dónde se guardan la memoria de ejecución, los Espacios de memoria y los Documentos del proyecto.", "status.storageGlobal": "Global", "status.storageWorkspace": "Espacio de trabajo", "status.storageWorkspaces": "Espacios de trabajo centralizados", "status.storageCustom": "Personalizado", "status.storageWaiting": "Leyendo directorios de dominios de almacenamiento…", "status.storageCustomUnset": "No hay ningún directorio personalizado configurado. Esta vista solo muestra una raíz personalizada ya configurada y activa en DSH.", "status.storageWorkspaceUnavailable": "La sesión actual no tiene un directorio de espacio de trabajo disponible.", "status.storageActiveRoot": "Raíz de lectura/escritura actual", "status.storageAvailable": "Directorio disponible", "status.storageNotCreated": "Directorio no creado", "status.storageRuntime": "Memoria de ejecución", "status.storageSpaces": "Espacios de memoria", "status.storageDocuments": "Documentos del proyecto", "status.storageState": "Estado en segundo plano", "status.storageReady": "Listo", "status.storageEmpty": "Vacío", "status.storageMissing": "No creado", "status.storageInvalid": "Requiere reparación", "status.storageItems": "elementos", "status.storageRuntimeDetail": "USER {user} · MEMORY {memory}", "status.storageSpacesDetail": "{active} activos · {databases} bases de datos", "status.storageDocumentsDetail": "{active} activos · {archived} archivados", "status.storageStateReady": "Los registros de revisión están persistidos", "status.storageStateVolatile": "El estado de revisión pertenece actualmente al proceso del Host", "status.storageFootnote": "Cambia el ámbito de almacenamiento en Configurar; los datos existentes permanecen en su lugar.", "config.aria": "Configuración del sistema de memoria", "plugin.openWorkspace": "Abrir", "config.interfaceTitle": "Interfaz", "config.unsaved": "Cambios sin guardar", "config.ready": "Guardado y aplicado en vivo", "config.displayTitle": "Sistema de memoria se abre en", "config.displaySidebar": "Barra lateral", "config.displaySidebarHint": "Una página independiente que puede mostrar otros espacios de trabajo", "config.displayBuiltin": "Pestaña de conversación", "config.displayBuiltinHint": "Se abre dentro de la conversación actual", "config.storageTitle": "Almacenamiento", "storage.usedBy": "Usado por", "storage.usedByTitle": "«{component}» guarda sus datos aquí", "storage.userProfileByWorkspace": "Cada espacio de trabajo tiene su propio perfil de usuario.", "storage.userProfileShared": "Todos los espacios de trabajo comparten un perfil de usuario. La memoria de trabajo permanece separada.", "storage.runtimeSettings": "Ajustes de Memoria de ejecución", "storage.default": "Predeterminado", "storage.directoryExample": "Por ejemplo, ~/Documents/mnemon", "storage.thisWorkspace": "Este espacio de trabajo", "storage.moveNote": "La memoria pasa a la nueva ubicación; los datos existentes permanecen donde están", "storage.chooseDirectory": "Elegir directorio", "storage.pickFailed": "No se pudo abrir el selector de directorios. Inténtalo de nuevo o escribe una ruta.", "config.scopeTitle": "Ámbito de almacenamiento", "config.global": "Global", "config.workspace": "Espacio de trabajo", "config.workspaces": "Centralizado · aislado por espacio de trabajo", "config.workspacesHint": "Una raíz con un subdirectorio por espacio de trabajo, según su ruta", "config.custom": "Personalizado", "config.globalScopeHint": "Todos los espacios de trabajo comparten un mismo directorio", "config.workspaceScopeHint": "Cada espacio de trabajo mantiene su propio directorio .mnemon", "config.dataDirectory": "Directorio de datos", "config.runtimeSectionScope": "Ámbito y recuperación", "config.runtimeDeferred": "Leer memoria de baja prioridad bajo demanda", "config.runtimeDeferredHint": "Omite en los prompts las entradas de baja prioridad no fijadas; los modelos las consultan bajo demanda.", "config.runtimeBm25Recall": "Buscar en memoria de trabajo bajo demanda (experimental)", "config.runtimeBm25RecallLabel": "Buscar en memoria de trabajo bajo demanda", "config.runtimeBm25RecallHint": "Ajusta las memorias de trabajo y los títulos de Documentos a cada turno; el perfil de usuario y los elementos fijados siguen visibles.", "config.runtimeIndexPush": "Enviar índices de Espacios de memoria y Documentos (experimental)", "config.runtimeIndexPushLabel": "Enviar índices de Espacios de memoria y Documentos", "config.runtimeIndexPushHint": "Coincide descripciones de Espacios de memoria y resúmenes de Documentos en el paso 1; solo envía índices compactos, nunca textos completos.", "config.runtimeUserScopeTitle": "Ámbito del perfil de usuario", "config.runtimeInheritance": "Compartir automáticamente Memoria de ejecución con subagentes", "config.runtimeInheritanceHint": "Los nuevos subagentes heredan el perfil de usuario y la memoria de trabajo; las tareas en ejecución conservan su contexto.", "config.runtimeUserScopeStorage": "Seguir ámbito de almacenamiento", "config.runtimeUserScopeStorageHint": "Se guarda junto a MEMORY.md", "config.runtimeUserScopeGlobal": "Compartido globalmente", "config.runtimeUserScopeGlobalHint": "Compartido por todos los espacios de trabajo; MEMORY.md sigue el ámbito de almacenamiento", "config.runtimeSnapshotRefreshTitle": "Actualización de instantánea", "config.runtimeSnapshotRefreshOnChange": "Actualizar al cambiar", "config.runtimeSnapshotRefreshOnChangeHint": "Proyecta la memoria de ejecución actualizada en sesiones abiertas en el siguiente turno", "config.runtimeSnapshotRefreshSessionStart": "Congelar al inicio de sesión", "config.runtimeSnapshotRefreshSessionStartHint": "Mantiene fija la instantánea inicial en sesiones abiertas para estabilizar la caché; las nuevas sesiones y las herramientas de recuperación leen la memoria actual", "config.componentScopeStorage": "Seguir ámbito de almacenamiento", "config.componentScopeGlobal": "Compartido globalmente", "config.componentScopeSwitchHint": "Cambiar el ámbito modifica dónde se leen y escriben los datos. Los datos existentes permanecen en su directorio original; vuelve a cambiar para verlos. Las exportaciones Pack y la sincronización con Git solo cubren la raíz de almacenamiento actual.", "config.documentsScopeSection": "Ámbito de almacenamiento", "config.documentsScopeTitle": "Ámbito de Documentos del proyecto", "config.documentsScopeStorageHint": "Se guarda en la raíz de almacenamiento seleccionada junto a MEMORY.md", "config.documentsScopeGlobalHint": "Compartido por todos los espacios de trabajo en la raíz global; MEMORY.md sigue el ámbito de almacenamiento", "config.memorySpacesScopeTitle": "Ámbito de Espacios de memoria", "config.memorySpacesScopeStorageHint": "Se guarda en la raíz de almacenamiento seleccionada junto a MEMORY.md", "config.memorySpacesScopeGlobalHint": "Compartido por todos los espacios de trabajo junto con sus conexiones de Proveedor en la raíz global; MEMORY.md sigue el ámbito de almacenamiento", "config.runtimeLimitsTitle": "Límites de capacidad", "config.runtimeLimitsHint": "Valores predeterminados: {user} KiB de perfil de usuario, {memory} KiB de memoria de trabajo.", "config.runtime.userLimitBytes": "Límite del perfil de usuario (bytes)", "config.runtime.memoryLimitBytes": "Límite de memoria de trabajo (bytes)", "config.runtimeLimitsApply": "Se aplica en vivo; reducir un límite no elimina entradas existentes", "config.runtimeLimitInvalid": "Establece {field} en un número entero entre 1 y {max}.", "config.runtimeAdvanced": "Límites de mantenimiento", "config.runtimeMaintenanceHint": "Tope de salida por ejecución para migración y compactación (predeterminado: {defaultTokens} tokens).", "config.runtime.maintenanceMaxTokens": "Límite de tokens de salida de mantenimiento", "config.runtimeMaintenanceInvalid": "{field} debe estar entre {min} y {max}", "config.documentsLimitsTitle": "Capacidad activa", "config.documentsLimitsHint": "Tope total para Documentos activos (predeterminado {defaultMiB} MiB, máx. {maxMiB} MiB).", "config.documents.limitBytes": "Límite de documentos activos (bytes)", "config.documentsLimitsApply": "Se aplica en vivo; reducir el límite no elimina documentos existentes", "config.documentsLimitInvalid": "Establece {field} en un número entero entre 1 y {max}.", "config.enhancementsRefreshFailed": "Se actualizó el ajuste, pero no se pudo actualizar su estado. Vuelve a abrir esta página.", "config.strategyTitle": "Estrategia principal", "config.strategyFailed": "No se pudo cambiar la estrategia principal. Se mantiene la selección anterior; inténtalo de nuevo.", "config.appliesNow": "Se aplica de inmediato", "config.quoted": "«{name}»", "config.listSeparator": ", ", "config.sentenceGap": " ", "config.enableStrategy": "Activar «{strategy}»", "config.useStrategy": "Usar «{strategy}»", "config.stopStrategies": "Desactivar {strategies}", "config.enableComponentNamed": "Activar «{component}»", "board.title": "Composición de memoria", "board.description": "La memoria de cada turno se compone a partir de estos componentes", "board.loading": "Leyendo la composición de memoria…", "board.componentsUnavailable": "No se pueden leer los componentes de memoria en este momento; aquí solo se pueden activar o desactivar capas de memoria.", "board.sources": "Fuentes de memoria", "board.enhancements": "Mejoras", "board.running": "En ejecución", "board.off": "Desactivado", "board.notRunning": "Sin ejecución", "board.needs": "Requiere «{component}»", "board.needsMissing": "Requiere un componente no instalado", "board.unused": "No utilizada por esta estrategia", "board.strategyMissing": "La estrategia principal seleccionada no está instalada.", "board.turningOn": "Activando…", "board.turningOff": "Desactivando…", "board.noMainMissing": "Memoria sin uso: la estrategia principal seleccionada no está instalada", "board.noMainOff": "Memoria sin uso: la estrategia principal «{strategy}» está desactivada", "board.noMainWaiting": "Memoria sin uso: «{strategy}» está activada pero aún no se ejecuta", "board.contenders": "Memoria sin uso: «{strategy}» no está en ejecución y {strategies} no pueden sustituirla a la vez", "board.fallback": "«{selected}» no está en ejecución; «{composing}» compone la memoria por ahora", "board.fallbackMissing": "La estrategia principal seleccionada no está instalada; «{composing}» compone la memoria por ahora", "board.noSource": "Memoria sin uso: no hay ninguna fuente de memoria en ejecución", "board.memoryOff": "Memoria sin uso: no se puede servir esta composición", "board.stale": "El último cambio no surtió efecto; la memoria sigue funcionando con la composición anterior", "board.idle": "También en ejecución, sin componer nada: {strategies}", "board.switching": "Cambiando…", "board.composing": "Componiendo memoria", "board.lastSource": "En ejecución · única fuente", "board.enabledCount": "{on} de {total} activos", "board.experimental": "Experimental", "board.search": "Buscar componentes", "board.searchEmpty": "Ningún componente coincide con «{query}».", "details.open": "Detalles de «{component}»", "details.shipped": "Incluido", "details.installed": "Extensión instalada", "details.relations": "Relaciones", "details.needs": "Requiere", "details.needsAny": "Requiere uno de", "details.needsMissing": "Ningún componente instalado ofrece {capability}", "details.neededBy": "Requerido por", "details.conflicts": "No puede ejecutarse junto a", "details.options": "Opciones", "details.effectOn": "Al activar también se activa: {names}", "details.effectOnReplace": "Al activar se desactiva: {names}", "details.effectOnMixed": "Al activar también se activa: {on}; se desactiva: {off}", "details.effectOff": "Al desactivar también se desactiva: {names}", "details.effectLast": "Única fuente en ejecución; permanece activa", "details.currentMain": "Estrategia principal actual", "details.useMain": "Usar como estrategia principal", "details.back": "Volver a «{component}»", "config.strategyWorkflowNote": "Solo se ejecuta cuando la estrategia principal lo admite (como Estrategia por capas); los ajustes se conservan.", "threeTier.offNote": "Este plugin está deshabilitado. Las tareas en segundo plano también requieren una Estrategia principal compatible.", "board.otherEnhancements": "Mejoras para otras estrategias principales ({count})", "board.more": "Añade más componentes desde la lista de Plugins", "board.relationNeeds": "Requiere «{component}»", "board.relationNeededBy": "«{component}» depende de esto", "options.aria": "Opciones de «{component}»", "options.emptySourcesTitle": "No hay fuentes de memoria seleccionadas", "options.emptySourcesConfirm": "No hay fuentes de memoria seleccionadas. Al guardar se desactiva el acceso del Agente a la memoria de ejecución, los documentos y los espacios de memoria. Para restaurar la selección automática, cancela y restablece esta opción a su valor predeterminado. ¿Guardar una selección vacía?", "options.apply": "Aplicar", "options.fix": "Corrige primero las opciones marcadas", "options.applying": "Aplicando…", "options.default": "Predeterminado", "options.reset": "Restablecer predeterminado", "options.integer": "Introduce un número entero", "options.between": "Introduce un número entero entre {min} y {max}", "options.atLeast": "Introduce un número entero de al menos {min}", "options.atMost": "Introduce un número entero de como máximo {max}", "options.tooLong": "Como máximo {max} caracteres", "options.listLimit": "Hasta {count} elementos únicos de como máximo {length} caracteres cada uno", "options.listHint": "Un elemento por línea.", "options.noSources": "No hay ninguna fuente de memoria disponible ahora.", "options.sourceUnavailable": "{source} (no disponible ahora)", "feedback.memoryOff": "Memoria sin uso: no hay ninguna estrategia principal en ejecución", "feedback.memoryRestored": "Memoria restablecida, compuesta por «{strategy}»", "feedback.fallback": "«{selected}» está desactivada; «{composing}» compone la memoria por ahora", "feedback.fallbackMissing": "La estrategia principal seleccionada no está instalada; «{composing}» compone la memoria por ahora", "feedback.switchedMain": "Se cambió a «{strategy}»", "feedback.switchedMainOff": "Se cambió a «{strategy}» y se desactivó {others}", "feedback.switchedMainWith": "Se cambió a «{strategy}» y se activó {others}, que necesita", "feedback.switchedMainMixed": "Se cambió a «{strategy}»: se activó {on} y se desactivó {off}", "feedback.externalMain": "La estrategia principal ahora es «{strategy}»", "feedback.idleMain": "«{component}» también está en ejecución, pero no compone nada", "feedback.sourceOn": "Se activó «{component}»; su capa vuelve a leer y escribir", "feedback.sourceOff": "Se desactivó «{component}»; su capa deja de leer y escribir", "feedback.componentOn": "Se activó «{component}»", "feedback.componentOff": "Se desactivó «{component}»", "feedback.externalSourceOn": "Se activó «{component}»; su capa vuelve a leer y escribir", "feedback.externalSourceOff": "Se desactivó «{component}»; su capa deja de leer y escribir", "feedback.externalComponentOn": "Se activó «{component}»", "feedback.externalComponentOff": "Se desactivó «{component}»", "feedback.several": "Se actualizaron {count} componentes", "feedback.enabledWith": "Se activó «{component}» y {others}, que necesita", "feedback.disabledWith": "Se desactivó «{component}» y {others}, que dependía de él", "feedback.enabledReplacing": "Se activó «{component}» y se desactivó {others}, que no puede ejecutarse junto a él", "feedback.enabledMixed": "Se activó «{component}»: también se activó {on} y se desactivó {off}", "feedback.optionsSaved": "Se actualizaron las opciones de «{component}»", "feedback.externalOptions": "Cambiaron las opciones de «{component}»", "feedback.externalSeveral": "Cambiaron {count} componentes", "feedback.undo": "Deshacer", "feedback.undone": "Deshecho; volvieron los ajustes anteriores", "feedback.show": "Mostrar", "feedback.retry": "Reintentar", "feedback.failed": "No se pudo aplicar el cambio; se mantienen los ajustes anteriores.", "feedback.layerResumed": "«{layer}» vuelve a estar en ejecución", "config.componentListNote": "En la lista de componentes de abajo, dsh-brain-mnemon/bundle es la entrada de agrupación de Starter; se muestra desactivada sin afectar a nada.", "layers.disabledBadge": "Desactivada", "layers.disabledTitle": "{layer} está desactivada", "layers.disabledDescription": "Esta capa de memoria no participa en el procesamiento de memoria.", "layers.disabledText": "Los datos existentes se conservan; vuelve a activarla en la configuración para reanudar.", "layers.stoppedBadge": "Sin ejecución", "layers.stoppedTitle": "{layer} no está en ejecución", "layers.stoppedDescription": "El componente de esta capa está activado pero no se está ejecutando.", "layers.stoppedText": "Los datos existentes se conservan; se reanuda en cuanto el componente entre en ejecución.", "layers.memoryOffBadge": "Sin uso", "layers.memoryOffTitle": "{layer} no está en uso", "layers.memoryOffDescription": "La memoria no está en uso, por lo que esta capa no está disponible.", "layers.memoryOffText": "Los datos existentes se conservan; restablece una estrategia principal en la configuración para reanudar.", "config.nativeName": "Mnemon Native", "config.backgroundTitle": "Tareas en segundo plano", "config.backgroundDescription": "La captura, el archivado y la revisión se ejecutan en segundo plano cuando la estrategia principal lo admite.", "config.memoryWriting": "Escrituras de memoria", "config.confirmWrites": "Confirmar escrituras de herramientas de memoria", "config.confirmWritesHint": "Pide confirmación mediante DSH antes de que los modelos añadan, editen o eliminen memoria con herramientas.", "config.confirmWritesBadge": "Pausa la revisión en inactividad", "config.taskAgentSectionTitle": "Agente de tareas", "config.taskAgentSectionDescription": "Impulsa el mantenimiento en segundo plano, Guardar en memoria, el enrutamiento de espacios y la revisión de sincronización.", "config.taskAgentTitle": "Modelo del Agente de tareas", "config.taskAgentInherit": "Seguir global", "config.taskAgentInheritHint": "Seguir el modelo de nuevas sesiones", "config.taskAgentConversation": "Seguir la conversación", "config.taskAgentConversationHint": "Seguir el modelo usado en la conversación actual", "config.taskAgentFixed": "Personalizado", "config.taskAgentFixedHint": "Elegir un modelo", "config.taskAgentProvider": "Proveedor de modelos", "config.taskAgentModel": "Modelo", "config.taskAgentImageInput": "Entrada de imágenes", "config.taskAgentEffective": "Usará actualmente", "config.taskAgentSource.fixed": "Personalizado", "config.taskAgentSource.session": "Conversación actual", "config.taskAgentSource.dsh-default": "Modelo de nueva sesión", "config.taskAgentSource.active-agent": "Una conversación abierta", "config.taskAgentLoading": "Cargando directorio de modelos", "config.taskAgentUnavailable": "No hay ninguna ruta de Proveedor / Modelo disponible actualmente", "config.taskAgentLoadFailed": "No se pudo cargar el directorio de modelos: {error}", "config.taskAgentPartial": "No se pudieron leer {count} proveedores; las demás opciones siguen disponibles.", "config.taskAgentRetry": "Leer de nuevo", "config.customAbsolute": "Usa una ruta absoluta o una que empiece por ~/", "config.saveFailed": "Error al guardar: {error}", "config.readOnly": "Los ajustes del plugin son de solo lectura en esta implementación.", "config.remoteReadOnly": "Los ajustes del plugin son de solo lectura en acceso remoto: establece remoteAccess: trusted-host en la configuración del perfil de mnemon y reinicia DSH para modificarlos aquí.", "config.unavailable": "No se pudieron cargar los ajustes del Sistema de memoria. Comprueba si el Host concede el RPC de configuración a esta implementación Web.", "config.discard": "Descartar", "config.interactionTurnBar": "Barra de memoria del turno", "config.interactionTurnBarHint": "Muestra la recuperación y las escrituras de cada turno debajo de la respuesta", "config.interactionSaveAction": "Acción Guardar en memoria", "config.interactionSaveActionHint": "Guarda una respuesta manualmente; se escribirá donde elijas tras confirmar", "config.packTitle": "Respaldo y migración", "config.packUnavailable": "Este Host de DSH no ofrece el canal de respaldo ZIP de Mnemon.", "config.packExporting": "Exportando…", "config.packInspecting": "Inspeccionando…", "config.packImporting": "Importando…", "config.packExported": "Exportado {file} ({size}).", "config.packFailed": "Error en la operación ZIP: {error}", "config.packSimpleDescription": "Un ZIP de los componentes anteriores, sin proveedores de terceros ni credenciales", "config.packImportZip": "Importar ZIP", "config.packExportZip": "Exportar ZIP", "config.packChooseZip": "Elegir un ZIP de respaldo de Mnemon", "config.packUnnamedZip": "Respaldo de Mnemon.zip", "config.packZipReady": "Verificado · {components} componentes · {items} elementos · {size}", "config.packImportZipAction": "Importación segura", "config.packImportedWhole": "Se combinó el ZIP de forma segura en {root}.", "config.syncTitle": "Sincronización con Git", "config.syncSimpleDescription": "Sincroniza los componentes anteriores con un repositorio Git, sin proveedores de terceros ni credenciales", "config.syncLoading": "Leyendo estado de sincronización…", "config.syncUnavailable": "Este Host de DSH no ofrece el canal de sincronización de repositorios de Mnemon.", "config.syncUnavailableReason": "No se pudo leer el estado de sincronización: {error}", "config.syncGitMissing": "La sincronización requiere Git {required} o superior", "config.syncRecheck": "Comprobar de nuevo", "config.syncFixCredentials": "Configurar credenciales", "config.syncRepository": "Repositorio", "config.syncRepositoryHint": "Elige el repositorio Git que conserva tu memoria", "config.syncChange": "Cambiar", "config.syncDisconnect": "Desconectar", "config.syncDisconnectTitle": "¿Desconectar este repositorio?", "config.syncDisconnectBody": "La memoria dejará de sincronizarse con {repository} y la sincronización automática se desactivará. No se elimina nada aquí ni en el repositorio; el token de acceso guardado sí se eliminará.", "config.syncDisconnected": "Repositorio desconectado.", "config.syncStateChecking": "Comprobando repositorio…", "config.syncStateConnected": "Conectado", "config.syncStateNewBranch": "Conectado · la primera sincronización crea la rama {branch}", "config.syncNoCredential": "subir cambios requiere iniciar sesión en GitHub o un token de acceso", "config.syncNoCredentialToken": "subir cambios requiere un token de acceso", "config.syncIssueAuthHttps": "Requiere credenciales; inicia sesión con GitHub o añade un token de acceso", "config.syncIssueAuthToken": "Requiere credenciales; añade un token de acceso", "config.syncIssueRejectedGitHub": "GitHub rechazó el inicio de sesión; vuelve a iniciar sesión o comprueba su acceso a este repositorio", "config.syncIssueRejectedGitHubToken": "GitHub rechazó el token de acceso guardado; reemplázalo", "config.syncIssueRejectedGitHubEnvironment": "GitHub rechazó el token en {env}; reemplázalo", "config.syncIssueRejected": "El host rechazó el token guardado; reemplázalo o indica en la dirección el usuario que espera", "config.syncIssueRejectedEnvironment": "El host rechazó el token en {env}; reemplázalo", "config.syncIssueAuthSsh": "Error de autenticación SSH; comprueba la clave SSH de este equipo", "config.syncIssueAuth": "Se denegó el acceso a este repositorio", "config.syncIssueNotFound": "Repositorio no encontrado; comprueba la dirección y tus permisos de acceso", "config.syncIssueNotFoundGitHub": "Repositorio no encontrado; comprueba la dirección, ya que un repositorio privado requiere inicio de sesión o token", "config.syncIssueNetwork": "No se puede conectar con el repositorio; comprueba la red o el proxy", "config.syncIssueTimeout": "El repositorio no respondió a tiempo", "config.syncIssueUnknown": "No se puede leer el repositorio: {error}", "config.syncViaGitHub": "vía GitHub @{login}", "config.syncViaGitHubAnonymous": "vía inicio de sesión en GitHub", "config.syncViaToken": "con un token de acceso", "config.syncViaEnvironment": "con la variable de entorno {env}", "config.syncViaSsh": "con una clave SSH", "config.syncConnectWith": "Conectar con", "config.syncModeGitHub": "Cuenta de GitHub", "config.syncModeAddress": "Dirección del repositorio", "config.syncRepoUrl": "Dirección del repositorio", "config.syncRepoUrlPlaceholder": "https://…, git@host:ruta o una ruta local absoluta", "config.syncRepoUrlInvalid": "Usa una URL https:// o ssh://, git@host:ruta o una ruta local absoluta", "config.syncRepoUrlCredentials": "Solo se permite un nombre de usuario en la dirección; introduce el token en Token de acceso", "config.syncToken": "Token de acceso", "config.syncTokenOptional": "Opcional", "config.syncTokenSaved": "Guardado; escribe uno nuevo para reemplazarlo", "config.syncTokenEnvironment": "Usando la variable de entorno {env}", "config.syncTokenHint": "Solo una dirección HTTPS necesita token; se conserva únicamente en este equipo", "config.syncTokenRemove": "Quitar", "config.syncTokenRemoved": "Se quitó el token de acceso.", "config.syncConnect": "Conectar", "config.syncConnecting": "Conectando…", "config.syncSave": "Guardar", "config.syncSaving": "Guardando…", "config.syncGitHubHint": "Inicia sesión para elegir o crear un repositorio; la autorización se guarda solo en este equipo", "config.syncGitHubReadOnly": "El almacén de credenciales es de solo lectura, por lo que no se puede guardar el inicio de sesión", "config.syncGitHubSignIn": "Iniciar sesión con GitHub", "config.syncGitHubStarting": "Solicitando código de dispositivo…", "config.syncGitHubCode": "Introduce este código de dispositivo en GitHub:", "config.syncGitHubCopyOpen": "Copiar y abrir GitHub", "config.syncGitHubCopied": "Copiado; pégalo en la página abierta y el proceso continuará automáticamente", "config.syncGitHubOpenBlocked": "El navegador no abrió una página nueva; visita {url} manualmente", "config.syncGitHubWaiting": "Esperando autorización… esto continúa automáticamente", "config.syncGitHubSignedIn": "Sesión iniciada como @{login}", "config.syncGitHubSignOut": "Cerrar sesión", "config.syncGitHubFailed": "Error al iniciar sesión en GitHub: {error}", "config.syncGitHubExpired": "El código de dispositivo expiró; inicia sesión de nuevo", "config.syncGitHubDenied": "Se denegó la autorización", "config.syncGitHubExpiredGrant": "La autorización de GitHub ya no es válida; vuelve a iniciar sesión", "config.syncGitHubSignInAgain": "Iniciar sesión de nuevo", "config.syncRepositoryLabel": "Repositorio", "config.syncRepositorySearch": "Buscar repositorios o escribir un nombre nuevo", "config.syncRepositoriesLoading": "Leyendo repositorios…", "config.syncRepositoriesFailed": "No se pudieron leer los repositorios: {error}", "config.syncRepositoriesRetry": "Reintentar", "config.syncRepositoriesNone": "Esta cuenta aún no tiene repositorios; escribe un nombre para crear uno", "config.syncRepositoriesEmpty": "Ningún repositorio coincide", "config.syncRepositoriesMore": "{count} repositorios más; escribe para filtrar la lista", "config.syncRepositoryPrivate": "Privado", "config.syncRepositoryPublic": "Público", "config.syncRepositoryNoPush": "Sin permiso de escritura", "config.syncRepositoryCurrent": "Actual", "config.syncRepositoryCreate": "Crear el repositorio privado {name}", "config.syncRepositoryCreating": "Creando…", "config.syncRepositoryNameInvalid": "El nombre de repositorio solo admite letras, dígitos, puntos, guiones y guiones bajos", "config.syncPublicTitle": "¿Usar un repositorio público?", "config.syncPublicBody": "{name} es público: cualquiera podrá leer la memoria sincronizada en él.", "config.syncPublicConfirm": "Usar de todos modos", "config.syncRowTitle": "Sincronización", "config.syncNever": "La sincronización combina aquí la memoria del repositorio y luego sube la de este equipo", "config.syncLast": "Última sincronización: {time}", "config.syncLastMerge": "Última combinación: {time}", "config.syncCheck": "Comprobar remoto", "config.syncNow": "Sincronizar ahora", "config.syncNowRunning": "Sincronizando…", "config.syncDone": "Sincronizado; se subió {commit}.", "config.runtimeMergeArchived": "Se conservaron localmente {count} memorias excedentes en runtime/archived/import-overflow y quedaron fuera de la memoria de trabajo.", "config.syncDoneMerged": "Sincronizado: se combinaron {count} memorias remotas y se subió {commit}.", "config.syncUpToDate": "Al día; el repositorio coincide con este equipo.", "config.syncUpToDateMerged": "Se combinaron {count} memorias remotas; el repositorio está al día.", "config.syncPushFailed": "Confirmado localmente, pero no se completó la subida: {reason}", "config.syncFailed": "Error de sincronización: {error}", "config.syncReasonBusy": "Ya hay otra sincronización en curso; inténtalo en breve", "config.syncReasonNoRepository": "No hay ningún repositorio conectado", "config.syncReasonGitMissing": "Git no está disponible en este equipo", "config.syncReasonRemoteEmpty": "El repositorio aún no tiene ningún respaldo; sincroniza una vez primero", "config.syncReasonRejected": "Otro dispositivo actualizó el repositorio durante la sincronización; sincroniza de nuevo", "config.syncAuto": "Sincronización automática", "config.syncAutoOff": "Desactivada", "config.syncAutoHour": "Cada hora", "config.syncAutoHours": "Cada {hours} horas", "config.syncAutoDay": "Cada día", "config.syncAutoDays": "Cada {days} días", "config.syncAutoHintOff": "Solo sincroniza cuando pulsas «Sincronizar ahora»", "config.syncAutoHintOn": "Sincroniza en segundo plano con este intervalo, igual que «Sincronizar ahora»", "config.syncAutoNext": "Próxima a las {time}", "config.syncAutoLast": "Última a las {time}", "config.syncAutoFailed": "Falló la última sincronización automática: {error}", "config.syncHistory": "Historial de respaldos", "config.syncHistoryHint": "Cada sincronización deja una versión en el repositorio", "config.syncHistoryView": "Ver", "config.syncHistoryLoading": "Leyendo…", "config.syncHistoryEmpty": "El repositorio aún no tiene ningún respaldo.", "config.syncHistoryMore": "Cargar versiones anteriores", "config.syncHistoryCapped": "Aquí solo se muestran las últimas {count} versiones", "config.syncHistoryFrom": "de {machine}", "config.syncHistoryUnknownMachine": "un equipo sin nombre", "config.syncComponentRuntime": "Memoria de ejecución", "config.syncComponentDocuments": "Documentos del proyecto", "config.syncComponentSpaces": "Espacios de memoria", "config.syncCountRuntime": "{count} memorias de ejecución", "config.syncCountDocuments": "{count} documentos", "config.syncCountSpaces": "{count} espacios de memoria", "config.syncCompareTitle": "Comparar con el remoto", "config.syncCompareLoading": "Leyendo el remoto…", "config.syncCompareRemote": "La versión remota es de {machine} · {time}", "config.syncCompareSame": "Igual", "config.syncCompareDiffers": "Difiere", "config.syncCompareRuntime": "{remote} solo en remoto · {local} solo aquí", "config.syncCompareConflicts": "{count} redactadas de forma distinta", "config.syncCompareAllSame": "Este equipo y el remoto coinciden; no hay nada que sincronizar.", "config.syncCompareTruncated": "Existen más diferencias de las que muestran estos conteos.", "config.syncCompareRemovals": "El remoto registró {count} eliminaciones; una sincronización las aplicará aquí.", "config.syncCompareConflictNote": "{count} temas están redactados de forma distinta: la sincronización conserva ambas versiones y la Conciliación de memoria puede fusionarlas después.", "config.syncCompareShowConflicts": "Mostrar", "config.syncCompareGoReview": "Ir a Conciliación de memoria", "config.syncCompareHeldBack": "{count} memorias remotas se eliminaron aquí anteriormente; la sincronización las mantendrá fuera.", "config.syncCompareRevive": "Recuperarlas", "config.syncCompareReviving": "Recuperando…", "config.syncCompareRevived": "Se recuperaron {count} memorias.", "config.syncDiffHere": "Aquí", "config.syncDiffThere": "Remoto", "config.syncMergeOnly": "Solo combinar aquí", "config.syncMerging": "Combinando…", "config.syncMerged": "Se combinó el remoto {commit}.", "config.syncMergedCount": "Se combinaron {count} memorias remotas.", "config.syncAdvanced": "Avanzado", "config.syncBranch": "Rama", "config.syncSubdir": "Directorio en el repositorio", "config.syncDefaultValue": "Predeterminado {value}", "config.syncBranchInvalid": "No es un nombre de rama válido", "config.syncSubdirInvalid": "Usa un directorio relativo dentro del repositorio", "config.syncAuthor": "Autor del commit", "config.syncAuthorDefault": "Predeterminado", "config.syncAuthorMachine": "Git de este equipo", "config.syncAuthorCustom": "Personalizado", "config.syncAuthorDefaultNote": "Usa la identidad Git de este equipo; recurre a {identity} si no está configurada", "config.syncAuthorMachineNote": "Usa la identidad Git de este equipo o, en su defecto, la predeterminada", "config.syncAuthorName": "Nombre", "config.syncAuthorEmail": "Correo electrónico", "config.syncAuthorEmailInvalid": "No es una dirección de correo válida", "config.syncAdvancedNote": "Al guardar, la próxima sincronización escribirá en la nueva rama o directorio", "config.syncMachineName": "Nombre de este equipo", "config.syncMachineHostname": "Nombre de host", "config.syncMachineCustom": "Personalizado", "config.syncMachineNameLabel": "Nombre", "config.syncMachineHostnameNote": "Usa el nombre de host; el historial de respaldos muestra «de {name}»", "config.syncMachineCustomNote": "El historial de respaldos muestra «de {name}»", "config.syncMachineNameInvalid": "Hasta 120 caracteres en una sola línea", "config.syncMachineRenameNote": "Al guardar, las sincronizaciones posteriores usarán el nuevo nombre; las versiones anteriores conservan el suyo", "config.syncAdvancedSaved": "Ajustes avanzados guardados.", "config.reconcileTitle": "Conciliación de memoria", "config.reconcileDescription": "Un modelo lee la memoria combinada y propone cambios; no se escribe nada hasta que lo revises", "review.reconcile": "Conciliar", "review.reconciling": "Conciliando…", "review.refresh": "Actualizar", "review.empty": "Nada por revisar", "review.pending": "{count} pendientes de revisión", "review.failed": "Error al leer el registro de revisiones: {error}", "review.planned": "Se prepararon {operations} propuestas; no se escribirá nada hasta que las aceptes.", "review.none": "El modelo no encontró nada que cambiar en la memoria combinada.", "review.statusPending": "Pendiente", "review.statusAccepted": "Aceptada", "review.statusRejected": "Rechazada", "review.expand": "Abrir", "review.collapse": "Cerrar", "review.accept": "Aceptar", "review.reject": "Rechazar", "review.apply": "Aplicar", "review.applying": "Aplicando…", "review.reopen": "Reabrir", "review.applied": "Se aplicaron {count} cambios.", "review.appliedAt": "Aplicado a las {time}", "review.appliedCount": "Se ejecutaron {count} de {total} operaciones", "review.applyFailed": "Error al aplicar: {error}", "review.meta": "{count} cambios · de {machine} · {time}", "review.foreign": "Afecta memoria de: {machines}", "review.opinions": "Opiniones", "review.noOpinions": "Aún sin opiniones", "review.authorUser": "Tú", "review.authorAgent": "Modelo", "review.opinionPlaceholder": "Deja una opinión para la próxima conciliación", "review.opinionSend": "Añadir opinión", "review.opinionAdded": "Tu opinión se registró.", "review.opAdd": "Añadir memoria de {target}: {content}", "review.opReplace": "Reescribir memoria de {target}: «{from}» pasa a «{to}»", "review.opRemove": "Eliminar memoria de {target}: {text}", "review.opArchive": "Archivar documento {id}", "review.targetMemory": "proyecto", "review.targetUser": "usuario", "review.guidanceLabel": "Objetivo de la conciliación", "review.guidanceHint": "Opcional: indica qué quieres lograr en esta conciliación; el modelo lo lee sin obtener autoridad adicional", "review.guidancePlaceholder": "Por ejemplo: dos preferencias dicen lo mismo, fusiónalas en una sola", "review.guided": "Planificado según tus indicaciones", "review.remoteEntries": "Se leyeron {count} entradas de la rama que faltan en esta instalación", "review.selectAll": "Todo", "review.selectNone": "Ninguno", "review.selectHint": "Marca los cambios que deseas aplicar; los desmarcados quedan para la siguiente ronda", "review.selected": "{count} de {total} seleccionados", "review.applyCount": "Aplicar {count}", "review.noSelection": "Selecciona al menos un cambio.", "review.history": "Planes aplicados ({count})", "review.historyTitle": "Planes aplicados", "review.historyHint": "Estos planes ya se ejecutaron y se conservan para consulta. Reabrir uno no deshace lo escrito.", "review.historyEmpty": "Aún no se ha ejecutado ningún plan.", "review.rejectedHint": "Este plan fue rechazado; deja una opinión y reábrelo, o pide a la IA que planifique de nuevo.", "skills.label": "Habilidades", "skills.groupSurface": "Superficies", "skills.groupPlacement": "Ubicación y actualizaciones", "skills.groupEvolution": "Automatización", "skills.groupGeneration": "Modelos y generación", "skills.groupSources": "Mercado y directorios", "skills.badgeDefault": "Predeterminado", "skills.badgeCustom": "Personalizado · {count}", "skills.parametersBadge": "Umbral {threshold} · {idle}s", "skills.evolution": "Autoevolución", "skills.allowCreate": "Sugerir nuevas habilidades", "skills.allowCreateHint": "Permite que las revisiones propongan nuevas habilidades; las sugerencias existentes siguen gestionándose manualmente", "skills.allowUpdate": "Sugerir mejoras de habilidades", "skills.allowUpdateHint": "Permite que las revisiones mejoren habilidades existentes; las revisiones se pausan si ambos tipos están desactivados", "skills.targetScope": "Destino de nuevas habilidades", "skills.roots.title": "Directorios para nuevas habilidades", "skills.roots.hint": "Se aplica a creación, borradores e instalaciones del mercado, reemplazando el destino anterior.", "skills.roots.enabled": "Personalizar directorios de creación", "skills.roots.default": "Directorio de creación predeterminado", "skills.roots.invalid": "Selecciona al menos un directorio e incluye el predeterminado entre las opciones.", "skills.root.project-dsh": "Proyecto .dsh/skills", "skills.root.project-agents": "Proyecto .agents/skills", "skills.root.user-dsh": "Usuario .dsh/skills", "skills.root.user-agents": "Usuario .agents/skills", "skills.allowLinkedUpdates": "Permitir actualizaciones de habilidades enlazadas", "skills.allowLinkedUpdatesHint": "Las actualizaciones escriben directamente en el destino del enlace simbólico compartido entre Agentes; habilítalo solo en rutas confiables.", "skills.targetScopeHint": "Por defecto es Usuario; Seguir almacenamiento asigna los ámbitos de espacio de trabajo a Proyecto, editable al adoptar.", "skills.targetScope.user": "Usuario", "skills.targetScope.project": "Proyecto", "skills.targetScope.storage": "Seguir almacenamiento", "skills.evolutionHint": "Revisa conversaciones y propone actualizaciones de habilidades; las sesiones de tarea se conservan localmente.", "skills.autoAdoptDailyLimit": "Candidatos automáticos por día", "skills.autoAdoptTimeZone": "Zona horaria de la cuota diaria", "skills.autoBudgetHint": "Por día natural en esta zona horaria (0 pausa el procesamiento automático); las acciones manuales siguen disponibles.", "skills.autoBudgetInvalid": "Usa un número entero de 0 a 100 y una zona horaria IANA válida o local.", "skills.autoAdopt": "Adoptar automáticamente nuevas sugerencias", "skills.autoAdoptHint": "Requiere backtests; adopta solo con cero regresiones en casos de texto (hasta 2 reintentos).", "skills.autoBacktest": "Ejecutar backtest de borradores", "skills.autoBacktestHint": "Compara un borrador nuevo con la versión actual en sus casos de prueba", "skills.parameters": "Parámetros de revisión", "skills.draftGeneration": "Generación de borradores", "skills.draftMaxTokens": "Límite de tokens de salida del borrador", "skills.draftRetryMaxTokens": "Límite de tokens de salida en reintento", "skills.draftBudgetHint": "Incluye razonamiento y SKILL.md completo; reintenta una vez en caso de truncamiento si el límite de reintento es mayor.", "skills.reviewThreshold": "Umbral de revisión", "skills.idleSeconds": "Espera en inactividad (s)", "skills.cooldownSeconds": "Intervalo de revisión (s)", "skills.minConfidence": "Confianza mínima", "skills.expiryDays": "Caducidad de sugerencias (días)", "skills.maxPendingPerSession": "Pendientes por conversación", "skills.casesPerRun": "Casos por backtest", "skills.invalid": "{field} debe estar entre {min} y {max}", "skills.hints": "En la conversación", "skills.hintsHint": "Muestra las habilidades usadas en un turno y las nuevas sugerencias debajo", "skills.sidebar": "Entrada en la barra lateral", "skills.sidebarHint": "Muestra Habilidades como entrada propia en la barra lateral en lugar de dentro del Sistema de memoria", "skills.models": "Modelos predeterminados", "skills.modelsHint": "Sigue la ruta del Agente de tareas cuando está en Automático.", "skills.modelAuto": "Automático (seguir al Agente de tareas)", "skills.draftModel": "Modelo de borrador de evolución", "skills.draftModelHint": "Redacta y revisa borradores de habilidades a partir de sugerencias", "skills.runModel": "Modelo de ejecución de evaluación", "skills.runModelHint": "Ejecuta casos de backtest y califica resultados", "skills.directories": "Directorios de habilidades", "skills.directoriesHint": "Déjalo vacío para usar los directorios de habilidades de usuario predeterminados.", "skills.dshHome": "Directorio raíz de DSH", "skills.agentsHome": "Directorio compartido de Agents", "skills.market": "Fuentes del mercado", "skills.marketHint": "Gestiona catálogos e índices de búsqueda del mercado de habilidades.", "skills.marketRefresh": "Actualizar", "skills.marketRefreshing": "Actualizando…", "skills.marketAddPlaceholder": "Repositorio de GitHub, URL de índice o ruta local", "skills.marketAdd": "Añadir", "skills.marketAdding": "Añadiendo…", "skills.marketRemove": "Quitar", "skills.marketBuiltin": "Integrada", "skills.marketSkillCount": "{count} habilidades", "skills.marketEmpty": "No hay fuentes del mercado configuradas.", "skills.statusCount": "{count} habilidades", "skills.statusOn": "Autoevolución activada · {waiting} pendientes", "skills.statusIdle": "Autoevolución activada", "skills.statusOff": "Autoevolución desactivada", "skillTail.label": "Habilidades del turno", "skillTail.reviewing": "Revisando", "skillTail.suggested": "sugeridas {count}", "skillTail.failed": "Error en la revisión", "skillTail.openSkill": "Abrir {name} en Habilidades", "skillTail.openSuggestions": "Abrir las sugerencias en Habilidades" }; // vendor/dsh-mnemon/src/client/locales/fr.ts const coreFr = { "composer.expand": "Afficher la zone de saisie", "composer.collapse": "Réduire la zone de saisie", "composer.collapsed": "Zone de saisie réduite", "tab.label": "Système de mémoire", "nav.aria": "Pages Mnemon", "nav.status": "État", "nav.runtime": "Mémoire d'exécution", "nav.runtimeDetail": "USER / MEMORY", "nav.documents": "Documents du projet", "nav.documentsDetail": "Index et archives", "nav.spaces": "Espaces de mémoire", "nav.spacesDetail": "Graphe et rappel", "common.refresh": "Actualiser", "common.openConfiguration": "Ouvrir les paramètres", "common.loading": "Chargement…", "common.cancel": "Annuler", "common.close": "Fermer", "common.showing": "Affichage de {visible} / {total}", "common.showMore": "Afficher {count} de plus", "header.backToConversation": "Retour au chat", "header.configure": "Configurer", "header.noticeSummary": "Avis ({count}) · {labels}", "header.noticeRemoteReadOnly": "Lecture seule à distance", "header.noticeIdleReview": "Révision en veille", "header.compositionHint": "Sélectionnez pour modifier la composition dans la configuration.", "header.checking": "Vérification", "header.connected": "Connecté", "header.unavailable": "Indisponible", "header.notReady": "Mnemon n'est pas prêt", "workspace.viewing": "Espace de travail affiché", "workspace.selectorAria": "Sélectionner un espace de travail mémoire à inspecter", "workspace.excluded": "Mémoire exclue", "workspace.excludedDetail": "Cet espace de travail et ses agents enfants ne participent ni à l'injection de mémoire, ni aux outils, ni à la révision automatique. Les données existantes restent lisibles ; supprimez l'exclusion pour reprendre.", "workspace.excludeTitle": "Espaces de travail exclus de la mémoire", "workspace.excludeHint": "Un chemin absolu d'espace de travail par ligne (~ et liens symboliques pris en charge).", "workspace.excludeCount": "{count} exclu(s)", "workspace.excludeNone": "Aucun", "workspace.excludePlaceholder": "/chemin/vers/espace-prive", "workspace.excludeNote": "S'applique aux tours suivants ; les données existantes et l'historique des sessions restent intacts.", "workspace.invalidExclusions": "{count} chemin(s) d'exclusion invalide(s) ou indisponible(s) ont été ignorés ; vérifiez les chemins dans les paramètres de stockage.", "workspace.unavailable": "Impossible d'identifier l'espace de travail actuel ; les exclusions de chemins n'ont pas été appliquées.", "workspace.storageMode": "Portée du stockage", "workspace.storageModeAria": "Portée du stockage : {mode}", "workspace.mismatchTitle": "Le répertoire inspecté ne correspond pas à cette session", "workspace.mismatchShort": "Hors espace de conversation", "workspace.selectedRoot": "Affiché : {root}", "workspace.effectiveRoot": "Effectif : {root}", "workspace.align": "Aligner", "workspace.remoteReadOnly": "L'accès distant est en lecture seule : définissez remoteAccess: trusted-host dans la configuration du profil mnemon et redémarrez DSH pour gérer la mémoire ici.", "sourcePage.instance": "Instance de Source", "sourcePage.instanceAria": "Sélectionner une instance de Source", "sourcePage.summaryAria": "Résumé de l'état et des autorisations de la Source", "sourcePage.package": "Paquet", "sourcePage.availability": "Disponibilité", "sourcePage.availability.ready": "Prêt", "sourcePage.availability.degraded": "Dégradé", "sourcePage.availability.unavailable": "Indisponible", "sourcePage.role": "Rôle sémantique", "sourcePage.revision": "Révision actuelle", "sourcePage.permissions": "Capacités autorisées", "sourcePage.diagnostics": "Diagnostics", "sourcePage.configuration": "Configuration déclarative", "sourcePage.configurationDescription": "Les champs proviennent du descripteur de gestion assaini de l'Hôte ; l'envoi est réautorisé pour cette instance et cette révision.", "sourcePage.configLoading": "Chargement de la configuration…", "sourcePage.configSave": "Enregistrer", "sourcePage.configSaving": "Enregistrement…", "sourcePage.configSaved": "Configuration envoyée ; actualisation de l'état de la Source.", "sourcePage.secretPlaceholder": "Laisser vide pour conserver le secret existant", "sourcePage.unavailable": "Source indisponible", "sourcePage.unavailableDescription": "Aucune instance appelable n'est visible dans cette portée. Le fonctionnement de la mémoire Hôte et Headless n'est pas affecté par cette page.", "turnTail.label": "Mémoire du tour", "turnTail.recall": "{count} rappel(s)", "turnTail.write": "{count} écriture(s)", "turnTail.documents": "{count} recherche(s) documentaire(s)", "turnTail.inspect": "{count} inspection(s)", "turnTail.failed": "{count} échec(s)", "turnTail.toolList": "Outils mémoire de ce tour", "turnTail.more": "{count} de plus", "turnTail.openTool": "Ouvrir la page Mémoire pour {tool}", "turnTail.tool.recall": "Rappel d'Espaces de mémoire", "turnTail.tool.related": "Mémoires associées", "turnTail.tool.documentSearch": "Recherche de documents", "turnTail.tool.documentManage": "Mise à jour de document", "turnTail.tool.documentCreate": "Nouveau document", "turnTail.tool.runtime": "Mise à jour de la Mémoire d'exécution", "turnTail.tool.remember": "Enregistré dans les Espaces de mémoire", "turnTail.tool.link": "Mémoires liées", "turnTail.tool.forget": "Mémoire supprimée", "turnTail.tool.status": "État de la mémoire", "turnTail.tool.spaces": "Liste des Espaces de mémoire", "turnTail.tool.spaceCreate": "Nouvel Espace de mémoire", "turnTail.tool.spaceUpdate": "Mise à jour d'Espace de mémoire", "turnTail.tool.spaceMerge": "Espaces de mémoire fusionnés", "turnTail.tool.viewRoute": "Lecture mémoire", "turnTail.tool.viewAction": "Mise à jour mémoire", "receipt.written": "Enregistré", "receipt.updated": "Mis à jour", "receipt.pending": "Envoyé ; le Fournisseur confirmera ultérieurement", "receipt.skipped": "Ignoré", "receipt.partial": "Partiellement enregistré", "receipt.unfinished": "Non terminé", "receipt.failed": "Échec", "receipt.view": "Voir dans Espaces de mémoire", "receipt.viewRuntime": "Voir dans Mémoire d'exécution", "receipt.unembedded": "Enregistré sans vecteur : la vectorisation a échoué, cette mémoire est donc exclue de la correspondance sémantique pour l'instant. Une fois le service d'embedding disponible, complétez-la depuis « Tester l'état » dans les paramètres d'embedding Mnemon Native.", "receipt.unembeddedNoService": "Aucun vecteur pour le moment : aucun service d'embedding n'est disponible, cette mémoire est donc exclue de la correspondance sémantique pour l'instant ; la recherche par mots-clés la trouve toujours. Une fois un service d'embedding connecté, complétez-la depuis « Tester l'état » dans les paramètres d'embedding Mnemon Native.", "taskAgent.ready": "Agent de tâches prêt", "taskAgent.unavailable": "Agent de tâches indisponible", "saveAction.button": "Enregistrer en mémoire", "saveAction.tooltip": "Enregistrer cette réponse en mémoire", "saveAction.title": "Enregistrer en mémoire", "saveAction.hint": "L'Agent de tâches décide s'il faut enregistrer, puis synthétise et écrit dans un Espace de mémoire.", "saveAction.fetching": "Extraction du texte du message…", "saveAction.missing": "Impossible d'extraire le texte de ce message depuis le journal de session.", "saveAction.candidate": "Contenu", "saveAction.truncated": "Cette réponse est longue ; seuls les {limit} premiers caractères sont chargés ici.", "saveAction.submit": "Enregistrer", "saveAction.submitting": "Enregistrement…", "saveAction.readOnly": "Ce déploiement est en lecture seule ; l'écriture en mémoire est désactivée.", "saveAction.close": "Fermer", "saveAction.hintDirect": "Écrit directement dans la cible sélectionnée.", "saveAction.to": "Enregistrer dans", "saveAction.to.agent": "Automatique", "saveAction.to.agentDetail": "L'Agent décide d'enregistrer et choisit un Espace de mémoire adapté", "saveAction.to.memory": "Mémoire de travail (MEMORY.md)", "saveAction.to.user": "Profil utilisateur (USER.md)", "saveAction.to.space": "Espace de mémoire · {provider}", "saveAction.save": "Enregistrer", "saveAction.saving": "Enregistrement…", "saveAction.saved.runtime": "Enregistré dans {target} · {count} entrée(s)", "saveAction.saved.runtimeMaintained": "Espace libéré et enregistré dans {target} · {count} entrée(s)", "saveAction.saved.space": "Enregistré dans l'Espace de mémoire {space}", "saveAction.saved.spacePending": "Envoyé vers l'Espace de mémoire {space} ; le Fournisseur le confirmera ultérieurement", "saveAction.saved.spaceOther": "Réponse de l'Espace de mémoire {space} : {action}", "saveAction.saved.duplicate": "Déjà enregistré ; aucun doublon n'a été écrit.", "saveAction.unavailable": "Cet emplacement n'accepte pas d'écriture pour le moment.", "saveAction.place.delimiter": "Les entrées de {target} ne peuvent pas contenir « § » ; supprimez-le pour enregistrer.", "saveAction.place.tooLong": "Ce texte fait environ {size}, ce qui dépasse la limite d'une entrée dans {target} ({limit}) ; raccourcissez-le.", "saveAction.place.orAgent": " Ou laissez l'Agent décider.", "saveAction.place.full": "{target} utilise {used} sur {limit}. L'enregistrement libère d'abord de la place : environ {keep} des entrées existantes sont conservées et le reste quitte la mémoire de travail.", "saveAction.place.fullAll": "{target} utilise {used} sur {limit}. L'enregistrement libère d'abord de la place : toutes les entrées existantes quittent la mémoire de travail.", "saveAction.place.userCondense": "Le profil utilisateur utilise {used} sur {limit}. Avant l'enregistrement, un Agent de tâches le condense à environ {keep}, sans archive.", "saveAction.place.userTooLong": "Ce texte fait environ {size}, ce qui dépasse ce que le profil utilisateur peut contenir après nettoyage ({max}) ; raccourcissez-le.", "saveAction.place.userFull": "Le profil utilisateur est plein et sa compaction nécessite un Agent de tâches ; supprimez d'abord des entrées dans Mémoire d'exécution ou choisissez un autre emplacement.", "saveAction.noPlace": "Aucun emplacement ne peut recevoir ce texte pour le moment.", "status.title": "État du système", "status.description": "État d'exécution de dsh-brain-mnemon, des Fournisseurs mémoire et de chaque couche de stockage.", "status.nominal": "Système opérationnel", "status.workflowUnavailable": "Maintenance en arrière-plan indisponible", "status.workflowIdleReview": "Révision en veille", "status.workflowRuntimeCapacity": "Maintenance de capacité d'exécution", "status.workflowUnsupported": "La Stratégie actuelle ne pilote pas : {workflows}. L'activation seule des paramètres de révision ne lance pas ces tâches. Sélectionnez une Stratégie compatible, comme la Stratégie en couches, dans Système de mémoire. Les actions manuelles restent disponibles.", "status.reviewFailed": "Échec de la révision en veille", "status.reviewFailedDetail": "Ce point de contrôle n'a pas abouti et ne sera pas rejoué automatiquement. Les révisions suivantes respectent le délai d'attente et la limite par session.", "status.reviewPartial": "Certaines écritures ont été validées. Vérifiez les reçus ci-dessous ; elles n'ont pas été annulées.", "status.reviewTeamPaused": "La révision en veille est suspendue par le paramètre de compatibilité Agent Teams. Pour continuer à réviser, sélectionnez « Révision par Agent de tâches restreint » sous Révision en veille sur la page dsh-brain-mnemon dans Plugins. Les paramètres de rappel et d'écriture restent inchangés.", "status.reviewConfirmationPaused": "La confirmation d'écriture mémoire est activée ; la révision mémoire en veille est donc suspendue. Vous pouvez toujours modifier la mémoire manuellement.", "status.reviewToolAccessPaused": "L'outil de finalisation requis par la révision automatique est actuellement indisponible. Ce point de contrôle a été ignoré sans consommer de tentative. L'accès sera vérifié de nouveau après un prochain tour de conversation éligible. Vérifiez les restrictions d'outils ou les paramètres d'approbation de cette session.", "status.reviewWatermarkUsage": "Tentatives de révision de la session : {attempts} / {max} ({restored} restaurée(s)).", "status.reviewWatermarkNext": "Prochaine révision au plus tôt à {time} ; un nouveau point de contrôle de conversation éligible reste requis.", "status.reviewWatermarkPaused": "Révision automatique en pause : les limites persistantes sont indisponibles.", "status.reviewWatermarkRecovery": "Poursuivez la conversation pour réessayer. Si l'erreur persiste, arrêtez les Hôtes utilisant cette racine de stockage avant d'inspecter l'état ou le verrou de cette session sous state/idle-review. La suppression de l'état réinitialise la limite.", "config.reviewPersistWatermark": "Conserver les limites de révision après réouverture", "config.reviewPersistWatermarkHint": "Conserve les tentatives et le délai d'attente par racine de stockage et session parente, y compris les exécutions échouées ou annulées.", "status.reviewRun": "Exécution de révision : {id}", "status.reviewContextWindow": "Choisissez la révision par point de contrôle borné (spawn) ou un modèle d'Agent de tâches dont la fenêtre de contexte couvre la conversation parente.", "config.reviewTitle": "Révision en veille", "config.reviewDescription": "Organise la mémoire lorsque la conversation est inactive ; le rappel et les écritures fonctionnent dans tous les cas", "config.reviewEnabled": "Activer la révision en veille", "config.reviewRuntimeMemory": "Écrire dans la Mémoire d'exécution", "config.reviewRuntimeMemoryHint": "Uniquement les préférences et règles que vous avez exprimées ; lorsqu'elle est désactivée, la révision ne crée que des Documents", "config.reviewSilent": "Exécuter les révisions en veille silencieusement", "config.reviewSilentHint": "Une fois désactivé, les révisions spawn automatiques apparaissent dans la liste des sous-agents de la conversation.", "config.reviewLimits": "Limites de révision", "config.reviewProvider": "Méthode de révision", "config.reviewSpawn": "Point de contrôle borné (spawn)", "config.reviewSpawnHint": "L'Agent de tâches lit un point de contrôle borné", "config.reviewFork": "Contexte parent complet (fork)", "config.reviewForkHint": "L'Agent de tâches dispose du contexte parent complet", "config.reviewFallback": "Quand fork est indisponible (avant démarrage uniquement)", "config.reviewSkip": "Ignorer cette révision", "config.reviewAgentTeams": "Compatibilité Agent Teams", "config.reviewTeamPause": "Mettre la révision en pause", "config.reviewTeamPauseHint": "Ignore la révision pendant l'exécution d'Agent Teams", "config.reviewTeamScoped": "Révision par Agent de tâches restreint", "config.reviewTeamScopedHint": "Un Agent de tâches restreint révise sans les outils Teams", "config.review.minIntervalMs": "Intervalle minimal de révision (secondes)", "config.review.maxPerSession": "Tentatives maximales par session", "config.review.maxContextChars": "Budget de caractères du point de contrôle spawn", "config.review.maxTokens": "Limite de tokens en sortie du modèle par requête", "config.reviewLimitInvalid": "{field} doit être compris entre {min} et {max}", "status.checkRequired": "Vérification requise", "status.memoryOff": "Mémoire inactive", "status.memoryOffDetail": "Les conversations continuent sans mémoire.", "status.compositionStale": "La dernière modification de composant n'a pas pris effet", "status.compositionStaleDetail": "La mémoire fonctionne toujours selon la composition précédente.", "status.strategyFallback": "La Stratégie principale sélectionnée ne s'exécute pas", "status.strategyFallbackDetail": "La seule Stratégie principale disponible compose la mémoire pour le moment.", "status.reasonNoStrategy": "Aucune Stratégie principale n'est en cours d'exécution.", "status.reasonNoSource": "Aucune Source de mémoire n'est en cours d'exécution.", "status.reasonNotComposed": "Les composants mémoire sont encore en cours de chargement.", "status.reasonSelectedStrategyOff": "La Stratégie principale sélectionnée ne s'exécute pas et plusieurs autres pourraient composer la mémoire.", "status.reasonDependency": "{component} nécessite {requirement}.", "status.reasonConflict": "Certains composants entrent en conflit.", "status.reasonRejected": "La composition a été refusée : {detail}", "status.layerOffDetail": "Réactivez-la dans la configuration", "status.layerStoppedDetail": "Son composant est activé mais ne s'exécute pas", "status.layerMemoryOffDetail": "Disponible dès qu'une Stratégie principale s'exécute", "status.rechecking": "Vérification…", "status.aria": "État d'exécution de Mnemon", "status.engine": "Moteur mémoire", "status.engineUnavailable": "Mnemon indisponible", "status.versionWaiting": "En attente de version", "status.pluginChecking": "Vérification de l'état du plugin", "status.pluginReady": "Plugin fonctionnel", "status.nativeAria": "État de Mnemon Native", "status.nativeCliMissing": "Mnemon CLI introuvable", "status.providersTitle": "Fournisseurs mémoire", "status.providersDescription": "État de connexion des Fournisseurs actifs et de leurs Espaces de mémoire.", "status.providersAria": "État des Fournisseurs mémoire", "status.providersEnabled": "{enabled} / {total} activé(s)", "status.providersOff": "{count} autre(s) Fournisseur(s) désactivé(s)", "status.providerState.disabled": "Désactivé", "status.providerState.idle": "Service prêt · aucun Espace de mémoire actif", "status.providerState.healthy": "Connexion saine", "status.providerState.unhealthy": "Connexion à vérifier", "status.providerSpaces": "{active} / {total} Espace(s) de mémoire actif(s)", "versions.checkAction": "Versions", "versions.title": "Vérifier et mettre à jour les versions", "versions.description": "Vérifiez votre installation et mettez à jour si nécessaire. Développez dsh-brain-mnemon pour gérer ses sous-paquets.", "versions.missing": "Non installé (facultatif)", "versions.restart": "Redémarrage requis", "versions.local": "Version locale", "versions.modeNpmCli": "npm", "versions.hintNpm": "Géré par npm. Mettez à jour ici ou exécutez mnemon update dans le terminal de l'Hôte.", "versions.hintNpmMissing": "Le lanceur npm a été trouvé, mais npm est indisponible sur l'Hôte. Vérifiez l'environnement Node.js.", "versions.hintNpmUnmanaged": "L'installation npm actuelle ne possède pas cette installation CLI globale. Utilisez son environnement Node.js d'origine ou migrez ci-dessous.", "versions.hintUnreadable": "Le CLI a été trouvé, mais sa version est illisible. Vérifiez la commande dans le terminal de l'Hôte ou réinstallez-le.", "versions.hintStarter": "Maintenu avec le Starter dsh-brain-mnemon. Mettez à jour le Starter pour utiliser sa combinaison de paquets validée.", "versions.npmRecommended": "Installation et maintenance via npm", "versions.npmMaintenance": "Maintenir le CLI avec npm", "versions.npmInstall": "Installer avec npm (recommandé)", "versions.npmMigrate": "Basculer vers npm (recommandé)", "versions.npmRepair": "Vérifier ou réparer l'installation npm", "versions.npmRepairDetail": "Vérifiez l'état de l'installation ci-dessus. Pour réinstaller, exécutez cette commande dans le terminal de l'Hôte DSH (Node.js 22+).", "versions.npmUpdateDetail": "Exécutez cette commande pour les mises à jour futures, puis cliquez sur « Vérifier à nouveau » pour confirmer la version active.", "versions.npmInstallDetail": "Seul Mnemon Native nécessite ce CLI séparé. Pour l'utiliser, exécutez cette commande dans le terminal de l'Hôte DSH (Node.js 22+).", "versions.npmMigrateDetail": "Pour passer à npm, exécutez cette commande sur l'Hôte DSH (Node.js 22+).", "versions.npmVerify": "Vérifiez la version installée, puis cliquez sur « Vérifier à nouveau » :", "versions.npmNextSteps": "Après l'installation : vérifier la version et le chemin actif", "versions.npmPath": "Placez le répertoire bin global de npm en tête du PATH. Si MNEMON_CLI_PATH ou mnemon.cliPath est défini, faites-le pointer vers le nouveau lanceur. Redémarrez DSH après avoir modifié son environnement et vérifiez le chemin de l'exécutable ci-dessus.", "versions.installGuide": "Guide d'installation", "versions.copy": "Copier", "versions.copied": "Copié", "versions.copyCommand": "Copier la commande : {command}", "versions.copyFailed": "Presse-papiers indisponible. Sélectionnez la commande et copiez-la manuellement.", "versions.readOnly": "Cette connexion est en lecture seule. Vous pouvez vérifier les versions et copier les commandes ; utilisez une connexion disposant des droits de gestion pour mettre à jour ici.", "versions.packages": "Versions des sous-paquets ({count})", "versions.packagesOutdated": "{count} mise(s) à jour disponible(s)", "versions.packagesDetail": "Développer pour les options de maintenance", "versions.packagesHide": "Réduire les détails des paquets", "versions.packagesHint": "Les paquets par défaut sont mis à jour avec le Starter. Les paquets installés indépendamment dans ce profil peuvent être mis à jour séparément. Redémarrez DSH ensuite.", "versions.managedStarter": "Maintenu avec le Starter", "versions.managedProfile": "Géré par le profil", "versions.starterVersion": "Version épinglée Starter", "versions.kind.source": "Sources", "versions.kind.strategy": "Stratégies", "versions.kind.provider": "Fournisseurs", "versions.checking": "Recherche de nouvelles versions sur les dépôts distants…", "versions.checkingShort": "Vérification…", "versions.recheck": "Vérifier à nouveau", "versions.failed": "Échec de l'opération de version", "versions.timeout": "Délai dépassé lors de la vérification des versions. Vérifiez le réseau et réessayez.", "versions.current": "À jour", "versions.available": "Mise à jour disponible", "versions.unknown": "Impossible de vérifier", "versions.installed": "Installée", "versions.latest": "Dernière", "versions.executable": "Exécutable", "versions.profileLocation": "Profil · {name}", "versions.sourceLocation": "Source", "versions.linkSourceLocation": "Source · Profil {name}", "versions.packageLocation": "Répertoire du paquet", "versions.update": "Mettre à jour", "versions.updating": "Mise à jour…", "versions.updated": "{name} mis à jour", "versions.alreadyCurrent": "Déjà sur la dernière version", "versions.restartRequired": "Redémarrez DSH pour charger le nouveau code du plugin dsh-brain-mnemon ; dans l'application de bureau, quittez et rouvrez-la.", "versions.pendingInstalledTitle": "dsh-brain-mnemon {version} est installé", "versions.pendingInstalledDetail": "Cet Hôte exécute encore {running}. Redémarrez DSH pour charger la mise à jour ; dans l'application de bureau, quittez et rouvrez-la.", "versions.pendingPackagesTitle": "{names} mis à jour", "versions.pendingPackagesDetail": "Redémarrez DSH pour charger la mise à jour ; dans l'application de bureau, quittez et rouvrez-la.", "versions.checkedAt": "Vérifié à {time}", "versions.latestUnavailable": "La dernière version distante est indisponible. Vérifiez le réseau et réessayez.", "versions.modeHomebrew": "Homebrew", "versions.modeGo": "Go install", "versions.modeNpm": "Profil DSH", "versions.modeLink": "Lien local", "versions.modeManual": "Manuel", "versions.modeMissing": "Manquant", "versions.hintHomebrew": "Géré par Homebrew ; une version disponible peut être mise à jour ici en toute sécurité.", "versions.hintBrewMissing": "Une installation Homebrew a été détectée, mais la commande brew est indisponible.", "versions.hintGo": "Géré par go install ; une version disponible peut être mise à jour ici en toute sécurité.", "versions.hintDsh": "Géré par le profil DSH actuel. Les mises à jour utilisent l'installeur de plugins de DSH ; redémarrez DSH ensuite.", "versions.hintPnpm": "Géré par le profil DSH actuel ; redémarrez DSH après la mise à jour.", "versions.hintPnpmMissing": "Une installation via profil DSH a été détectée, mais l'Hôte ne trouve pas la commande pnpm. Installez pnpm et redémarrez DSH pour mettre à jour ici.", "versions.hintLink": "Ceci est une version de développement liée localement. Récupérez et compilez dans le répertoire source pour préserver vos modifications locales.", "versions.hintInstall": "Mnemon CLI n'est pas installé. Seul Mnemon Native en a besoin ; pour utiliser Native, installez-le et placez mnemon dans PATH, ou définissez MNEMON_CLI_PATH / mnemon.cliPath.", "versions.hintManual": "Impossible d'identifier la source d'installation de manière fiable. Mettez à jour avec la méthode d'installation d'origine.", "status.activeRatio": "{active} / {total} actif(s)", "status.runtimeRatio": "{user} utilisateur · {memory} projet", "status.runtimeBytes": "{bytes} utilisés", "status.runtimeWaiting": "En attente", "status.runtimeWaitingDetail": "En attente de l'inventaire de stockage de l'Hôte", "status.directoryUnsynced": "Répertoire non synchronisé", "status.activeMemories": "{count} mémoire(s) active(s)", "status.documentsWaiting": "En attente d'espace de travail", "status.documentsSession": "Disponible après liaison à une session active", "status.documentRatio": "{active} actif(s) · {archived} archivé(s)", "status.documentUsage": "{used} / {limit} de capacité active", "status.storageDomains": "Domaines de stockage", "status.storageDomainsText": "Emplacement de stockage de la Mémoire d'exécution, des Espaces de mémoire et des Documents du projet.", "status.storageGlobal": "Global", "status.storageWorkspace": "Espace de travail", "status.storageWorkspaces": "Espaces de travail centralisés", "status.storageCustom": "Personnalisé", "status.storageWaiting": "Lecture des répertoires de domaines de stockage…", "status.storageCustomUnset": "Aucun répertoire personnalisé n'est configuré. Cette vue n'expose qu'une racine personnalisée déjà configurée et active dans DSH.", "status.storageWorkspaceUnavailable": "La session actuelle n'a aucun répertoire d'espace de travail disponible.", "status.storageActiveRoot": "Racine de lecture/écriture actuelle", "status.storageAvailable": "Répertoire disponible", "status.storageNotCreated": "Répertoire non créé", "status.storageRuntime": "Mémoire d'exécution", "status.storageSpaces": "Espaces de mémoire", "status.storageDocuments": "Documents du projet", "status.storageState": "État en arrière-plan", "status.storageReady": "Prêt", "status.storageEmpty": "Vide", "status.storageMissing": "Non créé", "status.storageInvalid": "Réparation requise", "status.storageItems": "éléments", "status.storageRuntimeDetail": "USER {user} · MEMORY {memory}", "status.storageSpacesDetail": "{active} actif(s) · {databases} base(s)", "status.storageDocumentsDetail": "{active} actif(s) · {archived} archivé(s)", "status.storageStateReady": "Les repères de révision sont persistés", "status.storageStateVolatile": "L'état de révision est actuellement géré par le processus Hôte", "status.storageFootnote": "Modifiez la portée du stockage dans Configurer ; les données existantes restent en place.", "config.aria": "Configuration du Système de mémoire", "plugin.openWorkspace": "Ouvrir", "config.interfaceTitle": "Interface", "config.unsaved": "Modifications non enregistrées", "config.ready": "Enregistré et appliqué en direct", "config.displayTitle": "Ouvrir le Système de mémoire dans", "config.displaySidebar": "Barre latérale", "config.displaySidebarHint": "Une page autonome permettant de consulter d'autres espaces de travail", "config.displayBuiltin": "Onglet de conversation", "config.displayBuiltinHint": "S'ouvre dans la conversation en cours", "config.storageTitle": "Stockage", "storage.usedBy": "Utilisé par", "storage.usedByTitle": "« {component} » stocke ses données ici", "storage.userProfileByWorkspace": "Chaque espace de travail possède son propre profil utilisateur.", "storage.userProfileShared": "Tous les espaces de travail partagent un même profil utilisateur. La mémoire de travail reste séparée.", "storage.runtimeSettings": "Paramètres de la Mémoire d'exécution", "storage.default": "Par défaut", "storage.directoryExample": "Par exemple ~/Documents/mnemon", "storage.thisWorkspace": "Cet espace de travail", "storage.moveNote": "La mémoire bascule vers le nouvel emplacement ; les données existantes restent où elles sont", "storage.chooseDirectory": "Choisir un répertoire", "storage.pickFailed": "Impossible d'ouvrir le sélecteur de répertoire. Réessayez ou saisissez un chemin.", "config.scopeTitle": "Portée du stockage", "config.global": "Global", "config.workspace": "Espace de travail", "config.workspaces": "Centralisé · isolé par espace de travail", "config.workspacesHint": "Une seule racine avec un sous-répertoire par espace de travail, selon son chemin", "config.custom": "Personnalisé", "config.globalScopeHint": "Tous les espaces de travail partagent un même répertoire", "config.workspaceScopeHint": "Chaque espace de travail conserve son propre répertoire .mnemon", "config.dataDirectory": "Répertoire de données", "config.runtimeSectionScope": "Portée et rappel", "config.runtimeDeferred": "Lire la mémoire basse priorité à la demande", "config.runtimeDeferredHint": "Omet des prompts les entrées non épinglées de basse priorité ; les modèles les récupèrent à la demande.", "config.runtimeBm25Recall": "Rechercher la mémoire de travail à la demande (expérimental)", "config.runtimeBm25RecallLabel": "Rechercher la mémoire de travail à la demande", "config.runtimeBm25RecallHint": "Fait correspondre les mémoires de travail et les titres de documents à chaque tour ; le profil utilisateur et les éléments épinglés restent visibles.", "config.runtimeIndexPush": "Pousser les index d'Espaces de mémoire et de Documents (expérimental)", "config.runtimeIndexPushLabel": "Pousser les index d'Espaces de mémoire et de Documents", "config.runtimeIndexPushHint": "Fait correspondre les descriptions d'Espaces de mémoire et les résumés de Documents à l'étape 1 ; pousse uniquement des index compacts, jamais les contenus complets.", "config.runtimeUserScopeTitle": "Portée du profil utilisateur", "config.runtimeInheritance": "Partager automatiquement la Mémoire d'exécution avec les sous-agents", "config.runtimeInheritanceHint": "Les nouveaux sous-agents héritent du profil utilisateur et de la mémoire de travail ; les tâches en cours conservent leur contexte.", "config.runtimeUserScopeStorage": "Suivre la portée du stockage", "config.runtimeUserScopeStorageHint": "Conservé avec MEMORY.md", "config.runtimeUserScopeGlobal": "Partagé globalement", "config.runtimeUserScopeGlobalHint": "Partagé par tous les espaces de travail ; MEMORY.md continue de suivre la portée du stockage", "config.runtimeSnapshotRefreshTitle": "Actualisation de l'instantané", "config.runtimeSnapshotRefreshOnChange": "Actualiser à chaque changement", "config.runtimeSnapshotRefreshOnChangeHint": "Projette la mémoire d'exécution mise à jour dans les sessions ouvertes au tour suivant", "config.runtimeSnapshotRefreshSessionStart": "Figer au début de la session", "config.runtimeSnapshotRefreshSessionStartHint": "Conserve l'instantané initial fixe dans les sessions ouvertes pour la stabilité du cache ; les nouvelles sessions et les outils de rappel lisent toujours la mémoire à jour", "config.componentScopeStorage": "Suivre la portée du stockage", "config.componentScopeGlobal": "Partagé globalement", "config.componentScopeSwitchHint": "Changer la portée modifie l'emplacement de lecture et d'écriture. Les données existantes restent dans leur répertoire d'origine ; revenez en arrière pour les consulter. Les exports Pack et la synchronisation Git ne couvrent que la racine de stockage actuelle.", "config.documentsScopeSection": "Portée du stockage", "config.documentsScopeTitle": "Portée des Documents du projet", "config.documentsScopeStorageHint": "Conservés dans la racine de stockage sélectionnée avec MEMORY.md", "config.documentsScopeGlobalHint": "Partagés par tous les espaces de travail dans la racine globale ; MEMORY.md continue de suivre la portée du stockage", "config.memorySpacesScopeTitle": "Portée des Espaces de mémoire", "config.memorySpacesScopeStorageHint": "Conservés dans la racine de stockage sélectionnée avec MEMORY.md", "config.memorySpacesScopeGlobalHint": "Partagés par tous les espaces de travail avec leurs connexions Fournisseur dans la racine globale ; MEMORY.md continue de suivre la portée du stockage", "config.runtimeLimitsTitle": "Limites de capacité", "config.runtimeLimitsHint": "Par défaut : {user} Kio profil utilisateur, {memory} Kio mémoire de travail.", "config.runtime.userLimitBytes": "Limite du profil utilisateur (octets)", "config.runtime.memoryLimitBytes": "Limite de la mémoire de travail (octets)", "config.runtimeLimitsApply": "Appliqué en direct ; réduire une limite ne supprime pas les entrées existantes", "config.runtimeLimitInvalid": "Définissez « {field} » sur un entier compris entre 1 et {max}.", "config.runtimeAdvanced": "Limites de maintenance", "config.runtimeMaintenanceHint": "Plafond de sortie par exécution pour la migration et la compaction (par défaut {defaultTokens} tokens).", "config.runtime.maintenanceMaxTokens": "Limite de tokens en sortie de maintenance", "config.runtimeMaintenanceInvalid": "{field} doit être compris entre {min} et {max}", "config.documentsLimitsTitle": "Capacité active", "config.documentsLimitsHint": "Plafond total pour les Documents actifs (par défaut {defaultMiB} Mio, max {maxMiB} Mio).", "config.documents.limitBytes": "Limite des documents actifs (octets)", "config.documentsLimitsApply": "Appliqué en direct ; réduire la limite ne supprime pas les documents existants", "config.documentsLimitInvalid": "Définissez « {field} » sur un entier compris entre 1 et {max}.", "config.enhancementsRefreshFailed": "Le paramètre a été mis à jour, mais son état n'a pas pu être actualisé. Rouvrez cette page.", "config.strategyTitle": "Stratégie principale", "config.strategyFailed": "Impossible de changer la Stratégie principale. Le choix précédent est conservé ; réessayez.", "config.appliesNow": "S'applique immédiatement", "config.quoted": "« {name} »", "config.listSeparator": ", ", "config.sentenceGap": " ", "config.enableStrategy": "Activer « {strategy} »", "config.useStrategy": "Utiliser « {strategy} »", "config.stopStrategies": "Désactiver {strategies}", "config.enableComponentNamed": "Activer « {component} »", "board.title": "Composition de la mémoire", "board.description": "La mémoire de chaque tour est composée à partir de ces composants", "board.loading": "Lecture de la composition mémoire…", "board.componentsUnavailable": "Impossible de lire les composants mémoire pour le moment ; seules les couches mémoire peuvent être activées ou désactivées ici.", "board.sources": "Sources de mémoire", "board.enhancements": "Améliorations", "board.running": "Actif", "board.off": "Désactivé", "board.notRunning": "Arrêté", "board.needs": "Requiert « {component} »", "board.needsMissing": "Requiert un composant non installé", "board.unused": "Non utilisé par cette Stratégie", "board.strategyMissing": "La Stratégie principale sélectionnée n'est pas installée.", "board.turningOn": "Activation…", "board.turningOff": "Désactivation…", "board.noMainMissing": "Mémoire inactive : la Stratégie principale sélectionnée n'est pas installée", "board.noMainOff": "Mémoire inactive : la Stratégie principale « {strategy} » est désactivée", "board.noMainWaiting": "Mémoire inactive : « {strategy} » est activée mais pas encore en cours d'exécution", "board.contenders": "Mémoire inactive : « {strategy} » ne s'exécute pas, et {strategies} ne peuvent pas la remplacer conjointement", "board.fallback": "« {selected} » ne s'exécute pas ; « {composing} » compose la mémoire pour le moment", "board.fallbackMissing": "La Stratégie principale sélectionnée n'est pas installée ; « {composing} » compose la mémoire pour le moment", "board.noSource": "Mémoire inactive : aucune Source de mémoire ne s'exécute", "board.memoryOff": "Mémoire inactive : cette composition ne peut pas être servie", "board.stale": "La dernière modification n'a pas pris effet ; la mémoire utilise toujours la composition précédente", "board.idle": "Également actifs sans composer : {strategies}", "board.switching": "Changement…", "board.composing": "Compose la mémoire", "board.lastSource": "Actif · unique Source", "board.enabledCount": "{on} sur {total} activé(s)", "board.experimental": "Expérimental", "board.search": "Rechercher des composants", "board.searchEmpty": "Aucun composant ne correspond à « {query} ».", "details.open": "Détails de « {component} »", "details.shipped": "Intégré", "details.installed": "Extension installée", "details.relations": "Relations", "details.needs": "Requiert", "details.needsAny": "Requiert l'un de", "details.needsMissing": "Aucun composant installé ne fournit {capability}", "details.neededBy": "Requis par", "details.conflicts": "Incompatible avec", "details.options": "Options", "details.effectOn": "L'activation active aussi : {names}", "details.effectOnReplace": "L'activation désactive : {names}", "details.effectOnMixed": "L'activation active aussi : {on} ; désactive : {off}", "details.effectOff": "La désactivation désactive aussi : {names}", "details.effectLast": "Seule Source active ; elle reste activée", "details.currentMain": "Stratégie principale actuelle", "details.useMain": "Définir comme Stratégie principale", "details.back": "Retour à « {component} »", "config.strategyWorkflowNote": "Ne s'exécute que si la Stratégie principale le prend en charge (comme Stratégie en couches) ; les paramètres sont conservés.", "threeTier.offNote": "Ce plugin est désactivé. Les tâches en arrière-plan nécessitent aussi une Stratégie principale compatible.", "board.otherEnhancements": "Améliorations pour d'autres Stratégies principales ({count})", "board.more": "Ajoutez d'autres composants depuis la liste Plugins", "board.relationNeeds": "Requiert « {component} »", "board.relationNeededBy": "« {component} » en dépend", "options.aria": "Options de « {component} »", "options.emptySourcesTitle": "Aucune Source de mémoire sélectionnée", "options.emptySourcesConfirm": "Aucune Source de mémoire n'est sélectionnée. L'enregistrement désactive l'accès de l'Agent à la Mémoire d'exécution, aux documents et aux Espaces de mémoire. Pour rétablir la sélection automatique, annulez et réinitialisez cette option par défaut. Enregistrer une sélection vide ?", "options.apply": "Appliquer", "options.fix": "Corrigez d'abord les options signalées", "options.applying": "Application…", "options.default": "Par défaut", "options.reset": "Réinitialiser par défaut", "options.integer": "Saisissez un nombre entier", "options.between": "Saisissez un entier entre {min} et {max}", "options.atLeast": "Saisissez un entier supérieur ou égal à {min}", "options.atMost": "Saisissez un entier inférieur ou égal à {max}", "options.tooLong": "Au maximum {max} caractères", "options.listLimit": "Jusqu'à {count} éléments uniques de {length} caractères maximum chacun", "options.listHint": "Un élément par ligne.", "options.noSources": "Aucune Source de mémoire disponible actuellement.", "options.sourceUnavailable": "{source} (indisponible actuellement)", "feedback.memoryOff": "Mémoire inactive : aucune Stratégie principale n'est en cours d'exécution", "feedback.memoryRestored": "Mémoire rétablie, composée par « {strategy} »", "feedback.fallback": "« {selected} » est désactivée ; « {composing} » compose la mémoire pour le moment", "feedback.fallbackMissing": "La Stratégie principale sélectionnée n'est pas installée ; « {composing} » compose la mémoire pour le moment", "feedback.switchedMain": "Basculé vers « {strategy} »", "feedback.switchedMainOff": "Basculé vers « {strategy} » et désactivé {others}", "feedback.switchedMainWith": "Basculé vers « {strategy} » et activé {others}, requis par celle-ci", "feedback.switchedMainMixed": "Basculé vers « {strategy} » : activé {on} et désactivé {off}", "feedback.externalMain": "La Stratégie principale est maintenant « {strategy} »", "feedback.idleMain": "« {component} » s'exécute également, mais ne compose rien", "feedback.sourceOn": "« {component} » activé ; sa couche lit et écrit de nouveau", "feedback.sourceOff": "« {component} » désactivé ; sa couche suspend lectures et écritures", "feedback.componentOn": "« {component} » activé", "feedback.componentOff": "« {component} » désactivé", "feedback.externalSourceOn": "« {component} » a été activé ; sa couche lit et écrit de nouveau", "feedback.externalSourceOff": "« {component} » a été désactivé ; sa couche suspend lectures et écritures", "feedback.externalComponentOn": "« {component} » a été activé", "feedback.externalComponentOff": "« {component} » a été désactivé", "feedback.several": "{count} composant(s) mis à jour", "feedback.enabledWith": "« {component} » activé ainsi que {others}, dont il dépend", "feedback.disabledWith": "« {component} » désactivé ainsi que {others}, qui en dépendaient", "feedback.enabledReplacing": "« {component} » activé et {others} désactivé(s) car incompatibles", "feedback.enabledMixed": "« {component} » activé : également activé {on} et désactivé {off}", "feedback.optionsSaved": "Options de « {component} » mises à jour", "feedback.externalOptions": "Les options de « {component} » ont changé", "feedback.externalSeveral": "{count} composant(s) modifié(s)", "feedback.undo": "Annuler", "feedback.undone": "Annulé ; les paramètres précédents sont rétablis", "feedback.show": "Afficher", "feedback.retry": "Réessayer", "feedback.failed": "Impossible d'appliquer la modification ; les paramètres précédents sont conservés.", "feedback.layerResumed": "« {layer} » s'exécute de nouveau", "config.componentListNote": "Dans la liste ci-dessous, dsh-brain-mnemon/bundle est l'entrée de regroupement du Starter ; son affichage comme désactivé n'affecte rien.", "layers.disabledBadge": "Désactivé", "layers.disabledTitle": "{layer} est désactivé", "layers.disabledDescription": "Cette couche mémoire ne participe pas au traitement mémoire.", "layers.disabledText": "Les données existantes sont conservées ; réactivez-la dans les paramètres pour reprendre.", "layers.stoppedBadge": "Arrêté", "layers.stoppedTitle": "{layer} ne s'exécute pas", "layers.stoppedDescription": "Le composant de cette couche est activé mais ne s'exécute pas.", "layers.stoppedText": "Les données existantes sont conservées ; reprise dès que le composant s'exécute.", "layers.memoryOffBadge": "Inactif", "layers.memoryOffTitle": "{layer} est inactif", "layers.memoryOffDescription": "La mémoire est inactive, cette couche est donc indisponible.", "layers.memoryOffText": "Les données existantes sont conservées ; rétablissez une Stratégie principale dans les paramètres pour reprendre.", "config.nativeName": "Mnemon Native", "config.backgroundTitle": "Tâches en arrière-plan", "config.backgroundDescription": "La capture, l'archivage et la révision s'exécutent en arrière-plan lorsque la Stratégie principale le prend en charge.", "config.memoryWriting": "Écritures mémoire", "config.confirmWrites": "Confirmer les écritures des outils mémoire", "config.confirmWritesHint": "Demande confirmation via DSH avant que les modèles n'ajoutent, modifient ou suppriment de la mémoire via des outils.", "config.confirmWritesBadge": "Met en pause la révision en veille", "config.taskAgentSectionTitle": "Agent de tâches", "config.taskAgentSectionDescription": "Pilote la maintenance en arrière-plan, Enregistrer en mémoire, le routage d'Espaces et la révision de synchronisation.", "config.taskAgentTitle": "Modèle de l'Agent de tâches", "config.taskAgentInherit": "Suivre le réglage global", "config.taskAgentInheritHint": "Suit le modèle des nouvelles sessions", "config.taskAgentConversation": "Suivre la conversation", "config.taskAgentConversationHint": "Suit le modèle utilisé par la conversation en cours", "config.taskAgentFixed": "Personnalisé", "config.taskAgentFixedHint": "Choisir un modèle", "config.taskAgentProvider": "Fournisseur de modèle", "config.taskAgentModel": "Modèle", "config.taskAgentImageInput": "Entrée image", "config.taskAgentEffective": "Utilisera actuellement", "config.taskAgentSource.fixed": "Personnalisé", "config.taskAgentSource.session": "Conversation en cours", "config.taskAgentSource.dsh-default": "Modèle de nouvelle session", "config.taskAgentSource.active-agent": "Une conversation ouverte", "config.taskAgentLoading": "Chargement du répertoire des modèles", "config.taskAgentUnavailable": "Aucune route Fournisseur / Modèle n'est actuellement disponible", "config.taskAgentLoadFailed": "Impossible de charger le répertoire des modèles : {error}", "config.taskAgentPartial": "{count} Fournisseur(s) illisible(s) ; les autres options restent disponibles.", "config.taskAgentRetry": "Relire", "config.customAbsolute": "Utilisez un chemin absolu ou commençant par ~/", "config.saveFailed": "Échec de l'enregistrement : {error}", "config.readOnly": "Les paramètres du plugin sont en lecture seule dans ce déploiement.", "config.remoteReadOnly": "Les paramètres du plugin sont en lecture seule via l'accès distant : définissez remoteAccess: trusted-host dans la configuration du profil mnemon et redémarrez DSH pour les modifier ici.", "config.unavailable": "Impossible de charger les paramètres du Système de mémoire. Vérifiez que l'Hôte autorise le RPC des paramètres pour ce déploiement Web.", "config.discard": "Ignorer", "config.interactionTurnBar": "Barre mémoire du tour", "config.interactionTurnBarHint": "Affiche les rappels et écritures de chaque tour sous la réponse", "config.interactionSaveAction": "Action Enregistrer en mémoire", "config.interactionSaveActionHint": "Enregistrez manuellement une réponse ; elle est écrite à l'emplacement choisi après confirmation", "config.packTitle": "Sauvegarde et migration", "config.packUnavailable": "Cet Hôte DSH ne fournit pas le canal de sauvegarde ZIP Mnemon.", "config.packExporting": "Exportation…", "config.packInspecting": "Inspection…", "config.packImporting": "Importation…", "config.packExported": "{file} exporté ({size}).", "config.packFailed": "Échec de l'opération ZIP : {error}", "config.packSimpleDescription": "Archive ZIP des composants ci-dessus, sans Fournisseurs tiers ni identifiants", "config.packImportZip": "Importer un ZIP", "config.packExportZip": "Exporter en ZIP", "config.packChooseZip": "Choisir un ZIP de sauvegarde Mnemon", "config.packUnnamedZip": "Sauvegarde Mnemon.zip", "config.packZipReady": "Vérifié · {components} composant(s) · {items} élément(s) · {size}", "config.packImportZipAction": "Importation sécurisée", "config.packImportedWhole": "Archive ZIP fusionnée en toute sécurité dans {root}.", "config.syncTitle": "Synchronisation Git", "config.syncSimpleDescription": "Synchronise les composants ci-dessus vers un dépôt Git, sans Fournisseurs tiers ni identifiants", "config.syncLoading": "Lecture de l'état de synchronisation…", "config.syncUnavailable": "Cet Hôte DSH ne fournit pas le canal de synchronisation de dépôt Mnemon.", "config.syncUnavailableReason": "Impossible de lire l'état de synchronisation : {error}", "config.syncGitMissing": "La synchronisation requiert Git {required} ou supérieur", "config.syncRecheck": "Vérifier à nouveau", "config.syncFixCredentials": "Configurer les identifiants", "config.syncRepository": "Dépôt", "config.syncRepositoryHint": "Choisissez le dépôt Git qui conserve votre mémoire", "config.syncChange": "Changer", "config.syncDisconnect": "Déconnecter", "config.syncDisconnectTitle": "Déconnecter ce dépôt ?", "config.syncDisconnectBody": "La mémoire ne se synchronise plus vers {repository} et la synchronisation automatique est désactivée. Rien n'est supprimé ici ni sur le dépôt ; tout jeton d'accès enregistré est retiré.", "config.syncDisconnected": "Dépôt déconnecté.", "config.syncStateChecking": "Vérification du dépôt…", "config.syncStateConnected": "Connecté", "config.syncStateNewBranch": "Connecté · la première synchronisation créera la branche {branch}", "config.syncNoCredential": "le push nécessite une connexion GitHub ou un jeton d'accès", "config.syncNoCredentialToken": "le push nécessite un jeton d'accès", "config.syncIssueAuthHttps": "Identifiants requis ; connectez-vous avec GitHub ou ajoutez un jeton d'accès", "config.syncIssueAuthToken": "Identifiants requis ; ajoutez un jeton d'accès", "config.syncIssueRejectedGitHub": "GitHub a refusé la connexion ; reconnectez-vous ou vérifiez son accès à ce dépôt", "config.syncIssueRejectedGitHubToken": "GitHub a refusé le jeton d'accès enregistré ; remplacez-le", "config.syncIssueRejectedGitHubEnvironment": "GitHub a refusé le jeton dans {env} ; remplacez-le", "config.syncIssueRejected": "L'hôte a refusé le jeton enregistré ; remplacez-le ou indiquez l'utilisateur attendu dans l'adresse", "config.syncIssueRejectedEnvironment": "L'hôte a refusé le jeton dans {env} ; remplacez-le", "config.syncIssueAuthSsh": "Échec de l'authentification SSH ; vérifiez la clé SSH de cet ordinateur", "config.syncIssueAuth": "Accès à ce dépôt refusé", "config.syncIssueNotFound": "Dépôt introuvable ; vérifiez l'adresse et vos permissions", "config.syncIssueNotFoundGitHub": "Dépôt introuvable ; vérifiez l'adresse, car un dépôt privé exige une connexion ou un jeton", "config.syncIssueNetwork": "Impossible de joindre le dépôt ; vérifiez le réseau ou le proxy", "config.syncIssueTimeout": "Le dépôt n'a pas répondu à temps", "config.syncIssueUnknown": "Impossible de lire le dépôt : {error}", "config.syncViaGitHub": "via GitHub @{login}", "config.syncViaGitHubAnonymous": "via une connexion GitHub", "config.syncViaToken": "avec un jeton d'accès", "config.syncViaEnvironment": "avec la variable d'environnement {env}", "config.syncViaSsh": "avec une clé SSH", "config.syncConnectWith": "Se connecter avec", "config.syncModeGitHub": "Compte GitHub", "config.syncModeAddress": "Adresse du dépôt", "config.syncRepoUrl": "Adresse du dépôt", "config.syncRepoUrlPlaceholder": "https://…, git@hote:chemin ou un chemin local absolu", "config.syncRepoUrlInvalid": "Utilisez une URL https:// ou ssh://, git@hote:chemin ou un chemin local absolu", "config.syncRepoUrlCredentials": "Seul un nom d'utilisateur peut figurer dans l'adresse ; saisissez le jeton dans Jeton d'accès", "config.syncToken": "Jeton d'accès", "config.syncTokenOptional": "Facultatif", "config.syncTokenSaved": "Enregistré ; saisissez-en un nouveau pour le remplacer", "config.syncTokenEnvironment": "Utilise la variable d'environnement {env}", "config.syncTokenHint": "Seule une adresse HTTPS nécessite un jeton ; il reste sur cet ordinateur", "config.syncTokenRemove": "Retirer", "config.syncTokenRemoved": "Jeton d'accès retiré.", "config.syncConnect": "Connecter", "config.syncConnecting": "Connexion…", "config.syncSave": "Enregistrer", "config.syncSaving": "Enregistrement…", "config.syncGitHubHint": "Connectez-vous pour choisir ou créer un dépôt ; l'autorisation reste sur cet ordinateur", "config.syncGitHubReadOnly": "Le magasin d'identifiants est en lecture seule ; la connexion ne peut pas être enregistrée", "config.syncGitHubSignIn": "Se connecter avec GitHub", "config.syncGitHubStarting": "Demande d'un code d'appareil…", "config.syncGitHubCode": "Saisissez ce code d'appareil sur GitHub :", "config.syncGitHubCopyOpen": "Copier et ouvrir GitHub", "config.syncGitHubCopied": "Copié ; collez-le sur la page ouverte et l'opération reprendra automatiquement", "config.syncGitHubOpenBlocked": "Le navigateur n'a pas ouvert de nouvelle page ; accédez manuellement à {url}", "config.syncGitHubWaiting": "En attente d'autorisation… l'opération reprendra automatiquement", "config.syncGitHubSignedIn": "Connecté en tant que @{login}", "config.syncGitHubSignOut": "Se déconnecter", "config.syncGitHubFailed": "Échec de la connexion GitHub : {error}", "config.syncGitHubExpired": "Le code d'appareil a expiré ; relancez la connexion", "config.syncGitHubDenied": "L'autorisation a été refusée", "config.syncGitHubExpiredGrant": "L'autorisation GitHub n'est plus valide ; reconnectez-vous", "config.syncGitHubSignInAgain": "Se reconnecter", "config.syncRepositoryLabel": "Dépôt", "config.syncRepositorySearch": "Rechercher des dépôts ou saisir un nouveau nom", "config.syncRepositoriesLoading": "Lecture des dépôts…", "config.syncRepositoriesFailed": "Impossible de lire les dépôts : {error}", "config.syncRepositoriesRetry": "Réessayer", "config.syncRepositoriesNone": "Ce compte n'a encore aucun dépôt ; saisissez un nom pour en créer un", "config.syncRepositoriesEmpty": "Aucun dépôt correspondant", "config.syncRepositoriesMore": "{count} autre(s) dépôt(s) ; saisissez un filtre pour affiner la liste", "config.syncRepositoryPrivate": "Privé", "config.syncRepositoryPublic": "Public", "config.syncRepositoryNoPush": "Sans accès push", "config.syncRepositoryCurrent": "Actuel", "config.syncRepositoryCreate": "Créer le dépôt privé {name}", "config.syncRepositoryCreating": "Création…", "config.syncRepositoryNameInvalid": "Un nom de dépôt accepte lettres, chiffres, points, tirets et underscores", "config.syncPublicTitle": "Utiliser un dépôt public ?", "config.syncPublicBody": "{name} est public : tout le monde peut lire la mémoire qui y est synchronisée.", "config.syncPublicConfirm": "Utiliser quand même", "config.syncRowTitle": "Synchronisation", "config.syncNever": "La synchronisation fusionne d'abord la mémoire du dépôt ici, puis pousse celle de cet ordinateur", "config.syncLast": "Dernière synchronisation : {time}", "config.syncLastMerge": "Dernière fusion : {time}", "config.syncCheck": "Vérifier le distant", "config.syncNow": "Synchroniser maintenant", "config.syncNowRunning": "Synchronisation…", "config.syncDone": "Synchronisé ; {commit} poussé.", "config.runtimeMergeArchived": "{count} mémoire(s) en dépassement ont été conservées localement dans runtime/archived/import-overflow et exclues de la mémoire de travail.", "config.syncDoneMerged": "Synchronisé : {count} mémoire(s) distante(s) fusionnée(s) et {commit} poussé.", "config.syncUpToDate": "À jour ; le dépôt correspond à cet ordinateur.", "config.syncUpToDateMerged": "{count} mémoire(s) distante(s) fusionnée(s) ; le dépôt est à jour.", "config.syncPushFailed": "Validé localement, mais le push n'a pas abouti : {reason}", "config.syncFailed": "Échec de la synchronisation : {error}", "config.syncReasonBusy": "Une autre synchronisation est encore en cours ; réessayez dans un instant", "config.syncReasonNoRepository": "Aucun dépôt n'est connecté", "config.syncReasonGitMissing": "Git est indisponible sur cet ordinateur", "config.syncReasonRemoteEmpty": "Le dépôt ne contient encore aucune sauvegarde ; synchronisez d'abord une fois", "config.syncReasonRejected": "Un autre appareil a mis à jour le dépôt pendant la synchronisation ; synchronisez de nouveau", "config.syncAuto": "Synchronisation automatique", "config.syncAutoOff": "Désactivée", "config.syncAutoHour": "Toutes les heures", "config.syncAutoHours": "Toutes les {hours} heures", "config.syncAutoDay": "Tous les jours", "config.syncAutoDays": "Tous les {days} jours", "config.syncAutoHintOff": "Synchronise uniquement lorsque vous cliquez sur Synchroniser maintenant", "config.syncAutoHintOn": "Synchronise en arrière-plan à cet intervalle, exactement comme Synchroniser maintenant", "config.syncAutoNext": "Prochaine à {time}", "config.syncAutoLast": "Dernière à {time}", "config.syncAutoFailed": "Échec de la dernière synchronisation automatique : {error}", "config.syncHistory": "Historique des sauvegardes", "config.syncHistoryHint": "Chaque synchronisation enregistre une version dans le dépôt", "config.syncHistoryView": "Afficher", "config.syncHistoryLoading": "Lecture…", "config.syncHistoryEmpty": "Le dépôt ne contient encore aucune sauvegarde.", "config.syncHistoryMore": "Charger les versions antérieures", "config.syncHistoryCapped": "Seules les {count} dernières versions sont listées ici", "config.syncHistoryFrom": "depuis {machine}", "config.syncHistoryUnknownMachine": "un ordinateur sans nom", "config.syncComponentRuntime": "Mémoire d'exécution", "config.syncComponentDocuments": "Documents du projet", "config.syncComponentSpaces": "Espaces de mémoire", "config.syncCountRuntime": "{count} mémoire(s) d'exécution", "config.syncCountDocuments": "{count} document(s)", "config.syncCountSpaces": "{count} espace(s) de mémoire", "config.syncCompareTitle": "Comparer avec le dépôt distant", "config.syncCompareLoading": "Lecture du dépôt distant…", "config.syncCompareRemote": "La version distante provient de {machine} · {time}", "config.syncCompareSame": "Identique", "config.syncCompareDiffers": "Diffère", "config.syncCompareRuntime": "{remote} uniquement sur le distant · {local} uniquement ici", "config.syncCompareConflicts": "{count} divergence(s) de formulation", "config.syncCompareAllSame": "Cet ordinateur et le dépôt distant sont identiques ; rien à synchroniser.", "config.syncCompareTruncated": "D'autres différences existent au-delà de ces compteurs.", "config.syncCompareRemovals": "Le dépôt distant enregistre {count} suppression(s) ; une synchronisation les applique ici.", "config.syncCompareConflictNote": "{count} sujet(s) présentent des formulations différentes : la synchronisation conserve les deux, et la Réconciliation mémoire pourra les fusionner ensuite.", "config.syncCompareShowConflicts": "Afficher", "config.syncCompareGoReview": "Ouvrir la Réconciliation mémoire", "config.syncCompareHeldBack": "{count} mémoire(s) distante(s) ont été supprimées ici précédemment ; la synchronisation les maintient écartées.", "config.syncCompareRevive": "Les restaurer", "config.syncCompareReviving": "Restauration…", "config.syncCompareRevived": "{count} mémoire(s) restaurée(s).", "config.syncDiffHere": "Local", "config.syncDiffThere": "Distant", "config.syncMergeOnly": "Fusionner localement uniquement", "config.syncMerging": "Fusion…", "config.syncMerged": "Distant {commit} fusionné.", "config.syncMergedCount": "{count} mémoire(s) distante(s) fusionnée(s).", "config.syncAdvanced": "Avancé", "config.syncBranch": "Branche", "config.syncSubdir": "Répertoire dans le dépôt", "config.syncDefaultValue": "Par défaut {value}", "config.syncBranchInvalid": "Nom de branche invalide", "config.syncSubdirInvalid": "Utilisez un répertoire relatif à l'intérieur du dépôt", "config.syncAuthor": "Auteur des commits", "config.syncAuthorDefault": "Par défaut", "config.syncAuthorMachine": "Git de cet ordinateur", "config.syncAuthorCustom": "Personnalisé", "config.syncAuthorDefaultNote": "Utilise l'identité Git de cet ordinateur ; bascule sur {identity} si non configurée", "config.syncAuthorMachineNote": "Utilise l'identité Git de cet ordinateur, sinon celle par défaut", "config.syncAuthorName": "Nom", "config.syncAuthorEmail": "E-mail", "config.syncAuthorEmailInvalid": "Adresse e-mail invalide", "config.syncAdvancedNote": "Après enregistrement, la prochaine synchronisation écrira sur la nouvelle branche ou le nouveau répertoire", "config.syncMachineName": "Nom de cet ordinateur", "config.syncMachineHostname": "Nom d'hôte", "config.syncMachineCustom": "Personnalisé", "config.syncMachineNameLabel": "Nom", "config.syncMachineHostnameNote": "Utilise le nom d'hôte ; l'historique des sauvegardes affiche « depuis {name} »", "config.syncMachineCustomNote": "L'historique des sauvegardes affiche « depuis {name} »", "config.syncMachineNameInvalid": "Jusqu'à 120 caractères sur une seule ligne", "config.syncMachineRenameNote": "Après enregistrement, les synchronisations suivantes utilisent le nouveau nom ; les versions antérieures conservent l'ancien", "config.syncAdvancedSaved": "Paramètres avancés enregistrés.", "config.reconcileTitle": "Réconciliation mémoire", "config.reconcileDescription": "Un modèle lit la mémoire fusionnée et propose des modifications ; rien n'est écrit avant votre révision", "review.reconcile": "Réconcilier", "review.reconciling": "Réconciliation…", "review.refresh": "Actualiser", "review.empty": "Rien à réviser", "review.pending": "{count} en attente de révision", "review.failed": "Échec de lecture du journal de révision : {error}", "review.planned": "{operations} proposition(s) préparée(s) ; rien n'est écrit avant votre validation.", "review.none": "Le modèle n'a trouvé aucune modification à apporter à la mémoire fusionnée.", "review.statusPending": "En attente", "review.statusAccepted": "Accepté", "review.statusRejected": "Rejeté", "review.expand": "Ouvrir", "review.collapse": "Fermer", "review.accept": "Accepter", "review.reject": "Rejeter", "review.apply": "Appliquer", "review.applying": "Application…", "review.reopen": "Rouvrir", "review.applied": "{count} modification(s) appliquée(s).", "review.appliedAt": "Appliqué à {time}", "review.appliedCount": "{count} sur {total} opération(s) exécutée(s)", "review.applyFailed": "Échec de l'application : {error}", "review.meta": "{count} modification(s) · depuis {machine} · {time}", "review.foreign": "Touche la mémoire issue de : {machines}", "review.opinions": "Avis", "review.noOpinions": "Aucun avis pour l'instant", "review.authorUser": "Vous", "review.authorAgent": "Modèle", "review.opinionPlaceholder": "Laissez un avis pour la prochaine réconciliation", "review.opinionSend": "Ajouter un avis", "review.opinionAdded": "Votre avis a été enregistré.", "review.opAdd": "Ajouter à la mémoire {target} : {content}", "review.opReplace": "Réécrire la mémoire {target} : « {from} » devient « {to} »", "review.opRemove": "Supprimer de la mémoire {target} : {text}", "review.opArchive": "Archiver le document {id}", "review.targetMemory": "projet", "review.targetUser": "utilisateur", "review.guidanceLabel": "Objectif de la réconciliation", "review.guidanceHint": "Facultatif : indiquez ce que vous attendez de cette réconciliation ; le modèle le lit sans y puiser d'autorisation supplémentaire", "review.guidancePlaceholder": "Par exemple : deux préférences disent la même chose, fusionnez-les en une seule", "review.guided": "Planifié selon vos consignes", "review.remoteEntries": "{count} entrée(s) lue(s) depuis la branche absente sur cette installation", "review.selectAll": "Tout", "review.selectNone": "Aucun", "review.selectHint": "Cochez les modifications à appliquer ; celles non cochées restent pour le tour suivant", "review.selected": "{count} sur {total} sélectionné(s)", "review.applyCount": "Appliquer ({count})", "review.noSelection": "Sélectionnez au moins une modification.", "review.history": "Plans appliqués ({count})", "review.historyTitle": "Plans appliqués", "review.historyHint": "Ces plans ont déjà été exécutés ; ils sont conservés en lecture. En rouvrir un n'annule pas ses écritures.", "review.historyEmpty": "Aucun plan n'a encore été exécuté.", "review.rejectedHint": "Ce plan a été rejeté ; laissez un avis et rouvrez-le, ou demandez à l'IA d'en préparer un nouveau.", "skills.label": "Compétences", "skills.groupSurface": "Surfaces", "skills.groupPlacement": "Emplacement et mises à jour", "skills.groupEvolution": "Automatisation", "skills.groupGeneration": "Modèles et génération", "skills.groupSources": "Marché et répertoires", "skills.badgeDefault": "Par défaut", "skills.badgeCustom": "Personnalisé · {count}", "skills.parametersBadge": "Seuil {threshold} · {idle} s", "skills.evolution": "Auto-évolution", "skills.allowCreate": "Suggérer de nouvelles compétences", "skills.allowCreateHint": "Autorise les bilans à proposer de nouvelles compétences ; les suggestions existantes restent gérables manuellement", "skills.allowUpdate": "Suggérer des améliorations de compétences", "skills.allowUpdateHint": "Autorise les bilans à améliorer les compétences existantes ; les bilans se mettent en pause si les deux types de suggestions sont désactivés", "skills.targetScope": "Destination des nouvelles compétences", "skills.roots.title": "Répertoires des nouvelles compétences", "skills.roots.hint": "S'applique à la création, aux brouillons et aux installations depuis le marché, en priorité sur la destination ci-dessus.", "skills.roots.enabled": "Personnaliser les répertoires de création", "skills.roots.default": "Répertoire de création par défaut", "skills.roots.invalid": "Sélectionnez au moins un répertoire et incluez celui par défaut dans les choix.", "skills.root.project-dsh": "Projet .dsh/skills", "skills.root.project-agents": "Projet .agents/skills", "skills.root.user-dsh": "Utilisateur .dsh/skills", "skills.root.user-agents": "Utilisateur .agents/skills", "skills.allowLinkedUpdates": "Autoriser la mise à jour des compétences liées", "skills.allowLinkedUpdatesHint": "Les mises à jour écrivent directement dans les cibles des liens symboliques partagés entre Agents ; n'activez que pour des chemins de confiance.", "skills.targetScopeHint": "Utilisateur par défaut ; Suivre le stockage associe les portées d'espace de travail au Projet, modifiable lors de l'adoption.", "skills.targetScope.user": "Utilisateur", "skills.targetScope.project": "Projet", "skills.targetScope.storage": "Suivre le stockage", "skills.evolutionHint": "Analyse les conversations et propose des mises à jour de compétences ; les sessions de tâches sont conservées localement.", "skills.autoAdoptDailyLimit": "Candidats automatiques par jour", "skills.autoAdoptTimeZone": "Fuseau horaire du quota quotidien", "skills.autoBudgetHint": "Par jour calendaire dans ce fuseau horaire (0 met en pause le traitement auto) ; les actions manuelles restent ouvertes.", "skills.autoBudgetInvalid": "Indiquez un entier de 0 à 100 et un fuseau horaire IANA valide ou local.", "skills.autoAdopt": "Adopter automatiquement les nouvelles suggestions", "skills.autoAdoptHint": "Requiert les backtests ; n'adopte qu'avec zéro régression sur les cas texte (jusqu'à 2 tentatives).", "skills.autoBacktest": "Backtester les brouillons", "skills.autoBacktestHint": "Compare un nouveau brouillon à la version actuelle sur ses cas de test", "skills.parameters": "Paramètres de bilan", "skills.draftGeneration": "Génération de brouillons", "skills.draftMaxTokens": "Limite de tokens de sortie du brouillon", "skills.draftRetryMaxTokens": "Limite de tokens de sortie en cas de nouvel essai", "skills.draftBudgetHint": "Inclut le raisonnement et le fichier SKILL.md complet ; réessaie une fois en cas de troncature si la limite de réessai est plus élevée.", "skills.reviewThreshold": "Seuil de bilan", "skills.idleSeconds": "Attente d'inactivité (s)", "skills.cooldownSeconds": "Intervalle de bilan (s)", "skills.minConfidence": "Confiance minimale", "skills.expiryDays": "Expiration des suggestions (jours)", "skills.maxPendingPerSession": "En attente par conversation", "skills.casesPerRun": "Cas par backtest", "skills.invalid": "{field} doit être compris entre {min} et {max}", "skills.hints": "Dans la conversation", "skills.hintsHint": "Affiche sous le tour les compétences utilisées et les nouvelles suggestions", "skills.sidebar": "Entrée dans la barre latérale", "skills.sidebarHint": "Affiche Compétences comme entrée dédiée dans la barre latérale plutôt que dans le Système de mémoire", "skills.models": "Modèles par défaut", "skills.modelsHint": "Suit la route de l'Agent de tâches lorsqu'il est réglé sur Automatique.", "skills.modelAuto": "Automatique (suivre l'Agent de tâches)", "skills.draftModel": "Modèle de brouillon d'évolution", "skills.draftModelHint": "Rédige et révise les brouillons de compétences pour les suggestions", "skills.runModel": "Modèle d'exécution d'évaluation", "skills.runModelHint": "Exécute les cas de backtest et note les résultats", "skills.directories": "Répertoires de compétences", "skills.directoriesHint": "Laissez vide pour utiliser les répertoires de compétences utilisateur par défaut.", "skills.dshHome": "Répertoire DSH", "skills.agentsHome": "Répertoire Agents partagé", "skills.market": "Sources du marché", "skills.marketHint": "Gère les catalogues du marché de compétences et les index de recherche.", "skills.marketRefresh": "Actualiser", "skills.marketRefreshing": "Actualisation…", "skills.marketAddPlaceholder": "Dépôt GitHub, URL d'index ou chemin local", "skills.marketAdd": "Ajouter", "skills.marketAdding": "Ajout…", "skills.marketRemove": "Retirer", "skills.marketBuiltin": "Intégrée", "skills.marketSkillCount": "{count} compétence(s)", "skills.marketEmpty": "Aucune source de marché configurée.", "skills.statusCount": "{count} compétence(s)", "skills.statusOn": "Auto-évolution activée · {waiting} en attente", "skills.statusIdle": "Auto-évolution activée", "skills.statusOff": "Auto-évolution désactivée", "skillTail.label": "Compétences du tour", "skillTail.reviewing": "Analyse en cours", "skillTail.suggested": "{count} suggestion(s)", "skillTail.failed": "Échec du bilan", "skillTail.openSkill": "Ouvrir {name} dans Compétences", "skillTail.openSuggestions": "Ouvrir les suggestions dans Compétences" }; // vendor/dsh-mnemon/src/client/locales/ja.ts const coreJa = { "composer.expand": "入力欄を展開", "composer.collapse": "入力欄を折りたたむ", "composer.collapsed": "入力欄を折りたたみました", "tab.label": "メモリシステム", "nav.aria": "Mnemon ページ", "nav.status": "ステータス", "nav.runtime": "ランタイムメモリ", "nav.runtimeDetail": "USER / MEMORY", "nav.documents": "プロジェクトドキュメント", "nav.documentsDetail": "索引とアーカイブ", "nav.spaces": "メモリスペース", "nav.spacesDetail": "グラフと検索", "common.refresh": "更新", "common.openConfiguration": "設定を開く", "common.loading": "読み込み中…", "common.cancel": "キャンセル", "common.close": "閉じる", "common.showing": "{visible} / {total} 件を表示中", "common.showMore": "さらに {count} 件表示", "header.backToConversation": "会話に戻る", "header.configure": "設定", "header.noticeSummary": "お知らせ {count} 件 · {labels}", "header.noticeRemoteReadOnly": "リモート読み取り専用", "header.noticeIdleReview": "アイドルレビュー", "header.compositionHint": "クリックして設定画面で構成を変更できます。", "header.checking": "確認中", "header.connected": "接続済み", "header.unavailable": "利用不可", "header.notReady": "Mnemon は準備できていません", "workspace.viewing": "表示中のワークスペース", "workspace.selectorAria": "確認するメモリワークスペースを選択", "workspace.excluded": "メモリ対象外", "workspace.excludedDetail": "このワークスペースとそのサブエージェントは、メモリ注入、ツール実行、自動レビューの対象外です。既存データは引き続き閲覧でき、除外を解除すると再開します。", "workspace.excludeTitle": "メモリ対象外のワークスペース", "workspace.excludeHint": "ワークスペースの絶対パスを 1 行につき 1 つ入力してください(~ およびシンボリックリンクに対応)。", "workspace.excludeCount": "{count} 件除外中", "workspace.excludeNone": "なし", "workspace.excludePlaceholder": "/path/to/private-workspace", "workspace.excludeNote": "今後のターンから適用されます。既存データとセッション履歴は変更されません。", "workspace.invalidExclusions": "{count} 件の除外パスが無効またはアクセス不可のため無視されました。ストレージ設定でパスを確認してください。", "workspace.unavailable": "現在のワークスペースを特定できなかったため、パス除外は適用されていません。", "workspace.storageMode": "保存範囲", "workspace.storageModeAria": "保存範囲:{mode}", "workspace.mismatchTitle": "表示中のディレクトリがこのセッションと一致していません", "workspace.mismatchShort": "会話のワークスペース外", "workspace.selectedRoot": "表示中:{root}", "workspace.effectiveRoot": "適用中:{root}", "workspace.align": "一致させる", "workspace.remoteReadOnly": "リモートアクセスは読み取り専用です。ここでメモリを管理するには、mnemon プロファイル設定に remoteAccess: trusted-host を設定して DSH を再起動してください。", "sourcePage.instance": "ソースインスタンス", "sourcePage.instanceAria": "ソースインスタンスを選択", "sourcePage.summaryAria": "ソースのステータスと権限の概要", "sourcePage.package": "パッケージ", "sourcePage.availability": "可用性", "sourcePage.availability.ready": "利用可能", "sourcePage.availability.degraded": "機能制限", "sourcePage.availability.unavailable": "利用不可", "sourcePage.role": "セマンティックロール", "sourcePage.revision": "現在のリビジョン", "sourcePage.permissions": "許可された機能", "sourcePage.diagnostics": "診断情報", "sourcePage.configuration": "宣言的設定", "sourcePage.configurationDescription": "項目はホストのサニタイズ済み管理記述子に基づいています。送信時にこのインスタンスとリビジョンに対して再認可されます。", "sourcePage.configLoading": "設定を読み込み中…", "sourcePage.configSave": "保存", "sourcePage.configSaving": "保存中…", "sourcePage.configSaved": "設定を送信しました。ソースのステータスを更新しています。", "sourcePage.secretPlaceholder": "既存のシークレットを保持する場合は空欄のままにしてください", "sourcePage.unavailable": "ソースを利用できません", "sourcePage.unavailableDescription": "このスコープで呼び出し可能なインスタンスがありません。ホストおよび Headless モードのメモリ動作はこのページの影響を受けません。", "turnTail.label": "このターンのメモリ", "turnTail.recall": "想起 {count}", "turnTail.write": "書き込み {count}", "turnTail.documents": "ドキュメント検索 {count}", "turnTail.inspect": "確認 {count}", "turnTail.failed": "失敗 {count}", "turnTail.toolList": "このターンのメモリツール", "turnTail.more": "他 {count} 件", "turnTail.openTool": "{tool} のメモリページを開く", "turnTail.tool.recall": "メモリスペース検索", "turnTail.tool.related": "関連メモリ検索", "turnTail.tool.documentSearch": "プロジェクトドキュメント検索", "turnTail.tool.documentManage": "プロジェクトドキュメント更新", "turnTail.tool.documentCreate": "プロジェクトドキュメント作成", "turnTail.tool.runtime": "ランタイムメモリ更新", "turnTail.tool.remember": "メモリスペースに保存", "turnTail.tool.link": "メモリを関連付け", "turnTail.tool.forget": "メモリを削除", "turnTail.tool.status": "メモリステータス", "turnTail.tool.spaces": "メモリスペース一覧", "turnTail.tool.spaceCreate": "メモリスペース作成", "turnTail.tool.spaceUpdate": "メモリスペース更新", "turnTail.tool.spaceMerge": "メモリスペース統合", "turnTail.tool.viewRoute": "メモリ読み取り", "turnTail.tool.viewAction": "メモリ更新", "receipt.written": "保存済み", "receipt.updated": "更新済み", "receipt.pending": "送信済み(プロバイダーの確認待ち)", "receipt.skipped": "スキップ", "receipt.partial": "一部保存済み", "receipt.unfinished": "未完了", "receipt.failed": "失敗", "receipt.view": "メモリスペースで表示", "receipt.viewRuntime": "ランタイムメモリで表示", "receipt.unembedded": "ベクトル未生成で保存されました。埋め込みに失敗したため、このメモリは現在セマンティック検索の対象外です。埋め込みサービスが利用可能になったら、Mnemon Native 埋め込み設定の「ステータス確認」から補完できます。", "receipt.unembeddedNoService": "ベクトル未生成です。利用可能な埋め込みサービスがないため、現在はセマンティック検索の対象外ですが、キーワード検索では引き続き見つかります。埋め込みサービスを接続後、Mnemon Native 埋め込み設定の「ステータス確認」から補完できます。", "taskAgent.ready": "タスクエージェント準備完了", "taskAgent.unavailable": "タスクエージェント利用不可", "saveAction.button": "メモリに保存", "saveAction.tooltip": "この返信をメモリに保存", "saveAction.title": "メモリに保存", "saveAction.hint": "タスクエージェントが保存の要否を判断し、要約・重複除去してメモリスペースに書き込みます。", "saveAction.fetching": "メッセージ本文を抽出中…", "saveAction.missing": "セッションログからこのメッセージ本文を抽出できませんでした。", "saveAction.candidate": "内容", "saveAction.truncated": "返信が長いため、先頭 {limit} 文字のみ読み込まれています。", "saveAction.submit": "保存", "saveAction.submitting": "保存中…", "saveAction.readOnly": "このデプロイメントは読み取り専用のため、メモリへの書き込みは無効です。", "saveAction.close": "閉じる", "saveAction.hintDirect": "選択した保存先に直接書き込みます。", "saveAction.to": "保存先", "saveAction.to.agent": "自動", "saveAction.to.agentDetail": "エージェントが保存の要否と適切なメモリスペースを判断します", "saveAction.to.memory": "作業メモリ(MEMORY.md)", "saveAction.to.user": "ユーザープロファイル(USER.md)", "saveAction.to.space": "メモリスペース · {provider}", "saveAction.save": "保存", "saveAction.saving": "保存中…", "saveAction.saved.runtime": "{target}に保存しました · 現在 {count} 件", "saveAction.saved.runtimeMaintained": "容量を整理して{target}に保存しました · 現在 {count} 件", "saveAction.saved.space": "メモリスペース「{space}」に保存しました", "saveAction.saved.spacePending": "メモリスペース「{space}」に送信しました(プロバイダーが後で確認します)", "saveAction.saved.spaceOther": "メモリスペース「{space}」からの応答:{action}", "saveAction.saved.duplicate": "すでに保存されているため、重複書き込みは行われませんでした。", "saveAction.unavailable": "この保存先は現在書き込めません。", "saveAction.place.delimiter": "{target}のエントリには § を含められません。削除してから保存してください。", "saveAction.place.tooLong": "このテキストは約 {size} あり、{target}の 1 件あたりの上限({limit})を超えています。短くしてください。", "saveAction.place.orAgent": " またはエージェントに判断を任せてください。", "saveAction.place.full": "{target}は {used} / {limit} 使用中です。保存前に容量を整理します。既存エントリは約 {keep} 分のみ残し、残りは作業メモリから移されます。", "saveAction.place.fullAll": "{target}は {used} / {limit} 使用中です。保存前に容量を整理するため、既存エントリはすべて作業メモリから移されます。", "saveAction.place.userCondense": "ユーザープロファイルは {used} / {limit} 使用中です。保存前にタスクエージェントが既存内容を約 {keep} 以内に圧縮します(アーカイブは残りません)。", "saveAction.place.userTooLong": "このテキストは約 {size} あり、整理後のユーザープロファイルの上限({max})を超えています。短くしてください。", "saveAction.place.userFull": "ユーザープロファイルが上限に達しており、整理にはタスクエージェントが必要です。先にランタイムメモリでエントリを削除するか、別の保存先を選んでください。", "saveAction.noPlace": "現在このテキストを書き込める保存先がありません。", "status.title": "システムステータス", "status.description": "dsh-brain-mnemon、メモリプロバイダー、各ストレージ層の稼働状況。", "status.nominal": "システム正常", "status.workflowUnavailable": "バックグラウンド保守は停止中", "status.workflowIdleReview": "アイドルレビュー", "status.workflowRuntimeCapacity": "ランタイム容量メンテナンス", "status.workflowUnsupported": "現在の戦略は次のタスクを実行しません:{workflows}。レビュー設定を有効にするだけでは開始されません。メモリシステムで階層戦略など対応する戦略を選択してください。手動操作は引き続き利用できます。", "status.reviewFailed": "アイドルレビューに失敗しました", "status.reviewFailedDetail": "このチェックポイントは完了せず、自動再実行されません。以降のレビューはクールダウンとセッション上限に従います。", "status.reviewPartial": "一部の書き込みは確定済みです。ロールバックはされていないため、以下の実行記録を確認してください。", "status.reviewTeamPaused": "Agent Teams 互換設定によりアイドルレビューは一時停止しています。継続するには、「プラグイン → dsh-brain-mnemon」のアイドルレビュー設定で「制限付きタスクエージェントレビュー」を選択してください。検索と書き込みの設定は変わりません。", "status.reviewConfirmationPaused": "メモリ書き込みの確認が有効なため、アイドルレビューは一時停止しています。手動での編集は引き続き可能です。", "status.reviewToolAccessPaused": "自動レビューに必要な完了ツールが現在利用できません。今回のチェックポイントは試行回数を消費せずにスキップされました。次の対象ターン後に再確認します。このセッションのツール制限や承認設定を確認してください。", "status.reviewWatermarkUsage": "セッション内のレビュー試行:{attempts} / {max}(復元 {restored} 回)。", "status.reviewWatermarkNext": "次回のレビューは {time} 以降です。新たに対象となる会話チェックポイントも必要です。", "status.reviewWatermarkPaused": "自動レビューを一時停止しました:永続化された上限情報を読み書きできません。", "status.reviewWatermarkRecovery": "会話を続けると再試行されます。エラーが続く場合は、このストレージルートを使用中のホストを停止したうえで state/idle-review 配下のセッション状態またはロックを確認してください。状態ファイルを削除すると上限はリセットされます。", "config.reviewPersistWatermark": "再オープン後もレビュー上限を保持", "config.reviewPersistWatermarkHint": "ストレージルートおよび親セッションごとに試行回数とクールダウンを保持します(失敗・キャンセルも含む)。", "status.reviewRun": "レビュー実行:{id}", "status.reviewContextWindow": "有界チェックポイント(spawn)を選択するか、親会話全体を収容できるコンテキストウィンドウを持つタスクエージェントモデルを選択してください。", "config.reviewTitle": "アイドルレビュー", "config.reviewDescription": "会話の待機中にメモリを整理します。オフでも検索と書き込みは動作します", "config.reviewEnabled": "アイドルレビューを有効にする", "config.reviewRuntimeMemory": "ランタイムメモリに書き込む", "config.reviewRuntimeMemoryHint": "明示された好みやルールのみ記録します。オフの場合はプロジェクトドキュメントのみ作成します", "config.reviewSilent": "アイドルレビューをサイレント実行", "config.reviewSilentHint": "オフにすると、自動 spawn レビューが会話のサブエージェント一覧に表示されます。", "config.reviewLimits": "レビュー制限", "config.reviewProvider": "レビュー方式", "config.reviewSpawn": "有界チェックポイント(spawn)", "config.reviewSpawnHint": "タスクエージェントは上限付きのチェックポイントのみ参照します", "config.reviewFork": "完全な親コンテキスト(fork)", "config.reviewForkHint": "タスクエージェントが親会話の全コンテキストを引き継ぎます", "config.reviewFallback": "fork が利用できない場合(開始前のみ)", "config.reviewSkip": "今回のレビューをスキップ", "config.reviewAgentTeams": "Agent Teams 互換モード", "config.reviewTeamPause": "レビューを一時停止", "config.reviewTeamPauseHint": "Agent Teams 稼働中はレビューをスキップします", "config.reviewTeamScoped": "制限付きタスクエージェントレビュー", "config.reviewTeamScopedHint": "Teams ツールなしで制限付きタスクエージェントがレビューします", "config.review.minIntervalMs": "最小レビュー間隔(秒)", "config.review.maxPerSession": "セッションあたりの最大試行回数", "config.review.maxContextChars": "spawn チェックポイント文字数上限", "config.review.maxTokens": "1 リクエストあたりのモデル出力トークン上限", "config.reviewLimitInvalid": "{field}は {min}〜{max} の範囲で指定してください", "status.checkRequired": "確認が必要", "status.memoryOff": "メモリ無効", "status.memoryOffDetail": "会話はメモリを使用せずに続行されます。", "status.compositionStale": "最新のコンポーネント変更が反映されていません", "status.compositionStaleDetail": "メモリは以前の構成のまま稼働しています。", "status.strategyFallback": "選択されたメイン戦略が稼働していません", "status.strategyFallbackDetail": "現在利用可能な唯一のメイン戦略が一時的にメモリを構成しています。", "status.reasonNoStrategy": "稼働中のメイン戦略がありません。", "status.reasonNoSource": "稼働中のメモリソースがありません。", "status.reasonNotComposed": "メモリコンポーネントを読み込み中です。", "status.reasonSelectedStrategyOff": "選択されたメイン戦略が稼働しておらず、代替可能なメイン戦略が複数あります。", "status.reasonDependency": "{component} に必要な {requirement} が不足しています。", "status.reasonConflict": "競合するコンポーネントがあります。", "status.reasonRejected": "構成が拒否されました:{detail}", "status.layerOffDetail": "設定で再度有効にすると再開します", "status.layerStoppedDetail": "コンポーネントはオンですが稼働していません", "status.layerMemoryOffDetail": "メイン戦略が稼働すると利用可能になります", "status.rechecking": "確認中…", "status.aria": "Mnemon 稼働ステータス", "status.engine": "メモリエンジン", "status.engineUnavailable": "Mnemon 利用不可", "status.versionWaiting": "バージョン情報を待機中", "status.pluginChecking": "プラグイン状態を確認中", "status.pluginReady": "プラグインは正常に稼働中", "status.nativeAria": "Mnemon Native ステータス", "status.nativeCliMissing": "Mnemon CLI が見つかりません", "status.providersTitle": "メモリプロバイダー", "status.providersDescription": "稼働中のプロバイダーとメモリスペースの接続状況。", "status.providersAria": "メモリプロバイダーステータス", "status.providersEnabled": "{enabled} / {total} 有効", "status.providersOff": "他 {count} 件のプロバイダーが無効", "status.providerState.disabled": "オフ", "status.providerState.idle": "サービス準備完了 · 有効なメモリスペースなし", "status.providerState.healthy": "接続正常", "status.providerState.unhealthy": "接続の確認が必要", "status.providerSpaces": "{active} / {total} メモリスペースが稼働中", "versions.checkAction": "バージョン", "versions.title": "バージョンの確認と更新", "versions.description": "現在のインストールを確認し、必要に応じて更新します。dsh-brain-mnemon を展開すると各サブパッケージを管理できます。", "versions.missing": "未インストール(任意)", "versions.restart": "再起動が必要", "versions.local": "ローカルバージョン", "versions.modeNpmCli": "npm", "versions.hintNpm": "npm で管理されています。ここで更新するか、ホスト端末で mnemon update を実行してください。", "versions.hintNpmMissing": "npm ランチャーは見つかりましたが、ホストで npm を利用できません。Node.js 環境を確認してください。", "versions.hintNpmUnmanaged": "現在の npm はこのグローバル CLI インストールを管理していません。元の Node.js 環境を使うか、以下の手順で移行してください。", "versions.hintUnreadable": "CLI は見つかりましたがバージョンを読み取れませんでした。ホスト端末でコマンドを確認するか再インストールしてください。", "versions.hintStarter": "dsh-brain-mnemon Starter とともに管理されています。検証済みの組み合わせを使うには Starter を更新してください。", "versions.npmRecommended": "npm によるインストールと保守", "versions.npmMaintenance": "npm で CLI を保守", "versions.npmInstall": "npm でインストール(推奨)", "versions.npmMigrate": "npm に移行(推奨)", "versions.npmRepair": "npm インストールの確認・修復", "versions.npmRepairDetail": "上のインストール状況を確認してください。再インストールする場合は、DSH ホストの端末で次のコマンドを実行します(Node.js 22+)。", "versions.npmUpdateDetail": "今後の更新には次のコマンドを実行し、「再確認」をクリックして反映を確認してください。", "versions.npmInstallDetail": "この独立 CLI が必要なのは Mnemon Native のみです。利用する場合は DSH ホストの端末で次のコマンドを実行してください(Node.js 22+)。", "versions.npmMigrateDetail": "npm に切り替えるには、DSH ホストで次のコマンドを実行してください(Node.js 22+)。", "versions.npmVerify": "インストールされたバージョンを確認し、「再確認」をクリックしてください:", "versions.npmNextSteps": "インストール後:バージョンと実行パスを確認", "versions.npmPath": "npm のグローバル bin ディレクトリを PATH の先頭に配置してください。MNEMON_CLI_PATH または mnemon.cliPath を設定している場合は新しいランチャーに合わせて更新してください。環境変更後に DSH を再起動し、上の実行ファイルパスを確認してください。", "versions.installGuide": "インストール手順", "versions.copy": "コピー", "versions.copied": "コピーしました", "versions.copyCommand": "コマンドをコピー:{command}", "versions.copyFailed": "クリップボードを利用できません。コマンドを選択して手動でコピーしてください。", "versions.readOnly": "この接続は読み取り専用です。バージョン確認とコマンドのコピーは可能ですが、ページからの更新には管理権限のある接続が必要です。", "versions.packages": "サブパッケージのバージョン({count})", "versions.packagesOutdated": "{count} 件の更新あり", "versions.packagesDetail": "展開して保守オプションを表示", "versions.packagesHide": "サブパッケージの詳細を折りたたむ", "versions.packagesHint": "デフォルトのパッケージは Starter と一緒に更新されます。このプロファイルに個別インストールしたパッケージは単独で更新できます。更新後は DSH を再起動してください。", "versions.managedStarter": "Starter と同期管理", "versions.managedProfile": "プロファイルで個別管理", "versions.starterVersion": "Starter 指定", "versions.kind.source": "ソース", "versions.kind.strategy": "戦略", "versions.kind.provider": "プロバイダー", "versions.checking": "リモートリポジトリで新しいバージョンを確認中…", "versions.checkingShort": "確認中…", "versions.recheck": "再確認", "versions.failed": "バージョン操作に失敗しました", "versions.timeout": "バージョン確認がタイムアウトしました。ネットワークを確認して再試行してください。", "versions.current": "最新です", "versions.available": "更新あり", "versions.unknown": "確認できません", "versions.installed": "インストール済み", "versions.latest": "最新", "versions.executable": "実行ファイル", "versions.profileLocation": "プロファイル · {name}", "versions.sourceLocation": "ソースコード", "versions.linkSourceLocation": "ソースコード · プロファイル {name}", "versions.packageLocation": "パッケージディレクトリ", "versions.update": "更新", "versions.updating": "更新中…", "versions.updated": "{name} を更新しました", "versions.alreadyCurrent": "すでに最新バージョンです", "versions.restartRequired": "新しい dsh-brain-mnemon プラグインコードを読み込むため DSH を再起動してください。デスクトップアプリの場合は完全に終了してから再度開いてください。", "versions.pendingInstalledTitle": "dsh-brain-mnemon {version} がインストール済みです", "versions.pendingInstalledDetail": "このホストではまだ {running} が稼働中です。反映するには DSH を再起動してください(デスクトップアプリは完全に終了して再起動)。", "versions.pendingPackagesTitle": "{names} を更新しました", "versions.pendingPackagesDetail": "更新を反映するには DSH を再起動してください(デスクトップアプリは完全に終了して再起動)。", "versions.checkedAt": "確認日時:{time}", "versions.latestUnavailable": "リモートの最新バージョンを取得できませんでした。ネットワークを確認して再試行してください。", "versions.modeHomebrew": "Homebrew", "versions.modeGo": "Go install", "versions.modeNpm": "DSH プロファイル", "versions.modeLink": "ローカルリンク", "versions.modeManual": "手動インストール", "versions.modeMissing": "未インストール", "versions.hintHomebrew": "Homebrew で管理されています。新しいリリースがあればここで安全に更新できます。", "versions.hintBrewMissing": "Homebrew インストールを検出しましたが、brew コマンドが見つかりません。", "versions.hintGo": "go install で管理されています。新しいリリースがあればここで安全に更新できます。", "versions.hintDsh": "現在の DSH プロファイルで管理されています。DSH 自身のプラグインインストーラーで更新され、完了後に DSH の再起動が必要です。", "versions.hintPnpm": "現在の DSH プロファイルで管理されています。更新後に DSH を再起動してください。", "versions.hintPnpmMissing": "DSH プロファイルでのインストールを検出しましたが、ホストに pnpm コマンドが見つかりません。pnpm をインストールして DSH を再起動するとここで更新できます。", "versions.hintLink": "ローカルリンクされた開発ビルドです。ローカルの変更を保持するため、ソースディレクトリで取得・ビルドしてください。", "versions.hintInstall": "Mnemon CLI がインストールされていません。必要なのは Mnemon Native のみです。利用する場合はインストールして mnemon を PATH に通すか、MNEMON_CLI_PATH / mnemon.cliPath を設定してください。", "versions.hintManual": "インストール元を安全に特定できません。元のインストール方法を使って手動で更新してください。", "status.activeRatio": "{active} / {total} 有効", "status.runtimeRatio": "ユーザー {user} · プロジェクト {memory}", "status.runtimeBytes": "{bytes} 使用中", "status.runtimeWaiting": "待機中", "status.runtimeWaitingDetail": "ホストのストレージ一覧を待機中", "status.directoryUnsynced": "ディレクトリ未同期", "status.activeMemories": "有効なメモリ {count} 件", "status.documentsWaiting": "ワークスペース待機中", "status.documentsSession": "アクティブなセッションに接続後に利用可能", "status.documentRatio": "アクティブ {active} 件 · アーカイブ {archived} 件", "status.documentUsage": "アクティブ容量 {used} / {limit}", "status.storageDomains": "ストレージドメイン", "status.storageDomainsText": "ランタイムメモリ、メモリスペース、プロジェクトドキュメントの保存先。", "status.storageGlobal": "グローバル", "status.storageWorkspace": "ワークスペース", "status.storageWorkspaces": "集中管理 · ワークスペース分離", "status.storageCustom": "カスタム", "status.storageWaiting": "ストレージドメインのディレクトリを読み込み中…", "status.storageCustomUnset": "カスタムディレクトリは設定されていません。このビューには DSH で設定・有効化済みのカスタムルートのみ表示されます。", "status.storageWorkspaceUnavailable": "現在のセッションには利用可能なワークスペースディレクトリがありません。", "status.storageActiveRoot": "現在の読み書きルート", "status.storageAvailable": "ディレクトリ利用可能", "status.storageNotCreated": "ディレクトリ未作成", "status.storageRuntime": "ランタイムメモリ", "status.storageSpaces": "メモリスペース", "status.storageDocuments": "プロジェクトドキュメント", "status.storageState": "バックグラウンド状態", "status.storageReady": "正常", "status.storageEmpty": "空", "status.storageMissing": "未作成", "status.storageInvalid": "修復が必要", "status.storageItems": "件", "status.storageRuntimeDetail": "USER {user} · MEMORY {memory}", "status.storageSpacesDetail": "有効 {active} 件 · データベース {databases} 件", "status.storageDocumentsDetail": "アクティブ {active} 件 · アーカイブ {archived} 件", "status.storageStateReady": "レビュー上限状態は永続化済みです", "status.storageStateVolatile": "レビュー状態は現在ホストプロセスで保持されています", "status.storageFootnote": "保存範囲は「設定」で切り替えられます。既存データは元の場所に残ります。", "config.aria": "メモリシステム設定", "plugin.openWorkspace": "開く", "config.interfaceTitle": "インターフェース", "config.unsaved": "未保存の変更があります", "config.ready": "保存済み・リアルタイム適用中", "config.displayTitle": "メモリシステムの表示場所", "config.displaySidebar": "サイドバー", "config.displaySidebarHint": "他のワークスペースも閲覧できる独立ページ", "config.displayBuiltin": "会話タブ", "config.displayBuiltinHint": "現在の会話内で開きます", "config.storageTitle": "ストレージ", "storage.usedBy": "使用元", "storage.usedByTitle": "「{component}」のデータはここに保存されます", "storage.userProfileByWorkspace": "ワークスペースごとに独立したユーザープロファイルを持ちます。", "storage.userProfileShared": "すべてのワークスペースでユーザープロファイルを共有します。作業メモリは分離されたままです。", "storage.runtimeSettings": "ランタイムメモリ設定", "storage.default": "デフォルト", "storage.directoryExample": "例:~/Documents/mnemon", "storage.thisWorkspace": "このワークスペース", "storage.moveNote": "適用後は新しい保存先を使用します。既存データは自動移行されません", "storage.chooseDirectory": "ディレクトリを選択", "storage.pickFailed": "ディレクトリ選択ダイアログを開けませんでした。再試行するかパスを直接入力してください。", "config.scopeTitle": "保存範囲", "config.global": "グローバル", "config.workspace": "ワークスペース", "config.workspaces": "集中管理 · ワークスペースごとに分離", "config.workspacesHint": "1 つのルート配下にワークスペースのパスごとのサブディレクトリを作成します", "config.custom": "カスタム", "config.globalScopeHint": "すべてのワークスペースで 1 つのディレクトリを共有します", "config.workspaceScopeHint": "各ワークスペースが独自の .mnemon ディレクトリを保持します", "config.dataDirectory": "データディレクトリ", "config.runtimeSectionScope": "範囲と検索", "config.runtimeDeferred": "低優先度メモリをオンデマンドで読み込む", "config.runtimeDeferredHint": "ピン留めされていない低優先度エントリをプロンプトから省き、モデルが必要に応じて取得します。", "config.runtimeBm25Recall": "作業メモリをオンデマンド検索(実験的)", "config.runtimeBm25RecallLabel": "作業メモリをオンデマンド検索", "config.runtimeBm25RecallHint": "ターンごとに作業メモリとドキュメントのタイトルを照合します。ユーザープロファイルとピン留め項目は常に表示されます。", "config.runtimeIndexPush": "メモリスペースとドキュメントの索引をプッシュ(実験的)", "config.runtimeIndexPushLabel": "メモリスペースとドキュメントの索引をプッシュ", "config.runtimeIndexPushHint": "ステップ 1 でメモリスペースの説明とドキュメント要約を照合し、本文ではなく軽量な索引のみを渡します。", "config.runtimeUserScopeTitle": "ユーザープロファイルの範囲", "config.runtimeInheritance": "ランタイムメモリをサブエージェントに自動共有", "config.runtimeInheritanceHint": "新しいサブエージェントはユーザープロファイルと作業メモリを引き継ぎます。実行中のタスクのコンテキストは変わりません。", "config.runtimeUserScopeStorage": "保存範囲に従う", "config.runtimeUserScopeStorageHint": "MEMORY.md と同じディレクトリに保存されます", "config.runtimeUserScopeGlobal": "グローバルで共有", "config.runtimeUserScopeGlobalHint": "全ワークスペースで共有します(MEMORY.md は引き続き保存範囲に従います)", "config.runtimeSnapshotRefreshTitle": "スナップショットの更新", "config.runtimeSnapshotRefreshOnChange": "変更時に更新", "config.runtimeSnapshotRefreshOnChangeHint": "ランタイムメモリが変更されると、開いているセッションの次のターンで再投影します", "config.runtimeSnapshotRefreshSessionStart": "セッション開始時に固定", "config.runtimeSnapshotRefreshSessionStartHint": "キャッシュ安定のため開いているセッションでは初期スナップショットを固定します。新規セッションと検索ツールは最新のメモリを読み取ります", "config.componentScopeStorage": "保存範囲に従う", "config.componentScopeGlobal": "グローバルで共有", "config.componentScopeSwitchHint": "範囲を切り替えるとデータの読み書き先が変わります。既存データは元のディレクトリに残るため、元に戻せば閲覧できます。Pack エクスポートと Git 同期の対象は現在のストレージルートのみです。", "config.documentsScopeSection": "保存範囲", "config.documentsScopeTitle": "プロジェクトドキュメントの範囲", "config.documentsScopeStorageHint": "選択したストレージルートに MEMORY.md と一緒に保存されます", "config.documentsScopeGlobalHint": "全ワークスペースでグローバルルートのドキュメントを共有します(MEMORY.md は引き続き保存範囲に従います)", "config.memorySpacesScopeTitle": "メモリスペースの範囲", "config.memorySpacesScopeStorageHint": "選択したストレージルートに MEMORY.md と一緒に保存されます", "config.memorySpacesScopeGlobalHint": "全ワークスペースでグローバルルートのメモリスペースとプロバイダー接続を共有します(MEMORY.md は引き続き保存範囲に従います)", "config.runtimeLimitsTitle": "容量上限", "config.runtimeLimitsHint": "デフォルト:ユーザープロファイル {user} KiB、作業メモリ {memory} KiB。", "config.runtime.userLimitBytes": "ユーザープロファイル上限(バイト)", "config.runtime.memoryLimitBytes": "作業メモリ上限(バイト)", "config.runtimeLimitsApply": "リアルタイムに適用されます。上限を下げても既存エントリは削除されません", "config.runtimeLimitInvalid": "「{field}」には 1〜{max} の整数を指定してください。", "config.runtimeAdvanced": "メンテナンス制限", "config.runtimeMaintenanceHint": "移行および圧縮処理の 1 回あたりの出力上限(デフォルト {defaultTokens} トークン)。", "config.runtime.maintenanceMaxTokens": "メンテナンス出力トークン上限", "config.runtimeMaintenanceInvalid": "{field}は {min}〜{max} の範囲で指定してください", "config.documentsLimitsTitle": "アクティブ容量", "config.documentsLimitsHint": "アクティブドキュメントの合計上限(デフォルト {defaultMiB} MiB、最大 {maxMiB} MiB)。", "config.documents.limitBytes": "アクティブドキュメント上限(バイト)", "config.documentsLimitsApply": "リアルタイムに適用されます。上限を下げても既存ドキュメントは削除されません", "config.documentsLimitInvalid": "「{field}」には 1〜{max} の整数を指定してください。", "config.enhancementsRefreshFailed": "設定は更新されましたが、ステータスの更新に失敗しました。このページを開き直してください。", "config.strategyTitle": "メイン戦略", "config.strategyFailed": "メイン戦略を切り替えられませんでした。以前の設定が保持されています。再試行してください。", "config.appliesNow": "即時適用", "config.quoted": "「{name}」", "config.listSeparator": "、", "config.sentenceGap": "", "config.enableStrategy": "「{strategy}」をオンにする", "config.useStrategy": "「{strategy}」を使用", "config.stopStrategies": "{strategies}をオフにする", "config.enableComponentNamed": "「{component}」をオンにする", "board.title": "メモリ構成", "board.description": "各ターンのメモリは以下のコンポーネントから構成されます", "board.loading": "メモリ構成を読み込み中…", "board.componentsUnavailable": "現在メモリコンポーネントを読み込めないため、ここではメモリ層の切り替えのみ行えます。", "board.sources": "メモリソース", "board.enhancements": "拡張機能", "board.running": "稼働中", "board.off": "オフ", "board.notRunning": "停止中", "board.needs": "「{component}」が必要", "board.needsMissing": "未インストールのコンポーネントが必要", "board.unused": "この戦略では未使用", "board.strategyMissing": "選択されたメイン戦略はインストールされていません。", "board.turningOn": "オンにしています…", "board.turningOff": "オフにしています…", "board.noMainMissing": "メモリは無効です:選択されたメイン戦略がインストールされていません", "board.noMainOff": "メモリは無効です:メイン戦略「{strategy}」がオフです", "board.noMainWaiting": "メモリは無効です:「{strategy}」はオンですがまだ稼働していません", "board.contenders": "メモリは無効です:選択された「{strategy}」は稼働しておらず、{strategies}は同時に代替できません", "board.fallback": "選択された「{selected}」が稼働していないため、一時的に「{composing}」がメモリを構成しています", "board.fallbackMissing": "選択されたメイン戦略が未インストールのため、一時的に「{composing}」がメモリを構成しています", "board.noSource": "メモリは無効です:稼働中のメモリソースがありません", "board.memoryOff": "メモリは無効です:現在の構成は利用できません", "board.stale": "最新の変更が反映されていないため、メモリは以前の構成のまま稼働しています", "board.idle": "稼働中ですが構成には未使用:{strategies}", "board.switching": "切り替え中…", "board.composing": "メモリを構成中", "board.lastSource": "稼働中 · 唯一のソース", "board.enabledCount": "{on} / {total} オン", "board.experimental": "実験的", "board.search": "コンポーネントを検索", "board.searchEmpty": "「{query}」に一致するコンポーネントはありません。", "details.open": "「{component}」の詳細", "details.shipped": "同梱", "details.installed": "インストール済み拡張", "details.relations": "依存関係", "details.needs": "必須依存", "details.needsAny": "いずれかが必要", "details.needsMissing": "{capability} を提供するコンポーネントがインストールされていません", "details.neededBy": "依存元", "details.conflicts": "併用不可", "details.options": "オプション", "details.effectOn": "オンにすると次もオンになります:{names}", "details.effectOnReplace": "オンにすると次がオフになります:{names}", "details.effectOnMixed": "オンにすると次もオンになります:{on}/オフになります:{off}", "details.effectOff": "オフにすると次もオフになります:{names}", "details.effectLast": "稼働中の唯一のソースのためオフにできません", "details.currentMain": "現在のメイン戦略", "details.useMain": "メイン戦略として使用", "details.back": "「{component}」に戻る", "config.strategyWorkflowNote": "メイン戦略が対応している場合(階層戦略など)のみ稼働します。非対応の戦略に切り替えても設定は保持されます。", "threeTier.offNote": "このプラグインは無効です。バックグラウンドタスクには対応するメイン戦略も必要です。", "board.otherEnhancements": "他のメイン戦略向け拡張機能({count})", "board.more": "さらにコンポーネントを追加するにはプラグイン一覧を開いてください", "board.relationNeeds": "「{component}」が必要", "board.relationNeededBy": "「{component}」がこれに依存", "options.aria": "「{component}」のオプション", "options.emptySourcesTitle": "メモリソースが選択されていません", "options.emptySourcesConfirm": "メモリソースが 1 つも選択されていません。このまま保存すると、エージェントからランタイムメモリ、ドキュメント、メモリスペースにアクセスできなくなります。自動選択に戻す場合はキャンセルしてデフォルトにリセットしてください。空のまま保存しますか?", "options.apply": "適用", "options.fix": "先にマークされたオプションを修正してください", "options.applying": "適用中…", "options.default": "デフォルト", "options.reset": "デフォルトにリセット", "options.integer": "整数を入力してください", "options.between": "{min}〜{max} の整数を入力してください", "options.atLeast": "{min} 以上の整数を入力してください", "options.atMost": "{max} 以下の整数を入力してください", "options.tooLong": "最大 {max} 文字です", "options.listLimit": "重複なしで最大 {count} 件、各項目最大 {length} 文字", "options.listHint": "1 行に 1 項目ずつ入力してください。", "options.noSources": "現在選択可能なメモリソースはありません。", "options.sourceUnavailable": "{source}(現在利用不可)", "feedback.memoryOff": "メモリは無効です:稼働中のメイン戦略がありません", "feedback.memoryRestored": "メモリが復帰しました(「{strategy}」が構成中)", "feedback.fallback": "「{selected}」はオフのため、一時的に「{composing}」がメモリを構成しています", "feedback.fallbackMissing": "選択されたメイン戦略は未インストールのため、一時的に「{composing}」がメモリを構成しています", "feedback.switchedMain": "「{strategy}」に切り替えました", "feedback.switchedMainOff": "「{strategy}」に切り替え、{others}をオフにしました", "feedback.switchedMainWith": "「{strategy}」に切り替え、必要な{others}もオンにしました", "feedback.switchedMainMixed": "「{strategy}」に切り替えました:{on}をオンにし、{off}をオフにしました", "feedback.externalMain": "メイン戦略が「{strategy}」に変更されました", "feedback.idleMain": "「{component}」も稼働中ですが、構成には使われていません", "feedback.sourceOn": "「{component}」をオンにしました。この層の読み書きを再開します", "feedback.sourceOff": "「{component}」をオフにしました。この層の読み書きを停止します", "feedback.componentOn": "「{component}」をオンにしました", "feedback.componentOff": "「{component}」をオフにしました", "feedback.externalSourceOn": "「{component}」がオンになりました。この層の読み書きを再開します", "feedback.externalSourceOff": "「{component}」がオフになりました。この層の読み書きを停止します", "feedback.externalComponentOn": "「{component}」がオンになりました", "feedback.externalComponentOff": "「{component}」がオフになりました", "feedback.several": "{count} 件のコンポーネントを更新しました", "feedback.enabledWith": "「{component}」と必要な{others}をオンにしました", "feedback.disabledWith": "「{component}」と依存する{others}をオフにしました", "feedback.enabledReplacing": "「{component}」をオンにし、併用できない{others}をオフにしました", "feedback.enabledMixed": "「{component}」をオンにしました:{on}をオンにし、{off}をオフにしました", "feedback.optionsSaved": "「{component}」のオプションを更新しました", "feedback.externalOptions": "「{component}」のオプションが変更されました", "feedback.externalSeveral": "{count} 件のコンポーネントが変更されました", "feedback.undo": "元に戻す", "feedback.undone": "元に戻し、以前の設定を復元しました", "feedback.show": "表示", "feedback.retry": "再試行", "feedback.failed": "変更を適用できませんでした。以前の設定が保持されています。", "feedback.layerResumed": "「{layer}」が再び稼働しました", "config.componentListNote": "下のコンポーネント一覧にある dsh-brain-mnemon/bundle は Starter のグループ用エントリであり、「オフ」と表示されても動作には影響しません。", "layers.disabledBadge": "オフ", "layers.disabledTitle": "{layer} はオフです", "layers.disabledDescription": "このメモリ層は現在メモリ処理に参加していません。", "layers.disabledText": "既存データは保持されます。設定で再度オンにすると再開します。", "layers.stoppedBadge": "停止中", "layers.stoppedTitle": "{layer} は停止中です", "layers.stoppedDescription": "この層のコンポーネントはオンですが稼働していません。", "layers.stoppedText": "既存データは保持されます。コンポーネントが稼働すると自動的に再開します。", "layers.memoryOffBadge": "無効", "layers.memoryOffTitle": "{layer} は無効です", "layers.memoryOffDescription": "メモリが無効なため、この層は利用できません。", "layers.memoryOffText": "既存データは保持されます。設定でメイン戦略を復帰させると再開します。", "config.nativeName": "Mnemon Native", "config.backgroundTitle": "バックグラウンドタスク", "config.backgroundDescription": "記録、アーカイブ、レビューはメイン戦略が対応している場合にバックグラウンドで実行されます。", "config.memoryWriting": "メモリ書き込み", "config.confirmWrites": "メモリツールの書き込み前に確認", "config.confirmWritesHint": "モデルがツール経由でメモリを追加・編集・削除する前に DSH で確認を求めます。", "config.confirmWritesBadge": "アイドルレビューを一時停止", "config.taskAgentSectionTitle": "タスクエージェント", "config.taskAgentSectionDescription": "バックグラウンド保守、メモリへの保存、スペース振り分け、同期レビューを実行します。", "config.taskAgentTitle": "タスクエージェントモデル", "config.taskAgentInherit": "グローバルに従う", "config.taskAgentInheritHint": "新規セッションのモデルに従います", "config.taskAgentConversation": "会話に従う", "config.taskAgentConversationHint": "現在の会話で使用中のモデルに従います", "config.taskAgentFixed": "カスタム", "config.taskAgentFixedHint": "モデルを指定", "config.taskAgentProvider": "モデルプロバイダー", "config.taskAgentModel": "モデル", "config.taskAgentImageInput": "画像入力", "config.taskAgentEffective": "現在の適用モデル", "config.taskAgentSource.fixed": "カスタム", "config.taskAgentSource.session": "現在の会話", "config.taskAgentSource.dsh-default": "新規セッションモデル", "config.taskAgentSource.active-agent": "開いている会話", "config.taskAgentLoading": "モデル一覧を読み込み中", "config.taskAgentUnavailable": "利用可能なプロバイダー / モデルルートがありません", "config.taskAgentLoadFailed": "モデル一覧を読み込めませんでした:{error}", "config.taskAgentPartial": "{count} 件のプロバイダーを読み込めませんでしたが、その他の選択肢は引き続き利用できます。", "config.taskAgentRetry": "再読み込み", "config.customAbsolute": "絶対パス、または ~/ で始まるパスを指定してください", "config.saveFailed": "保存に失敗しました:{error}", "config.readOnly": "このデプロイメントではプラグイン設定は読み取り専用です。", "config.remoteReadOnly": "リモートアクセス時はプラグイン設定が読み取り専用になります。ここで変更するには、mnemon プロファイル設定に remoteAccess: trusted-host を設定して DSH を再起動してください。", "config.unavailable": "メモリシステム設定を読み込めませんでした。ホストがこの Web デプロイメントに設定 RPC を許可しているか確認してください。", "config.discard": "破棄", "config.interactionTurnBar": "ターンメモリバー", "config.interactionTurnBarHint": "各返信の下に、そのターンの想起と書き込みを表示します", "config.interactionSaveAction": "メモリに保存アクション", "config.interactionSaveActionHint": "返信を手動で保存し、確認後に選択した保存先へ書き込みます", "config.packTitle": "バックアップと移行", "config.packUnavailable": "この DSH ホストは Mnemon ZIP バックアップチャネルに対応していません。", "config.packExporting": "エクスポート中…", "config.packInspecting": "検証中…", "config.packImporting": "インポート中…", "config.packExported": "{file}({size})をエクスポートしました。", "config.packFailed": "ZIP 操作に失敗しました:{error}", "config.packSimpleDescription": "上記コンポーネントの ZIP バックアップ(サードパーティプロバイダーと認証情報は含まれません)", "config.packImportZip": "ZIP をインポート", "config.packExportZip": "ZIP をエクスポート", "config.packChooseZip": "Mnemon バックアップ ZIP を選択", "config.packUnnamedZip": "Mnemon バックアップ.zip", "config.packZipReady": "検証完了 · コンポーネント {components} 件 · 項目 {items} 件 · {size}", "config.packImportZipAction": "安全にインポート", "config.packImportedWhole": "ZIP を {root} に安全にマージしました。", "config.syncTitle": "Git 同期", "config.syncSimpleDescription": "上記コンポーネントを Git リポジトリに同期します(サードパーティプロバイダーと認証情報は含まれません)", "config.syncLoading": "同期ステータスを読み込み中…", "config.syncUnavailable": "この DSH ホストは Mnemon リポジトリ同期チャネルに対応していません。", "config.syncUnavailableReason": "同期ステータスを読み込めませんでした:{error}", "config.syncGitMissing": "同期には Git {required} 以降が必要です", "config.syncRecheck": "再確認", "config.syncFixCredentials": "認証情報を設定", "config.syncRepository": "リポジトリ", "config.syncRepositoryHint": "メモリを保存する Git リポジトリを選択します", "config.syncChange": "変更", "config.syncDisconnect": "接続解除", "config.syncDisconnectTitle": "このリポジトリの接続を解除しますか?", "config.syncDisconnectBody": "{repository} へのメモリ同期を停止し、自動同期をオフにします。ローカルとリポジトリ内のデータは削除されませんが、保存されたアクセストークンは削除されます。", "config.syncDisconnected": "リポジトリの接続を解除しました。", "config.syncStateChecking": "リポジトリを確認中…", "config.syncStateConnected": "接続済み", "config.syncStateNewBranch": "接続済み · 初回同期で {branch} ブランチを作成します", "config.syncNoCredential": "プッシュには GitHub サインインまたはアクセストークンが必要です", "config.syncNoCredentialToken": "プッシュにはアクセストークンが必要です", "config.syncIssueAuthHttps": "認証情報が必要です。GitHub でサインインするかアクセストークンを追加してください", "config.syncIssueAuthToken": "認証情報が必要です。アクセストークンを追加してください", "config.syncIssueRejectedGitHub": "GitHub がサインインを拒否しました。再度サインインするか、このリポジトリへのアクセス権を確認してください", "config.syncIssueRejectedGitHubToken": "GitHub が保存済みアクセストークンを拒否しました。トークンを差し替えてください", "config.syncIssueRejectedGitHubEnvironment": "GitHub が {env} のトークンを拒否しました。差し替えてください", "config.syncIssueRejected": "リポジトリホストが保存済みトークンを拒否しました。トークンを差し替えるか、アドレスに必要なユーザー名を含めてください", "config.syncIssueRejectedEnvironment": "リポジトリホストが {env} のトークンを拒否しました。差し替えてください", "config.syncIssueAuthSsh": "SSH 認証に失敗しました。このコンピュータの SSH キーを確認してください", "config.syncIssueAuth": "このリポジトリへのアクセスが拒否されました", "config.syncIssueNotFound": "リポジトリが見つかりません。アドレスとアクセス権を確認してください", "config.syncIssueNotFoundGitHub": "リポジトリが見つかりません。アドレスを確認してください(プライベートリポジトリにはサインインまたはトークンが必要です)", "config.syncIssueNetwork": "リポジトリに接続できません。ネットワークまたはプロキシを確認してください", "config.syncIssueTimeout": "リポジトリからの応答がタイムアウトしました", "config.syncIssueUnknown": "リポジトリを読み込めません:{error}", "config.syncViaGitHub": "GitHub @{login} 経由", "config.syncViaGitHubAnonymous": "GitHub サインイン経由", "config.syncViaToken": "アクセストークン使用", "config.syncViaEnvironment": "環境変数 {env} を使用", "config.syncViaSsh": "SSH キー使用", "config.syncConnectWith": "接続方法", "config.syncModeGitHub": "GitHub アカウント", "config.syncModeAddress": "リポジトリ URL", "config.syncRepoUrl": "リポジトリ URL", "config.syncRepoUrlPlaceholder": "https://…、git@host:path、またはローカル絶対パス", "config.syncRepoUrlInvalid": "https:// または ssh:// の URL、git@host:path、またはローカル絶対パスを入力してください", "config.syncRepoUrlCredentials": "URL にはユーザー名のみ含められます。トークンは「アクセストークン」欄に入力してください", "config.syncToken": "アクセストークン", "config.syncTokenOptional": "任意", "config.syncTokenSaved": "保存済み(新しく入力すると上書きされます)", "config.syncTokenEnvironment": "環境変数 {env} を使用中", "config.syncTokenHint": "トークンは HTTPS アドレスの場合のみ必要で、このコンピュータ内にのみ保存されます", "config.syncTokenRemove": "削除", "config.syncTokenRemoved": "アクセストークンを削除しました。", "config.syncConnect": "接続", "config.syncConnecting": "接続中…", "config.syncSave": "保存", "config.syncSaving": "保存中…", "config.syncGitHubHint": "サインインするとリポジトリの選択や作成ができます。認可情報はこのコンピュータ内にのみ保存されます", "config.syncGitHubReadOnly": "認証情報ストアが読み取り専用のため、サインインを保存できません", "config.syncGitHubSignIn": "GitHub でサインイン", "config.syncGitHubStarting": "デバイスコードを取得中…", "config.syncGitHubCode": "GitHub でこのデバイスコードを入力してください:", "config.syncGitHubCopyOpen": "コピーして GitHub を開く", "config.syncGitHubCopied": "コピーしました。開いたページに貼り付けると自動で処理が続行します", "config.syncGitHubOpenBlocked": "ブラウザが新しいページを開けませんでした。手動で {url} にアクセスしてください", "config.syncGitHubWaiting": "認可を待機中…完了すると自動で続行します", "config.syncGitHubSignedIn": "@{login} としてサインイン中", "config.syncGitHubSignOut": "サインアウト", "config.syncGitHubFailed": "GitHub サインインに失敗しました:{error}", "config.syncGitHubExpired": "デバイスコードの有効期限が切れました。最初からサインインし直してください", "config.syncGitHubDenied": "認可が拒否されました", "config.syncGitHubExpiredGrant": "GitHub の認可が無効になりました。再度サインインしてください", "config.syncGitHubSignInAgain": "再サインイン", "config.syncRepositoryLabel": "リポジトリ", "config.syncRepositorySearch": "リポジトリを検索、または新しい名前を入力", "config.syncRepositoriesLoading": "リポジトリを読み込み中…", "config.syncRepositoriesFailed": "リポジトリを読み込めませんでした:{error}", "config.syncRepositoriesRetry": "再試行", "config.syncRepositoriesNone": "このアカウントにはまだリポジトリがありません。名前を入力して作成してください", "config.syncRepositoriesEmpty": "一致するリポジトリがありません", "config.syncRepositoriesMore": "他 {count} 件のリポジトリ(入力して絞り込み)", "config.syncRepositoryPrivate": "プライベート", "config.syncRepositoryPublic": "パブリック", "config.syncRepositoryNoPush": "プッシュ権限なし", "config.syncRepositoryCurrent": "現在", "config.syncRepositoryCreate": "プライベートリポジトリ {name} を作成", "config.syncRepositoryCreating": "作成中…", "config.syncRepositoryNameInvalid": "リポジトリ名には英数字、ドット、ハイフン、アンダースコアのみ使用できます", "config.syncPublicTitle": "パブリックリポジトリを使用しますか?", "config.syncPublicBody": "{name} はパブリックリポジトリです。同期したメモリは誰でも閲覧可能になります。", "config.syncPublicConfirm": "このまま使用", "config.syncRowTitle": "同期", "config.syncNever": "同期を実行すると、リポジトリのメモリをローカルにマージしたあと、ローカルの変更をプッシュします", "config.syncLast": "最終同期:{time}", "config.syncLastMerge": "最終マージ:{time}", "config.syncCheck": "リモートを確認", "config.syncNow": "今すぐ同期", "config.syncNowRunning": "同期中…", "config.syncDone": "同期しました({commit} をプッシュ)。", "config.runtimeMergeArchived": "上限超過の作業メモリ {count} 件をローカルの runtime/archived/import-overflow に保存し、作業メモリからは除外しました。", "config.syncDoneMerged": "同期しました:リモートのメモリ {count} 件をマージし、{commit} をプッシュしました。", "config.syncUpToDate": "最新です。リポジトリとローカルの内容は一致しています。", "config.syncUpToDateMerged": "リモートのメモリ {count} 件をマージしました。リポジトリは最新です。", "config.syncPushFailed": "ローカルにコミットしましたが、プッシュを完了できませんでした:{reason}", "config.syncFailed": "同期に失敗しました:{error}", "config.syncReasonBusy": "別の同期処理が実行中です。しばらくしてから再試行してください", "config.syncReasonNoRepository": "リポジトリが接続されていません", "config.syncReasonGitMissing": "このコンピュータで Git を利用できません", "config.syncReasonRemoteEmpty": "リポジトリにまだバックアップがありません。先に一度同期してください", "config.syncReasonRejected": "同期中に別の端末がリポジトリを更新しました。もう一度同期してください", "config.syncAuto": "自動同期", "config.syncAutoOff": "オフ", "config.syncAutoHour": "1 時間ごと", "config.syncAutoHours": "{hours} 時間ごと", "config.syncAutoDay": "毎日", "config.syncAutoDays": "{days} 日ごと", "config.syncAutoHintOff": "「今すぐ同期」を押したときのみ同期します", "config.syncAutoHintOn": "この間隔でバックグラウンド同期します(「今すぐ同期」と同じ処理です)", "config.syncAutoNext": "次回:{time}", "config.syncAutoLast": "前回:{time}", "config.syncAutoFailed": "前回の自動同期に失敗しました:{error}", "config.syncHistory": "バックアップ履歴", "config.syncHistoryHint": "同期するたびにリポジトリにバージョンが記録されます", "config.syncHistoryView": "表示", "config.syncHistoryLoading": "読み込み中…", "config.syncHistoryEmpty": "リポジトリにまだバックアップがありません。", "config.syncHistoryMore": "以前のバージョンを読み込む", "config.syncHistoryCapped": "直近 {count} 件のバージョンのみ表示しています", "config.syncHistoryFrom": "{machine} から", "config.syncHistoryUnknownMachine": "名称未設定の端末", "config.syncComponentRuntime": "ランタイムメモリ", "config.syncComponentDocuments": "プロジェクトドキュメント", "config.syncComponentSpaces": "メモリスペース", "config.syncCountRuntime": "ランタイムメモリ {count} 件", "config.syncCountDocuments": "ドキュメント {count} 件", "config.syncCountSpaces": "メモリスペース {count} 件", "config.syncCompareTitle": "リモートと比較", "config.syncCompareLoading": "リモートを読み込み中…", "config.syncCompareRemote": "リモートバージョン:{machine} · {time}", "config.syncCompareSame": "一致", "config.syncCompareDiffers": "差分あり", "config.syncCompareRuntime": "リモートのみ {remote} 件 · ローカルのみ {local} 件", "config.syncCompareConflicts": "記述の相違 {count} 件", "config.syncCompareAllSame": "ローカルとリモートは一致しているため、同期する項目はありません。", "config.syncCompareTruncated": "表示されている件数以外にも差分があります。", "config.syncCompareRemovals": "リモートに {count} 件の削除が記録されています。同期するとローカルにも適用されます。", "config.syncCompareConflictNote": "{count} 件のトピックで記述が異なります。同期では両方を保持し、後から「メモリ整理」で統合できます。", "config.syncCompareShowConflicts": "表示", "config.syncCompareGoReview": "メモリ整理を開く", "config.syncCompareHeldBack": "リモートのメモリ {count} 件は以前にローカルで削除されたため、同期しても戻されません。", "config.syncCompareRevive": "これらを復元", "config.syncCompareReviving": "復元中…", "config.syncCompareRevived": "{count} 件のメモリを復元しました。", "config.syncDiffHere": "ローカル", "config.syncDiffThere": "リモート", "config.syncMergeOnly": "ローカルにマージのみ", "config.syncMerging": "マージ中…", "config.syncMerged": "リモートの {commit} をマージしました。", "config.syncMergedCount": "リモートのメモリ {count} 件をマージしました。", "config.syncAdvanced": "詳細設定", "config.syncBranch": "ブランチ", "config.syncSubdir": "リポジトリ内ディレクトリ", "config.syncDefaultValue": "デフォルト:{value}", "config.syncBranchInvalid": "無効なブランチ名です", "config.syncSubdirInvalid": "リポジトリ内の相対ディレクトリを指定してください", "config.syncAuthor": "コミット作成者", "config.syncAuthorDefault": "デフォルト", "config.syncAuthorMachine": "このコンピュータの Git", "config.syncAuthorCustom": "カスタム", "config.syncAuthorDefaultNote": "このコンピュータの Git ユーザー情報を使用し、未設定の場合は {identity} を使用します", "config.syncAuthorMachineNote": "このコンピュータの Git ユーザー情報を使用します(未設定時はデフォルト)", "config.syncAuthorName": "名前", "config.syncAuthorEmail": "メールアドレス", "config.syncAuthorEmailInvalid": "メールアドレスの形式が正しくありません", "config.syncAdvancedNote": "保存後、次回の同期から新しいブランチまたはディレクトリに書き込まれます", "config.syncMachineName": "このコンピュータの名前", "config.syncMachineHostname": "ホスト名", "config.syncMachineCustom": "カスタム", "config.syncMachineNameLabel": "名前", "config.syncMachineHostnameNote": "ホスト名を使用します。バックアップ履歴には「{name} から」と表示されます", "config.syncMachineCustomNote": "バックアップ履歴には「{name} から」と表示されます", "config.syncMachineNameInvalid": "1 行以内、最大 120 文字で入力してください", "config.syncMachineRenameNote": "保存後、以降の同期で新しい名前が使われます。過去のバージョンは元の名前のまま残ります", "config.syncAdvancedSaved": "詳細設定を保存しました。", "config.reconcileTitle": "メモリ整理", "config.reconcileDescription": "モデルがマージ後のメモリを読み込んで変更案を作成します。レビューで承認するまで書き込みは行われません", "review.reconcile": "整理を実行", "review.reconciling": "整理中…", "review.refresh": "更新", "review.empty": "レビュー待ちの提案はありません", "review.pending": "レビュー待ち {count} 件", "review.failed": "レビュー台帳の読み込みに失敗しました:{error}", "review.planned": "{operations} 件の変更案を作成しました。承認するまで書き込みは行われません。", "review.none": "マージ後のメモリに変更すべき点は見つかりませんでした。", "review.statusPending": "レビュー待ち", "review.statusAccepted": "承認済み", "review.statusRejected": "却下済み", "review.expand": "開く", "review.collapse": "閉じる", "review.accept": "承認", "review.reject": "却下", "review.apply": "適用", "review.applying": "適用中…", "review.reopen": "再オープン", "review.applied": "{count} 件の変更を適用しました。", "review.appliedAt": "適用日時:{time}", "review.appliedCount": "{total} 件中 {count} 件の操作を実行済み", "review.applyFailed": "適用に失敗しました:{error}", "review.meta": "変更 {count} 件 · {machine} から · {time}", "review.foreign": "他の端末由来のメモリを含みます:{machines}", "review.opinions": "コメント", "review.noOpinions": "コメントはまだありません", "review.authorUser": "あなた", "review.authorAgent": "モデル", "review.opinionPlaceholder": "次回のメモリ整理に向けたコメントを入力", "review.opinionSend": "コメントを追加", "review.opinionAdded": "コメントを記録しました。", "review.opAdd": "{target}メモリを追加:{content}", "review.opReplace": "{target}メモリを書き換え:「{from}」→「{to}」", "review.opRemove": "{target}メモリを削除:{text}", "review.opArchive": "ドキュメント {id} をアーカイブ", "review.targetMemory": "プロジェクト", "review.targetUser": "ユーザー", "review.guidanceLabel": "整理の方針", "review.guidanceHint": "任意:今回の整理で達成したい内容を指定します。モデルは参照のみ行い、追加権限は付与されません", "review.guidancePlaceholder": "例:同じ意味の好みが 2 つあるので 1 つに統合してほしい", "review.guided": "指定方針に沿って作成済み", "review.remoteEntries": "この環境にないリモートブランチの {count} 件を参照しました", "review.selectAll": "すべて選択", "review.selectNone": "選択解除", "review.selectHint": "適用する変更にチェックを入れてください。未選択の項目は次回に持ち越されます", "review.selected": "{total} 件中 {count} 件を選択中", "review.applyCount": "{count} 件を適用", "review.noSelection": "少なくとも 1 件の変更を選択してください。", "review.history": "適用済みプラン({count})", "review.historyTitle": "適用済みプラン", "review.historyHint": "実行済みのプランを参照用に保持しています。再オープンしても書き込み内容は取り消されません。", "review.historyEmpty": "実行済みのプランはまだありません。", "review.rejectedHint": "このプランは却下されました。コメントを残して再オープンするか、AI に再作成を依頼してください。", "skills.label": "スキル", "skills.groupSurface": "表示と入口", "skills.groupPlacement": "保存先と更新", "skills.groupEvolution": "自動化", "skills.groupGeneration": "モデルと生成", "skills.groupSources": "マーケットとディレクトリ", "skills.badgeDefault": "デフォルト", "skills.badgeCustom": "カスタム · {count}", "skills.parametersBadge": "しきい値 {threshold} · {idle}s", "skills.evolution": "自己進化", "skills.allowCreate": "新しいスキルを提案", "skills.allowCreateHint": "レビューで新規スキルを提案できるようにします。既存の提案は手動で引き続き処理できます", "skills.allowUpdate": "既存スキルの改善を提案", "skills.allowUpdateHint": "レビューで既存スキルの改善を提案できるようにします。両方の提案がオフのときはレビューが一時停止します", "skills.targetScope": "新規スキルの保存先", "skills.roots.title": "新規スキルの作成ディレクトリ", "skills.roots.hint": "新規作成、ドラフト、マーケットインストールに適用され、上の保存先設定より優先されます。", "skills.roots.enabled": "作成ディレクトリをカスタマイズ", "skills.roots.default": "デフォルトの作成ディレクトリ", "skills.roots.invalid": "少なくとも 1 つのディレクトリを選択し、デフォルトを選択肢に含めてください。", "skills.root.project-dsh": "プロジェクト .dsh/skills", "skills.root.project-agents": "プロジェクト .agents/skills", "skills.root.user-dsh": "ユーザー .dsh/skills", "skills.root.user-agents": "ユーザー .agents/skills", "skills.allowLinkedUpdates": "リンク済みスキルの更新を許可", "skills.allowLinkedUpdatesHint": "更新がシンボリックリンク先に直接書き込まれ、共有する全エージェントに影響します。信頼できるパスのみ有効にしてください。", "skills.targetScopeHint": "デフォルトは「ユーザー」です。「保存範囲に従う」ではワークスペース範囲をプロジェクトに割り当てます(採用時に変更可能)。", "skills.targetScope.user": "ユーザー", "skills.targetScope.project": "プロジェクト", "skills.targetScope.storage": "保存範囲に従う", "skills.evolutionHint": "会話をレビューしてスキルの更新を提案します。タスクセッションはローカルに保持されます。", "skills.autoAdoptDailyLimit": "1 日あたりの自動処理候補数", "skills.autoAdoptTimeZone": "日次上限のタイムゾーン", "skills.autoBudgetHint": "このタイムゾーンの暦日ごとに集計します(0 で自動処理を一時停止)。手動操作は制限されません。", "skills.autoBudgetInvalid": "0〜100 の整数と、有効な IANA タイムゾーン名または local を指定してください。", "skills.autoAdopt": "新しい提案を自動採用", "skills.autoAdoptHint": "バックテストが必要です。テキストケースで退行ゼロの場合のみ採用します(最大 2 回リトライ)。", "skills.autoBacktest": "ドラフトを自動バックテスト", "skills.autoBacktestHint": "新しいドラフトをテストケースで現行バージョンと比較します", "skills.parameters": "レビューパラメータ", "skills.draftGeneration": "ドラフト生成", "skills.draftMaxTokens": "ドラフト出力トークン上限", "skills.draftRetryMaxTokens": "リトライ時の出力トークン上限", "skills.draftBudgetHint": "推論と SKILL.md 全文を含みます。切り詰めが発生し、リトライ上限が高い場合は 1 回だけ自動で再試行します。", "skills.reviewThreshold": "レビューしきい値", "skills.idleSeconds": "アイドル待機(秒)", "skills.cooldownSeconds": "レビュー間隔(秒)", "skills.minConfidence": "最小信頼度", "skills.expiryDays": "提案の有効期限(日)", "skills.maxPendingPerSession": "会話あたりの保留上限", "skills.casesPerRun": "1 回のバックテストあたりのケース数", "skills.invalid": "{field}は {min}〜{max} の範囲で指定してください", "skills.hints": "会話内の表示", "skills.hintsHint": "ターンで使用したスキルと新しい提案を返信の下に表示します", "skills.sidebar": "サイドバーに表示", "skills.sidebarHint": "メモリシステム内ではなく、サイドバーに「スキル」を独立表示します", "skills.models": "デフォルトモデル", "skills.modelsHint": "「自動」の場合はタスクエージェントのルートに従います。", "skills.modelAuto": "自動(タスクエージェントに従う)", "skills.draftModel": "進化ドラフト作成モデル", "skills.draftModelHint": "提案のスキルドラフトを作成・改訂します", "skills.runModel": "評価実行モデル", "skills.runModelHint": "バックテストケースを実行し結果を採点します", "skills.directories": "スキルディレクトリ", "skills.directoriesHint": "空欄の場合はデフォルトのユーザースキルディレクトリを使用します。", "skills.dshHome": "DSH ホーム", "skills.agentsHome": "共有 Agents ホーム", "skills.market": "マーケットソース", "skills.marketHint": "スキルマーケットのカタログと検索インデックスを管理します。", "skills.marketRefresh": "更新", "skills.marketRefreshing": "更新中…", "skills.marketAddPlaceholder": "GitHub リポジトリ、インデックス URL、またはローカルパス", "skills.marketAdd": "追加", "skills.marketAdding": "追加中…", "skills.marketRemove": "削除", "skills.marketBuiltin": "組み込み", "skills.marketSkillCount": "{count} 件", "skills.marketEmpty": "マーケットソースが設定されていません。", "skills.statusCount": "スキル {count} 件", "skills.statusOn": "自己進化オン · {waiting} 件待機中", "skills.statusIdle": "自己進化オン", "skills.statusOff": "自己進化オフ", "skillTail.label": "このターンのスキル", "skillTail.reviewing": "レビュー中", "skillTail.suggested": "提案 {count}", "skillTail.failed": "レビュー失敗", "skillTail.openSkill": "スキル画面で {name} を開く", "skillTail.openSuggestions": "スキル画面で提案を開く" }; // vendor/dsh-mnemon/src/client/locales/pt.ts const corePt = { "composer.expand": "Mostrar entrada de mensagem", "composer.collapse": "Recolher entrada de mensagem", "composer.collapsed": "Entrada de mensagem recolhida", "tab.label": "Sistema de memória", "nav.aria": "Páginas do Mnemon", "nav.status": "Status", "nav.runtime": "Memória de execução", "nav.runtimeDetail": "USER / MEMORY", "nav.documents": "Documentos do projeto", "nav.documentsDetail": "Índice e arquivo", "nav.spaces": "Espaços de memória", "nav.spacesDetail": "Grafo e recuperação", "common.refresh": "Atualizar", "common.openConfiguration": "Abrir configurações", "common.loading": "Carregando…", "common.cancel": "Cancelar", "common.close": "Fechar", "common.showing": "Exibindo {visible} / {total}", "common.showMore": "Mostrar mais {count}", "header.backToConversation": "Voltar à conversa", "header.configure": "Configurar", "header.noticeSummary": "Avisos {count} · {labels}", "header.noticeRemoteReadOnly": "Acesso remoto somente leitura", "header.noticeIdleReview": "Revisão em inatividade", "header.compositionHint": "Selecione para alterar a composição nas configurações.", "header.checking": "Verificando", "header.connected": "Conectado", "header.unavailable": "Indisponível", "header.notReady": "O Mnemon não está pronto", "workspace.viewing": "Visualizando espaço de trabalho", "workspace.selectorAria": "Selecionar um espaço de trabalho de memória para inspecionar", "workspace.excluded": "Memória excluída", "workspace.excludedDetail": "Este espaço de trabalho e seus subagentes não participam de injeção de memória, ferramentas ou revisão automática. Os dados existentes continuam legíveis; remova a exclusão para retomar.", "workspace.excludeTitle": "Espaços de trabalho excluídos da memória", "workspace.excludeHint": "Um caminho absoluto de espaço de trabalho por linha (~ e links simbólicos são aceitos).", "workspace.excludeCount": "{count} excluídos", "workspace.excludeNone": "Nenhum", "workspace.excludePlaceholder": "/caminho/para/espaco-de-trabalho-privado", "workspace.excludeNote": "Aplica-se aos próximos turnos; os dados existentes e o histórico da sessão permanecem intactos.", "workspace.invalidExclusions": "{count} caminhos de exclusão são inválidos ou indisponíveis e foram ignorados; verifique os caminhos nas configurações de armazenamento.", "workspace.unavailable": "Não foi possível identificar o espaço de trabalho atual; as exclusões de caminho não foram aplicadas.", "workspace.storageMode": "Escopo de armazenamento", "workspace.storageModeAria": "Escopo de armazenamento: {mode}", "workspace.mismatchTitle": "O diretório inspecionado não corresponde a esta sessão", "workspace.mismatchShort": "Fora do espaço de trabalho da conversa", "workspace.selectedRoot": "Visualizando: {root}", "workspace.effectiveRoot": "Efetivo: {root}", "workspace.align": "Alinhar", "workspace.remoteReadOnly": "O acesso remoto é somente leitura: defina remoteAccess: trusted-host na configuração do perfil mnemon e reinicie o DSH para gerenciar a memória aqui.", "sourcePage.instance": "Instância de Fonte", "sourcePage.instanceAria": "Selecionar instância de Fonte", "sourcePage.summaryAria": "Resumo de status e permissões da Fonte", "sourcePage.package": "Pacote", "sourcePage.availability": "Disponibilidade", "sourcePage.availability.ready": "Pronta", "sourcePage.availability.degraded": "Degradada", "sourcePage.availability.unavailable": "Indisponível", "sourcePage.role": "Papel semântico", "sourcePage.revision": "Revisão atual", "sourcePage.permissions": "Capacidades autorizadas", "sourcePage.diagnostics": "Diagnóstico", "sourcePage.configuration": "Configuração declarativa", "sourcePage.configurationDescription": "Os campos vêm do descritor de gerenciamento sanitizado do Host; o envio é reautorizado para esta instância e revisão.", "sourcePage.configLoading": "Carregando configuração…", "sourcePage.configSave": "Salvar", "sourcePage.configSaving": "Salvando…", "sourcePage.configSaved": "Configuração enviada; atualizando o status da Fonte.", "sourcePage.secretPlaceholder": "Deixe em branco para manter o segredo existente", "sourcePage.unavailable": "Fonte indisponível", "sourcePage.unavailableDescription": "Nenhuma instância invocável está visível neste escopo. O comportamento da memória no Host e no modo Headless não é afetado por esta página.", "turnTail.label": "Memória do turno", "turnTail.recall": "recuperou {count}", "turnTail.write": "gravou {count}", "turnTail.documents": "busca em documentos {count}", "turnTail.inspect": "inspecionou {count}", "turnTail.failed": "falhou {count}", "turnTail.toolList": "Ferramentas de memória neste turno", "turnTail.more": "mais {count}", "turnTail.openTool": "Abrir a página de memória de {tool}", "turnTail.tool.recall": "Recuperação em Espaços de memória", "turnTail.tool.related": "Memórias relacionadas", "turnTail.tool.documentSearch": "Busca em documentos", "turnTail.tool.documentManage": "Atualização de documento", "turnTail.tool.documentCreate": "Novo documento", "turnTail.tool.runtime": "Atualização da Memória de execução", "turnTail.tool.remember": "Salvo em Espaços de memória", "turnTail.tool.link": "Memórias vinculadas", "turnTail.tool.forget": "Memória excluída", "turnTail.tool.status": "Status da memória", "turnTail.tool.spaces": "Lista de Espaços de memória", "turnTail.tool.spaceCreate": "Novo Espaço de memória", "turnTail.tool.spaceUpdate": "Atualização de Espaço de memória", "turnTail.tool.spaceMerge": "Espaços de memória mesclados", "turnTail.tool.viewRoute": "Leitura de memória", "turnTail.tool.viewAction": "Atualização de memória", "receipt.written": "Salvo", "receipt.updated": "Atualizado", "receipt.pending": "Enviado; o Provedor confirma depois", "receipt.skipped": "Ignorado", "receipt.partial": "Salvo parcialmente", "receipt.unfinished": "Não concluído", "receipt.failed": "Falhou", "receipt.view": "Ver em Espaços de memória", "receipt.viewRuntime": "Ver em Memória de execução", "receipt.unembedded": "Salvo sem vetor: a geração de embedding falhou, portanto esta memória fica fora da correspondência semântica por enquanto. Assim que o serviço de embedding responder, preencha-o em Testar status nas configurações de embedding do Mnemon Native.", "receipt.unembeddedNoService": "Ainda sem vetor: não há serviço de embedding disponível, portanto esta memória fica fora da correspondência semântica por enquanto; a pesquisa por palavras-chave continua encontrando-a. Assim que conectar um serviço de embedding, preencha-o em Testar status nas configurações de embedding do Mnemon Native.", "taskAgent.ready": "Agente de tarefas pronto", "taskAgent.unavailable": "Agente de tarefas indisponível", "saveAction.button": "Salvar na memória", "saveAction.tooltip": "Salvar esta resposta na memória", "saveAction.title": "Salvar na memória", "saveAction.hint": "O Agente de tarefas decide se deve salvar, sintetiza e grava em um Espaço de memória.", "saveAction.fetching": "Extraindo texto da mensagem…", "saveAction.missing": "Não foi possível extrair o texto desta mensagem do registro da sessão.", "saveAction.candidate": "Conteúdo", "saveAction.truncated": "Esta resposta é longa; apenas os primeiros {limit} caracteres foram carregados aqui.", "saveAction.submit": "Salvar", "saveAction.submitting": "Salvando…", "saveAction.readOnly": "Esta implantação é somente leitura; gravações na memória estão desativadas.", "saveAction.close": "Fechar", "saveAction.hintDirect": "Grava diretamente no destino selecionado.", "saveAction.to": "Salvar em", "saveAction.to.agent": "Automático", "saveAction.to.agentDetail": "O Agente decide se deve salvar e escolhe um Espaço de memória", "saveAction.to.memory": "Memória de trabalho (MEMORY.md)", "saveAction.to.user": "Perfil do usuário (USER.md)", "saveAction.to.space": "Espaço de memória · {provider}", "saveAction.save": "Salvar", "saveAction.saving": "Salvando…", "saveAction.saved.runtime": "Salvo em {target} · {count} entradas", "saveAction.saved.runtimeMaintained": "Espaço liberado e salvo em {target} · {count} entradas", "saveAction.saved.space": "Salvo no Espaço de memória {space}", "saveAction.saved.spacePending": "Enviado ao Espaço de memória {space}; o Provedor confirma depois", "saveAction.saved.spaceOther": "O Espaço de memória {space} respondeu: {action}", "saveAction.saved.duplicate": "Já está salvo; nada foi gravado em duplicidade.", "saveAction.unavailable": "Este destino não aceita gravações no momento.", "saveAction.place.delimiter": "Entradas em {target} não podem conter §; remova-o para salvar.", "saveAction.place.tooLong": "Este texto tem cerca de {size}, acima do limite de uma entrada em {target} ({limit}); reduza-o.", "saveAction.place.orAgent": " Ou deixe o Agente decidir.", "saveAction.place.full": "{target} ocupa {used} de {limit}. Salvar primeiro libera espaço: cerca de {keep} das entradas existentes permanecem e o restante sai da memória de trabalho.", "saveAction.place.fullAll": "{target} ocupa {used} de {limit}. Salvar primeiro libera espaço: todas as entradas existentes saem da memória de trabalho.", "saveAction.place.userCondense": "O perfil do usuário ocupa {used} de {limit}. Antes de salvar, um Agente de tarefas o condensa para cerca de {keep}, sem manter arquivo.", "saveAction.place.userTooLong": "Este texto tem cerca de {size}, mais do que o perfil do usuário comporta após liberar espaço ({max}); reduza-o.", "saveAction.place.userFull": "O perfil do usuário está cheio, e liberar espaço nele requer um Agente de tarefas; remova entradas na Memória de execução primeiro ou escolha outro destino.", "saveAction.noPlace": "Nenhum destino pode receber este texto agora.", "status.title": "Status do sistema", "status.description": "Como o dsh-brain-mnemon, os Provedores de memória e cada camada de armazenamento estão operando.", "status.nominal": "Sistema operacional", "status.workflowUnavailable": "Manutenção em segundo plano indisponível", "status.workflowIdleReview": "Revisão em inatividade", "status.workflowRuntimeCapacity": "Manutenção de capacidade de execução", "status.workflowUnsupported": "A Estratégia atual não aciona: {workflows}. Apenas ativar as opções de revisão não inicia essas tarefas. Selecione uma Estratégia compatível, como a Estratégia em camadas, em Sistema de memória. As ações manuais continuam disponíveis.", "status.reviewFailed": "Falha na revisão em inatividade", "status.reviewFailedDetail": "Este ponto de verificação não foi concluído e não será reproduzido automaticamente. Revisões futuras respeitam o tempo de espera e o limite por sessão.", "status.reviewPartial": "Algumas gravações foram efetivadas. Confira os recibos abaixo; elas não foram revertidas.", "status.reviewTeamPaused": "A revisão em inatividade está pausada pela configuração de compatibilidade do Agent Teams. Para continuar revisando, selecione “Revisão por Agente de tarefas restrito” em Revisão em inatividade na página dsh-brain-mnemon em Plugins. As configurações de recuperação e gravação não foram alteradas.", "status.reviewConfirmationPaused": "A confirmação de gravação na memória está ativada, portanto a revisão em inatividade está pausada. Você ainda pode editar a memória manualmente.", "status.reviewToolAccessPaused": "A ferramenta de conclusão exigida pela revisão automática está indisponível no momento. Este ponto de verificação foi ignorado sem consumir uma tentativa. O acesso será verificado novamente após um turno elegível da conversa. Verifique as restrições de ferramentas ou configurações de aprovação desta sessão.", "status.reviewWatermarkUsage": "Tentativas de revisão da sessão: {attempts} / {max} ({restored} restauradas).", "status.reviewWatermarkNext": "Próxima revisão não antes de {time}; ainda é necessário um novo ponto de verificação elegível na conversa.", "status.reviewWatermarkPaused": "Revisão automática pausada: limites persistentes indisponíveis.", "status.reviewWatermarkRecovery": "Continue a conversa para tentar novamente. Se o erro persistir, pare os Hosts que usam esta raiz de armazenamento antes de inspecionar o estado ou bloqueio desta sessão em state/idle-review. Excluir o estado redefine o limite.", "config.reviewPersistWatermark": "Manter limites de revisão após reabrir", "config.reviewPersistWatermarkHint": "Mantém tentativas e tempo de espera por raiz de armazenamento e sessão pai, incluindo execuções com falha ou canceladas.", "status.reviewRun": "Execução da revisão: {id}", "status.reviewContextWindow": "Escolha revisão por ponto de verificação limitado (spawn) ou um modelo de Agente de tarefas cuja janela de contexto cubra a conversa pai.", "config.reviewTitle": "Revisão em inatividade", "config.reviewDescription": "Organiza a memória enquanto a conversa está inativa; recuperação e gravações funcionam de qualquer maneira", "config.reviewEnabled": "Ativar revisão em inatividade", "config.reviewRuntimeMemory": "Gravar na Memória de execução", "config.reviewRuntimeMemoryHint": "Apenas preferências e regras que você declarou; quando desativada, a revisão cria apenas Documentos", "config.reviewSilent": "Executar revisões em inatividade silenciosamente", "config.reviewSilentHint": "Quando desativada, as revisões automáticas por spawn aparecem na lista de subagentes da conversa.", "config.reviewLimits": "Limites de revisão", "config.reviewProvider": "Método de revisão", "config.reviewSpawn": "Ponto de verificação limitado (spawn)", "config.reviewSpawnHint": "O Agente de tarefas lê um ponto de verificação limitado", "config.reviewFork": "Contexto pai completo (fork)", "config.reviewForkHint": "O Agente de tarefas recebe o contexto pai completo", "config.reviewFallback": "Quando fork estiver indisponível (somente antes de iniciar)", "config.reviewSkip": "Ignorar esta revisão", "config.reviewAgentTeams": "Compatibilidade com Agent Teams", "config.reviewTeamPause": "Pausar revisão", "config.reviewTeamPauseHint": "Ignora a revisão enquanto o Agent Teams estiver em execução", "config.reviewTeamScoped": "Revisão por Agente de tarefas restrito", "config.reviewTeamScopedHint": "Um Agente de tarefas restrito faz a revisão, sem ferramentas do Teams", "config.review.minIntervalMs": "Intervalo mínimo de revisão (segundos)", "config.review.maxPerSession": "Máximo de tentativas por sessão", "config.review.maxContextChars": "Orçamento de caracteres do ponto de verificação spawn", "config.review.maxTokens": "Limite de tokens de saída do modelo por solicitação", "config.reviewLimitInvalid": "{field} deve estar entre {min} e {max}", "status.checkRequired": "Verificação necessária", "status.memoryOff": "Memória fora de uso", "status.memoryOffDetail": "As conversas continuam sem memória.", "status.compositionStale": "A alteração mais recente de componentes não entrou em vigor", "status.compositionStaleDetail": "A memória continua rodando com a composição anterior.", "status.strategyFallback": "A estratégia principal selecionada não está em execução", "status.strategyFallbackDetail": "A única estratégia principal disponível compõe a memória por enquanto.", "status.reasonNoStrategy": "Nenhuma estratégia principal está em execução.", "status.reasonNoSource": "Nenhuma fonte de memória está em execução.", "status.reasonNotComposed": "Os componentes de memória ainda estão carregando.", "status.reasonSelectedStrategyOff": "A estratégia principal selecionada não está em execução, e mais de uma alternativa poderia compor a memória.", "status.reasonDependency": "{component} precisa de {requirement}.", "status.reasonConflict": "Alguns componentes estão em conflito.", "status.reasonRejected": "A composição foi recusada: {detail}", "status.layerOffDetail": "Reative nas configurações", "status.layerStoppedDetail": "O componente está ativado, mas não está em execução", "status.layerMemoryOffDetail": "Disponível quando uma estratégia principal estiver em execução", "status.rechecking": "Verificando…", "status.aria": "Status de execução do Mnemon", "status.engine": "Motor de memória", "status.engineUnavailable": "Mnemon indisponível", "status.versionWaiting": "Aguardando versão", "status.pluginChecking": "Verificando status do plugin", "status.pluginReady": "Plugin em operação normal", "status.nativeAria": "Status do Mnemon Native", "status.nativeCliMissing": "Mnemon CLI não encontrado", "status.providersTitle": "Provedores de memória", "status.providersDescription": "Status de conexão dos Provedores em execução e seus Espaços de memória.", "status.providersAria": "Status dos provedores de memória", "status.providersEnabled": "{enabled} / {total} ativados", "status.providersOff": "Outros {count} Provedores estão desativados", "status.providerState.disabled": "Desativado", "status.providerState.idle": "Serviço pronto · nenhum Espaço de memória ativo", "status.providerState.healthy": "Conexão saudável", "status.providerState.unhealthy": "Conexão precisa de atenção", "status.providerSpaces": "{active} / {total} Espaços de memória em execução", "versions.checkAction": "Versões", "versions.title": "Verificar e atualizar versões", "versions.description": "Revise sua instalação e atualize quando necessário. Expanda dsh-brain-mnemon para manter seus subpacotes.", "versions.missing": "Não instalado (opcional)", "versions.restart": "Reinicialização necessária", "versions.local": "Versão local", "versions.modeNpmCli": "npm", "versions.hintNpm": "Gerenciado pelo npm. Atualize aqui ou execute mnemon update no terminal do Host.", "versions.hintNpmMissing": "O iniciador do npm foi encontrado, mas o npm está indisponível no Host. Verifique o ambiente Node.js.", "versions.hintNpmUnmanaged": "O npm atual não é o proprietário desta instalação global do CLI. Use o ambiente Node.js original ou migre abaixo.", "versions.hintUnreadable": "O CLI foi encontrado, mas não foi possível ler sua versão. Verifique o comando no terminal do Host ou reinstale-o.", "versions.hintStarter": "Mantido com o dsh-brain-mnemon Starter. Atualize o Starter para usar a combinação testada de pacotes.", "versions.npmRecommended": "Instalação e manutenção via npm", "versions.npmMaintenance": "Manter o CLI com npm", "versions.npmInstall": "Instalar com npm (recomendado)", "versions.npmMigrate": "Migrar para npm (recomendado)", "versions.npmRepair": "Verificar ou reparar a instalação npm", "versions.npmRepairDetail": "Verifique o status de instalação acima. Para reinstalar, execute este comando no terminal do Host DSH (Node.js 22+).", "versions.npmUpdateDetail": "Execute este comando em atualizações futuras e clique em Verificar novamente para confirmar a versão ativa.", "versions.npmInstallDetail": "Apenas o Mnemon Native precisa deste CLI separado. Para usá-lo, execute este comando no terminal do Host DSH (Node.js 22+).", "versions.npmMigrateDetail": "Para migrar para npm, execute isto no Host DSH (Node.js 22+).", "versions.npmVerify": "Verifique a versão instalada e clique em Verificar novamente:", "versions.npmNextSteps": "Após a instalação: verifique a versão e o caminho ativo", "versions.npmPath": "Coloque o diretório bin global do npm no início do PATH. Se MNEMON_CLI_PATH ou mnemon.cliPath estiver definido, aponte-o para o novo iniciador. Reinicie o DSH após alterar o ambiente e confirme o caminho do executável acima.", "versions.installGuide": "Guia de instalação", "versions.copy": "Copiar", "versions.copied": "Copiado", "versions.copyCommand": "Copiar comando: {command}", "versions.copyFailed": "Área de transferência indisponível. Selecione o comando e copie manualmente.", "versions.readOnly": "Esta conexão é somente leitura. Você pode verificar versões e copiar comandos; use uma conexão com acesso de gerenciamento para atualizar aqui.", "versions.packages": "Versões de subpacotes ({count})", "versions.packagesOutdated": "{count} atualizações disponíveis", "versions.packagesDetail": "Expandir para opções de manutenção", "versions.packagesHide": "Recolher detalhes dos pacotes", "versions.packagesHint": "Os pacotes padrão são atualizados com o Starter. Pacotes instalados separadamente neste Perfil podem ser atualizados individualmente. Reinicie o DSH depois.", "versions.managedStarter": "Mantido com o Starter", "versions.managedProfile": "Gerenciado pelo Perfil", "versions.starterVersion": "Fixado pelo Starter", "versions.kind.source": "Fontes", "versions.kind.strategy": "Estratégias", "versions.kind.provider": "Provedores", "versions.checking": "Verificando repositórios remotos em busca de novas versões…", "versions.checkingShort": "Verificando…", "versions.recheck": "Verificar novamente", "versions.failed": "Falha na operação de versão", "versions.timeout": "A verificação de versão atingiu o tempo limite. Verifique a rede e tente novamente.", "versions.current": "Atualizado", "versions.available": "Atualização disponível", "versions.unknown": "Não foi possível verificar", "versions.installed": "Instalada", "versions.latest": "Mais recente", "versions.executable": "Executável", "versions.profileLocation": "Perfil · {name}", "versions.sourceLocation": "Código-fonte", "versions.linkSourceLocation": "Código-fonte · Perfil {name}", "versions.packageLocation": "Diretório do pacote", "versions.update": "Atualizar", "versions.updating": "Atualizando…", "versions.updated": "{name} atualizado", "versions.alreadyCurrent": "Já está na versão mais recente", "versions.restartRequired": "Reinicie o DSH para carregar o novo código do plugin dsh-brain-mnemon; no aplicativo desktop, encerre e abra novamente.", "versions.pendingInstalledTitle": "dsh-brain-mnemon {version} está instalado", "versions.pendingInstalledDetail": "Este Host ainda executa {running}. Reinicie o DSH para carregá-lo; no aplicativo desktop, encerre e abra novamente.", "versions.pendingPackagesTitle": "Atualização concluída: {names}", "versions.pendingPackagesDetail": "Reinicie o DSH para carregar a atualização; no aplicativo desktop, encerre e abra novamente.", "versions.checkedAt": "Verificado às {time}", "versions.latestUnavailable": "A versão mais recente remota está indisponível. Verifique a rede e tente novamente.", "versions.modeHomebrew": "Homebrew", "versions.modeGo": "Go install", "versions.modeNpm": "Perfil DSH", "versions.modeLink": "Link local", "versions.modeManual": "Manual", "versions.modeMissing": "Ausente", "versions.hintHomebrew": "Gerenciado pelo Homebrew; versões disponíveis podem ser atualizadas com segurança aqui.", "versions.hintBrewMissing": "Uma instalação Homebrew foi detectada, mas o comando brew está indisponível.", "versions.hintGo": "Gerenciado por go install; versões disponíveis podem ser atualizadas com segurança aqui.", "versions.hintDsh": "Gerenciado pelo Perfil DSH atual. As atualizações usam o instalador de plugins do DSH; reinicie o DSH depois.", "versions.hintPnpm": "Gerenciado pelo Perfil DSH atual; reinicie o DSH após atualizar.", "versions.hintPnpmMissing": "Uma instalação do Perfil DSH foi detectada, mas o Host não encontra o comando pnpm. Instale o pnpm e reinicie o DSH para atualizar aqui.", "versions.hintLink": "Esta é uma compilação de desenvolvimento vinculada localmente. Faça pull e build no diretório de origem para preservar alterações locais.", "versions.hintInstall": "O Mnemon CLI não está instalado. Apenas o Mnemon Native precisa dele; para usar o Native, instale-o e coloque mnemon no PATH, ou defina MNEMON_CLI_PATH / mnemon.cliPath.", "versions.hintManual": "Não foi possível identificar com segurança a origem da instalação. Atualize usando o método de instalação original.", "status.activeRatio": "{active} / {total} ativos", "status.runtimeRatio": "{user} usuário · {memory} projeto", "status.runtimeBytes": "{bytes} usados", "status.runtimeWaiting": "Aguardando", "status.runtimeWaitingDetail": "Aguardando inventário de armazenamento do Host", "status.directoryUnsynced": "Diretório não sincronizado", "status.activeMemories": "{count} memórias ativas", "status.documentsWaiting": "Aguardando espaço de trabalho", "status.documentsSession": "Disponível após vincular uma sessão ativa", "status.documentRatio": "{active} ativos · {archived} arquivados", "status.documentUsage": "{used} / {limit} de capacidade ativa", "status.storageDomains": "Domínios de armazenamento", "status.storageDomainsText": "Onde a Memória de execução, os Espaços de memória e os Documentos do projeto são armazenados.", "status.storageGlobal": "Global", "status.storageWorkspace": "Espaço de trabalho", "status.storageWorkspaces": "Espaços de trabalho centralizados", "status.storageCustom": "Personalizado", "status.storageWaiting": "Lendo diretórios dos domínios de armazenamento…", "status.storageCustomUnset": "Nenhum diretório personalizado configurado. Esta visão exibe apenas uma raiz personalizada já configurada e ativa no DSH.", "status.storageWorkspaceUnavailable": "A sessão atual não possui um diretório de espaço de trabalho disponível.", "status.storageActiveRoot": "Raiz de leitura/gravação atual", "status.storageAvailable": "Diretório disponível", "status.storageNotCreated": "Diretório não criado", "status.storageRuntime": "Memória de execução", "status.storageSpaces": "Espaços de memória", "status.storageDocuments": "Documentos do projeto", "status.storageState": "Estado em segundo plano", "status.storageReady": "Pronto", "status.storageEmpty": "Vazio", "status.storageMissing": "Não criado", "status.storageInvalid": "Reparo necessário", "status.storageItems": "itens", "status.storageRuntimeDetail": "USER {user} · MEMORY {memory}", "status.storageSpacesDetail": "{active} ativos · {databases} bancos de dados", "status.storageDocumentsDetail": "{active} ativos · {archived} arquivados", "status.storageStateReady": "Marcas de revisão persistidas", "status.storageStateVolatile": "O estado da revisão é mantido atualmente pelo processo do Host", "status.storageFootnote": "Altere o escopo de armazenamento em Configurar; os dados existentes permanecem no local original.", "config.aria": "Configuração do sistema de memória", "plugin.openWorkspace": "Abrir", "config.interfaceTitle": "Interface", "config.unsaved": "Alterações não salvas", "config.ready": "Salvo e aplicado em tempo real", "config.displayTitle": "Onde abrir o Sistema de memória", "config.displaySidebar": "Barra lateral", "config.displaySidebarHint": "Uma página independente que pode exibir outros espaços de trabalho", "config.displayBuiltin": "Aba da conversa", "config.displayBuiltinHint": "Abre dentro da conversa atual", "config.storageTitle": "Armazenamento", "storage.usedBy": "Usado por", "storage.usedByTitle": "“{component}” armazena seus dados aqui", "storage.userProfileByWorkspace": "Cada espaço de trabalho tem seu próprio perfil do usuário.", "storage.userProfileShared": "Todos os espaços de trabalho compartilham um perfil do usuário. A memória de trabalho permanece separada.", "storage.runtimeSettings": "Configurações da Memória de execução", "storage.default": "Padrão", "storage.directoryExample": "Por exemplo, ~/Documents/mnemon", "storage.thisWorkspace": "Este espaço de trabalho", "storage.moveNote": "A memória passa a usar o novo local; os dados existentes permanecem onde estão", "storage.chooseDirectory": "Escolher diretório", "storage.pickFailed": "Não foi possível abrir o seletor de diretórios. Tente novamente ou informe um caminho.", "config.scopeTitle": "Escopo de armazenamento", "config.global": "Global", "config.workspace": "Espaço de trabalho", "config.workspaces": "Centralizado · isolado por espaço de trabalho", "config.workspacesHint": "Uma raiz com um subdiretório por espaço de trabalho, identificado pelo caminho", "config.custom": "Personalizado", "config.globalScopeHint": "Todos os espaços de trabalho compartilham um único diretório", "config.workspaceScopeHint": "Cada espaço de trabalho mantém seu próprio diretório .mnemon", "config.dataDirectory": "Diretório de dados", "config.runtimeSectionScope": "Escopo e recuperação", "config.runtimeDeferred": "Ler memória de baixa prioridade sob demanda", "config.runtimeDeferredHint": "Omite entradas não fixadas de baixa prioridade nos prompts; os modelos as buscam sob demanda.", "config.runtimeBm25Recall": "Pesquisar memória de trabalho sob demanda (experimental)", "config.runtimeBm25RecallLabel": "Pesquisar memória de trabalho sob demanda", "config.runtimeBm25RecallHint": "Corresponde memórias de trabalho e títulos de Documentos a cada turno; o perfil do usuário e os itens fixados permanecem visíveis.", "config.runtimeIndexPush": "Enviar índices de Espaços de memória e Documentos (experimental)", "config.runtimeIndexPushLabel": "Enviar índices de Espaços de memória e Documentos", "config.runtimeIndexPushHint": "Corresponde descrições de Espaços de memória e resumos de Documentos no passo 1; envia apenas índices compactos, nunca o texto completo.", "config.runtimeUserScopeTitle": "Escopo do perfil do usuário", "config.runtimeInheritance": "Compartilhar Memória de execução automaticamente com subagentes", "config.runtimeInheritanceHint": "Novos subagentes herdam o perfil do usuário e a memória de trabalho; tarefas em execução mantêm seu contexto.", "config.runtimeUserScopeStorage": "Seguir escopo de armazenamento", "config.runtimeUserScopeStorageHint": "Mantido junto com MEMORY.md", "config.runtimeUserScopeGlobal": "Compartilhado globalmente", "config.runtimeUserScopeGlobalHint": "Compartilhado por todos os espaços de trabalho; MEMORY.md continua seguindo o escopo de armazenamento", "config.runtimeSnapshotRefreshTitle": "Atualização do instantâneo", "config.runtimeSnapshotRefreshOnChange": "Atualizar ao alterar", "config.runtimeSnapshotRefreshOnChangeHint": "Projeta a memória de execução atualizada em sessões abertas no próximo turno", "config.runtimeSnapshotRefreshSessionStart": "Congelar no início da sessão", "config.runtimeSnapshotRefreshSessionStartHint": "Mantém o instantâneo inicial fixo em sessões abertas para estabilidade de cache; novas sessões e ferramentas de recuperação continuam lendo a memória atual", "config.componentScopeStorage": "Seguir escopo de armazenamento", "config.componentScopeGlobal": "Compartilhado globalmente", "config.componentScopeSwitchHint": "Alterar o escopo muda onde os dados são lidos e gravados. Os dados existentes permanecem no diretório original; altere de volta para visualizá-los. Exportações de pacote e sincronização Git cobrem apenas a raiz de armazenamento atual.", "config.documentsScopeSection": "Escopo de armazenamento", "config.documentsScopeTitle": "Escopo de Documentos do projeto", "config.documentsScopeStorageHint": "Mantido na raiz de armazenamento selecionada junto com MEMORY.md", "config.documentsScopeGlobalHint": "Compartilhado por todos os espaços de trabalho na raiz global; MEMORY.md continua seguindo o escopo de armazenamento", "config.memorySpacesScopeTitle": "Escopo de Espaços de memória", "config.memorySpacesScopeStorageHint": "Mantido na raiz de armazenamento selecionada junto com MEMORY.md", "config.memorySpacesScopeGlobalHint": "Compartilhado por todos os espaços de trabalho com suas conexões de Provedor na raiz global; MEMORY.md continua seguindo o escopo de armazenamento", "config.runtimeLimitsTitle": "Limites de capacidade", "config.runtimeLimitsHint": "Padrões: {user} KiB para perfil do usuário, {memory} KiB para memória de trabalho.", "config.runtime.userLimitBytes": "Limite do perfil do usuário (bytes)", "config.runtime.memoryLimitBytes": "Limite da memória de trabalho (bytes)", "config.runtimeLimitsApply": "Aplica-se em tempo real; reduzir um limite não exclui entradas existentes", "config.runtimeLimitInvalid": "Defina {field} como um número inteiro de 1 a {max}.", "config.runtimeAdvanced": "Limites de manutenção", "config.runtimeMaintenanceHint": "Teto de saída por execução para migração e compactação (padrão {defaultTokens} tokens).", "config.runtime.maintenanceMaxTokens": "Limite de tokens de saída da manutenção", "config.runtimeMaintenanceInvalid": "{field} deve estar entre {min} e {max}", "config.documentsLimitsTitle": "Capacidade ativa", "config.documentsLimitsHint": "Limite total para Documentos ativos (padrão {defaultMiB} MiB, máximo {maxMiB} MiB).", "config.documents.limitBytes": "Limite de documentos ativos (bytes)", "config.documentsLimitsApply": "Aplica-se em tempo real; reduzir o limite não exclui documentos existentes", "config.documentsLimitInvalid": "Defina {field} como um número inteiro de 1 a {max}.", "config.enhancementsRefreshFailed": "A configuração foi atualizada, mas não foi possível atualizar seu status. Reabra esta página.", "config.strategyTitle": "Estratégia principal", "config.strategyFailed": "Não foi possível trocar a estratégia principal. A escolha anterior foi mantida; tente novamente.", "config.appliesNow": "Aplica-se imediatamente", "config.quoted": "“{name}”", "config.listSeparator": ", ", "config.sentenceGap": " ", "config.enableStrategy": "Ativar “{strategy}”", "config.useStrategy": "Usar “{strategy}”", "config.stopStrategies": "Desativar {strategies}", "config.enableComponentNamed": "Ativar “{component}”", "board.title": "Composição de memória", "board.description": "A memória de cada turno é composta por estes componentes", "board.loading": "Lendo a composição de memória…", "board.componentsUnavailable": "Não é possível ler os componentes de memória agora; apenas as camadas de memória podem ser alternadas aqui.", "board.sources": "Fontes de memória", "board.enhancements": "Aprimoramentos", "board.running": "Em execução", "board.off": "Desativado", "board.notRunning": "Não está em execução", "board.needs": "Requer “{component}”", "board.needsMissing": "Requer um componente não instalado", "board.unused": "Não usado por esta estratégia", "board.strategyMissing": "A estratégia principal selecionada não está instalada.", "board.turningOn": "Ativando…", "board.turningOff": "Desativando…", "board.noMainMissing": "Memória fora de uso: a estratégia principal selecionada não está instalada", "board.noMainOff": "Memória fora de uso: a estratégia principal “{strategy}” está desativada", "board.noMainWaiting": "Memória fora de uso: a estratégia “{strategy}” está ativada, mas ainda não está em execução", "board.contenders": "Memória fora de uso: a estratégia selecionada “{strategy}” não está em execução, e {strategies} não podem substituí-la juntas", "board.fallback": "A estratégia “{selected}” não está em execução; “{composing}” compõe a memória por enquanto", "board.fallbackMissing": "A estratégia principal selecionada não está instalada; “{composing}” compõe a memória por enquanto", "board.noSource": "Memória fora de uso: nenhuma fonte de memória está em execução", "board.memoryOff": "Memória fora de uso: esta composição não pode ser atendida", "board.stale": "A alteração mais recente não entrou em vigor; a memória continua rodando com a composição anterior", "board.idle": "Também em execução, sem compor: {strategies}", "board.switching": "Alternando…", "board.composing": "Compondo memória", "board.lastSource": "Em execução · única fonte", "board.enabledCount": "{on} de {total} ativos", "board.experimental": "Experimental", "board.search": "Pesquisar componentes", "board.searchEmpty": "Nenhum componente corresponde a “{query}”.", "details.open": "Detalhes de “{component}”", "details.shipped": "Integrado", "details.installed": "Extensão instalada", "details.relations": "Relações", "details.needs": "Requer", "details.needsAny": "Requer um destes", "details.needsMissing": "Nenhum componente instalado fornece {capability}", "details.neededBy": "Necessário para", "details.conflicts": "Não pode executar junto com", "details.options": "Opções", "details.effectOn": "Ativar também ativa: {names}", "details.effectOnReplace": "Ativar desativa: {names}", "details.effectOnMixed": "Ativar também ativa: {on}; desativa: {off}", "details.effectOff": "Desativar também desativa: {names}", "details.effectLast": "Única fonte em execução; permanece ativa", "details.currentMain": "Estratégia principal atual", "details.useMain": "Usar como estratégia principal", "details.back": "Voltar para “{component}”", "config.strategyWorkflowNote": "Executa somente quando suportado pela estratégia principal (como Em camadas); as configurações são preservadas.", "threeTier.offNote": "Este plugin está desativado. Tarefas em segundo plano também exigem uma Estratégia principal compatível.", "board.otherEnhancements": "Aprimoramentos para outras estratégias principais ({count})", "board.more": "Adicione mais componentes pela lista de Plugins", "board.relationNeeds": "Requer “{component}”", "board.relationNeededBy": "“{component}” depende disto", "options.aria": "Opções de “{component}”", "options.emptySourcesTitle": "Nenhuma fonte de memória selecionada", "options.emptySourcesConfirm": "Nenhuma fonte de memória está selecionada. Salvar desativa o acesso do Agente à memória de execução, documentos e espaços de memória. Para restaurar a seleção automática, cancele e redefina esta opção para o padrão. Salvar uma seleção vazia?", "options.apply": "Aplicar", "options.fix": "Corrija primeiro as opções marcadas", "options.applying": "Aplicando…", "options.default": "Padrão", "options.reset": "Redefinir padrão", "options.integer": "Informe um número inteiro", "options.between": "Informe um número inteiro de {min} a {max}", "options.atLeast": "Informe um número inteiro maior ou igual a {min}", "options.atMost": "Informe um número inteiro menor ou igual a {max}", "options.tooLong": "No máximo {max} caracteres", "options.listLimit": "Até {count} itens únicos de no máximo {length} caracteres cada", "options.listHint": "Um item por linha.", "options.noSources": "Nenhuma fonte de memória disponível para escolha no momento.", "options.sourceUnavailable": "{source} (indisponível agora)", "feedback.memoryOff": "Memória fora de uso: nenhuma estratégia principal está em execução", "feedback.memoryRestored": "Memória restaurada, composta por “{strategy}”", "feedback.fallback": "A estratégia “{selected}” está desativada; “{composing}” compõe a memória por enquanto", "feedback.fallbackMissing": "A estratégia principal selecionada não está instalada; “{composing}” compõe a memória por enquanto", "feedback.switchedMain": "Estratégia alterada para “{strategy}”", "feedback.switchedMainOff": "Estratégia alterada para “{strategy}”; desativado: {others}", "feedback.switchedMainWith": "Estratégia alterada para “{strategy}”; também ativado por dependência: {others}", "feedback.switchedMainMixed": "Estratégia alterada para “{strategy}”: ativado {on} e desativado {off}", "feedback.externalMain": "A estratégia principal agora é “{strategy}”", "feedback.idleMain": "Componente “{component}” também está em execução, mas não compõe nada", "feedback.sourceOn": "Componente “{component}” ativado; sua camada voltou a ler e gravar", "feedback.sourceOff": "Componente “{component}” desativado; sua camada parou de ler e gravar", "feedback.componentOn": "Componente “{component}” ativado", "feedback.componentOff": "Componente “{component}” desativado", "feedback.externalSourceOn": "Componente “{component}” foi ativado; sua camada voltou a ler e gravar", "feedback.externalSourceOff": "Componente “{component}” foi desativado; sua camada parou de ler e gravar", "feedback.externalComponentOn": "Componente “{component}” foi ativado", "feedback.externalComponentOff": "Componente “{component}” foi desativado", "feedback.several": "{count} componentes atualizados", "feedback.enabledWith": "Componente “{component}” ativado (também ativado por dependência: {others})", "feedback.disabledWith": "Componente “{component}” desativado (também desativado por dependência: {others})", "feedback.enabledReplacing": "Componente “{component}” ativado (desativado por conflito: {others})", "feedback.enabledMixed": "Componente “{component}” ativado: também ativado {on} e desativado {off}", "feedback.optionsSaved": "Opções de “{component}” atualizadas", "feedback.externalOptions": "As opções de “{component}” foram alteradas", "feedback.externalSeveral": "{count} componentes foram alterados", "feedback.undo": "Desfazer", "feedback.undone": "Desfeito; as configurações anteriores foram restauradas", "feedback.show": "Mostrar", "feedback.retry": "Tentar novamente", "feedback.failed": "Não foi possível aplicar a alteração; as configurações anteriores foram mantidas.", "feedback.layerResumed": "A camada “{layer}” voltou a executar", "config.componentListNote": "Na lista de componentes abaixo, dsh-brain-mnemon/bundle é a entrada de agrupamento do Starter; aparecer como desativada não afeta o funcionamento.", "layers.disabledBadge": "Desativado", "layers.disabledTitle": "Camada {layer} desativada", "layers.disabledDescription": "Esta camada de memória não está participando do processamento de memória.", "layers.disabledText": "Os dados existentes são preservados; reative nas configurações para retomar.", "layers.stoppedBadge": "Não está em execução", "layers.stoppedTitle": "Camada {layer} não está em execução", "layers.stoppedDescription": "O componente desta camada está ativado, mas não está em execução.", "layers.stoppedText": "Os dados existentes são preservados; retorna assim que o componente voltar a executar.", "layers.memoryOffBadge": "Fora de uso", "layers.memoryOffTitle": "Camada {layer} fora de uso", "layers.memoryOffDescription": "A memória está fora de uso, portanto esta camada está indisponível.", "layers.memoryOffText": "Os dados existentes são preservados; restaure uma estratégia principal nas configurações para retomar.", "config.nativeName": "Mnemon Native", "config.backgroundTitle": "Tarefas em segundo plano", "config.backgroundDescription": "Captura, arquivamento e revisão executam em segundo plano quando suportados pela estratégia principal.", "config.memoryWriting": "Gravações na memória", "config.confirmWrites": "Confirmar gravações por ferramentas de memória", "config.confirmWritesHint": "Pergunta pelo DSH antes que modelos adicionem, editem ou excluam memória via ferramentas.", "config.confirmWritesBadge": "Pausa a revisão em inatividade", "config.taskAgentSectionTitle": "Agente de tarefas", "config.taskAgentSectionDescription": "Conduz manutenção em segundo plano, Salvar na memória, roteamento de Espaços e revisão de sincronização.", "config.taskAgentTitle": "Modelo do Agente de tarefas", "config.taskAgentInherit": "Seguir global", "config.taskAgentInheritHint": "Segue o modelo de novas sessões", "config.taskAgentConversation": "Seguir a conversa", "config.taskAgentConversationHint": "Segue o modelo usado pela conversa atual", "config.taskAgentFixed": "Personalizado", "config.taskAgentFixedHint": "Escolher um modelo", "config.taskAgentProvider": "Provedor de modelo", "config.taskAgentModel": "Modelo", "config.taskAgentImageInput": "Entrada de imagem", "config.taskAgentEffective": "Usará atualmente", "config.taskAgentSource.fixed": "Personalizado", "config.taskAgentSource.session": "Conversa atual", "config.taskAgentSource.dsh-default": "Modelo de novas sessões", "config.taskAgentSource.active-agent": "Uma conversa aberta", "config.taskAgentLoading": "Carregando diretório de modelos", "config.taskAgentUnavailable": "Nenhuma rota de Provedor / Modelo disponível no momento", "config.taskAgentLoadFailed": "Não foi possível carregar o diretório de modelos: {error}", "config.taskAgentPartial": "Não foi possível ler {count} provedores; as demais opções continuam disponíveis.", "config.taskAgentRetry": "Ler novamente", "config.customAbsolute": "Use um caminho absoluto ou iniciado com ~/", "config.saveFailed": "Falha ao salvar: {error}", "config.readOnly": "As configurações do plugin são somente leitura nesta implantação.", "config.remoteReadOnly": "As configurações do plugin são somente leitura no acesso remoto: defina remoteAccess: trusted-host na configuração do perfil mnemon e reinicie o DSH para alterá-las aqui.", "config.unavailable": "Não foi possível carregar as configurações do Sistema de memória. Verifique se o Host concede a RPC de configurações a esta implantação Web.", "config.discard": "Descartar", "config.interactionTurnBar": "Barra de memória do turno", "config.interactionTurnBarHint": "Exibe a recuperação e as gravações de cada turno abaixo da resposta", "config.interactionSaveAction": "Ação Salvar na memória", "config.interactionSaveActionHint": "Salve uma resposta manualmente; ela vai para o destino escolhido após sua confirmação", "config.packTitle": "Backup e migração", "config.packUnavailable": "Este Host DSH não fornece o canal de backup ZIP do Mnemon.", "config.packExporting": "Exportando…", "config.packInspecting": "Inspecionando…", "config.packImporting": "Importando…", "config.packExported": "{file} exportado ({size}).", "config.packFailed": "Falha na operação ZIP: {error}", "config.packSimpleDescription": "Um ZIP dos componentes acima, sem provedores de terceiros nem credenciais", "config.packImportZip": "Importar ZIP", "config.packExportZip": "Exportar ZIP", "config.packChooseZip": "Escolher um ZIP de backup do Mnemon", "config.packUnnamedZip": "Backup Mnemon.zip", "config.packZipReady": "Verificado · {components} componentes · {items} itens · {size}", "config.packImportZipAction": "Importação segura", "config.packImportedWhole": "ZIP mesclado com segurança em {root}.", "config.syncTitle": "Sincronização Git", "config.syncSimpleDescription": "Sincroniza os componentes acima com um repositório Git, sem provedores de terceiros nem credenciais", "config.syncLoading": "Lendo o status da sincronização…", "config.syncUnavailable": "Este Host DSH não fornece o canal de sincronização de repositório do Mnemon.", "config.syncUnavailableReason": "Não foi possível ler o status da sincronização: {error}", "config.syncGitMissing": "A sincronização requer Git {required} ou mais recente", "config.syncRecheck": "Verificar novamente", "config.syncFixCredentials": "Definir credenciais", "config.syncRepository": "Repositório", "config.syncRepositoryHint": "Escolha o repositório Git que guarda sua memória", "config.syncChange": "Alterar", "config.syncDisconnect": "Desconectar", "config.syncDisconnectTitle": "Desconectar este repositório?", "config.syncDisconnectBody": "A memória para de sincronizar com {repository} e a sincronização automática é desativada. Nada é excluído aqui nem no repositório; o token de acesso salvo é removido.", "config.syncDisconnected": "Repositório desconectado.", "config.syncStateChecking": "Verificando o repositório…", "config.syncStateConnected": "Conectado", "config.syncStateNewBranch": "Conectado · a primeira sincronização cria a branch {branch}", "config.syncNoCredential": "fazer push requer login no GitHub ou um token de acesso", "config.syncNoCredentialToken": "fazer push requer um token de acesso", "config.syncIssueAuthHttps": "Requer credenciais; entre com o GitHub ou adicione um token de acesso", "config.syncIssueAuthToken": "Requer credenciais; adicione um token de acesso", "config.syncIssueRejectedGitHub": "O GitHub recusou o login; entre novamente ou verifique o acesso a este repositório", "config.syncIssueRejectedGitHubToken": "O GitHub recusou o token de acesso salvo; substitua-o", "config.syncIssueRejectedGitHubEnvironment": "O GitHub recusou o token em {env}; substitua-o", "config.syncIssueRejected": "O servidor recusou o token salvo; substitua-o ou informe o usuário esperado no endereço", "config.syncIssueRejectedEnvironment": "O servidor recusou o token em {env}; substitua-o", "config.syncIssueAuthSsh": "Falha na autenticação SSH; verifique a chave SSH deste computador", "config.syncIssueAuth": "Acesso recusado a este repositório", "config.syncIssueNotFound": "Repositório não encontrado; verifique o endereço e suas permissões", "config.syncIssueNotFoundGitHub": "Repositório não encontrado; verifique o endereço, pois repositórios privados exigem login ou token", "config.syncIssueNetwork": "Não foi possível alcançar o repositório; verifique a rede ou o proxy", "config.syncIssueTimeout": "O repositório não respondeu a tempo", "config.syncIssueUnknown": "Não foi possível ler o repositório: {error}", "config.syncViaGitHub": "via GitHub @{login}", "config.syncViaGitHubAnonymous": "via login no GitHub", "config.syncViaToken": "com um token de acesso", "config.syncViaEnvironment": "com a variável de ambiente {env}", "config.syncViaSsh": "com uma chave SSH", "config.syncConnectWith": "Conectar com", "config.syncModeGitHub": "Conta do GitHub", "config.syncModeAddress": "Endereço do repositório", "config.syncRepoUrl": "Endereço do repositório", "config.syncRepoUrlPlaceholder": "https://…, git@host:caminho ou um caminho local absoluto", "config.syncRepoUrlInvalid": "Use uma URL https:// ou ssh://, git@host:caminho ou um caminho local absoluto", "config.syncRepoUrlCredentials": "Apenas o nome de usuário pode ir no endereço; informe o token em Token de acesso", "config.syncToken": "Token de acesso", "config.syncTokenOptional": "Opcional", "config.syncTokenSaved": "Salvo; digite um novo para substituí-lo", "config.syncTokenEnvironment": "Usando a variável de ambiente {env}", "config.syncTokenHint": "Apenas endereços HTTPS precisam de token; ele permanece neste computador", "config.syncTokenRemove": "Remover", "config.syncTokenRemoved": "Token de acesso removido.", "config.syncConnect": "Conectar", "config.syncConnecting": "Conectando…", "config.syncSave": "Salvar", "config.syncSaving": "Salvando…", "config.syncGitHubHint": "Entre para escolher ou criar um repositório; a autorização permanece neste computador", "config.syncGitHubReadOnly": "O armazenamento de credenciais é somente leitura, portanto não é possível salvar o login", "config.syncGitHubSignIn": "Entrar com o GitHub", "config.syncGitHubStarting": "Solicitando código de dispositivo…", "config.syncGitHubCode": "Digite este código de dispositivo no GitHub:", "config.syncGitHubCopyOpen": "Copiar e abrir o GitHub", "config.syncGitHubCopied": "Copiado; cole na página que abriu e o processo continuará automaticamente", "config.syncGitHubOpenBlocked": "O navegador não abriu uma nova página; acesse {url} manualmente", "config.syncGitHubWaiting": "Aguardando autorização… continuará automaticamente", "config.syncGitHubSignedIn": "Conectado como @{login}", "config.syncGitHubSignOut": "Sair", "config.syncGitHubFailed": "Falha ao entrar com o GitHub: {error}", "config.syncGitHubExpired": "O código de dispositivo expirou; inicie o login novamente", "config.syncGitHubDenied": "A autorização foi negada", "config.syncGitHubExpiredGrant": "A autorização do GitHub não é mais válida; entre novamente", "config.syncGitHubSignInAgain": "Entrar novamente", "config.syncRepositoryLabel": "Repositório", "config.syncRepositorySearch": "Pesquisar repositórios ou digitar um novo nome", "config.syncRepositoriesLoading": "Lendo repositórios…", "config.syncRepositoriesFailed": "Não foi possível ler os repositórios: {error}", "config.syncRepositoriesRetry": "Tentar novamente", "config.syncRepositoriesNone": "Esta conta ainda não tem repositórios; digite um nome para criar um", "config.syncRepositoriesEmpty": "Nenhum repositório correspondente", "config.syncRepositoriesMore": "Mais {count} repositórios; digite para filtrar a lista", "config.syncRepositoryPrivate": "Privado", "config.syncRepositoryPublic": "Público", "config.syncRepositoryNoPush": "Sem permissão de push", "config.syncRepositoryCurrent": "Atual", "config.syncRepositoryCreate": "Criar repositório privado {name}", "config.syncRepositoryCreating": "Criando…", "config.syncRepositoryNameInvalid": "O nome do repositório aceita letras, dígitos, pontos, hifens e sublinhados", "config.syncPublicTitle": "Usar um repositório público?", "config.syncPublicBody": "{name} é público: qualquer pessoa pode ler a memória sincronizada nele.", "config.syncPublicConfirm": "Usar mesmo assim", "config.syncRowTitle": "Sincronizar", "config.syncNever": "A sincronização mescla aqui a memória do repositório e depois envia a deste computador", "config.syncLast": "Última sincronização em {time}", "config.syncLastMerge": "Última mesclagem em {time}", "config.syncCheck": "Verificar remoto", "config.syncNow": "Sincronizar agora", "config.syncNowRunning": "Sincronizando…", "config.syncDone": "Sincronizado; push de {commit} enviado.", "config.runtimeMergeArchived": "{count} memórias excedentes foram preservadas localmente em runtime/archived/import-overflow e mantidas fora da memória de trabalho.", "config.syncDoneMerged": "Sincronizado: {count} memórias remotas mescladas e push de {commit} enviado.", "config.syncUpToDate": "Atualizado; o repositório corresponde a este computador.", "config.syncUpToDateMerged": "{count} memórias remotas mescladas; o repositório está atualizado.", "config.syncPushFailed": "Commit feito localmente, mas o push não foi concluído: {reason}", "config.syncFailed": "Falha na sincronização: {error}", "config.syncReasonBusy": "Outra sincronização ainda está em andamento; tente novamente em instantes", "config.syncReasonNoRepository": "Nenhum repositório conectado", "config.syncReasonGitMissing": "O Git deste computador está indisponível", "config.syncReasonRemoteEmpty": "O repositório ainda não tem backup; sincronize uma vez primeiro", "config.syncReasonRejected": "Outro dispositivo atualizou o repositório durante a sincronização; sincronize novamente", "config.syncAuto": "Sincronização automática", "config.syncAutoOff": "Desativada", "config.syncAutoHour": "A cada hora", "config.syncAutoHours": "A cada {hours} horas", "config.syncAutoDay": "Diariamente", "config.syncAutoDays": "A cada {days} dias", "config.syncAutoHintOff": "Sincroniza apenas quando você clicar em Sincronizar agora", "config.syncAutoHintOn": "Sincroniza em segundo plano neste intervalo, exatamente como Sincronizar agora", "config.syncAutoNext": "Próxima às {time}", "config.syncAutoLast": "Última às {time}", "config.syncAutoFailed": "A última sincronização automática falhou: {error}", "config.syncHistory": "Histórico de backups", "config.syncHistoryHint": "Cada sincronização registra uma versão no repositório", "config.syncHistoryView": "Ver", "config.syncHistoryLoading": "Lendo…", "config.syncHistoryEmpty": "O repositório ainda não tem backups.", "config.syncHistoryMore": "Carregar versões anteriores", "config.syncHistoryCapped": "Apenas as últimas {count} versões são listadas aqui", "config.syncHistoryFrom": "de {machine}", "config.syncHistoryUnknownMachine": "um computador sem nome", "config.syncComponentRuntime": "Memória de execução", "config.syncComponentDocuments": "Documentos do projeto", "config.syncComponentSpaces": "Espaços de memória", "config.syncCountRuntime": "{count} memórias de execução", "config.syncCountDocuments": "{count} documentos", "config.syncCountSpaces": "{count} espaços de memória", "config.syncCompareTitle": "Comparar com o remoto", "config.syncCompareLoading": "Lendo o remoto…", "config.syncCompareRemote": "A versão remota é de {machine} · {time}", "config.syncCompareSame": "Igual", "config.syncCompareDiffers": "Diferente", "config.syncCompareRuntime": "{remote} só no remoto · {local} só aqui", "config.syncCompareConflicts": "{count} com redação diferente", "config.syncCompareAllSame": "Este computador e o remoto coincidem; não há nada para sincronizar.", "config.syncCompareTruncated": "Há mais diferenças do que estas contagens mostram.", "config.syncCompareRemovals": "O remoto registrou {count} exclusões; a sincronização as aplica aqui.", "config.syncCompareConflictNote": "{count} assuntos estão escritos de forma diferente: a sincronização mantém ambos, e a Reconciliação de memória pode mesclá-los depois.", "config.syncCompareShowConflicts": "Mostrar", "config.syncCompareGoReview": "Ir para Reconciliação de memória", "config.syncCompareHeldBack": "{count} memórias remotas foram excluídas aqui anteriormente; a sincronização as mantém fora.", "config.syncCompareRevive": "Trazer de volta", "config.syncCompareReviving": "Trazendo de volta…", "config.syncCompareRevived": "{count} memórias trazidas de volta.", "config.syncDiffHere": "Local", "config.syncDiffThere": "Remoto", "config.syncMergeOnly": "Mesclar apenas aqui", "config.syncMerging": "Mesclando…", "config.syncMerged": "Remoto {commit} mesclado.", "config.syncMergedCount": "{count} memórias remotas mescladas.", "config.syncAdvanced": "Avançado", "config.syncBranch": "Branch", "config.syncSubdir": "Diretório no repositório", "config.syncDefaultValue": "Padrão {value}", "config.syncBranchInvalid": "Nome de branch inválido", "config.syncSubdirInvalid": "Use um diretório relativo dentro do repositório", "config.syncAuthor": "Autor do commit", "config.syncAuthorDefault": "Padrão", "config.syncAuthorMachine": "Git deste computador", "config.syncAuthorCustom": "Personalizado", "config.syncAuthorDefaultNote": "Usa a identidade Git deste computador; recorre a {identity} se não estiver configurada", "config.syncAuthorMachineNote": "Usa a identidade Git deste computador ou a padrão", "config.syncAuthorName": "Nome", "config.syncAuthorEmail": "E-mail", "config.syncAuthorEmailInvalid": "Endereço de e-mail inválido", "config.syncAdvancedNote": "Após salvar, a próxima sincronização grava na nova branch ou diretório", "config.syncMachineName": "Nome deste computador", "config.syncMachineHostname": "Nome do host", "config.syncMachineCustom": "Personalizado", "config.syncMachineNameLabel": "Nome", "config.syncMachineHostnameNote": "Usa o nome do host; o histórico de backup exibe “de {name}”", "config.syncMachineCustomNote": "O histórico de backup exibe “de {name}”", "config.syncMachineNameInvalid": "Até 120 caracteres em uma única linha", "config.syncMachineRenameNote": "Após salvar, as sincronizações seguintes usam o novo nome; versões anteriores mantêm o nome original", "config.syncAdvancedSaved": "Configurações avançadas salvas.", "config.reconcileTitle": "Reconciliação de memória", "config.reconcileDescription": "Um modelo lê a memória mesclada e propõe alterações; nada é gravado até você revisar", "review.reconcile": "Reconciliar", "review.reconciling": "Reconciliando…", "review.refresh": "Atualizar", "review.empty": "Nada para revisar", "review.pending": "{count} aguardando revisão", "review.failed": "Falha ao ler o registro de revisão: {error}", "review.planned": "{operations} propostas preparadas; nada é gravado até você aceitá-las.", "review.none": "O modelo não encontrou nada a alterar na memória mesclada.", "review.statusPending": "Pendente", "review.statusAccepted": "Aceito", "review.statusRejected": "Rejeitado", "review.expand": "Abrir", "review.collapse": "Fechar", "review.accept": "Aceitar", "review.reject": "Rejeitar", "review.apply": "Aplicar", "review.applying": "Aplicando…", "review.reopen": "Reabrir", "review.applied": "{count} alterações aplicadas.", "review.appliedAt": "Aplicado em {time}", "review.appliedCount": "{count} de {total} operações executadas", "review.applyFailed": "Falha ao aplicar: {error}", "review.meta": "{count} alterações · de {machine} · {time}", "review.foreign": "Toca memórias de: {machines}", "review.opinions": "Opiniões", "review.noOpinions": "Nenhuma opinião ainda", "review.authorUser": "Você", "review.authorAgent": "Modelo", "review.opinionPlaceholder": "Deixe uma opinião para a próxima reconciliação", "review.opinionSend": "Adicionar opinião", "review.opinionAdded": "Sua opinião foi registrada.", "review.opAdd": "Adicionar memória de {target}: {content}", "review.opReplace": "Reescrever memória de {target}: “{from}” passa a ser “{to}”", "review.opRemove": "Remover memória de {target}: {text}", "review.opArchive": "Arquivar documento {id}", "review.targetMemory": "projeto", "review.targetUser": "usuário", "review.guidanceLabel": "O que alcançar", "review.guidanceHint": "Opcional: informe o que deseja desta reconciliação; o modelo lê sem ganhar autoridade adicional com isso", "review.guidancePlaceholder": "Por exemplo: duas preferências dizem a mesma coisa, mescle-as em uma só", "review.guided": "Planejado com sua orientação", "review.remoteEntries": "Leu {count} entradas da branch ausentes nesta instalação", "review.selectAll": "Todas", "review.selectNone": "Nenhuma", "review.selectHint": "Marque as alterações a aplicar; as desmarcadas ficam para a próxima rodada", "review.selected": "{count} de {total} selecionadas", "review.applyCount": "Aplicar {count}", "review.noSelection": "Selecione ao menos uma alteração.", "review.history": "Planos aplicados ({count})", "review.historyTitle": "Planos aplicados", "review.historyHint": "Estes planos já foram executados e ficam para consulta. Reabrir um plano não desfaz o que ele gravou.", "review.historyEmpty": "Nenhum plano foi executado ainda.", "review.rejectedHint": "Este plano foi rejeitado; deixe uma opinião e reabra-o, ou peça à IA para planejar novamente.", "skills.label": "Habilidades", "skills.groupSurface": "Superfícies", "skills.groupPlacement": "Localização e atualizações", "skills.groupEvolution": "Automação", "skills.groupGeneration": "Modelos e geração", "skills.groupSources": "Mercado e diretórios", "skills.badgeDefault": "Padrão", "skills.badgeCustom": "Personalizado · {count}", "skills.parametersBadge": "Limiar {threshold} · {idle}s", "skills.evolution": "Autoevolução", "skills.allowCreate": "Sugerir novas habilidades", "skills.allowCreateHint": "Permite que revisões proponham novas habilidades; sugestões existentes continuam podendo ser tratadas manualmente", "skills.allowUpdate": "Sugerir melhorias de habilidades", "skills.allowUpdateHint": "Permite que revisões melhorem habilidades existentes; as revisões pausam quando ambos os tipos de sugestão estão desativados", "skills.targetScope": "Destino de novas habilidades", "skills.roots.title": "Diretórios de novas habilidades", "skills.roots.hint": "Aplica-se à criação, rascunhos e instalações do mercado, substituindo o destino acima.", "skills.roots.enabled": "Personalizar diretórios de criação", "skills.roots.default": "Diretório padrão de criação", "skills.roots.invalid": "Selecione ao menos um diretório e inclua o padrão entre as opções.", "skills.root.project-dsh": "Projeto .dsh/skills", "skills.root.project-agents": "Projeto .agents/skills", "skills.root.user-dsh": "Usuário .dsh/skills", "skills.root.user-agents": "Usuário .agents/skills", "skills.allowLinkedUpdates": "Permitir atualizações em habilidades vinculadas", "skills.allowLinkedUpdatesHint": "As atualizações gravam diretamente nos destinos dos links simbólicos entre Agentes compartilhados; ative apenas para caminhos confiáveis.", "skills.targetScopeHint": "Padrão: Usuário; Seguir armazenamento mapeia escopos de espaço de trabalho para Projeto, alterável ao adotar.", "skills.targetScope.user": "Usuário", "skills.targetScope.project": "Projeto", "skills.targetScope.storage": "Seguir armazenamento", "skills.evolutionHint": "Revisa conversas e propõe atualizações de habilidades; as sessões de tarefas são mantidas localmente.", "skills.autoAdoptDailyLimit": "Candidatos automáticos por dia", "skills.autoAdoptTimeZone": "Fuso horário da cota diária", "skills.autoBudgetHint": "Por dia calendário neste fuso horário (0 pausa o processamento automático); ações manuais continuam liberadas.", "skills.autoBudgetInvalid": "Use um número inteiro de 0 a 100 e um fuso horário IANA válido ou local.", "skills.autoAdopt": "Adotar novas sugestões automaticamente", "skills.autoAdoptHint": "Exige backtests; adota apenas com zero regressões em casos de texto (até 2 novas tentativas).", "skills.autoBacktest": "Executar backtest de rascunhos", "skills.autoBacktestHint": "Compara um novo rascunho com a versão atual em seus casos de teste", "skills.parameters": "Parâmetros de revisão", "skills.draftGeneration": "Geração de rascunho", "skills.draftMaxTokens": "Limite de tokens de saída do rascunho", "skills.draftRetryMaxTokens": "Limite de tokens de saída na nova tentativa", "skills.draftBudgetHint": "Inclui raciocínio e o SKILL.md completo; tenta novamente uma vez em caso de truncamento se o limite de nova tentativa for maior.", "skills.reviewThreshold": "Limiar de revisão", "skills.idleSeconds": "Espera em inatividade (s)", "skills.cooldownSeconds": "Intervalo de revisão (s)", "skills.minConfidence": "Confiança mínima", "skills.expiryDays": "Validade da sugestão (dias)", "skills.maxPendingPerSession": "Pendentes por conversa", "skills.casesPerRun": "Casos por backtest", "skills.invalid": "{field} deve estar entre {min} e {max}", "skills.hints": "Na conversa", "skills.hintsHint": "Exibe as habilidades usadas no turno e novas sugestões abaixo dele", "skills.sidebar": "Entrada na barra lateral", "skills.sidebarHint": "Exibe Habilidades como uma entrada própria na barra lateral em vez de dentro do Sistema de memória", "skills.models": "Modelos padrão", "skills.modelsHint": "Segue a rota do Agente de tarefas quando definido como Automático.", "skills.modelAuto": "Automático (seguir Agente de tarefas)", "skills.draftModel": "Modelo de rascunho de evolução", "skills.draftModelHint": "Escreve e revisa rascunhos de habilidades para sugestões", "skills.runModel": "Modelo de execução de avaliação", "skills.runModelHint": "Executa casos de backtest e pontua os resultados", "skills.directories": "Diretórios de habilidades", "skills.directoriesHint": "Deixe vazio para usar os diretórios padrão de habilidades do usuário.", "skills.dshHome": "Diretório inicial do DSH", "skills.agentsHome": "Diretório compartilhado de Agents", "skills.market": "Fontes do mercado", "skills.marketHint": "Gerencie catálogos do mercado de habilidades e índices de pesquisa.", "skills.marketRefresh": "Atualizar", "skills.marketRefreshing": "Atualizando…", "skills.marketAddPlaceholder": "Repositório GitHub, URL de índice ou caminho local", "skills.marketAdd": "Adicionar", "skills.marketAdding": "Adicionando…", "skills.marketRemove": "Remover", "skills.marketBuiltin": "Integrada", "skills.marketSkillCount": "{count} habilidades", "skills.marketEmpty": "Nenhuma fonte de mercado configurada.", "skills.statusCount": "{count} habilidades", "skills.statusOn": "Autoevolução ativa · {waiting} aguardando", "skills.statusIdle": "Autoevolução ativa", "skills.statusOff": "Autoevolução desativada", "skillTail.label": "Habilidades do turno", "skillTail.reviewing": "Revisando", "skillTail.suggested": "sugeriu {count}", "skillTail.failed": "Falha na revisão", "skillTail.openSkill": "Abrir {name} em Habilidades", "skillTail.openSuggestions": "Abrir as sugestões em Habilidades" }; // vendor/dsh-mnemon/src/client/locales/ru.ts const coreRu = { "composer.expand": "Показать поле ввода", "composer.collapse": "Свернуть поле ввода", "composer.collapsed": "Поле ввода свёрнуто", "tab.label": "Система памяти", "nav.aria": "Страницы Mnemon", "nav.status": "Статус", "nav.runtime": "Память выполнения", "nav.runtimeDetail": "USER / MEMORY", "nav.documents": "Документы проекта", "nav.documentsDetail": "Индекс и архив", "nav.spaces": "Пространства памяти", "nav.spacesDetail": "Граф и извлечение", "common.refresh": "Обновить", "common.openConfiguration": "Открыть настройки", "common.loading": "Загрузка…", "common.cancel": "Отмена", "common.close": "Закрыть", "common.showing": "Показано {visible} / {total}", "common.showMore": "Показать ещё {count}", "header.backToConversation": "Вернуться в диалог", "header.configure": "Настроить", "header.noticeSummary": "Уведомления ({count}) · {labels}", "header.noticeRemoteReadOnly": "Удалённый доступ только для чтения", "header.noticeIdleReview": "Проверка в простое", "header.compositionHint": "Нажмите, чтобы изменить состав в настройках.", "header.checking": "Проверка", "header.connected": "Подключено", "header.unavailable": "Недоступно", "header.notReady": "Mnemon не готов", "workspace.viewing": "Просмотр рабочей области", "workspace.selectorAria": "Выбрать рабочую область памяти для просмотра", "workspace.excluded": "Память исключена", "workspace.excludedDetail": "Эта рабочая область и её дочерние агенты не участвуют в подстановке памяти, вызовах инструментов и автоматической проверке. Существующие данные остаются доступными для чтения; удалите исключение, чтобы возобновить работу.", "workspace.excludeTitle": "Рабочие области, исключённые из памяти", "workspace.excludeHint": "По одному абсолютному пути рабочей области на строку (поддерживаются ~ и символические ссылки).", "workspace.excludeCount": "Исключено: {count}", "workspace.excludeNone": "Нет", "workspace.excludePlaceholder": "/path/to/private-workspace", "workspace.excludeNote": "Применяется к будущим ходам; существующие данные и история сессии не затрагиваются.", "workspace.invalidExclusions": "Некорректных или недоступных путей исключения: {count} (проигнорированы); проверьте пути в настройках хранилища.", "workspace.unavailable": "Не удалось определить текущую рабочую область; исключения путей не применены.", "workspace.storageMode": "Область хранения", "workspace.storageModeAria": "Область хранения: {mode}", "workspace.mismatchTitle": "Просматриваемый каталог не совпадает с этой сессией", "workspace.mismatchShort": "Другая рабочая область", "workspace.selectedRoot": "Просмотр: {root}", "workspace.effectiveRoot": "Активно: {root}", "workspace.align": "Совместить", "workspace.remoteReadOnly": "Удалённый доступ открыт только для чтения: задайте remoteAccess: trusted-host в конфигурации профиля mnemon и перезапустите DSH, чтобы управлять памятью здесь.", "sourcePage.instance": "Экземпляр Источника", "sourcePage.instanceAria": "Выбрать экземпляр Источника", "sourcePage.summaryAria": "Сводка статуса и прав Источника", "sourcePage.package": "Пакет", "sourcePage.availability": "Доступность", "sourcePage.availability.ready": "Готов", "sourcePage.availability.degraded": "Ограничен", "sourcePage.availability.unavailable": "Недоступен", "sourcePage.role": "Семантическая роль", "sourcePage.revision": "Текущая ревизия", "sourcePage.permissions": "Разрешённые возможности", "sourcePage.diagnostics": "Диагностика", "sourcePage.configuration": "Декларативная конфигурация", "sourcePage.configurationDescription": "Поля поступают из очищенного дескриптора управления Хоста; при отправке права повторно проверяются для этого экземпляра и ревизии.", "sourcePage.configLoading": "Загрузка конфигурации…", "sourcePage.configSave": "Сохранить", "sourcePage.configSaving": "Сохранение…", "sourcePage.configSaved": "Конфигурация отправлена; обновляется статус Источника.", "sourcePage.secretPlaceholder": "Оставьте пустым, чтобы сохранить текущий секрет", "sourcePage.unavailable": "Источник недоступен", "sourcePage.unavailableDescription": "В этой области нет доступного для вызова экземпляра. Работа памяти Хоста и Headless-режима от этой страницы не зависит.", "turnTail.label": "Память хода", "turnTail.recall": "извлечено: {count}", "turnTail.write": "записано: {count}", "turnTail.documents": "поиск документов: {count}", "turnTail.inspect": "проверено: {count}", "turnTail.failed": "ошибок: {count}", "turnTail.toolList": "Инструменты памяти за этот ход", "turnTail.more": "ещё {count}", "turnTail.openTool": "Открыть страницу памяти для {tool}", "turnTail.tool.recall": "Извлечение из Пространств памяти", "turnTail.tool.related": "Связанные записи памяти", "turnTail.tool.documentSearch": "Поиск по документам", "turnTail.tool.documentManage": "Обновление документа", "turnTail.tool.documentCreate": "Новый документ", "turnTail.tool.runtime": "Обновление памяти выполнения", "turnTail.tool.remember": "Сохранено в Пространства памяти", "turnTail.tool.link": "Связывание записей памяти", "turnTail.tool.forget": "Удаление записи памяти", "turnTail.tool.status": "Статус памяти", "turnTail.tool.spaces": "Список Пространств памяти", "turnTail.tool.spaceCreate": "Новое Пространство памяти", "turnTail.tool.spaceUpdate": "Обновление Пространства памяти", "turnTail.tool.spaceMerge": "Объединение Пространств памяти", "turnTail.tool.viewRoute": "Чтение памяти", "turnTail.tool.viewAction": "Обновление памяти", "receipt.written": "Сохранено", "receipt.updated": "Обновлено", "receipt.pending": "Отправлено; Провайдер подтвердит позже", "receipt.skipped": "Пропущено", "receipt.partial": "Сохранено частично", "receipt.unfinished": "Не завершено", "receipt.failed": "Ошибка", "receipt.view": "Открыть в Пространствах памяти", "receipt.viewRuntime": "Открыть в Памяти выполнения", "receipt.unembedded": "Сохранено без вектора: создать эмбеддинг не удалось, поэтому эта запись пока не участвует в семантическом поиске. Когда сервис эмбеддингов ответит, заполните векторы через «Проверить статус» в настройках эмбеддингов Mnemon Native.", "receipt.unembeddedNoService": "Вектора пока нет: нет доступного сервиса эмбеддингов, поэтому эта запись пока не участвует в семантическом поиске; поиск по ключевым словам по-прежнему её находит. После подключения сервиса эмбеддингов заполните векторы через «Проверить статус» в настройках эмбеддингов Mnemon Native.", "taskAgent.ready": "Агент задач готов", "taskAgent.unavailable": "Агент задач недоступен", "saveAction.button": "Сохранить в память", "saveAction.tooltip": "Сохранить этот ответ в память", "saveAction.title": "Сохранить в память", "saveAction.hint": "Агент задач решает, стоит ли сохранять запись, затем очищает её от дубликатов и записывает в Пространство памяти.", "saveAction.fetching": "Извлечение текста сообщения…", "saveAction.missing": "Не удалось извлечь текст этого сообщения из журнала сессии.", "saveAction.candidate": "Содержимое", "saveAction.truncated": "Этот ответ слишком длинный; сюда загружены только первые {limit} симв.", "saveAction.submit": "Сохранить", "saveAction.submitting": "Сохранение…", "saveAction.readOnly": "Это развёртывание работает только на чтение; запись в память отключена.", "saveAction.close": "Закрыть", "saveAction.hintDirect": "Записывает напрямую в выбранное место.", "saveAction.to": "Сохранить в", "saveAction.to.agent": "Автоматически", "saveAction.to.agentDetail": "Агент решает, сохранять ли запись, и подбирает Пространство памяти", "saveAction.to.memory": "Рабочая память (MEMORY.md)", "saveAction.to.user": "Профиль пользователя (USER.md)", "saveAction.to.space": "Пространство памяти · {provider}", "saveAction.save": "Сохранить", "saveAction.saving": "Сохранение…", "saveAction.saved.runtime": "Сохранено в {target} · записей: {count}", "saveAction.saved.runtimeMaintained": "Освобождено место и сохранено в {target} · записей: {count}", "saveAction.saved.space": "Сохранено в Пространство памяти «{space}»", "saveAction.saved.spacePending": "Отправлено в Пространство памяти «{space}»; Провайдер подтвердит позже", "saveAction.saved.spaceOther": "Ответ Пространства памяти «{space}»: {action}", "saveAction.saved.duplicate": "Уже сохранено; повторная запись не выполнялась.", "saveAction.unavailable": "Запись в это место сейчас недоступна.", "saveAction.place.delimiter": "Записи в {target} не могут содержать символ §; удалите его, чтобы сохранить.", "saveAction.place.tooLong": "Этот текст занимает около {size}, что превышает лимит одной записи в {target} ({limit}); сократите его.", "saveAction.place.orAgent": " Или позвольте Агенту решить.", "saveAction.place.full": "{target} использует {used} из {limit}. Перед сохранением освобождается место: из существующих записей останется около {keep}, остальные будут вынесены из рабочей памяти.", "saveAction.place.fullAll": "{target} использует {used} из {limit}. Перед сохранением освобождается место: все существующие записи будут вынесены из рабочей памяти.", "saveAction.place.userCondense": "Профиль пользователя использует {used} из {limit}. Перед сохранением агент задач сожмёт его примерно до {keep} без архивации.", "saveAction.place.userTooLong": "Этот текст занимает около {size}, что превышает доступный объём профиля пользователя после освобождения места ({max}); сократите его.", "saveAction.place.userFull": "Профиль пользователя заполнен, а для освобождения места требуется агент задач; сначала удалите записи в Памяти выполнения или выберите другое место.", "saveAction.noPlace": "Сейчас нет доступного места для записи этого текста.", "status.title": "Статус системы", "status.description": "Состояние работы dsh-brain-mnemon, Провайдеров памяти и каждого слоя хранения.", "status.nominal": "Система работает штатно", "status.workflowUnavailable": "Фоновое обслуживание недоступно", "status.workflowIdleReview": "Проверка в простое", "status.workflowRuntimeCapacity": "Обслуживание объёма памяти выполнения", "status.workflowUnsupported": "Текущая Стратегия не управляет процессами: {workflows}. Само по себе включение параметров проверки не запускает эти задачи. Выберите в Системе памяти Стратегию с их поддержкой, например «Многоуровневую стратегию». Ручные действия остаются доступными.", "status.reviewFailed": "Ошибка проверки в простое", "status.reviewFailedDetail": "Эта контрольная точка не завершилась и не будет запущена повторно автоматически. Последующие проверки учитывают паузу и лимит на сессию.", "status.reviewPartial": "Часть записей применена. Сверьте отчёты о записи ниже; откат не выполнялся.", "status.reviewTeamPaused": "Проверка в простое приостановлена настройкой совместимости с Agent Teams. Чтобы продолжить проверки, выберите «Ограниченная проверка агентом задач» в разделе «Проверка в простое» на странице dsh-brain-mnemon в «Плагины». Настройки извлечения и записи не изменены.", "status.reviewConfirmationPaused": "Включено подтверждение записи в память, поэтому проверка в простое приостановлена. Вы по-прежнему можете редактировать память вручную.", "status.reviewToolAccessPaused": "Инструмент завершения, необходимый для автоматической проверки, сейчас недоступен. Эта контрольная точка пропущена без расхода попытки. Доступ будет проверен снова после следующего подходящего хода диалога. Проверьте ограничения инструментов или настройки одобрения для этой сессии.", "status.reviewWatermarkUsage": "Попытки проверки в сессии: {attempts} / {max} (восстановлено: {restored}).", "status.reviewWatermarkNext": "Следующая проверка не ранее {time}; по-прежнему требуется новая подходящая контрольная точка диалога.", "status.reviewWatermarkPaused": "Автоматическая проверка приостановлена: постоянные лимиты недоступны.", "status.reviewWatermarkRecovery": "Продолжите диалог для повторной попытки. Если ошибка сохраняется, остановите Хосты, использующие этот корневой каталог хранения, прежде чем проверять состояние или блокировку сессии в state/idle-review. Удаление состояния сбросит лимит.", "config.reviewPersistWatermark": "Сохранять лимиты проверок после повторного открытия", "config.reviewPersistWatermarkHint": "Сохранять число попыток и паузу для каждого корня хранилища и родительской сессии, включая неудавшиеся и отменённые запуски.", "status.reviewRun": "Запуск проверки: {id}", "status.reviewContextWindow": "Выберите ограниченную контрольную точку (spawn) или модель агента задач с контекстным окном, достаточным для родительского диалога.", "config.reviewTitle": "Проверка в простое", "config.reviewDescription": "Упорядочивает память во время простоя диалога; извлечение и запись работают независимо", "config.reviewEnabled": "Включить проверку в простое", "config.reviewRuntimeMemory": "Записывать в память выполнения", "config.reviewRuntimeMemoryHint": "Только явно указанные вами предпочтения и правила; при выключении создаются только Документы", "config.reviewSilent": "Запускать проверки в простое в тихом режиме", "config.reviewSilentHint": "Если выключено, автоматические spawn-проверки отображаются в списке субагентов диалога.", "config.reviewLimits": "Параметры проверки", "config.reviewProvider": "Способ проверки", "config.reviewSpawn": "Ограниченная контрольная точка (spawn)", "config.reviewSpawnHint": "Агент задач читает ограниченную контрольную точку", "config.reviewFork": "Полный родительский контекст (fork)", "config.reviewForkHint": "Агент задач получает полный контекст родительского диалога", "config.reviewFallback": "Если fork недоступен (только до запуска)", "config.reviewSkip": "Пропустить эту проверку", "config.reviewAgentTeams": "Совместимость с Agent Teams", "config.reviewTeamPause": "Приостановить проверку", "config.reviewTeamPauseHint": "Пропускает проверку во время работы Agent Teams", "config.reviewTeamScoped": "Ограниченная проверка агентом задач", "config.reviewTeamScopedHint": "Проверку выполняет ограниченный агент задач без инструментов Teams", "config.review.minIntervalMs": "Минимальный интервал проверки (секунды)", "config.review.maxPerSession": "Максимум попыток на сессию", "config.review.maxContextChars": "Лимит символов контрольной точки spawn", "config.review.maxTokens": "Лимит выходных токенов модели на запрос", "config.reviewLimitInvalid": "Значение поля «{field}» должно быть от {min} до {max}", "status.checkRequired": "Требуется проверка", "status.memoryOff": "Память не используется", "status.memoryOffDetail": "Диалоги продолжаются без использования памяти.", "status.compositionStale": "Последнее изменение компонентов не вступило в силу", "status.compositionStaleDetail": "Память по-прежнему работает в прежнем составе.", "status.strategyFallback": "Выбранная основная стратегия не запущена", "status.strategyFallbackDetail": "Сейчас состав памяти формирует единственная доступная основная стратегия.", "status.reasonNoStrategy": "Нет запущенной основной стратегии.", "status.reasonNoSource": "Нет запущенного источника памяти.", "status.reasonNotComposed": "Компоненты памяти ещё загружаются.", "status.reasonSelectedStrategyOff": "Выбранная основная стратегия не запущена, а доступных альтернативных стратегий несколько.", "status.reasonDependency": "Компоненту {component} не хватает зависимости: {requirement}.", "status.reasonConflict": "Некоторые компоненты конфликтуют друг с другом.", "status.reasonRejected": "Состав отклонён: {detail}", "status.layerOffDetail": "Включите снова в настройках", "status.layerStoppedDetail": "Компонент включён, но не запущен", "status.layerMemoryOffDetail": "Станет доступно после запуска основной стратегии", "status.rechecking": "Проверка…", "status.aria": "Статус работы Mnemon", "status.engine": "Движок памяти", "status.engineUnavailable": "Mnemon недоступен", "status.versionWaiting": "Ожидание версии", "status.pluginChecking": "Проверка статуса плагина", "status.pluginReady": "Плагин работает штатно", "status.nativeAria": "Статус Mnemon Native", "status.nativeCliMissing": "Mnemon CLI не найден", "status.providersTitle": "Провайдеры памяти", "status.providersDescription": "Статус подключения работающих Провайдеров и их Пространств памяти.", "status.providersAria": "Статус провайдеров памяти", "status.providersEnabled": "Включено: {enabled} / {total}", "status.providersOff": "Отключено ещё Провайдеров: {count}", "status.providerState.disabled": "Выключен", "status.providerState.idle": "Сервис готов · нет активных Пространств памяти", "status.providerState.healthy": "Подключение исправно", "status.providerState.unhealthy": "Требуется проверка подключения", "status.providerSpaces": "Активных Пространств памяти: {active} / {total}", "versions.checkAction": "Версии", "versions.title": "Проверка и обновление версий", "versions.description": "Просмотрите текущую установку и обновите при необходимости. Разверните dsh-brain-mnemon для обслуживания подпакетов.", "versions.missing": "Не установлен (необязательно)", "versions.restart": "Требуется перезапуск", "versions.local": "Локальная версия", "versions.modeNpmCli": "npm", "versions.hintNpm": "Управляется через npm. Обновите здесь или выполните mnemon update в терминале Хоста.", "versions.hintNpmMissing": "Запускаемый файл npm найден, но npm недоступен на Хосте. Проверьте окружение Node.js.", "versions.hintNpmUnmanaged": "Текущий npm не управляет этой глобальной установкой CLI. Используйте исходное окружение Node.js или перейдите на npm ниже.", "versions.hintUnreadable": "CLI найден, но не удалось прочитать его версию. Проверьте команду в терминале Хоста или переустановите его.", "versions.hintStarter": "Обслуживается вместе с dsh-brain-mnemon Starter. Обновите Starter, чтобы использовать проверенную комбинацию пакетов.", "versions.npmRecommended": "Установка и обслуживание через npm", "versions.npmMaintenance": "Обслуживание CLI через npm", "versions.npmInstall": "Установить через npm (рекомендуется)", "versions.npmMigrate": "Перейти на npm (рекомендуется)", "versions.npmRepair": "Проверить или восстановить установку npm", "versions.npmRepairDetail": "Проверьте статус установки выше. Для переустановки выполните эту команду в терминале на Хосте DSH (Node.js 22+).", "versions.npmUpdateDetail": "Выполняйте эту команду для будущих обновлений, затем нажмите «Проверить снова», чтобы подтвердить активную версию.", "versions.npmInstallDetail": "Отдельный CLI нужен только для Mnemon Native. Чтобы использовать его, выполните эту команду в терминале на Хосте DSH (Node.js 22+).", "versions.npmMigrateDetail": "Чтобы перейти на npm, выполните эту команду на Хосте DSH (Node.js 22+).", "versions.npmVerify": "Проверьте установленную версию, затем нажмите «Проверить снова»:", "versions.npmNextSteps": "После установки: проверьте версию и активный путь", "versions.npmPath": "Разместите глобальный каталог bin для npm в начале PATH. Если заданы MNEMON_CLI_PATH или mnemon.cliPath, укажите в них новый исполняемый файл. Перезапустите DSH после изменения окружения и проверьте путь выше.", "versions.installGuide": "Руководство по установке", "versions.copy": "Копировать", "versions.copied": "Скопировано", "versions.copyCommand": "Копировать команду: {command}", "versions.copyFailed": "Буфер обмена недоступен. Выделите команду и скопируйте её вручную.", "versions.readOnly": "Подключение открыто только для чтения. Вы можете проверять версии и копировать команды; для обновления здесь используйте подключение с правами управления.", "versions.packages": "Версии подпакетов ({count})", "versions.packagesOutdated": "Доступно обновлений: {count}", "versions.packagesDetail": "Развернуть параметры обслуживания", "versions.packagesHide": "Свернуть детали подпакетов", "versions.packagesHint": "Пакеты по умолчанию обновляются вместе со Starter. Пакеты, установленные независимо в этом DSH Profile, можно обновлять по отдельности. После обновления перезапустите DSH.", "versions.managedStarter": "Обслуживается со Starter", "versions.managedProfile": "Управляется DSH Profile", "versions.starterVersion": "Закреплено в Starter", "versions.kind.source": "Источники", "versions.kind.strategy": "Стратегии", "versions.kind.provider": "Провайдеры", "versions.checking": "Проверка новых версий в удалённых репозиториях…", "versions.checkingShort": "Проверка…", "versions.recheck": "Проверить снова", "versions.failed": "Ошибка операции с версиями", "versions.timeout": "Превышено время ожидания проверки версий. Проверьте сеть и повторите попытку.", "versions.current": "Актуально", "versions.available": "Доступно обновление", "versions.unknown": "Не удалось проверить", "versions.installed": "Установлено", "versions.latest": "Последняя", "versions.executable": "Исполняемый файл", "versions.profileLocation": "DSH Profile · {name}", "versions.sourceLocation": "Исходный код", "versions.linkSourceLocation": "Исходный код · DSH Profile {name}", "versions.packageLocation": "Каталог пакета", "versions.update": "Обновить", "versions.updating": "Обновление…", "versions.updated": "{name} обновлён", "versions.alreadyCurrent": "Уже установлена последняя версия", "versions.restartRequired": "Перезапустите DSH, чтобы загрузить новый код плагина dsh-brain-mnemon; в настольном приложении полностью закройте и откройте его снова.", "versions.pendingInstalledTitle": "Установлен dsh-brain-mnemon {version}", "versions.pendingInstalledDetail": "Этот Хост по-прежнему использует {running}. Перезапустите DSH для загрузки новой версии; в настольном приложении полностью закройте и откройте его снова.", "versions.pendingPackagesTitle": "Обновлено: {names}", "versions.pendingPackagesDetail": "Перезапустите DSH, чтобы загрузить обновление; в настольном приложении полностью закройте и откройте его снова.", "versions.checkedAt": "Проверено в {time}", "versions.latestUnavailable": "Не удалось получить последнюю удалённую версию. Проверьте сеть и повторите попытку.", "versions.modeHomebrew": "Homebrew", "versions.modeGo": "go install", "versions.modeNpm": "DSH Profile", "versions.modeLink": "Локальная ссылка", "versions.modeManual": "Вручную", "versions.modeMissing": "Не установлен", "versions.hintHomebrew": "Управляется через Homebrew; доступный релиз можно безопасно обновить здесь.", "versions.hintBrewMissing": "Обнаружена установка Homebrew, но команда brew недоступна.", "versions.hintGo": "Управляется через go install; доступный релиз можно безопасно обновить здесь.", "versions.hintDsh": "Управляется текущим DSH Profile. Обновление выполняется установщиком плагинов DSH; после этого перезапустите DSH.", "versions.hintPnpm": "Управляется текущим DSH Profile; после обновления перезапустите DSH.", "versions.hintPnpmMissing": "Обнаружена установка DSH Profile, но Хост не находит команду pnpm. Установите pnpm и перезапустите DSH, чтобы обновлять здесь.", "versions.hintLink": "Это локально подключённая сборка для разработки. Получите изменения и пересоберите в каталоге исходного кода, чтобы сохранить локальные правки.", "versions.hintInstall": "Mnemon CLI не установлен. Он нужен только для Mnemon Native; чтобы использовать Native, установите его и добавьте mnemon в PATH или задайте MNEMON_CLI_PATH / mnemon.cliPath.", "versions.hintManual": "Не удалось надёжно определить способ установки. Обновите пакет тем же способом, которым он был установлен.", "status.activeRatio": "Активно: {active} / {total}", "status.runtimeRatio": "Профиль: {user} · проект: {memory}", "status.runtimeBytes": "Занято {bytes}", "status.runtimeWaiting": "Ожидание", "status.runtimeWaitingDetail": "Ожидание списка хранилищ от Хоста", "status.directoryUnsynced": "Каталог не синхронизирован", "status.activeMemories": "Активных записей: {count}", "status.documentsWaiting": "Ожидание рабочей области", "status.documentsSession": "Станет доступно после подключения активной сессии", "status.documentRatio": "Активных: {active} · в архиве: {archived}", "status.documentUsage": "{used} / {limit} активного объёма", "status.storageDomains": "Домены хранения", "status.storageDomainsText": "Где хранятся память выполнения, Пространства памяти и Документы проекта.", "status.storageGlobal": "Глобальный", "status.storageWorkspace": "Рабочая область", "status.storageWorkspaces": "Централизованные рабочие области", "status.storageCustom": "Свой путь", "status.storageWaiting": "Чтение каталогов доменов хранения…", "status.storageCustomUnset": "Пользовательский каталог не настроен. Это представление показывает только пользовательский корень, уже настроенный и активный в DSH.", "status.storageWorkspaceUnavailable": "В текущей сессии нет доступного каталога рабочей области.", "status.storageActiveRoot": "Текущий корень чтения/записи", "status.storageAvailable": "Каталог доступен", "status.storageNotCreated": "Каталог не создан", "status.storageRuntime": "Память выполнения", "status.storageSpaces": "Пространства памяти", "status.storageDocuments": "Документы проекта", "status.storageState": "Фоновое состояние", "status.storageReady": "Готово", "status.storageEmpty": "Пусто", "status.storageMissing": "Не создано", "status.storageInvalid": "Требуется восстановление", "status.storageItems": "элементов", "status.storageRuntimeDetail": "USER {user} · MEMORY {memory}", "status.storageSpacesDetail": "Активных: {active} · баз данных: {databases}", "status.storageDocumentsDetail": "Активных: {active} · в архиве: {archived}", "status.storageStateReady": "Счётчики проверок сохранены на диске", "status.storageStateVolatile": "Состояние проверок сейчас хранится в процессе Хоста", "status.storageFootnote": "Переключайте область хранения в разделе «Настроить»; существующие данные остаются на месте.", "config.aria": "Настройки системы памяти", "plugin.openWorkspace": "Открыть", "config.interfaceTitle": "Интерфейс", "config.unsaved": "Несохранённые изменения", "config.ready": "Сохранено и применено", "config.displayTitle": "Открывать Систему памяти в", "config.displaySidebar": "Боковой панели", "config.displaySidebarHint": "Отдельная страница с возможностью просмотра других рабочих областей", "config.displayBuiltin": "Вкладке диалога", "config.displayBuiltinHint": "Открывается внутри текущего диалога", "config.storageTitle": "Хранилище", "storage.usedBy": "Используется", "storage.usedByTitle": "Здесь хранятся данные компонента «{component}»", "storage.userProfileByWorkspace": "У каждой рабочей области собственный профиль пользователя.", "storage.userProfileShared": "Все рабочие области используют общий профиль пользователя. Рабочая память остаётся раздельной.", "storage.runtimeSettings": "Настройки памяти выполнения", "storage.default": "По умолчанию", "storage.directoryExample": "Например, ~/Documents/mnemon", "storage.thisWorkspace": "Эта рабочая область", "storage.moveNote": "Память переключится на новое расположение; существующие данные останутся на месте", "storage.chooseDirectory": "Выбрать каталог", "storage.pickFailed": "Не удалось открыть выбор каталога. Повторите попытку или введите путь вручную.", "config.scopeTitle": "Область хранения", "config.global": "Глобальная", "config.workspace": "Рабочая область", "config.workspaces": "Централизованно · по рабочим областям", "config.workspacesHint": "Один корневой каталог с отдельным подкаталогом для каждой рабочей области по её пути", "config.custom": "Пользовательская", "config.globalScopeHint": "Все рабочие области используют один общий каталог", "config.workspaceScopeHint": "Каждая рабочая область хранит собственный каталог .mnemon", "config.dataDirectory": "Каталог данных", "config.runtimeSectionScope": "Область и извлечение", "config.runtimeDeferred": "Читать память низкого приоритета по запросу", "config.runtimeDeferredHint": "Не включать незакреплённые записи низкого приоритета в промпт; модели запрашивают их по мере необходимости.", "config.runtimeBm25Recall": "Поиск по рабочей памяти по запросу (экспериментально)", "config.runtimeBm25RecallLabel": "Поиск по рабочей памяти по запросу", "config.runtimeBm25RecallHint": "Подбирать записи рабочей памяти и заголовки Документов под каждый ход; профиль пользователя и закреплённые записи всегда видимы.", "config.runtimeIndexPush": "Передавать индексы Пространств памяти и Документов (экспериментально)", "config.runtimeIndexPushLabel": "Передавать индексы Пространств памяти и Документов", "config.runtimeIndexPushHint": "Подбирать описания Пространств памяти и сводки Документов на шаге 1; передаются только компактные индексы, без полного текста.", "config.runtimeUserScopeTitle": "Область профиля пользователя", "config.runtimeInheritance": "Автоматически передавать Память выполнения субагентам", "config.runtimeInheritanceHint": "Новые субагенты наследуют профиль пользователя и рабочую память; уже запущенные задачи сохраняют свой контекст.", "config.runtimeUserScopeStorage": "Как область хранения", "config.runtimeUserScopeStorageHint": "Хранится вместе с MEMORY.md", "config.runtimeUserScopeGlobal": "Общий глобально", "config.runtimeUserScopeGlobalHint": "Общий для всех рабочих областей; MEMORY.md по-прежнему следует области хранения", "config.runtimeSnapshotRefreshTitle": "Обновление снимка", "config.runtimeSnapshotRefreshOnChange": "Обновлять при изменении", "config.runtimeSnapshotRefreshOnChangeHint": "Повторно проецировать обновлённую память выполнения в открытые сессии на следующем ходе", "config.runtimeSnapshotRefreshSessionStart": "Фиксировать при старте сессии", "config.runtimeSnapshotRefreshSessionStartHint": "Удерживать начальный снимок в открытых сессиях ради стабильности кэша; новые сессии и инструменты поиска продолжают читать актуальную память", "config.componentScopeStorage": "Как область хранения", "config.componentScopeGlobal": "Общий глобально", "config.componentScopeSwitchHint": "Переключение области меняет место чтения и записи данных. Существующие данные остаются в исходном каталоге — переключитесь обратно, чтобы просмотреть их. Экспорт Pack и синхронизация Git охватывают только текущий корень хранилища.", "config.documentsScopeSection": "Область хранения", "config.documentsScopeTitle": "Область Документов проекта", "config.documentsScopeStorageHint": "Хранятся в выбранном корне хранилища вместе с MEMORY.md", "config.documentsScopeGlobalHint": "Общие для всех рабочих областей в глобальном корне; MEMORY.md по-прежнему следует области хранения", "config.memorySpacesScopeTitle": "Область Пространств памяти", "config.memorySpacesScopeStorageHint": "Хранятся в выбранном корне хранилища вместе с MEMORY.md", "config.memorySpacesScopeGlobalHint": "Общие для всех рабочих областей вместе с подключениями Провайдеров в глобальном корне; MEMORY.md по-прежнему следует области хранения", "config.runtimeLimitsTitle": "Лимиты объёма", "config.runtimeLimitsHint": "По умолчанию: {user} KiB для профиля пользователя, {memory} KiB для рабочей памяти.", "config.runtime.userLimitBytes": "Лимит профиля пользователя (байты)", "config.runtime.memoryLimitBytes": "Лимит рабочей памяти (байты)", "config.runtimeLimitsApply": "Применяется сразу; снижение лимита не удаляет существующие записи", "config.runtimeLimitInvalid": "Задайте для поля «{field}» целое число от 1 до {max}.", "config.runtimeAdvanced": "Лимиты обслуживания", "config.runtimeMaintenanceHint": "Ограничение выходных токенов на один запуск миграции и сжатия (по умолчанию {defaultTokens}).", "config.runtime.maintenanceMaxTokens": "Лимит выходных токенов обслуживания", "config.runtimeMaintenanceInvalid": "Значение поля «{field}» должно быть от {min} до {max}", "config.documentsLimitsTitle": "Активный объём", "config.documentsLimitsHint": "Общий предел для активных Документов (по умолчанию {defaultMiB} MiB, макс. {maxMiB} MiB).", "config.documents.limitBytes": "Лимит активных документов (байты)", "config.documentsLimitsApply": "Применяется сразу; снижение лимита не удаляет существующие документы", "config.documentsLimitInvalid": "Задайте для поля «{field}» целое число от 1 до {max}.", "config.enhancementsRefreshFailed": "Настройка обновлена, но не удалось обновить статус. Откройте эту страницу повторно.", "config.strategyTitle": "Основная стратегия", "config.strategyFailed": "Не удалось переключить основную стратегию. Сохранена прежняя настройка; повторите попытку.", "config.appliesNow": "Применяется сразу", "config.quoted": "«{name}»", "config.listSeparator": ", ", "config.sentenceGap": " ", "config.enableStrategy": "Включить «{strategy}»", "config.useStrategy": "Использовать «{strategy}»", "config.stopStrategies": "Выключить {strategies}", "config.enableComponentNamed": "Включить «{component}»", "board.title": "Состав памяти", "board.description": "Память каждого хода формируется из этих компонентов", "board.loading": "Чтение состава памяти…", "board.componentsUnavailable": "Сейчас невозможно прочитать компоненты памяти; здесь можно переключать только слои памяти.", "board.sources": "Источники памяти", "board.enhancements": "Расширения", "board.running": "Работает", "board.off": "Выкл.", "board.notRunning": "Не запущен", "board.needs": "Требуется «{component}»", "board.needsMissing": "Требуется неустановленный компонент", "board.unused": "Не используется этой стратегией", "board.strategyMissing": "Выбранная основная стратегия не установлена.", "board.turningOn": "Включение…", "board.turningOff": "Выключение…", "board.noMainMissing": "Память не используется: выбранная основная стратегия не установлена", "board.noMainOff": "Память не используется: основная стратегия «{strategy}» выключена", "board.noMainWaiting": "Память не используется: стратегия «{strategy}» включена, но ещё не запущена", "board.contenders": "Память не используется: выбранная «{strategy}» не запущена, а {strategies} не могут заменить её вместе", "board.fallback": "Выбранная «{selected}» не запущена; сейчас память формирует «{composing}»", "board.fallbackMissing": "Выбранная основная стратегия не установлена; сейчас память формирует «{composing}»", "board.noSource": "Память не используется: нет запущенного источника памяти", "board.memoryOff": "Память не используется: текущий состав не может работать", "board.stale": "Последнее изменение не вступило в силу; память продолжает работать в прежнем составе", "board.idle": "Также запущены, но не участвуют в составе: {strategies}", "board.switching": "Переключение…", "board.composing": "Формирует память", "board.lastSource": "Работает · единственный источник", "board.enabledCount": "Вкл. {on} из {total}", "board.experimental": "Экспериментально", "board.search": "Поиск компонентов", "board.searchEmpty": "Нет компонентов по запросу «{query}».", "details.open": "Подробности о «{component}»", "details.shipped": "В комплекте", "details.installed": "Установленное расширение", "details.relations": "Связи", "details.needs": "Требуется", "details.needsAny": "Требуется одно из", "details.needsMissing": "Ни один установленный компонент не предоставляет {capability}", "details.neededBy": "Требуется для", "details.conflicts": "Несовместимо с", "details.options": "Параметры", "details.effectOn": "При включении также включатся: {names}", "details.effectOnReplace": "При включении выключатся: {names}", "details.effectOnMixed": "При включении также включатся: {on}; выключатся: {off}", "details.effectOff": "При выключении также выключатся: {names}", "details.effectLast": "Единственный работающий источник; его нельзя выключить", "details.currentMain": "Текущая основная стратегия", "details.useMain": "Сделать основной стратегией", "details.back": "Назад к «{component}»", "config.strategyWorkflowNote": "Работает только при поддержке основной стратегией (например, «Многоуровневой»); настройки сохраняются.", "threeTier.offNote": "Этот плагин отключён. Для фоновых задач также нужна основная Стратегия с их поддержкой.", "board.otherEnhancements": "Расширения для других основных стратегий ({count})", "board.more": "Добавьте другие компоненты в списке плагинов", "board.relationNeeds": "Требуется «{component}»", "board.relationNeededBy": "Зависит «{component}»", "options.aria": "Параметры компонента «{component}»", "options.emptySourcesTitle": "Источники памяти не выбраны", "options.emptySourcesConfirm": "Не выбран ни один источник памяти. Сохранение отключит доступ Агента к памяти выполнения, документам и пространствам памяти. Чтобы вернуть автоматический выбор, отмените и сбросьте параметр к значению по умолчанию. Сохранить пустой список?", "options.apply": "Применить", "options.fix": "Сначала исправьте отмеченные параметры", "options.applying": "Применение…", "options.default": "По умолчанию", "options.reset": "Сбросить по умолчанию", "options.integer": "Введите целое число", "options.between": "Введите целое число от {min} до {max}", "options.atLeast": "Введите целое число не меньше {min}", "options.atMost": "Введите целое число не больше {max}", "options.tooLong": "Не более {max} симв.", "options.listLimit": "До {count} уникальных элементов длиной не более {length} симв. каждый", "options.listHint": "По одному элементу на строку.", "options.noSources": "Сейчас нет доступных источников памяти для выбора.", "options.sourceUnavailable": "{source} (сейчас недоступен)", "feedback.memoryOff": "Память не используется: нет запущенной основной стратегии", "feedback.memoryRestored": "Память восстановлена, состав формирует «{strategy}»", "feedback.fallback": "«{selected}» выключена; сейчас память формирует «{composing}»", "feedback.fallbackMissing": "Выбранная основная стратегия не установлена; сейчас память формирует «{composing}»", "feedback.switchedMain": "Переключено на «{strategy}»", "feedback.switchedMainOff": "Переключено на «{strategy}» и выключены: {others}", "feedback.switchedMainWith": "Переключено на «{strategy}» и включены необходимые компоненты: {others}", "feedback.switchedMainMixed": "Переключено на «{strategy}»: включены {on}, выключены {off}", "feedback.externalMain": "Основной стратегией стала «{strategy}»", "feedback.idleMain": "«{component}» тоже запущен, но не участвует в составе", "feedback.sourceOn": "Включён «{component}»; слой снова доступен для чтения и записи", "feedback.sourceOff": "Выключен «{component}»; чтение и запись слоя приостановлены", "feedback.componentOn": "Включён «{component}»", "feedback.componentOff": "Выключен «{component}»", "feedback.externalSourceOn": "«{component}» включён; слой снова доступен для чтения и записи", "feedback.externalSourceOff": "«{component}» выключен; чтение и запись слоя приостановлены", "feedback.externalComponentOn": "«{component}» включён", "feedback.externalComponentOff": "«{component}» выключен", "feedback.several": "Обновлено компонентов: {count}", "feedback.enabledWith": "Включён «{component}» и необходимые компоненты: {others}", "feedback.disabledWith": "Выключен «{component}» и зависящие от него: {others}", "feedback.enabledReplacing": "Включён «{component}» и выключены несовместимые с ним: {others}", "feedback.enabledMixed": "Включён «{component}»: также включены {on} и выключены {off}", "feedback.optionsSaved": "Обновлены параметры «{component}»", "feedback.externalOptions": "Параметры «{component}» изменены", "feedback.externalSeveral": "Изменено компонентов: {count}", "feedback.undo": "Отменить", "feedback.undone": "Отменено; прежние настройки восстановлены", "feedback.show": "Показать", "feedback.retry": "Повторить", "feedback.failed": "Не удалось применить изменения; прежние настройки сохранены.", "feedback.layerResumed": "Слой «{layer}» снова работает", "config.componentListNote": "В списке компонентов ниже dsh-brain-mnemon/bundle — это группирующая запись Starter; статус «Выкл.» ни на что не влияет.", "layers.disabledBadge": "Выкл.", "layers.disabledTitle": "Слой «{layer}» выключен", "layers.disabledDescription": "Этот слой памяти сейчас не участвует в обработке памяти.", "layers.disabledText": "Существующие данные сохранены; включите слой снова в настройках для возобновления.", "layers.stoppedBadge": "Не запущен", "layers.stoppedTitle": "Слой «{layer}» не запущен", "layers.stoppedDescription": "Компонент этого слоя включён, но не запущен.", "layers.stoppedText": "Существующие данные сохранены; работа возобновится после запуска компонента.", "layers.memoryOffBadge": "Не используется", "layers.memoryOffTitle": "Слой «{layer}» не используется", "layers.memoryOffDescription": "Память не используется, поэтому этот слой недоступен.", "layers.memoryOffText": "Существующие данные сохранены; восстановите основную стратегию в настройках для продолжения.", "config.nativeName": "Mnemon Native", "config.backgroundTitle": "Фоновые задачи", "config.backgroundDescription": "Фиксация, архивация и проверка выполняются в фоне, если их поддерживает основная стратегия.", "config.memoryWriting": "Запись в память", "config.confirmWrites": "Подтверждать запись через инструменты памяти", "config.confirmWritesHint": "Запрашивать подтверждение в DSH перед добавлением, изменением или удалением памяти моделями через инструменты.", "config.confirmWritesBadge": "Приостанавливает проверку в простое", "config.taskAgentSectionTitle": "Агент задач", "config.taskAgentSectionDescription": "Управляет фоновым обслуживанием, сохранением в память, маршрутизацией Пространств и проверкой синхронизации.", "config.taskAgentTitle": "Модель агента задач", "config.taskAgentInherit": "Как глобальная", "config.taskAgentInheritHint": "Использовать модель для новых сессий", "config.taskAgentConversation": "Как в диалоге", "config.taskAgentConversationHint": "Использовать модель текущего диалога", "config.taskAgentFixed": "Выбрать вручную", "config.taskAgentFixedHint": "Указать конкретную модель", "config.taskAgentProvider": "Провайдер модели", "config.taskAgentModel": "Модель", "config.taskAgentImageInput": "Ввод изображений", "config.taskAgentEffective": "Сейчас используется", "config.taskAgentSource.fixed": "Выбрана вручную", "config.taskAgentSource.session": "Текущий диалог", "config.taskAgentSource.dsh-default": "Модель новых сессий", "config.taskAgentSource.active-agent": "Открытый диалог", "config.taskAgentLoading": "Загрузка каталога моделей", "config.taskAgentUnavailable": "Сейчас нет доступного маршрута Провайдер / Модель", "config.taskAgentLoadFailed": "Не удалось загрузить каталог моделей: {error}", "config.taskAgentPartial": "Не удалось прочитать провайдеров: {count}; остальные варианты по-прежнему доступны.", "config.taskAgentRetry": "Прочитать снова", "config.customAbsolute": "Укажите абсолютный путь или путь, начинающийся с ~/", "config.saveFailed": "Ошибка сохранения: {error}", "config.readOnly": "Настройки плагина в этом развёртывании доступны только для чтения.", "config.remoteReadOnly": "При удалённом доступе настройки плагина открыты только для чтения: задайте remoteAccess: trusted-host в конфигурации профиля mnemon и перезапустите DSH, чтобы изменять их здесь.", "config.unavailable": "Не удалось загрузить настройки Системы памяти. Проверьте, предоставляет ли Хост RPC настроек для этого Web-развёртывания.", "config.discard": "Сбросить", "config.interactionTurnBar": "Панель памяти хода", "config.interactionTurnBarHint": "Показывает извлечённые и записанные данные за ход под ответом", "config.interactionSaveAction": "Кнопка «Сохранить в память»", "config.interactionSaveActionHint": "Сохраняйте ответ вручную; запись попадёт в выбранное вами место после подтверждения", "config.packTitle": "Резервное копирование и перенос", "config.packUnavailable": "Этот хост DSH не поддерживает канал резервного копирования Mnemon ZIP.", "config.packExporting": "Экспорт…", "config.packInspecting": "Проверка…", "config.packImporting": "Импорт…", "config.packExported": "Экспортировано: {file} ({size}).", "config.packFailed": "Ошибка операции с ZIP: {error}", "config.packSimpleDescription": "ZIP-архив перечисленных выше компонентов без сторонних провайдеров и учётных данных", "config.packImportZip": "Импорт ZIP", "config.packExportZip": "Экспорт ZIP", "config.packChooseZip": "Выберите ZIP-архив резервной копии Mnemon", "config.packUnnamedZip": "Mnemon backup.zip", "config.packZipReady": "Проверено · компонентов: {components} · элементов: {items} · {size}", "config.packImportZipAction": "Безопасный импорт", "config.packImportedWhole": "ZIP-архив безопасно объединён с {root}.", "config.syncTitle": "Синхронизация Git", "config.syncSimpleDescription": "Синхронизирует перечисленные выше компоненты с репозиторием Git без сторонних провайдеров и учётных данных", "config.syncLoading": "Чтение статуса синхронизации…", "config.syncUnavailable": "Этот хост DSH не поддерживает канал синхронизации репозиториев Mnemon.", "config.syncUnavailableReason": "Не удалось прочитать статус синхронизации: {error}", "config.syncGitMissing": "Для синхронизации требуется Git {required} или новее", "config.syncRecheck": "Проверить снова", "config.syncFixCredentials": "Настроить учётные данные", "config.syncRepository": "Репозиторий", "config.syncRepositoryHint": "Выберите репозиторий Git для хранения памяти", "config.syncChange": "Изменить", "config.syncDisconnect": "Отключить", "config.syncDisconnectTitle": "Отключить этот репозиторий?", "config.syncDisconnectBody": "Синхронизация памяти с {repository} остановится, а автоматическая синхронизация выключится. Данные на этом компьютере и в репозитории не будут удалены; сохранённый токен доступа будет удалён.", "config.syncDisconnected": "Репозиторий отключён.", "config.syncStateChecking": "Проверка репозитория…", "config.syncStateConnected": "Подключено", "config.syncStateNewBranch": "Подключено · первая синхронизация создаст ветку {branch}", "config.syncNoCredential": "для отправки требуется вход через GitHub или токен доступа", "config.syncNoCredentialToken": "для отправки требуется токен доступа", "config.syncIssueAuthHttps": "Требуются учётные данные; войдите через GitHub или добавьте токен доступа", "config.syncIssueAuthToken": "Требуются учётные данные; добавьте токен доступа", "config.syncIssueRejectedGitHub": "GitHub отклонил учётные данные; войдите снова или проверьте доступ к этому репозиторию", "config.syncIssueRejectedGitHubToken": "GitHub отклонил сохранённый токен доступа; замените его", "config.syncIssueRejectedGitHubEnvironment": "GitHub отклонил токен из {env}; замените его", "config.syncIssueRejected": "Хост отклонил сохранённый токен; замените его или укажите ожидаемое имя пользователя в адресе", "config.syncIssueRejectedEnvironment": "Хост отклонил токен из {env}; замените его", "config.syncIssueAuthSsh": "Ошибка аутентификации SSH; проверьте SSH-ключ на этом компьютере", "config.syncIssueAuth": "Доступ к этому репозиторию отклонён", "config.syncIssueNotFound": "Репозиторий не найден; проверьте адрес и права доступа", "config.syncIssueNotFoundGitHub": "Репозиторий не найден; проверьте адрес — для приватного репозитория требуется вход или токен", "config.syncIssueNetwork": "Не удаётся связаться с репозиторием; проверьте сеть или прокси", "config.syncIssueTimeout": "Репозиторий не ответил вовремя", "config.syncIssueUnknown": "Не удаётся прочитать репозиторий: {error}", "config.syncViaGitHub": "через GitHub @{login}", "config.syncViaGitHubAnonymous": "через вход GitHub", "config.syncViaToken": "с токеном доступа", "config.syncViaEnvironment": "с переменной окружения {env}", "config.syncViaSsh": "с SSH-ключом", "config.syncConnectWith": "Способ подключения", "config.syncModeGitHub": "Аккаунт GitHub", "config.syncModeAddress": "Адрес репозитория", "config.syncRepoUrl": "Адрес репозитория", "config.syncRepoUrlPlaceholder": "https://…, git@host:path или абсолютный локальный путь", "config.syncRepoUrlInvalid": "Укажите URL https:// или ssh://, git@host:path или абсолютный локальный путь", "config.syncRepoUrlCredentials": "В адресе можно указать только имя пользователя; токен введите в поле «Токен доступа»", "config.syncToken": "Токен доступа", "config.syncTokenOptional": "Необязательно", "config.syncTokenSaved": "Сохранён; введите новый для замены", "config.syncTokenEnvironment": "Используется переменная окружения {env}", "config.syncTokenHint": "Токен нужен только для HTTPS-адреса; он хранится только на этом компьютере", "config.syncTokenRemove": "Удалить", "config.syncTokenRemoved": "Токен доступа удалён.", "config.syncConnect": "Подключить", "config.syncConnecting": "Подключение…", "config.syncSave": "Сохранить", "config.syncSaving": "Сохранение…", "config.syncGitHubHint": "Войдите, чтобы выбрать или создать репозиторий; авторизация хранится только на этом компьютере", "config.syncGitHubReadOnly": "Хранилище учётных данных доступно только для чтения, поэтому вход нельзя сохранить", "config.syncGitHubSignIn": "Войти через GitHub", "config.syncGitHubStarting": "Запрос кода устройства…", "config.syncGitHubCode": "Введите этот код устройства на GitHub:", "config.syncGitHubCopyOpen": "Копировать и открыть GitHub", "config.syncGitHubCopied": "Скопировано; вставьте код на открывшейся странице, после чего процесс продолжится автоматически", "config.syncGitHubOpenBlocked": "Браузер не открыл новую страницу; перейдите по адресу {url} вручную", "config.syncGitHubWaiting": "Ожидание авторизации… процесс продолжится автоматически", "config.syncGitHubSignedIn": "Выполнен вход как @{login}", "config.syncGitHubSignOut": "Выйти", "config.syncGitHubFailed": "Ошибка входа через GitHub: {error}", "config.syncGitHubExpired": "Срок действия кода устройства истёк; начните вход снова", "config.syncGitHubDenied": "Авторизация отклонена", "config.syncGitHubExpiredGrant": "Разрешение GitHub больше не действительно; войдите снова", "config.syncGitHubSignInAgain": "Войти снова", "config.syncRepositoryLabel": "Репозиторий", "config.syncRepositorySearch": "Поиск репозиториев или ввод нового имени", "config.syncRepositoriesLoading": "Загрузка репозиториев…", "config.syncRepositoriesFailed": "Не удалось загрузить репозитории: {error}", "config.syncRepositoriesRetry": "Повторить", "config.syncRepositoriesNone": "В этом аккаунте ещё нет репозиториев; введите имя, чтобы создать новый", "config.syncRepositoriesEmpty": "Нет подходящих репозиториев", "config.syncRepositoriesMore": "Ещё репозиториев: {count}; введите текст, чтобы сузить список", "config.syncRepositoryPrivate": "Приватный", "config.syncRepositoryPublic": "Публичный", "config.syncRepositoryNoPush": "Нет прав на отправку", "config.syncRepositoryCurrent": "Текущий", "config.syncRepositoryCreate": "Создать приватный репозиторий {name}", "config.syncRepositoryCreating": "Создание…", "config.syncRepositoryNameInvalid": "Имя репозитория может содержать буквы, цифры, точки, дефисы и подчёркивания", "config.syncPublicTitle": "Использовать публичный репозиторий?", "config.syncPublicBody": "Репозиторий {name} публичный: любой сможет прочитать синхронизированную в него память.", "config.syncPublicConfirm": "Всё равно использовать", "config.syncRowTitle": "Синхронизация", "config.syncNever": "Синхронизация сначала объединяет память из репозитория на этом компьютере, затем отправляет локальные изменения", "config.syncLast": "Последняя синхронизация: {time}", "config.syncLastMerge": "Последнее слияние: {time}", "config.syncCheck": "Проверить удалённый", "config.syncNow": "Синхронизировать", "config.syncNowRunning": "Синхронизация…", "config.syncDone": "Синхронизировано; отправлен коммит {commit}.", "config.runtimeMergeArchived": "Превышающие лимит записи памяти ({count}) сохранены локально в runtime/archived/import-overflow и не загружены в рабочую память.", "config.syncDoneMerged": "Синхронизировано: объединено удалённых записей: {count}, отправлен коммит {commit}.", "config.syncUpToDate": "Актуально; репозиторий совпадает с этим компьютером.", "config.syncUpToDateMerged": "Объединено удалённых записей: {count}; репозиторий актуален.", "config.syncPushFailed": "Коммит создан локально, но отправка не завершилась: {reason}", "config.syncFailed": "Ошибка синхронизации: {error}", "config.syncReasonBusy": "Выполняется другая синхронизация; попробуйте чуть позже", "config.syncReasonNoRepository": "Репозиторий не подключён", "config.syncReasonGitMissing": "На этом компьютере недоступен Git", "config.syncReasonRemoteEmpty": "В репозитории ещё нет резервных копий; сначала выполните синхронизацию", "config.syncReasonRejected": "Другое устройство обновило репозиторий во время синхронизации; синхронизируйте снова", "config.syncAuto": "Автосинхронизация", "config.syncAutoOff": "Выкл.", "config.syncAutoHour": "Каждый час", "config.syncAutoHours": "Каждые {hours} ч.", "config.syncAutoDay": "Каждый день", "config.syncAutoDays": "Каждые {days} дн.", "config.syncAutoHintOff": "Синхронизируется только по нажатию «Синхронизировать»", "config.syncAutoHintOn": "Синхронизируется в фоне с этим интервалом так же, как по кнопке «Синхронизировать»", "config.syncAutoNext": "Следующая: {time}", "config.syncAutoLast": "Последняя: {time}", "config.syncAutoFailed": "Последняя автосинхронизация завершилась ошибкой: {error}", "config.syncHistory": "История резервных копий", "config.syncHistoryHint": "Каждая синхронизация сохраняет версию в репозитории", "config.syncHistoryView": "Просмотр", "config.syncHistoryLoading": "Чтение…", "config.syncHistoryEmpty": "В репозитории ещё нет резервных копий.", "config.syncHistoryMore": "Загрузить более ранние версии", "config.syncHistoryCapped": "Здесь показаны только последние версии ({count})", "config.syncHistoryFrom": "от {machine}", "config.syncHistoryUnknownMachine": "безымянный компьютер", "config.syncComponentRuntime": "Память выполнения", "config.syncComponentDocuments": "Документы проекта", "config.syncComponentSpaces": "Пространства памяти", "config.syncCountRuntime": "Память выполнения: {count}", "config.syncCountDocuments": "Документы: {count}", "config.syncCountSpaces": "Пространства памяти: {count}", "config.syncCompareTitle": "Сравнение с удалённым репозиторием", "config.syncCompareLoading": "Чтение удалённого репозитория…", "config.syncCompareRemote": "Удалённая версия от {machine} · {time}", "config.syncCompareSame": "Совпадает", "config.syncCompareDiffers": "Есть различия", "config.syncCompareRuntime": "Только в удалённом: {remote} · только здесь: {local}", "config.syncCompareConflicts": "Расхождений в формулировках: {count}", "config.syncCompareAllSame": "Этот компьютер и удалённый репозиторий совпадают; синхронизировать нечего.", "config.syncCompareTruncated": "Различий больше, чем отражено в этих счётчиках.", "config.syncCompareRemovals": "В удалённом репозитории зафиксировано удалений: {count}; синхронизация применит их здесь.", "config.syncCompareConflictNote": "Тем с разными формулировками: {count} — синхронизация сохранит оба варианта, а «Согласование памяти» поможет объединить их позже.", "config.syncCompareShowConflicts": "Показать", "config.syncCompareGoReview": "Перейти к согласованию памяти", "config.syncCompareHeldBack": "Удалённых записей памяти, ранее удалённых здесь: {count}; синхронизация не будет возвращать их.", "config.syncCompareRevive": "Восстановить их", "config.syncCompareReviving": "Восстановление…", "config.syncCompareRevived": "Восстановлено записей памяти: {count}.", "config.syncDiffHere": "Здесь", "config.syncDiffThere": "В удалённом", "config.syncMergeOnly": "Объединить только здесь", "config.syncMerging": "Объединение…", "config.syncMerged": "Объединён удалённый коммит {commit}.", "config.syncMergedCount": "Объединено удалённых записей памяти: {count}.", "config.syncAdvanced": "Дополнительно", "config.syncBranch": "Ветка", "config.syncSubdir": "Каталог в репозитории", "config.syncDefaultValue": "По умолчанию: {value}", "config.syncBranchInvalid": "Недопустимое имя ветки", "config.syncSubdirInvalid": "Укажите относительный путь внутри репозитория", "config.syncAuthor": "Автор коммита", "config.syncAuthorDefault": "По умолчанию", "config.syncAuthorMachine": "Git этого компьютера", "config.syncAuthorCustom": "Свой", "config.syncAuthorDefaultNote": "Использует профиль Git этого компьютера; если он не настроен, используется {identity}", "config.syncAuthorMachineNote": "Использует профиль Git этого компьютера, иначе — значение по умолчанию", "config.syncAuthorName": "Имя", "config.syncAuthorEmail": "Электронная почта", "config.syncAuthorEmailInvalid": "Некорректный адрес электронной почты", "config.syncAdvancedNote": "После сохранения следующая синхронизация выполнится в новую ветку или каталог", "config.syncMachineName": "Имя этого компьютера", "config.syncMachineHostname": "Имя хоста", "config.syncMachineCustom": "Своё", "config.syncMachineNameLabel": "Имя", "config.syncMachineHostnameNote": "Использует имя хоста; в истории копий отображается как «от {name}»", "config.syncMachineCustomNote": "В истории копий отображается как «от {name}»", "config.syncMachineNameInvalid": "До 120 символов в одну строку", "config.syncMachineRenameNote": "После сохранения новое имя используется в следующих синхронизациях; прежние версии сохранят старое", "config.syncAdvancedSaved": "Дополнительные настройки сохранены.", "config.reconcileTitle": "Согласование памяти", "config.reconcileDescription": "Модель читает объединённую память и предлагает правки; ничего не записывается до вашей проверки", "review.reconcile": "Согласовать", "review.reconciling": "Согласование…", "review.refresh": "Обновить", "review.empty": "Нет предложений на проверку", "review.pending": "Ожидает проверки: {count}", "review.failed": "Не удалось прочитать журнал проверок: {error}", "review.planned": "Подготовлено предложений: {operations}; запись выполнится только после их принятия.", "review.none": "Модель не нашла, что нужно изменить в объединённой памяти.", "review.statusPending": "Ожидает", "review.statusAccepted": "Принято", "review.statusRejected": "Отклонено", "review.expand": "Открыть", "review.collapse": "Свернуть", "review.accept": "Принять", "review.reject": "Отклонить", "review.apply": "Применить", "review.applying": "Применение…", "review.reopen": "Открыть снова", "review.applied": "Применено изменений: {count}.", "review.appliedAt": "Применено в {time}", "review.appliedCount": "Выполнено операций: {count} из {total}", "review.applyFailed": "Ошибка применения: {error}", "review.meta": "Изменений: {count} · от {machine} · {time}", "review.foreign": "Затрагивает память с устройств: {machines}", "review.opinions": "Комментарии", "review.noOpinions": "Комментариев пока нет", "review.authorUser": "Вы", "review.authorAgent": "Модель", "review.opinionPlaceholder": "Оставьте комментарий для следующего согласования", "review.opinionSend": "Добавить комментарий", "review.opinionAdded": "Ваш комментарий записан.", "review.opAdd": "Добавить в память ({target}): {content}", "review.opReplace": "Переписать память ({target}): «{from}» → «{to}»", "review.opRemove": "Удалить из памяти ({target}): {text}", "review.opArchive": "Архивировать документ {id}", "review.targetMemory": "проект", "review.targetUser": "пользователь", "review.guidanceLabel": "Что нужно сделать", "review.guidanceHint": "Необязательно: укажите цель этого согласования; модель учтёт её, не получая дополнительных прав", "review.guidancePlaceholder": "Например: два предпочтения означают одно и то же — объединить в одно", "review.guided": "Спланировано с учётом ваших указаний", "review.remoteEntries": "Учтены записи из ветки, отсутствующие в этой установке ({count})", "review.selectAll": "Все", "review.selectNone": "Ничего", "review.selectHint": "Отметьте изменения для применения; неотмеченные останутся до следующего раза", "review.selected": "Выбрано {count} из {total}", "review.applyCount": "Применить ({count})", "review.noSelection": "Выберите хотя бы одно изменение.", "review.history": "Применённые планы ({count})", "review.historyTitle": "Применённые планы", "review.historyHint": "Эти планы уже выполнены и хранятся для просмотра. Повторное открытие не отменяет внесённые записи.", "review.historyEmpty": "Ни один план ещё не применялся.", "review.rejectedHint": "Этот план был отклонён; оставьте комментарий и откройте его снова или попросите AI составить новый план.", "skills.label": "Навыки", "skills.groupSurface": "Интерфейс", "skills.groupPlacement": "Расположение и обновления", "skills.groupEvolution": "Автоматизация", "skills.groupGeneration": "Модели и генерация", "skills.groupSources": "Маркет и каталоги", "skills.badgeDefault": "По умолчанию", "skills.badgeCustom": "Свои · {count}", "skills.parametersBadge": "Порог {threshold} · {idle}с", "skills.evolution": "Самоэволюция", "skills.allowCreate": "Предлагать новые навыки", "skills.allowCreateHint": "Разрешить анализам предлагать новые навыки; существующие предложения по-прежнему можно обрабатывать вручную", "skills.allowUpdate": "Предлагать улучшения навыков", "skills.allowUpdateHint": "Разрешить анализам улучшать существующие навыки; при отключении обоих типов анализ приостанавливается", "skills.targetScope": "Назначение новых навыков", "skills.roots.title": "Каталоги для новых навыков", "skills.roots.hint": "Применяется к созданию, черновикам и установкам из маркета, переопределяя назначение выше.", "skills.roots.enabled": "Настроить каталоги создания", "skills.roots.default": "Каталог создания по умолчанию", "skills.roots.invalid": "Выберите хотя бы один каталог и включите каталог по умолчанию в список.", "skills.root.project-dsh": "Проект .dsh/skills", "skills.root.project-agents": "Проект .agents/skills", "skills.root.user-dsh": "Пользователь .dsh/skills", "skills.root.user-agents": "Пользователь .agents/skills", "skills.allowLinkedUpdates": "Разрешить обновление связанных навыков", "skills.allowLinkedUpdatesHint": "Обновления записываются напрямую в целевые файлы символических ссылок и затрагивают общих агентов; включайте только для доверенных путей.", "skills.targetScopeHint": "По умолчанию — Пользователь; «Как область хранения» сопоставляет области рабочих пространств с Проектом; можно изменить при принятии.", "skills.targetScope.user": "Пользователь", "skills.targetScope.project": "Проект", "skills.targetScope.storage": "Как область хранения", "skills.evolutionHint": "Анализирует диалоги и предлагает обновления навыков; сессии задач сохраняются локально.", "skills.autoAdoptDailyLimit": "Автоматических кандидатов в день", "skills.autoAdoptTimeZone": "Часовой пояс дневной квоты", "skills.autoBudgetHint": "За календарный день в выбранном часовом поясе (0 приостанавливает автообработку); ручные действия остаются доступными.", "skills.autoBudgetInvalid": "Укажите целое число от 0 до 100 и корректный часовой пояс IANA или local.", "skills.autoAdopt": "Автоматически принимать новые предложения", "skills.autoAdoptHint": "Требуются бэктесты; принимается только при отсутствии регрессий по текстовым кейсам (до 2 повторов).", "skills.autoBacktest": "Бэктест черновиков", "skills.autoBacktestHint": "Сравнивать новый черновик с текущей версией на его тестовых кейсах", "skills.parameters": "Параметры анализа", "skills.draftGeneration": "Генерация черновиков", "skills.draftMaxTokens": "Лимит выходных токенов черновика", "skills.draftRetryMaxTokens": "Лимит выходных токенов при повторе", "skills.draftBudgetHint": "Включает рассуждения и полный SKILL.md; при усечении повторяет один раз, если лимит повтора выше.", "skills.reviewThreshold": "Порог анализа", "skills.idleSeconds": "Ожидание простоя (с)", "skills.cooldownSeconds": "Интервал анализа (с)", "skills.minConfidence": "Минимальная уверенность", "skills.expiryDays": "Срок действия предложения (дн.)", "skills.maxPendingPerSession": "Лимит ожидающих на диалог", "skills.casesPerRun": "Кейсов за бэктест", "skills.invalid": "Значение поля «{field}» должно быть от {min} до {max}", "skills.hints": "В диалоге", "skills.hintsHint": "Показывать под ходом использованные навыки и новые предложения", "skills.sidebar": "Раздел в боковой панели", "skills.sidebarHint": "Показывать «Навыки» отдельным пунктом в боковой панели вместо «Системы памяти»", "skills.models": "Модели по умолчанию", "skills.modelsHint": "В режиме «Автоматически» следует маршруту Агента задач.", "skills.modelAuto": "Автоматически (как у Агента задач)", "skills.draftModel": "Модель для черновиков эволюции", "skills.draftModelHint": "Создаёт и дорабатывает черновики навыков по предложениям", "skills.runModel": "Модель для оценки", "skills.runModelHint": "Запускает кейсы бэктеста и оценивает результаты", "skills.directories": "Каталоги навыков", "skills.directoriesHint": "Оставьте пустым для использования пользовательских каталогов навыков по умолчанию.", "skills.dshHome": "Каталог DSH", "skills.agentsHome": "Общий каталог Agents", "skills.market": "Источники маркета", "skills.marketHint": "Управление каталогами и поисковыми индексами маркета навыков.", "skills.marketRefresh": "Обновить", "skills.marketRefreshing": "Обновление…", "skills.marketAddPlaceholder": "Репозиторий GitHub, URL индекса или локальный путь", "skills.marketAdd": "Добавить", "skills.marketAdding": "Добавление…", "skills.marketRemove": "Удалить", "skills.marketBuiltin": "Встроенный", "skills.marketSkillCount": "Навыков: {count}", "skills.marketEmpty": "Источники маркета не настроены.", "skills.statusCount": "Навыков: {count}", "skills.statusOn": "Самоэволюция вкл. · ожидает: {waiting}", "skills.statusIdle": "Самоэволюция вкл.", "skills.statusOff": "Самоэволюция выкл.", "skillTail.label": "Навыки хода", "skillTail.reviewing": "Анализ", "skillTail.suggested": "предложено: {count}", "skillTail.failed": "Ошибка анализа", "skillTail.openSkill": "Открыть {name} в «Навыках»", "skillTail.openSuggestions": "Открыть предложения в «Навыках»" }; // vendor/dsh-mnemon/src/client/locales/zh.ts const zh$4 = { "composer.expand": "展开输入框", "composer.collapse": "收起输入框", "composer.collapsed": "输入框已收起", "tab.label": "记忆系统", "nav.aria": "Mnemon 页面", "nav.status": "状态", "nav.runtime": "运行时记忆", "nav.runtimeDetail": "USER / MEMORY", "nav.documents": "项目档案", "nav.documentsDetail": "索引与归档", "nav.spaces": "记忆空间", "nav.spacesDetail": "图谱与检索", "common.refresh": "刷新", "common.openConfiguration": "去配置", "common.loading": "载入中…", "common.cancel": "取消", "common.close": "关闭", "common.showing": "当前显示 {visible} / {total}", "common.showMore": "再显示 {count} 条", "header.backToConversation": "返回会话", "header.configure": "配置", "header.noticeSummary": "提示 {count} 条 · {labels}", "header.noticeRemoteReadOnly": "远程只读", "header.noticeIdleReview": "空闲审查", "header.compositionHint": "点击前往配置调整组合。", "header.checking": "检查中", "header.connected": "已连接", "header.unavailable": "不可用", "header.notReady": "Mnemon 尚未就绪", "workspace.viewing": "查看工作区", "workspace.selectorAria": "选择要查看的记忆工作区", "workspace.excluded": "已排除记忆", "workspace.excludedDetail": "此工作区及其子代理不参与记忆注入、工具调用和自动整理。已有数据仍可查看;移除排除项后恢复。", "workspace.excludeTitle": "排除记忆的工作区", "workspace.excludeHint": "每行填写一个工作区绝对路径(支持 ~ 与符号链接)。", "workspace.excludeCount": "{count} 项", "workspace.excludeNone": "未设置", "workspace.excludePlaceholder": "/path/to/private-workspace", "workspace.excludeNote": "保存后对后续操作生效,已有数据与会话历史保持不变。", "workspace.invalidExclusions": "有 {count} 项排除路径无效或不可访问,已忽略;请在存储设置中检查路径。", "workspace.unavailable": "无法识别当前工作区,未应用路径排除。", "workspace.storageMode": "存储范围", "workspace.storageModeAria": "存储范围:{mode}", "workspace.mismatchTitle": "查看目录与当前会话未对齐", "workspace.mismatchShort": "非对话工作区", "workspace.selectedRoot": "查看:{root}", "workspace.effectiveRoot": "生效:{root}", "workspace.align": "对齐", "workspace.remoteReadOnly": "远程访问为只读:在 profile 的 mnemon 配置中设置 remoteAccess: trusted-host 并重启 DSH 后,可在此管理记忆。", "sourcePage.instance": "Source 实例", "sourcePage.instanceAria": "选择 Source 实例", "sourcePage.summaryAria": "Source 状态与权限摘要", "sourcePage.package": "来源包", "sourcePage.availability": "可用性", "sourcePage.availability.ready": "可用", "sourcePage.availability.degraded": "降级", "sourcePage.availability.unavailable": "不可用", "sourcePage.role": "语义角色", "sourcePage.revision": "当前修订", "sourcePage.permissions": "受权能力", "sourcePage.diagnostics": "诊断", "sourcePage.configuration": "声明式配置", "sourcePage.configurationDescription": "字段来自 Host 的脱敏 management descriptor;提交会按当前实例与修订重新授权。", "sourcePage.configLoading": "载入配置…", "sourcePage.configSave": "保存", "sourcePage.configSaving": "保存中…", "sourcePage.configSaved": "配置已提交,正在刷新 Source 状态。", "sourcePage.secretPlaceholder": "留空以保留现有密钥", "sourcePage.unavailable": "Source 当前不可用", "sourcePage.unavailableDescription": "当前 scope 中没有可调用的实例。Host 与 Headless 记忆运行不受此页面影响。", "turnTail.label": "本回合记忆", "turnTail.recall": "召回 {count}", "turnTail.write": "写入 {count}", "turnTail.documents": "档案检索 {count}", "turnTail.inspect": "检查 {count}", "turnTail.failed": "失败 {count}", "turnTail.toolList": "本回合记忆工具", "turnTail.more": "另 {count} 条", "turnTail.openTool": "打开 {tool} 对应的记忆页面", "turnTail.tool.recall": "记忆空间召回", "turnTail.tool.related": "关联查询", "turnTail.tool.documentSearch": "项目档案检索", "turnTail.tool.documentManage": "项目档案更新", "turnTail.tool.documentCreate": "新建项目档案", "turnTail.tool.runtime": "运行时记忆更新", "turnTail.tool.remember": "存入记忆空间", "turnTail.tool.link": "建立关联", "turnTail.tool.forget": "删除记忆", "turnTail.tool.status": "记忆状态", "turnTail.tool.spaces": "记忆空间目录", "turnTail.tool.spaceCreate": "新建记忆空间", "turnTail.tool.spaceUpdate": "更新记忆空间", "turnTail.tool.spaceMerge": "合并记忆空间", "turnTail.tool.viewRoute": "读取记忆", "turnTail.tool.viewAction": "更新记忆", "receipt.written": "已存入", "receipt.updated": "已更新", "receipt.pending": "已提交,等待 Provider 确认", "receipt.skipped": "已跳过", "receipt.partial": "部分完成", "receipt.unfinished": "未完成", "receipt.failed": "失败", "receipt.view": "在记忆空间中查看", "receipt.viewRuntime": "在运行时记忆中查看", "receipt.unembedded": "未生成向量:嵌入没有成功,这条记忆暂时不参与语义匹配。嵌入服务可用后,可在 Mnemon Native 嵌入设置的「测试状态」中补齐。", "receipt.unembeddedNoService": "这条记忆暂未生成向量:当前没有可用的嵌入服务,它暂不参与语义匹配,关键词检索不受影响。连接嵌入服务后,可在 Mnemon Native 嵌入设置的「测试状态」中补齐。", "taskAgent.ready": "任务 Agent 就绪", "taskAgent.unavailable": "任务 Agent 不可用", "saveAction.button": "存入记忆", "saveAction.tooltip": "将这条回复存入记忆", "saveAction.title": "存入记忆", "saveAction.hint": "由任务 Agent 判断是否保存,提炼去重后写入记忆空间。", "saveAction.fetching": "提取消息文本…", "saveAction.missing": "无法从会话记录提取这条消息的文本。", "saveAction.candidate": "内容", "saveAction.truncated": "原回复较长,这里仅载入前 {limit} 个字符。", "saveAction.submit": "保存", "saveAction.submitting": "处理中…", "saveAction.readOnly": "当前部署为只读模式,无法写入记忆。", "saveAction.close": "关闭", "saveAction.hintDirect": "直接写入所选位置。", "saveAction.to": "保存到", "saveAction.to.agent": "自动选择", "saveAction.to.agentDetail": "由 Agent 判断是否保存并匹配记忆空间", "saveAction.to.memory": "工作记忆(MEMORY.md)", "saveAction.to.user": "用户画像(USER.md)", "saveAction.to.space": "记忆空间 · {provider}", "saveAction.save": "保存", "saveAction.saving": "保存中…", "saveAction.saved.runtime": "已存入{target} · 当前 {count} 条", "saveAction.saved.runtimeMaintained": "已整理容量并存入{target} · 当前 {count} 条", "saveAction.saved.space": "已存入记忆空间“{space}”", "saveAction.saved.spacePending": "已提交到记忆空间“{space}”,由 Provider 稍后确认", "saveAction.saved.spaceOther": "记忆空间“{space}”返回:{action}", "saveAction.saved.duplicate": "内容已存在,没有重复写入。", "saveAction.unavailable": "这个位置当前不可写。", "saveAction.place.delimiter": "{target}的条目不能包含 §;删去后即可保存。", "saveAction.place.tooLong": "这段文本约 {size},超过{target}单条上限 {limit};请删减。", "saveAction.place.orAgent": "也可以交给 Agent 决定。", "saveAction.place.full": "{target}已用 {used} / {limit}。保存前需要先整理容量:已有条目只保留约 {keep},其余移出工作记忆。", "saveAction.place.fullAll": "{target}已用 {used} / {limit}。保存前需要先整理容量:已有条目将全部移出工作记忆。", "saveAction.place.userCondense": "用户画像已用 {used} / {limit}。保存前,任务 Agent 会把已有内容压缩到约 {keep} 以内,不留存档。", "saveAction.place.userTooLong": "这段文本约 {size},整理后的用户画像最多只能放下 {max};请删减。", "saveAction.place.userFull": "用户画像已满,整理它需要任务 Agent;请先在运行时记忆中删减条目,或换一个位置。", "saveAction.noPlace": "现在没有可以写入的位置。", "status.title": "系统状态", "status.description": "dsh-brain-mnemon、记忆 Provider 与各层存储的运行状态。", "status.nominal": "系统正常", "status.workflowUnavailable": "后台维护未运行", "status.workflowIdleReview": "空闲审查", "status.workflowRuntimeCapacity": "运行时容量维护", "status.workflowUnsupported": "当前策略不驱动:{workflows}。仅开启审查设置不会启动这些维护任务。可在记忆系统中选择支持相应能力的策略(如分层策略)。手动操作仍可使用。", "status.reviewFailed": "空闲审查失败", "status.reviewFailedDetail": "本轮记忆检查未完成,不会自动重放。后续审查受冷却时间和会话次数限制。", "status.reviewPartial": "已有写入提交;请按下列回执核对,未回滚。", "status.reviewTeamPaused": "Agent Teams 工具在役时按兼容设置暂停空闲审查。如需继续审查,可在“插件 → 可组合记忆”页面的空闲审查中选择“受限任务 Agent 审查”。召回与主动写入设置不变。", "status.reviewConfirmationPaused": "已开启记忆工具写入前确认,闲时记忆整理已暂停。你仍可手动编辑记忆。", "status.reviewToolAccessPaused": "自动审查所需的结果提交工具当前不可用,已跳过本轮,不消耗审查次数。后续符合条件的对话轮次会重新检查。请检查当前会话的工具限制或审批设置。", "status.reviewWatermarkUsage": "本会话审查尝试:{attempts} / {max}(已恢复 {restored} 次)。", "status.reviewWatermarkNext": "下次审查不早于 {time};仍需新的合格对话检查点。", "status.reviewWatermarkPaused": "自动审查已暂停:无法读取或保存持久化限额。", "status.reviewWatermarkRecovery": "可继续对话以重试。若错误持续,请先停止使用此存储根目录的 Host,再检查 state/idle-review 中该会话的状态或锁。删除状态会重置限额。", "config.reviewPersistWatermark": "重新打开会话后保留审查限额", "config.reviewPersistWatermarkHint": "按存储根目录和父会话保留尝试次数与冷却时间(失败与取消均计次)。", "status.reviewRun": "审查运行:{id}", "status.reviewContextWindow": "请切换为有界检查点(spawn),或选择上下文窗口足以覆盖父会话的任务 Agent 模型。", "config.reviewTitle": "空闲审查", "config.reviewDescription": "对话空闲时整理记忆;关闭不影响召回与写入", "config.reviewEnabled": "启用空闲审查", "config.reviewRuntimeMemory": "写入运行时记忆", "config.reviewRuntimeMemoryHint": "只记你明确说过的偏好和规则;关闭后只建项目档案", "config.reviewSilent": "静默运行空闲审查", "config.reviewSilentHint": "关闭后自动 Spawn 审查会显示在子 Agent 列表中。", "config.reviewLimits": "审查参数", "config.reviewProvider": "审查方式", "config.reviewSpawn": "有界检查点(spawn)", "config.reviewSpawnHint": "任务 Agent 只读取有界的检查点", "config.reviewFork": "完整父上下文(fork)", "config.reviewForkHint": "任务 Agent 带着完整的父上下文", "config.reviewFallback": "fork 不可用时(仅启动前)", "config.reviewSkip": "跳过本次审查", "config.reviewAgentTeams": "Agent Teams 兼容模式", "config.reviewTeamPause": "暂停审查", "config.reviewTeamPauseHint": "Agent Teams 运行时跳过审查", "config.reviewTeamScoped": "受限任务 Agent 审查", "config.reviewTeamScopedHint": "由受限的任务 Agent 审查,不用 Teams 工具", "config.review.minIntervalMs": "最小审查间隔(秒)", "config.review.maxPerSession": "每会话最多尝试次数", "config.review.maxContextChars": "spawn 检查点字符预算", "config.review.maxTokens": "每次模型输出 token 上限", "config.reviewLimitInvalid": "{field}需在 {min}–{max} 之间", "status.checkRequired": "需要检查", "status.memoryOff": "记忆未生效", "status.memoryOffDetail": "对话照常进行,但不会使用记忆。", "status.compositionStale": "最近的组件变更没有生效", "status.compositionStaleDetail": "记忆仍按之前的组合运行。", "status.strategyFallback": "所选主策略没有运行", "status.strategyFallbackDetail": "记忆暂由唯一可用的主策略组合。", "status.reasonNoStrategy": "没有正在运行的主策略。", "status.reasonNoSource": "没有正在运行的记忆来源。", "status.reasonNotComposed": "记忆组件还在加载。", "status.reasonSelectedStrategyOff": "所选主策略没有运行,而可用的主策略不止一个。", "status.reasonDependency": "{component} 缺少依赖 {requirement}。", "status.reasonConflict": "有组件相互冲突。", "status.reasonRejected": "组合被拒绝:{detail}", "status.layerOffDetail": "在配置中重新开启后恢复", "status.layerStoppedDetail": "组件已开启,但没有运行", "status.layerMemoryOffDetail": "主策略恢复运行后可用", "status.rechecking": "检查中…", "status.aria": "Mnemon 运行状态", "status.engine": "记忆引擎", "status.engineUnavailable": "Mnemon 不可用", "status.versionWaiting": "等待版本信息", "status.pluginChecking": "正在检查插件状态", "status.pluginReady": "插件运行正常", "status.nativeAria": "Mnemon Native 状态", "status.nativeCliMissing": "未找到 Mnemon CLI", "status.providersTitle": "记忆 Provider", "status.providersDescription": "正在运行的 Provider 及其记忆空间的连接状态。", "status.providersAria": "记忆 Provider 状态", "status.providersEnabled": "{enabled} / {total} 已启用", "status.providersOff": "另有 {count} 个 Provider 未启用", "status.providerState.disabled": "已关闭", "status.providerState.idle": "服务就绪 · 尚无已激活记忆空间", "status.providerState.healthy": "连接正常", "status.providerState.unhealthy": "连接需要检查", "status.providerSpaces": "{active} / {total} 个记忆空间参与运行", "versions.checkAction": "版本", "versions.title": "检查与更新版本", "versions.description": "查看当前安装,按需更新;展开 dsh-brain-mnemon 可维护各子包。", "versions.missing": "未安装(可选)", "versions.restart": "待重启", "versions.local": "本地版本", "versions.modeNpmCli": "npm", "versions.hintNpm": "由 npm 管理;可在此更新,或在宿主终端运行 mnemon update。", "versions.hintNpmMissing": "已找到 npm 启动器,但宿主当前找不到 npm;请检查 Node.js 环境。", "versions.hintNpmUnmanaged": "当前 npm 不拥有这个 CLI 的全局安装;请切换到原 Node.js 环境,或按下方指引迁移。", "versions.hintUnreadable": "找到了 CLI,但无法读取版本;请在宿主终端检查该命令,或重新安装。", "versions.hintStarter": "随 dsh-brain-mnemon 主包维护;升级主包以采用经过验证的子包组合。", "versions.npmRecommended": "npm 安装与维护", "versions.npmMaintenance": "通过 npm 维护 CLI", "versions.npmInstall": "通过 npm 安装(推荐)", "versions.npmMigrate": "改用 npm 维护(推荐)", "versions.npmRepair": "检查或修复 npm 安装", "versions.npmRepairDetail": "请先检查上方的安装状态。需要重新安装时,在运行 DSH 的宿主终端执行以下命令(Node.js 22+)。", "versions.npmUpdateDetail": "后续更新可直接运行以下命令;更新后点击“重新检查”确认生效。", "versions.npmInstallDetail": "只有 Mnemon Native 需要这个独立的 CLI。需要时在运行 DSH 的宿主终端执行以下命令(Node.js 22+)。", "versions.npmMigrateDetail": "若改用 npm,在 DSH 宿主终端执行(Node.js 22+)。", "versions.npmVerify": "安装后确认版本,再点击“重新检查”:", "versions.npmNextSteps": "安装后:验证版本与生效路径", "versions.npmPath": "确保 npm 全局命令目录位于 PATH 前部。若设置了 MNEMON_CLI_PATH 或 mnemon.cliPath,请同步指向新的启动器;宿主环境改变后重启 DSH,并核对上方的可执行文件路径。", "versions.installGuide": "查看安装说明", "versions.copy": "复制", "versions.copied": "已复制", "versions.copyCommand": "复制命令:{command}", "versions.copyFailed": "无法访问剪贴板,请选中命令手动复制。", "versions.readOnly": "当前为只读访问,可检查版本和复制命令;在拥有管理权限的连接中执行页面更新。", "versions.packages": "子包版本({count})", "versions.packagesOutdated": "{count} 个有新版本", "versions.packagesDetail": "展开查看维护方式", "versions.packagesHide": "收起子包详情", "versions.packagesHint": "默认组合随主包更新;在当前 Profile 中独立安装的子包可单独更新。更新后重启 DSH。", "versions.managedStarter": "随主包维护", "versions.managedProfile": "Profile 独立维护", "versions.starterVersion": "主包指定", "versions.kind.source": "Sources · 记忆源", "versions.kind.strategy": "Strategies · 策略", "versions.kind.provider": "Providers · 后端", "versions.checking": "正在检查远程仓库中的新版本…", "versions.checkingShort": "检查中…", "versions.recheck": "重新检查", "versions.failed": "版本操作失败", "versions.timeout": "版本检查超时,请检查网络后重试。", "versions.current": "已是最新", "versions.available": "可更新", "versions.unknown": "无法确认", "versions.installed": "当前版本", "versions.latest": "最新版本", "versions.executable": "可执行文件", "versions.profileLocation": "Profile · {name}", "versions.sourceLocation": "源码", "versions.linkSourceLocation": "源码 · Profile {name}", "versions.packageLocation": "包目录", "versions.update": "更新", "versions.updating": "更新中…", "versions.updated": "{name} 已更新", "versions.alreadyCurrent": "当前已经是最新版本", "versions.restartRequired": "请重启 DSH 以加载新的 dsh-brain-mnemon 插件代码;桌面版请完全退出后重新打开。", "versions.pendingInstalledTitle": "dsh-brain-mnemon {version} 已安装", "versions.pendingInstalledDetail": "当前运行的仍是 {running};重启 DSH 后生效,桌面版请完全退出后重新打开。", "versions.pendingPackagesTitle": "{names} 已更新", "versions.pendingPackagesDetail": "重启 DSH 后生效,桌面版请完全退出后重新打开。", "versions.checkedAt": "检查于 {time}", "versions.latestUnavailable": "暂时无法读取远程最新版本;请检查网络后重试。", "versions.modeHomebrew": "Homebrew", "versions.modeGo": "Go 安装", "versions.modeNpm": "DSH Profile", "versions.modeLink": "本地 Link", "versions.modeManual": "手工安装", "versions.modeMissing": "未安装", "versions.hintHomebrew": "由 Homebrew 管理;发现新版本时可在此安全更新。", "versions.hintBrewMissing": "检测到 Homebrew 安装,但当前找不到 brew 命令。", "versions.hintGo": "由 go install 管理;发现新版本时可在此安全更新。", "versions.hintDsh": "由当前 DSH Profile 管理;用 DSH 自己的插件安装方式更新,完成后重启 DSH。", "versions.hintPnpm": "由当前 DSH Profile 管理;更新后需要重启 DSH。", "versions.hintPnpmMissing": "检测到 DSH Profile 安装,但宿主找不到 pnpm 命令;安装 pnpm 并重启 DSH 后即可在此更新。", "versions.hintLink": "当前为本地 Link 开发版本;请在源码目录拉取并构建,避免覆盖本地修改。", "versions.hintInstall": "未安装 Mnemon CLI。只有 Mnemon Native 需要它;需要时安装并确保 mnemon 位于 PATH,或设置 MNEMON_CLI_PATH / mnemon.cliPath。", "versions.hintManual": "无法安全识别安装来源;请沿用原安装方式手工更新。", "status.activeRatio": "{active} / {total} 已激活", "status.runtimeRatio": "{user} 用户 · {memory} 项目", "status.runtimeBytes": "{bytes} 已使用", "status.runtimeWaiting": "等待同步", "status.runtimeWaitingDetail": "宿主存储清单待返回", "status.directoryUnsynced": "目录尚未同步", "status.activeMemories": "{count} 条激活记忆", "status.documentsWaiting": "等待工作区", "status.documentsSession": "绑定活动会话后可用", "status.documentRatio": "{active} 份活跃 · {archived} 份归档", "status.documentUsage": "{used} / {limit} 活跃容量", "status.storageDomains": "存储域", "status.storageDomainsText": "运行时记忆、记忆空间与项目档案共用的存储位置。", "status.storageGlobal": "全局", "status.storageWorkspace": "工作区", "status.storageWorkspaces": "集中存储 · 工作区隔离", "status.storageCustom": "自定义", "status.storageWaiting": "正在读取存储域目录…", "status.storageCustomUnset": "尚未配置自定义目录。当前只展示已经由 DSH 配置并启用的自定义根。", "status.storageWorkspaceUnavailable": "当前会话没有可用的工作区目录。", "status.storageActiveRoot": "当前读写根", "status.storageAvailable": "目录可用", "status.storageNotCreated": "目录尚未创建", "status.storageRuntime": "运行时记忆", "status.storageSpaces": "记忆空间", "status.storageDocuments": "项目档案", "status.storageState": "后台状态", "status.storageReady": "正常", "status.storageEmpty": "空", "status.storageMissing": "未创建", "status.storageInvalid": "需修复", "status.storageItems": "项", "status.storageRuntimeDetail": "USER {user} · MEMORY {memory}", "status.storageSpacesDetail": "{active} 个激活 · {databases} 个数据库", "status.storageDocumentsDetail": "{active} 份活跃 · {archived} 份归档", "status.storageStateReady": "审阅水位已经持久化", "status.storageStateVolatile": "当前审阅状态仍由 Host 进程维护", "status.storageFootnote": "在“配置”中切换存储范围;切换后不会自动迁移旧数据。", "config.aria": "记忆系统配置", "plugin.openWorkspace": "打开", "config.interfaceTitle": "界面", "config.unsaved": "有未保存的修改", "config.ready": "已保存并实时生效", "config.displayTitle": "记忆系统入口", "config.displaySidebar": "侧边栏", "config.displaySidebarHint": "独立页面,可查看其他工作区", "config.displayBuiltin": "会话标签页", "config.displayBuiltinHint": "在当前会话中打开", "config.storageTitle": "存储", "storage.usedBy": "用于", "storage.usedByTitle": "“{component}”的数据保存在这里", "storage.userProfileByWorkspace": "每个工作区都有独立的用户画像。", "storage.userProfileShared": "所有工作区共用一个用户画像,工作记忆仍按工作区隔离。", "storage.runtimeSettings": "运行时记忆设置", "storage.default": "默认", "storage.directoryExample": "例如 ~/Documents/mnemon", "storage.thisWorkspace": "本工作区", "storage.moveNote": "应用后读写新位置,已有数据不会迁移", "storage.chooseDirectory": "选择目录", "storage.pickFailed": "无法打开目录选择器,请重试或手动填写路径。", "config.scopeTitle": "存储范围", "config.global": "全局", "config.workspace": "工作区", "config.workspaces": "集中存储 · 按工作区隔离", "config.workspacesHint": "一个根目录下,每个工作区一个子目录(按路径区分)", "config.custom": "自定义", "config.globalScopeHint": "所有工作区共用一个目录", "config.workspaceScopeHint": "每个工作区自己的 .mnemon 目录", "config.dataDirectory": "数据目录", "config.runtimeSectionScope": "范围与检索", "config.runtimeDeferred": "低优先级记忆按需读取", "config.runtimeDeferredHint": "不直接注入未置顶的低优先级条目,由模型按需检索。", "config.runtimeBm25Recall": "工作记忆按需检索(实验)", "config.runtimeBm25RecallLabel": "工作记忆按需检索", "config.runtimeBm25RecallHint": "按本轮内容匹配工作记忆与档案标题;用户画像与置顶记忆始终可见。", "config.runtimeIndexPush": "推送记忆空间与档案索引(实验)", "config.runtimeIndexPushLabel": "推送记忆空间与档案索引", "config.runtimeIndexPushHint": "每轮首步按内容匹配记忆空间说明与档案摘要,仅推轻量索引,不自动拉取正文。", "config.runtimeUserScopeTitle": "用户画像范围", "config.runtimeInheritance": "子 Agent 自动继承 Runtime 记忆", "config.runtimeInheritanceHint": "新建子 Agent 自动继承用户画像与工作记忆;已运行任务不受影响。", "config.runtimeUserScopeStorage": "跟随存储范围", "config.runtimeUserScopeStorageHint": "与 MEMORY.md 在同一目录", "config.runtimeUserScopeGlobal": "全局共享", "config.runtimeUserScopeGlobalHint": "所有工作区共用;MEMORY.md 仍按存储范围", "config.runtimeSnapshotRefreshTitle": "快照刷新策略", "config.runtimeSnapshotRefreshOnChange": "变化时刷新", "config.runtimeSnapshotRefreshOnChangeHint": "运行时记忆变化后,在已打开会话的下一轮重新投影", "config.runtimeSnapshotRefreshSessionStart": "会话开始时冻结", "config.runtimeSnapshotRefreshSessionStartHint": "已打开会话固定使用初始快照以保持缓存稳定;新会话与召回工具仍读取最新记忆", "config.componentScopeStorage": "跟随存储范围", "config.componentScopeGlobal": "全局共享", "config.componentScopeSwitchHint": "切换后从所选范围读写。原有数据保留在原目录,切回即可查看。Pack 导出和 Git 同步只覆盖当前存储根。", "config.documentsScopeSection": "存储范围", "config.documentsScopeTitle": "项目档案范围", "config.documentsScopeStorageHint": "与 MEMORY.md 保存在同一存储根目录", "config.documentsScopeGlobalHint": "所有工作区共用全局项目档案库;MEMORY.md 仍按存储范围隔离", "config.memorySpacesScopeTitle": "记忆空间范围", "config.memorySpacesScopeStorageHint": "与 MEMORY.md 保存在同一存储根目录", "config.memorySpacesScopeGlobalHint": "所有工作区共用全局记忆空间与 Provider 连接;MEMORY.md 仍按存储范围隔离", "config.runtimeLimitsTitle": "容量上限", "config.runtimeLimitsHint": "默认用户画像 {user} KiB、工作记忆 {memory} KiB。", "config.runtime.userLimitBytes": "用户画像上限(字节)", "config.runtime.memoryLimitBytes": "工作记忆上限(字节)", "config.runtimeLimitsApply": "应用后实时生效;调低上限不会删除已有条目", "config.runtimeLimitInvalid": "请将“{field}”设为 1–{max} 之间的整数。", "config.runtimeAdvanced": "维护参数", "config.runtimeMaintenanceHint": "迁移与压缩任务的单次输出上限(默认 {defaultTokens} tokens)。", "config.runtime.maintenanceMaxTokens": "维护输出 token 上限", "config.runtimeMaintenanceInvalid": "{field}需在 {min}–{max} 之间", "config.documentsLimitsTitle": "活跃容量", "config.documentsLimitsHint": "活跃档案总容量上限(默认 {defaultMiB} MiB,最大 {maxMiB} MiB)。", "config.documents.limitBytes": "活跃档案上限(字节)", "config.documentsLimitsApply": "应用后实时生效;调低上限不会删除已有档案", "config.documentsLimitInvalid": "请将“{field}”设为 1–{max} 之间的整数。", "config.enhancementsRefreshFailed": "设置已更新,但状态刷新失败;请重新打开此页面。", "config.strategyTitle": "主策略", "config.strategyFailed": "无法切换主策略,已保留原设置,请重试。", "config.appliesNow": "即时生效", "config.quoted": "“{name}”", "config.listSeparator": "、", "config.sentenceGap": "", "config.enableStrategy": "开启“{strategy}”", "config.useStrategy": "改用“{strategy}”", "config.stopStrategies": "关闭{strategies}", "config.enableComponentNamed": "开启“{component}”", "board.title": "记忆组合", "board.description": "每轮对话的记忆由以下组件组合", "board.loading": "正在读取记忆组合…", "board.componentsUnavailable": "暂时无法读取记忆组件;这里只能开关记忆层。", "board.sources": "记忆来源", "board.enhancements": "增强", "board.running": "运行中", "board.off": "已关闭", "board.notRunning": "未运行", "board.needs": "需要“{component}”", "board.needsMissing": "所需组件未安装", "board.unused": "当前主策略不使用", "board.strategyMissing": "所选的主策略没有安装。", "board.turningOn": "正在开启…", "board.turningOff": "正在关闭…", "board.noMainMissing": "记忆未生效:所选的主策略没有安装", "board.noMainOff": "记忆未生效:主策略“{strategy}”已关闭", "board.noMainWaiting": "记忆未生效:“{strategy}”已开启,但还没有运行", "board.contenders": "记忆未生效:所选的“{strategy}”没有运行,{strategies}不能一同替它组合", "board.fallback": "所选的“{selected}”没有运行,记忆暂由“{composing}”组合", "board.fallbackMissing": "所选的主策略没有安装,记忆暂由“{composing}”组合", "board.noSource": "记忆未生效:没有正在运行的记忆来源", "board.memoryOff": "记忆未生效:当前组合无法使用", "board.stale": "最近的修改没有生效,记忆仍按之前的组合运行", "board.idle": "{strategies}也在运行,但不参与组合", "board.switching": "正在切换…", "board.composing": "正在组合记忆", "board.lastSource": "运行中 · 唯一的来源", "board.enabledCount": "{on} / {total} 已开启", "board.experimental": "实验性", "board.search": "搜索组件", "board.searchEmpty": "没有与“{query}”匹配的组件。", "details.open": "“{component}”的详情", "details.shipped": "随附", "details.installed": "已安装的扩展", "details.relations": "关系", "details.needs": "需要", "details.needsAny": "需要其一", "details.needsMissing": "尚未安装提供 {capability} 的组件", "details.neededBy": "被依赖", "details.conflicts": "不能同时运行", "details.options": "选项", "details.effectOn": "开启时一同开启:{names}", "details.effectOnReplace": "开启时关闭:{names}", "details.effectOnMixed": "开启时一同开启:{on};关闭:{off}", "details.effectOff": "关闭时一同关闭:{names}", "details.effectLast": "唯一运行的来源,不能关闭", "details.currentMain": "当前主策略", "details.useMain": "设为主策略", "details.back": "返回“{component}”", "config.strategyWorkflowNote": "仅在主策略支持时运行(如分层策略);切换到不支持的策略时保留设置。", "threeTier.offNote": "当前插件未启用。后台任务还需主策略支持相应能力。", "board.otherEnhancements": "适用于其他主策略的增强({count})", "board.more": "更多组件可在插件列表中添加", "board.relationNeeds": "需要“{component}”", "board.relationNeededBy": "“{component}”依赖它", "options.aria": "“{component}”的选项", "options.emptySourcesTitle": "未选择记忆源", "options.emptySourcesConfirm": "当前未选择任何记忆源。保存后 Agent 的热记忆、档案和记忆空间读写将不可用。若想恢复自动选择,请取消并点击恢复默认。确定保存空列表吗?", "options.apply": "应用", "options.fix": "先修正标出的选项", "options.applying": "正在应用…", "options.default": "默认", "options.reset": "恢复默认", "options.integer": "请输入整数", "options.between": "请输入 {min} 到 {max} 之间的整数", "options.atLeast": "请输入不小于 {min} 的整数", "options.atMost": "请输入不大于 {max} 的整数", "options.tooLong": "最多 {max} 个字符", "options.listLimit": "最多 {count} 项,每项不超过 {length} 个字符,且不能重复", "options.listHint": "每行一项。", "options.noSources": "当前没有可选的记忆来源。", "options.sourceUnavailable": "{source}(当前不可用)", "feedback.memoryOff": "记忆未生效:没有正在运行的主策略", "feedback.memoryRestored": "记忆已恢复,由“{strategy}”组合", "feedback.fallback": "“{selected}”已关闭,记忆暂由“{composing}”组合", "feedback.fallbackMissing": "所选的主策略没有安装,记忆暂由“{composing}”组合", "feedback.switchedMain": "已改用“{strategy}”", "feedback.switchedMainOff": "已改用“{strategy}”,并关闭{others}", "feedback.switchedMainWith": "已改用“{strategy}”,并一同开启它需要的{others}", "feedback.switchedMainMixed": "已改用“{strategy}”:一同开启{on},关闭{off}", "feedback.externalMain": "主策略已改为“{strategy}”", "feedback.idleMain": "“{component}”也在运行,但不参与组合", "feedback.sourceOn": "已开启“{component}”,这一层恢复读写", "feedback.sourceOff": "已关闭“{component}”,这一层暂停读写", "feedback.componentOn": "已开启“{component}”", "feedback.componentOff": "已关闭“{component}”", "feedback.externalSourceOn": "“{component}”已开启,这一层恢复读写", "feedback.externalSourceOff": "“{component}”已关闭,这一层暂停读写", "feedback.externalComponentOn": "“{component}”已开启", "feedback.externalComponentOff": "“{component}”已关闭", "feedback.several": "已更新 {count} 个组件", "feedback.enabledWith": "已开启“{component}”,并一同开启它需要的{others}", "feedback.disabledWith": "已关闭“{component}”,依赖它的{others}也一同关闭", "feedback.enabledReplacing": "已开启“{component}”,并关闭不能与它同时运行的{others}", "feedback.enabledMixed": "已开启“{component}”:一同开启{on},关闭{off}", "feedback.optionsSaved": "已更新“{component}”的选项", "feedback.externalOptions": "“{component}”的选项已更改", "feedback.externalSeveral": "{count} 个组件已变化", "feedback.undo": "撤销", "feedback.undone": "已撤销,恢复为之前的设置", "feedback.show": "查看", "feedback.retry": "重试", "feedback.failed": "未能应用修改,已保留原来的设置。", "feedback.layerResumed": "“{layer}”已恢复运行", "config.componentListNote": "下方组件列表中的 dsh-brain-mnemon/bundle 是 Starter 的分组条目,显示“已关闭”不影响运行。", "layers.disabledBadge": "已关闭", "layers.disabledTitle": "{layer} 已关闭", "layers.disabledDescription": "此记忆层当前不参与记忆处理。", "layers.disabledText": "已有数据完整保留;在配置中重新开启后立即恢复。", "layers.stoppedBadge": "未运行", "layers.stoppedTitle": "{layer} 未运行", "layers.stoppedDescription": "这一层的组件已开启,但没有运行。", "layers.stoppedText": "已有数据完整保留;组件恢复运行后自动恢复。", "layers.memoryOffBadge": "未生效", "layers.memoryOffTitle": "{layer} 未生效", "layers.memoryOffDescription": "记忆当前未生效,这一层暂不可用。", "layers.memoryOffText": "已有数据完整保留;恢复主策略后即可继续使用。", "config.nativeName": "Mnemon Native", "config.backgroundTitle": "后台任务", "config.backgroundDescription": "沉淀、归档与审查在后台运行;仅在支持的主策略下生效。", "config.memoryWriting": "记忆写入", "config.confirmWrites": "记忆工具写入前确认", "config.confirmWritesHint": "模型通过记忆工具增删改前由 DSH 确认;拒绝时不写入。", "config.confirmWritesBadge": "暂停闲时整理", "config.taskAgentSectionTitle": "任务 Agent", "config.taskAgentSectionDescription": "驱动后台维护、存入记忆、空间分流与同步审阅。", "config.taskAgentTitle": "任务 Agent 模型", "config.taskAgentInherit": "跟随全局", "config.taskAgentInheritHint": "跟随新会话的模型", "config.taskAgentConversation": "跟随会话", "config.taskAgentConversationHint": "跟随当前会话使用的模型", "config.taskAgentFixed": "自定义", "config.taskAgentFixedHint": "指定模型", "config.taskAgentProvider": "模型 Provider", "config.taskAgentModel": "模型", "config.taskAgentImageInput": "图片输入", "config.taskAgentEffective": "当前将使用", "config.taskAgentSource.fixed": "自定义", "config.taskAgentSource.session": "当前会话", "config.taskAgentSource.dsh-default": "新会话模型", "config.taskAgentSource.active-agent": "已打开的会话", "config.taskAgentLoading": "正在读取模型目录", "config.taskAgentUnavailable": "尚无可用的 Provider / Model 路由", "config.taskAgentLoadFailed": "模型目录读取失败:{error}", "config.taskAgentPartial": "有 {count} 个 Provider 暂时无法读取,其他选项仍可使用。", "config.taskAgentRetry": "重新读取", "config.customAbsolute": "需要绝对路径,或以 ~/ 开头", "config.saveFailed": "保存失败:{error}", "config.readOnly": "当前部署的插件设置为只读。", "config.remoteReadOnly": "远程访问时插件设置为只读:在 profile 的 mnemon 配置中设置 remoteAccess: trusted-host 并重启 DSH 后可在此修改。", "config.unavailable": "无法加载记忆系统设置。请检查 Host 是否已为当前 Web 部署授权设置 RPC。", "config.discard": "放弃", "config.interactionTurnBar": "回合记忆栏", "config.interactionTurnBarHint": "每轮回复下方显示本轮的召回与写入", "config.interactionSaveAction": "存入记忆按钮", "config.interactionSaveActionHint": "在回复旁手动存入,确认后写入你选择的位置", "config.packTitle": "备份与迁移", "config.packUnavailable": "当前 DSH 主机不支持 Mnemon ZIP 备份通道。", "config.packExporting": "导出中…", "config.packInspecting": "检查中…", "config.packImporting": "导入中…", "config.packExported": "已导出 {file}({size})。", "config.packFailed": "ZIP 操作失败:{error}", "config.packSimpleDescription": "ZIP 含上述组件的数据,不含第三方 Provider 与密钥", "config.packImportZip": "导入 ZIP", "config.packExportZip": "导出 ZIP", "config.packChooseZip": "选择 Mnemon 备份 ZIP", "config.packUnnamedZip": "Mnemon 备份.zip", "config.packZipReady": "校验通过 · {components} 个组件 · {items} 项 · {size}", "config.packImportZipAction": "安全导入", "config.packImportedWhole": "已将 ZIP 安全合并到 {root}。", "config.syncTitle": "Git 同步", "config.syncSimpleDescription": "把上述组件的数据同步到 Git 仓库;不含第三方 Provider 与密钥", "config.syncLoading": "正在读取同步状态…", "config.syncUnavailable": "当前 DSH 主机不支持 Mnemon 仓库同步通道。", "config.syncUnavailableReason": "无法读取同步状态:{error}", "config.syncGitMissing": "同步需要 Git {required} 或更高版本", "config.syncRecheck": "重新检查", "config.syncFixCredentials": "设置凭据", "config.syncRepository": "仓库", "config.syncRepositoryHint": "选择保存记忆的 Git 仓库", "config.syncChange": "更改", "config.syncDisconnect": "断开", "config.syncDisconnectTitle": "断开这个仓库?", "config.syncDisconnectBody": "之后不再同步到 {repository},自动同步也会关闭。本机记忆和仓库里的内容都不会删除;保存的访问令牌会一并移除。", "config.syncDisconnected": "已断开仓库。", "config.syncStateChecking": "正在检查仓库…", "config.syncStateConnected": "已连接", "config.syncStateNewBranch": "已连接 · 首次同步会创建 {branch} 分支", "config.syncNoCredential": "推送需要 GitHub 登录或访问令牌", "config.syncNoCredentialToken": "推送需要访问令牌", "config.syncIssueAuthHttps": "需要凭据,请用 GitHub 登录或填写访问令牌", "config.syncIssueAuthToken": "需要凭据,请填写访问令牌", "config.syncIssueRejectedGitHub": "GitHub 拒绝了登录凭据,请重新登录,或检查它能否访问这个仓库", "config.syncIssueRejectedGitHubToken": "GitHub 拒绝了保存的访问令牌,请更换令牌", "config.syncIssueRejectedGitHubEnvironment": "GitHub 拒绝了 {env} 中的令牌,请更换它", "config.syncIssueRejected": "仓库主机拒绝了保存的访问令牌,请更换令牌,或在地址中写上它要求的用户名", "config.syncIssueRejectedEnvironment": "仓库主机拒绝了 {env} 中的令牌,请更换它", "config.syncIssueAuthSsh": "SSH 认证失败,请检查这台电脑的 SSH 密钥", "config.syncIssueAuth": "没有访问这个仓库的权限", "config.syncIssueNotFound": "找不到这个仓库,请检查地址和访问权限", "config.syncIssueNotFoundGitHub": "找不到这个仓库,请检查地址;私有仓库需要先登录或填写令牌", "config.syncIssueNetwork": "无法连接到仓库,请检查网络或代理", "config.syncIssueTimeout": "仓库没有及时响应", "config.syncIssueUnknown": "无法读取仓库:{error}", "config.syncViaGitHub": "通过 GitHub @{login}", "config.syncViaGitHubAnonymous": "通过 GitHub 登录", "config.syncViaToken": "使用访问令牌", "config.syncViaEnvironment": "使用环境变量 {env}", "config.syncViaSsh": "使用 SSH 密钥", "config.syncConnectWith": "连接方式", "config.syncModeGitHub": "GitHub 账号", "config.syncModeAddress": "仓库地址", "config.syncRepoUrl": "仓库地址", "config.syncRepoUrlPlaceholder": "https://…、git@主机:路径 或本机绝对路径", "config.syncRepoUrlInvalid": "地址需要是 https://、ssh://、git@主机:路径 或本机绝对路径", "config.syncRepoUrlCredentials": "地址里只能写用户名,令牌请填在“访问令牌”里", "config.syncToken": "访问令牌", "config.syncTokenOptional": "可选", "config.syncTokenSaved": "已保存;输入新令牌可替换", "config.syncTokenEnvironment": "正在使用环境变量 {env}", "config.syncTokenHint": "只有 HTTPS 地址需要令牌,令牌只保存在这台电脑", "config.syncTokenRemove": "移除", "config.syncTokenRemoved": "已移除访问令牌。", "config.syncConnect": "连接", "config.syncConnecting": "连接中…", "config.syncSave": "保存", "config.syncSaving": "保存中…", "config.syncGitHubHint": "登录后可直接选择或新建仓库;授权只保存在这台电脑", "config.syncGitHubReadOnly": "当前凭据存储只读,登录无法保存", "config.syncGitHubSignIn": "使用 GitHub 登录", "config.syncGitHubStarting": "获取设备码…", "config.syncGitHubCode": "在 GitHub 页面输入这个设备码:", "config.syncGitHubCopyOpen": "复制并打开 GitHub", "config.syncGitHubCopied": "已复制,在打开的页面中粘贴即可;完成后会自动继续", "config.syncGitHubOpenBlocked": "浏览器没有打开新页面,请手动访问 {url}", "config.syncGitHubWaiting": "等待授权…完成后会自动继续", "config.syncGitHubSignedIn": "已登录 @{login}", "config.syncGitHubSignOut": "退出登录", "config.syncGitHubFailed": "GitHub 登录失败:{error}", "config.syncGitHubExpired": "设备码已过期,请重新登录", "config.syncGitHubDenied": "授权已被拒绝", "config.syncGitHubExpiredGrant": "GitHub 授权已失效,请重新登录", "config.syncGitHubSignInAgain": "重新登录", "config.syncRepositoryLabel": "仓库", "config.syncRepositorySearch": "搜索仓库,或输入新仓库名", "config.syncRepositoriesLoading": "正在读取仓库…", "config.syncRepositoriesFailed": "读取仓库失败:{error}", "config.syncRepositoriesRetry": "重试", "config.syncRepositoriesNone": "账号下还没有仓库,输入名称即可新建", "config.syncRepositoriesEmpty": "没有匹配的仓库", "config.syncRepositoriesMore": "还有 {count} 个仓库,输入名称缩小范围", "config.syncRepositoryPrivate": "私有", "config.syncRepositoryPublic": "公开", "config.syncRepositoryNoPush": "无推送权限", "config.syncRepositoryCurrent": "当前", "config.syncRepositoryCreate": "新建私有仓库 {name}", "config.syncRepositoryCreating": "创建中…", "config.syncRepositoryNameInvalid": "仓库名只能包含字母、数字、点、短横线和下划线", "config.syncPublicTitle": "使用公开仓库?", "config.syncPublicBody": "{name} 是公开仓库:同步后任何人都能看到这些记忆。", "config.syncPublicConfirm": "仍然使用", "config.syncRowTitle": "同步", "config.syncNever": "同步时先合并仓库里的记忆,再推送本机的", "config.syncLast": "上次同步:{time}", "config.syncLastMerge": "上次合并:{time}", "config.syncCheck": "检查远端", "config.syncNow": "立即同步", "config.syncNowRunning": "同步中…", "config.syncDone": "已同步,推送了 {commit}。", "config.runtimeMergeArchived": "{count} 条超限工作记忆已完整保存在本机 runtime/archived/import-overflow,未加载到工作记忆。", "config.syncDoneMerged": "已同步:合并了 {count} 条远端记忆,推送了 {commit}。", "config.syncUpToDate": "已是最新,仓库与本机一致。", "config.syncUpToDateMerged": "合并了 {count} 条远端记忆,仓库已是最新。", "config.syncPushFailed": "已在本机提交,但推送没有完成:{reason}", "config.syncFailed": "同步失败:{error}", "config.syncReasonBusy": "另一个同步操作还在进行,请稍后再试", "config.syncReasonNoRepository": "还没有连接仓库", "config.syncReasonGitMissing": "这台电脑的 Git 不可用", "config.syncReasonRemoteEmpty": "仓库里还没有备份,先同步一次", "config.syncReasonRejected": "同步时仓库又被其他设备更新了,请再同步一次", "config.syncAuto": "自动同步", "config.syncAutoOff": "关闭", "config.syncAutoHour": "每小时", "config.syncAutoHours": "每 {hours} 小时", "config.syncAutoDay": "每天", "config.syncAutoDays": "每 {days} 天", "config.syncAutoHintOff": "只在你点“立即同步”时同步", "config.syncAutoHintOn": "按间隔在后台同步,和“立即同步”做的事一样", "config.syncAutoNext": "下次 {time}", "config.syncAutoLast": "上次 {time}", "config.syncAutoFailed": "上次自动同步失败:{error}", "config.syncHistory": "备份历史", "config.syncHistoryHint": "每次同步都在仓库里留下一个版本", "config.syncHistoryView": "查看", "config.syncHistoryLoading": "正在读取…", "config.syncHistoryEmpty": "仓库里还没有备份。", "config.syncHistoryMore": "读取更早的版本", "config.syncHistoryCapped": "这里只列出最近的 {count} 个版本", "config.syncHistoryFrom": "来自 {machine}", "config.syncHistoryUnknownMachine": "未标注设备", "config.syncComponentRuntime": "运行时记忆", "config.syncComponentDocuments": "项目档案", "config.syncComponentSpaces": "记忆空间", "config.syncCountRuntime": "运行时记忆 {count} 条", "config.syncCountDocuments": "项目档案 {count} 份", "config.syncCountSpaces": "记忆空间 {count} 个", "config.syncCompareTitle": "与远端比较", "config.syncCompareLoading": "正在读取远端…", "config.syncCompareRemote": "远端版本来自 {machine} · {time}", "config.syncCompareSame": "一致", "config.syncCompareDiffers": "有差异", "config.syncCompareRuntime": "远端独有 {remote} 条 · 本机独有 {local} 条", "config.syncCompareConflicts": "{count} 处写法不同", "config.syncCompareAllSame": "本机与远端一致,不需要同步。", "config.syncCompareTruncated": "差异较多,只统计了一部分。", "config.syncCompareRemovals": "远端记录了 {count} 条删除,同步时会在本机应用。", "config.syncCompareConflictNote": "{count} 个主题两边写法不同:同步会保留两种写法,之后可以用“记忆整理”合并。", "config.syncCompareShowConflicts": "查看", "config.syncCompareGoReview": "去记忆整理", "config.syncCompareHeldBack": "远端有 {count} 条记忆是本机以前删掉的,同步不会把它们加回。", "config.syncCompareRevive": "恢复这些记忆", "config.syncCompareReviving": "恢复中…", "config.syncCompareRevived": "已恢复 {count} 条记忆。", "config.syncDiffHere": "本机", "config.syncDiffThere": "远端", "config.syncMergeOnly": "只合并到本机", "config.syncMerging": "合并中…", "config.syncMerged": "已合并远端 {commit}。", "config.syncMergedCount": "已合并 {count} 条远端记忆。", "config.syncAdvanced": "高级设置", "config.syncBranch": "分支", "config.syncSubdir": "仓库内目录", "config.syncDefaultValue": "默认 {value}", "config.syncBranchInvalid": "分支名无效", "config.syncSubdirInvalid": "需要是仓库内的相对目录", "config.syncAuthor": "提交者", "config.syncAuthorDefault": "默认", "config.syncAuthorMachine": "本机 Git", "config.syncAuthorCustom": "自定义", "config.syncAuthorDefaultNote": "优先使用本机 Git 身份;没有配置时以 {identity} 提交", "config.syncAuthorMachineNote": "使用这台电脑的 Git 身份;没有配置时用默认身份", "config.syncAuthorName": "姓名", "config.syncAuthorEmail": "邮箱", "config.syncAuthorEmailInvalid": "邮箱格式不正确", "config.syncAdvancedNote": "保存后,下次同步写到新的分支或目录", "config.syncMachineName": "这台电脑的名称", "config.syncMachineHostname": "主机名", "config.syncMachineCustom": "自定义", "config.syncMachineNameLabel": "名称", "config.syncMachineHostnameNote": "使用主机名,备份历史里显示为“来自 {name}”", "config.syncMachineCustomNote": "备份历史里显示为“来自 {name}”", "config.syncMachineNameInvalid": "名称最多 120 个字符,且只能占一行", "config.syncMachineRenameNote": "保存后,之后的同步使用新名称;已有的版本保留原来的名称", "config.syncAdvancedSaved": "已保存高级设置。", "config.reconcileTitle": "记忆整理", "config.reconcileDescription": "模型读合并后的记忆,只提出建议,等你审查后才写入", "review.reconcile": "整理记忆", "review.reconciling": "整理中…", "review.refresh": "刷新", "review.empty": "没有待审查的建议", "review.pending": "{count} 条待审查", "review.failed": "读取审查记录失败:{error}", "review.planned": "已生成 {operations} 条建议,接受后才会写入。", "review.none": "模型认为当前记忆无需改动。", "review.statusPending": "待审查", "review.statusAccepted": "已接受", "review.statusRejected": "已拒绝", "review.expand": "查看", "review.collapse": "收起", "review.accept": "接受", "review.reject": "拒绝", "review.apply": "执行", "review.applying": "执行中…", "review.reopen": "重新打开", "review.applied": "已执行 {count} 条改动。", "review.appliedAt": "执行于 {time}", "review.appliedCount": "已执行 {count}/{total} 条", "review.applyFailed": "执行失败:{error}", "review.meta": "{count} 条改动 · 来自 {machine} · {time}", "review.foreign": "涉及其他机器的记忆:{machines}", "review.opinions": "意见", "review.noOpinions": "还没有意见", "review.authorUser": "你", "review.authorAgent": "模型", "review.opinionPlaceholder": "写下你的意见,下次整理会读到", "review.opinionSend": "提交意见", "review.opinionAdded": "已记录你的意见。", "review.opAdd": "新增{target}记忆:{content}", "review.opReplace": "改写{target}记忆:由“{from}”改为“{to}”", "review.opRemove": "删除{target}记忆:{text}", "review.opArchive": "归档文档 {id}", "review.targetMemory": "项目", "review.targetUser": "用户", "review.guidanceLabel": "整理要求", "review.guidanceHint": "可选:写下你希望这次整理达成的目标,模型会读到,但不会因此获得额外权限", "review.guidancePlaceholder": "例如:两条偏好其实是一回事,合并成一条", "review.guided": "已按你的要求整理", "review.remoteEntries": "参考了远端 {count} 条本机没有的记忆", "review.selectAll": "全选", "review.selectNone": "全不选", "review.selectHint": "勾选要执行的改动,未勾选的保留到下次", "review.selected": "已选 {count}/{total} 条", "review.applyCount": "执行选中 {count} 条", "review.noSelection": "请至少选择一条改动。", "review.history": "已执行的历史方案({count})", "review.historyTitle": "已执行的历史方案", "review.historyHint": "这些方案已经执行过,只供回看;重新打开不会撤销已经写入的改动。", "review.historyEmpty": "还没有执行过的方案。", "review.rejectedHint": "这份方案已被拒绝;写下意见后重新打开,或直接让 AI 重新整理。", "skills.label": "技能管理", "skills.groupSurface": "界面与入口", "skills.groupPlacement": "位置与更新", "skills.groupEvolution": "自动进化", "skills.groupGeneration": "模型与生成", "skills.groupSources": "市场与目录", "skills.badgeDefault": "默认", "skills.badgeCustom": "自定义 · {count}", "skills.parametersBadge": "阈值 {threshold} · {idle}s", "skills.evolution": "自进化", "skills.allowCreate": "新建技能建议", "skills.allowCreateHint": "允许复盘提出新技能;已有建议仍可手动处理", "skills.allowUpdate": "改进已有技能", "skills.allowUpdateHint": "允许复盘提出已有技能的改进;两类建议均关闭时暂停复盘", "skills.targetScope": "新技能写入位置", "skills.roots.title": "新技能目录", "skills.roots.hint": "启用后用于新建、草案与市场安装,优先于上方写入位置。", "skills.roots.enabled": "自定义创建目录", "skills.roots.default": "默认创建目录", "skills.roots.invalid": "至少选择一个目录,且默认目录必须在选项中。", "skills.root.project-dsh": "项目 .dsh/skills", "skills.root.project-agents": "项目 .agents/skills", "skills.root.user-dsh": "用户 .dsh/skills", "skills.root.user-agents": "用户 .agents/skills", "skills.allowLinkedUpdates": "允许更新链接技能", "skills.allowLinkedUpdatesHint": "更新将直接写回符号链接目标并影响共享 Agent,仅对可信目录启用。", "skills.targetScopeHint": "默认写入用户目录;跟随存储范围时按工作区或用户分配,采纳时仍可改选。", "skills.targetScope.user": "用户", "skills.targetScope.project": "项目", "skills.targetScope.storage": "跟随存储范围", "skills.evolutionHint": "后台复盘对话并提出技能建议;任务与子代理会话记录将保存在本地。", "skills.autoAdoptDailyLimit": "每日自动处理候选数", "skills.autoAdoptTimeZone": "每日额度时区", "skills.autoBudgetHint": "按所选时区自然日计算,0 为暂停;手动操作不受限制。", "skills.autoBudgetInvalid": "候选数须为 0–100 的整数;时区须为有效 IANA 名称或 local。", "skills.autoAdopt": "自动采纳新建议", "skills.autoAdoptHint": "需开启自动回测;仅在文本用例零退步时采纳(最多重试 2 次)。", "skills.autoBacktest": "草案自动回测", "skills.autoBacktestHint": "草案写好后,用测试用例与当前版本对比", "skills.parameters": "复盘参数", "skills.draftGeneration": "草案生成", "skills.draftMaxTokens": "草案输出 token 上限", "skills.draftRetryMaxTokens": "重试输出 token 上限", "skills.draftBudgetHint": "包含推理与完整 SKILL.md;截断时若重试上限更高会自动扩容重试一次。", "skills.reviewThreshold": "复盘阈值", "skills.idleSeconds": "空闲等待(秒)", "skills.cooldownSeconds": "复盘间隔(秒)", "skills.minConfidence": "最低置信度", "skills.expiryDays": "建议有效期(天)", "skills.maxPendingPerSession": "单个对话待处理上限", "skills.casesPerRun": "每次回测用例数", "skills.invalid": "{field}需在 {min}–{max} 之间", "skills.hints": "对话提示", "skills.hintsHint": "在回合下方显示用到的技能和新的建议", "skills.sidebar": "侧边栏入口", "skills.sidebarHint": "技能管理单独显示在侧边栏,不再放在记忆系统里", "skills.models": "默认模型", "skills.modelsHint": "未指定时跟随任务 Agent 模型路由。", "skills.modelAuto": "自动(跟随任务 Agent)", "skills.draftModel": "进化起草模型", "skills.draftModelHint": "为进化建议起草或改写技能", "skills.runModel": "评测运行模型", "skills.runModelHint": "运行回测用例并评估得分", "skills.directories": "技能目录", "skills.directoriesHint": "留空时使用默认用户技能目录。", "skills.dshHome": "DSH 主目录", "skills.agentsHome": "共享 Agents 目录", "skills.market": "市场来源", "skills.marketHint": "管理技能市场目录与索引源。", "skills.marketRefresh": "刷新", "skills.marketRefreshing": "刷新中…", "skills.marketAddPlaceholder": "GitHub 仓库、索引地址或本地路径", "skills.marketAdd": "添加", "skills.marketAdding": "添加中…", "skills.marketRemove": "移除", "skills.marketBuiltin": "内置", "skills.marketSkillCount": "{count} 项", "skills.marketEmpty": "暂无市场来源。", "skills.statusCount": "{count} 个技能", "skills.statusOn": "自进化已开启 · {waiting} 项待处理", "skills.statusIdle": "自进化已开启", "skills.statusOff": "自进化未开启", "skillTail.label": "本回合技能", "skillTail.reviewing": "复盘中", "skillTail.suggested": "建议 {count}", "skillTail.failed": "复盘失败", "skillTail.openSkill": "在技能管理中打开 {name}", "skillTail.openSuggestions": "在技能管理中查看建议" }; // vendor/dsh-mnemon/src/client/locales.ts const en$4 = coreEn; const mnemonLocales = { en: en$4, zh: zh$4, ja: coreJa, es: coreEs, fr: coreFr, de: coreDe, ru: coreRu, pt: corePt }; function interpolate$1(dictionary, key, params) { const template = dictionary[key] ?? en$4[key] ?? key; if (params === void 0) return template; return template.replace(/\{(\w+)\}/g, (match, name) => name in params ? String(params[name]) : match); } function translateZh(key, params) { return interpolate$1(zh$4, key, params); } function translateEn(key, params) { return interpolate$1(en$4, key, params); } const TRANSLATORS = { en: translateEn, zh: translateZh, ja: (key, params) => interpolate$1(mnemonLocales.ja, key, params), es: (key, params) => interpolate$1(mnemonLocales.es, key, params), fr: (key, params) => interpolate$1(mnemonLocales.fr, key, params), de: (key, params) => interpolate$1(mnemonLocales.de, key, params), ru: (key, params) => interpolate$1(mnemonLocales.ru, key, params), pt: (key, params) => interpolate$1(mnemonLocales.pt, key, params) }; const BUILT_IN_TRANSLATORS = new Set(Object.values(TRANSLATORS)); function translateFor(preference) { return TRANSLATORS[resolveMnemonLocale(preference)]; } function isBuiltInTranslate(translate) { return BUILT_IN_TRANSLATORS.has(translate); } // vendor/dsh-mnemon/src/client/view-styles.ts function appearanceClass(base, sidebar) { return [base, sidebar].filter((value) => value !== void 0 && value !== "").join(" "); } // vendor/dsh-mnemon/src/client/ui-icons.ts const IconChevronLeftOutline14 = _deepseek_ai_dsh_client_ui_primitives.IconChevronLeftOutlineRegular; const css$18 = ".IIa07q_shell{--mn-bg:var(--dsw-alias-bg-base);--mn-backdrop:var(--dsw-alias-bg-overlay,var(--mn-bg));--mn-surface:linear-gradient(var(--mn-bg), var(--mn-bg)), linear-gradient(var(--mn-backdrop), var(--mn-backdrop)) var(--mn-bg);--mn-layer-1:var(--dsw-alias-bg-layer-1);--mn-layer-2:var(--dsw-alias-bg-layer-2);--mn-fill:var(--dsw-alias-bg-module-platform);--mn-block-fill:var(--mn-fill);--mn-input:var(--dsw-alias-bg-layer-1);--mn-text:var(--dsw-alias-label-primary);--mn-muted:var(--dsw-alias-label-secondary);--mn-faint:var(--dsw-alias-label-tertiary);--mn-caption:var(--dsw-alias-label-caption);--mn-line:var(--dsw-alias-border-l2);--mn-line-strong:var(--dsw-alias-border-l3);--mn-field-line:var(--dsw-alias-border-l4);--mn-card-line:var(--dsw-alias-settings-card-stroke);--mn-accent:var(--dsw-alias-state-business-primary);--mn-hover:var(--dsw-alias-interactive-bg-hover);--mn-pressed:var(--dsw-alias-interactive-bg-active);--mn-danger:var(--dsw-alias-state-error-primary);--mn-success:var(--dsw-alias-state-success-primary);--mn-warn:var(--dsw-alias-state-warn-primary);--mn-idle:var(--dsw-alias-state-idle-primary);--mn-priority:var(--dsw-alias-state-warn-primary);--mn-focus:var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));--mn-code:var(--dsw-font-mono,var(--ds-font-family-code,ui-monospace, \"SFMono-Regular\", Menlo, Consolas, monospace));--mn-sans:var(--dsw-font-family,-apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif);box-sizing:border-box;width:100%;min-width:0;height:100%;min-height:0;color:var(--mn-text);background:var(--mn-surface);font:13px/20px var(--mn-sans);-webkit-tap-highlight-color:transparent;flex-direction:column;flex:auto;display:flex;overflow:hidden;container:IIa07q_mnemon-workbench/inline-size}:has(>[data-conversation-scroll]>[data-slot=conversation\\.session]>*>[data-slot=conversation\\.view]>.IIa07q_shell[data-mnemon-surface=builtin])>[data-width-handle]{visibility:hidden;pointer-events:none}.IIa07q_shell *,.IIa07q_shell :before,.IIa07q_shell :after{box-sizing:border-box}:where(.IIa07q_shell) :where(button,input,select,textarea){color:inherit;font:inherit}:where(.IIa07q_shell) :where(button,select){touch-action:manipulation}.IIa07q_shell button:focus-visible,.IIa07q_shell input:focus-visible,.IIa07q_shell select:focus-visible,.IIa07q_shell textarea:focus-visible,.IIa07q_shell summary:focus-visible,.IIa07q_shell [role=button]:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--mn-focus);outline-offset:2px}.IIa07q_shell :is(textarea,input:not([type=checkbox],[type=radio],[type=file])):focus-visible{outline:none}.IIa07q_shell code{font-family:var(--mn-code);font-size:.92em}.IIa07q_masthead{background:var(--mn-surface);flex:none;align-items:center;gap:12px;min-height:48px;padding:10px 24px 4px;display:flex}.IIa07q_masthead[data-window-drag]{padding-left:calc(24px + var(--dsh-frame-leading-clearance,0px))}.IIa07q_backButton{flex:none;align-items:center;gap:4px;min-width:max-content;display:inline-flex}.IIa07q_backButton>svg{flex:none}.IIa07q_brand{flex-wrap:wrap;flex:auto;align-items:center;gap:4px 10px;min-width:0;display:flex}.IIa07q_brand h1{flex:none;margin:0;font-size:16px;font-weight:500;line-height:24px}.IIa07q_storageMode{corner-shape:round;height:20px;color:var(--mn-faint);background:var(--mn-fill);white-space:nowrap;border-radius:999px;flex:none;align-items:center;gap:4px;padding:0 8px;font-size:11px;line-height:1;display:inline-flex}.IIa07q_storageMode>strong{color:var(--mn-muted);font-weight:500}.IIa07q_statusCluster{color:var(--mn-faint);white-space:nowrap;flex:none;align-items:center;gap:6px;font-size:13px;line-height:20px;display:inline-flex}.IIa07q_checking{background:var(--mn-idle)}.IIa07q_iconButton{border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--mn-caption);cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;padding:0;transition:background-color .12s,color .12s;display:inline-flex}.IIa07q_iconButton:hover:not(:disabled){color:var(--mn-muted);background:var(--mn-hover)}.IIa07q_iconButton:active:not(:disabled){background:var(--mn-pressed)}.IIa07q_iconButton>svg{flex:none}.IIa07q_headerActions{flex:none;justify-content:flex-end;align-items:center;gap:8px;min-width:0;display:flex}.IIa07q_workspacePicker{min-width:0;color:var(--mn-faint);align-items:center;gap:6px;font-size:12px;line-height:18px;display:inline-flex}.IIa07q_workspacePicker>[data-part=label]{white-space:nowrap}.IIa07q_workspacePicker button{width:min(200px,22vw);min-width:112px}.IIa07q_alert,.IIa07q_inlineError{border-radius:var(--dsw-radius-md);color:var(--mn-danger);background:color-mix(in srgb, var(--mn-danger) 8%, transparent);padding:8px 12px;font-size:12px;line-height:18px}.IIa07q_alert{flex-direction:column;flex:none;gap:2px;margin:8px 24px 0;display:flex}.IIa07q_alert ul{margin:4px 0 0;padding-left:18px}.IIa07q_alert[role=status]{color:var(--dsw-alias-state-warn-label,var(--mn-text));background:var(--dsw-alias-state-warn-tertiary,color-mix(in srgb, var(--mn-warn) 12%, transparent))}.IIa07q_noticeGroup,.IIa07q_noticeContents{flex-direction:column;flex:none;display:flex}.IIa07q_noticeToggle{display:none}.IIa07q_notice{flex:none;margin:8px 24px 0}.IIa07q_compositionStatus{border-radius:var(--dsw-radius-sm);min-width:0;color:inherit;font:inherit;cursor:pointer;background:0 0;border:0;align-items:center;gap:6px;padding:2px 6px;transition:background-color .12s,color .12s;display:inline-flex}.IIa07q_compositionStatus:hover:not(:disabled){background:var(--mn-hover)}.IIa07q_compositionStatus:active:not(:disabled){background:var(--mn-pressed)}.IIa07q_compositionStatus:disabled{cursor:default}.IIa07q_compositionStrategy{color:var(--mn-muted)}.IIa07q_compositionStrategy:before{content:\"·\";color:var(--mn-faint);margin-right:6px}.IIa07q_compositionStatusWrap{min-width:0;display:inline-flex;position:relative}.IIa07q_compositionSummary{z-index:20;border:.5px solid var(--dsw-alias-border-l2);border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-layer-2);width:max-content;max-width:min(320px,100vw - 32px);box-shadow:var(--dsw-elevation-prominent);color:var(--mn-muted);white-space:normal;opacity:0;pointer-events:none;flex-direction:column;align-items:flex-start;gap:8px;padding:12px;font-size:12px;line-height:18px;transition:opacity .14s ease-out,transform .14s ease-out;display:flex;position:absolute;top:calc(100% + 6px);right:0;transform:translateY(-4px)}.IIa07q_compositionStatusWrap:hover .IIa07q_compositionSummary,.IIa07q_compositionStatusWrap:focus-within .IIa07q_compositionSummary{opacity:1;transition-delay:.2s;transform:none}.IIa07q_compositionSummary>strong{color:var(--mn-text);font-size:13px;font-weight:500;line-height:20px}.IIa07q_compositionLayers{flex-wrap:wrap;gap:6px;display:flex}.IIa07q_compositionHint{color:var(--mn-faint)}@media (prefers-reduced-motion:reduce){.IIa07q_compositionSummary{transition:none}}.IIa07q_workspaceMismatch{border:.5px solid color-mix(in srgb, var(--dsw-alias-state-warn-label,var(--mn-warn)) 20%, transparent);border-radius:var(--dsw-radius-sm);min-width:0;min-height:28px;color:var(--dsw-alias-state-warn-label,var(--mn-text));background:var(--dsw-alias-state-warn-tertiary,color-mix(in srgb, var(--mn-warn) 12%, transparent));white-space:nowrap;flex:none;align-items:center;gap:6px;padding:0 3px 0 10px;font-size:12px;font-weight:500;line-height:18px;display:inline-flex}.IIa07q_workspaceMismatch>button{border-radius:var(--dsw-radius-xs);min-height:22px;color:inherit;background:color-mix(in srgb, currentColor 10%, transparent);cursor:pointer;border:0;padding:0 8px;font-size:12px}.IIa07q_workspaceMismatch>button:hover{background:color-mix(in srgb, currentColor 16%, transparent)}.IIa07q_workspace{flex-direction:column;flex:1;min-height:0;display:flex}.IIa07q_topNavigation{border-bottom:.5px solid var(--mn-line-strong);background:var(--mn-surface);flex:none;align-items:flex-end;min-width:0;padding:0 24px;display:flex}.IIa07q_nav{overscroll-behavior-inline:contain;scrollbar-width:none;flex:1;align-items:flex-end;gap:28px;min-width:0;display:flex;overflow-x:auto}.IIa07q_nav::-webkit-scrollbar{display:none}.IIa07q_nav[data-fade-right]:not([data-fade-left]){-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 28px),#0000);mask-image:linear-gradient(90deg,#000 calc(100% - 28px),#0000)}.IIa07q_nav[data-fade-left]:not([data-fade-right]){-webkit-mask-image:linear-gradient(90deg,#0000,#000 28px);mask-image:linear-gradient(90deg,#0000,#000 28px)}.IIa07q_nav[data-fade-left][data-fade-right]{-webkit-mask-image:linear-gradient(90deg,#0000,#000 28px calc(100% - 28px),#0000);mask-image:linear-gradient(90deg,#0000,#000 28px calc(100% - 28px),#0000)}.IIa07q_nav button{min-width:max-content;color:var(--mn-faint);text-align:left;cursor:pointer;transition:color .15s var(--ds-ease-in-out,cubic-bezier(.4, 0, .2, 1)), border-bottom-color .15s var(--ds-ease-in-out,cubic-bezier(.4, 0, .2, 1));background:0 0;border:0;border-bottom:2px solid #0000;align-items:center;gap:6px;margin-bottom:-.5px;padding:10px 0 9px;font-size:13px;font-weight:500;line-height:16px;display:flex;position:relative}.IIa07q_nav button:hover{color:var(--mn-muted)}.IIa07q_nav button[data-active]{color:var(--mn-accent)}.IIa07q_nav button[data-layer-disabled]:not([data-active]){color:var(--mn-caption)}.IIa07q_nav .IIa07q_layerDisabledBadge{border:.5px solid var(--mn-field-line);corner-shape:round;height:18px;color:var(--mn-faint);border-radius:999px;align-items:center;padding:0 6px;font-size:11px;font-style:normal;font-weight:500;line-height:1;display:inline-flex}.IIa07q_canvas{overscroll-behavior-x:contain;overscroll-behavior-y:auto;scroll-behavior:auto;-webkit-overflow-scrolling:touch;background:var(--mn-surface);flex:1;min-width:0;overflow:auto}.IIa07q_page{width:100%;min-height:100%;margin:0 auto;padding:20px 24px 32px;animation:.14s cubic-bezier(.22,1,.36,1) both IIa07q_mnemon-page-fade}@keyframes IIa07q_mnemon-page-fade{0%{opacity:0}}.IIa07q_pageHeader{justify-content:space-between;align-items:flex-start;gap:16px 24px;margin-bottom:16px;display:flex}.IIa07q_pageHeader:has(+[class*=subNav]){margin-bottom:8px}.IIa07q_pageHeader>div:first-child{min-width:0}.IIa07q_pageHeader h2{margin:0;font-size:16px;font-weight:500;line-height:24px}.IIa07q_pageHeader p{max-width:72ch;color:var(--mn-muted);margin:2px 0 0;font-size:13px;line-height:20px}.IIa07q_pageHeaderMeta{flex-wrap:wrap;flex:none;justify-content:flex-end;align-items:center;gap:8px;min-width:0;display:flex}.IIa07q_pageHeaderMeta>code{border:.5px solid var(--mn-field-line);corner-shape:round;height:22px;color:var(--mn-faint);font:500 11px/1 var(--mn-sans);font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:999px;align-items:center;padding:0 8px;display:inline-flex}.IIa07q_pageSpinner{width:20px;height:20px;color:var(--mn-faint);flex:none;place-items:center;display:inline-grid}.IIa07q_pageSpinner>i{border:2px solid color-mix(in srgb, currentColor 25%, transparent);corner-shape:round;border-top-color:currentColor;border-radius:50%;width:14px;height:14px;animation:.9s linear infinite IIa07q_mnemon-spin}.IIa07q_primaryButton,.IIa07q_secondaryButton,.IIa07q_ghostButton,.IIa07q_dangerButton,.IIa07q_dangerSolidButton{border-radius:var(--dsw-radius-md);min-height:32px;color:var(--mn-text);white-space:nowrap;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;gap:4px;padding:0 12px;font-size:13px;font-weight:400;line-height:20px;transition:background-color .12s,color .12s,border-color .12s;display:inline-flex}.IIa07q_primaryButton{color:var(--dsw-alias-label-primary-foreground);background:var(--dsw-alias-button-primary-fill)}.IIa07q_primaryButton:hover:not(:disabled){background:var(--dsw-alias-button-primary-hover)}.IIa07q_secondaryButton{border:.5px solid var(--mn-line-strong)}.IIa07q_secondaryButton:hover:not(:disabled),.IIa07q_ghostButton:hover:not(:disabled){background:var(--mn-hover)}.IIa07q_secondaryButton:active:not(:disabled),.IIa07q_ghostButton:active:not(:disabled){background:var(--mn-pressed)}.IIa07q_dangerButton{color:var(--mn-danger)}.IIa07q_dangerButton:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger,color-mix(in srgb, var(--mn-danger) 8%, transparent))}.IIa07q_dangerSolidButton{color:var(--dsw-static-neutral-00,#fff);background:var(--mn-danger)}.IIa07q_dangerSolidButton:hover:not(:disabled){background:color-mix(in srgb, var(--mn-danger), black 8%)}.IIa07q_shell :where(button:disabled){cursor:not-allowed;opacity:.4}.IIa07q_emptyState{text-align:center;flex-direction:column;justify-content:center;align-items:center;gap:12px;min-height:200px;padding:32px 24px;display:flex}.IIa07q_emptyGlyph{border:.5px solid var(--mn-line-strong);border-radius:var(--dsw-radius-lg);width:48px;height:48px;color:var(--mn-faint);flex:none;place-items:center;font-size:20px;line-height:1;display:grid}.IIa07q_emptyState h3{margin:0 0 4px;font-size:14px;font-weight:500;line-height:22px}.IIa07q_emptyState p{max-width:480px;color:var(--mn-faint);margin:0;font-size:13px;line-height:20px}.IIa07q_sourceManagementSummary{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);grid-template-columns:minmax(220px,1.2fr) minmax(260px,1fr) minmax(220px,1fr);gap:16px;margin-top:12px;padding:16px;display:grid}.IIa07q_sourceManagementIdentity{grid-template-columns:6px minmax(0,1fr);align-items:center;gap:10px;min-width:0;display:grid}.IIa07q_sourceManagementIdentity>span{corner-shape:round;background:var(--mn-success);border-radius:50%;width:6px;height:6px}.IIa07q_sourceManagementSummary[data-availability=degraded] .IIa07q_sourceManagementIdentity>span{background:var(--mn-warn)}.IIa07q_sourceManagementSummary[data-availability=unavailable] .IIa07q_sourceManagementIdentity>span{background:var(--mn-danger)}.IIa07q_sourceManagementIdentity>div{gap:2px;min-width:0;display:grid}.IIa07q_sourceManagementIdentity small,.IIa07q_sourceManagementCapabilities>small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_sourceManagementIdentity strong{text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:500;line-height:20px;overflow:hidden}.IIa07q_sourceManagementIdentity code{color:var(--mn-faint);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.IIa07q_sourceManagementSummary dl{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0;display:grid}.IIa07q_sourceManagementSummary dl>div{border-radius:var(--dsw-radius-sm);background:var(--mn-block-fill);align-content:center;gap:2px;min-width:0;padding:8px 10px;display:grid}.IIa07q_sourceManagementSummary dt{color:var(--mn-faint);font-size:11px;line-height:14px}.IIa07q_sourceManagementSummary dd{text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:13px;line-height:20px;overflow:hidden}.IIa07q_sourceManagementSummary dd code{font-size:12px}.IIa07q_sourceManagementCapabilities{align-content:center;gap:6px;min-width:0;display:grid}.IIa07q_sourceManagementCapabilities>div{flex-wrap:wrap;gap:4px;display:flex}.IIa07q_sourceManagementCapabilities span{corner-shape:round;color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_sourceManagementDiagnostics,.IIa07q_sourceManagementForm{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);margin-top:12px;padding:16px}.IIa07q_sourceManagementDiagnostics h3,.IIa07q_sourceManagementForm h3{margin:0;font-size:14px;font-weight:500;line-height:22px}.IIa07q_sourceManagementDiagnostics ul{color:var(--mn-muted);gap:4px;margin:8px 0 0;padding-left:18px;font-size:12px;line-height:18px;display:grid}.IIa07q_sourceManagementForm>div:first-child p{color:var(--mn-faint);margin:2px 0 0;font-size:12px;line-height:18px}.IIa07q_sourceManagementForm .IIa07q_formGrid label>small,.IIa07q_sourceManagementForm .IIa07q_formGrid .IIa07q_providerFieldControl>small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_sourceManagementForm .IIa07q_formGrid .IIa07q_providerFieldControl{align-content:center}.IIa07q_sourceManagementForm .IIa07q_formGrid input[type=checkbox]{width:16px;min-width:0;height:16px;min-height:0;accent-color:var(--dsw-alias-brand-primary)}.IIa07q_sectionSpinner{z-index:6;width:20px;height:20px;color:var(--mn-faint);place-items:center;display:grid;position:absolute;top:10px;right:10px}.IIa07q_sectionSpinner>i{border:2px solid color-mix(in srgb, currentColor 25%, transparent);corner-shape:round;border-top-color:currentColor;border-radius:50%;width:14px;height:14px;animation:.9s linear infinite IIa07q_mnemon-spin}@keyframes IIa07q_mnemon-spin{to{transform:rotate(360deg)}}.IIa07q_inlineError{margin:0 0 12px}.IIa07q_loading{color:var(--mn-faint);padding:16px 0;font-size:13px}.IIa07q_bodyEdit{gap:12px;padding-top:2px;display:grid}.IIa07q_bodyEdit label,.IIa07q_formGrid>label{color:var(--mn-muted);gap:6px;font-size:12px;font-weight:500;line-height:18px;display:grid}.IIa07q_bodyEdit input,.IIa07q_bodyEdit select,.IIa07q_bodyEdit textarea,.IIa07q_formGrid select,.IIa07q_formGrid input:not([type=checkbox]){border:.5px solid var(--mn-field-line);border-radius:var(--dsw-radius-md);width:100%;min-width:0;min-height:32px;color:var(--mn-text);background:var(--mn-input);outline:0;padding:5px 10px;font-size:13px;font-weight:400;line-height:20px}.IIa07q_bodyEdit textarea{resize:vertical}.IIa07q_bodyEdit input::placeholder,.IIa07q_bodyEdit textarea::placeholder,.IIa07q_formGrid input::placeholder{color:var(--dsw-alias-label-dimmed)}.IIa07q_bodyEdit input:focus,.IIa07q_bodyEdit select:focus,.IIa07q_bodyEdit textarea:focus,.IIa07q_formGrid select:focus,.IIa07q_formGrid input:focus{border-color:var(--mn-accent)}.IIa07q_providerFieldControl{gap:4px;min-width:0;display:grid}.IIa07q_providerFieldControl input[type=checkbox]{width:16px;height:16px;min-height:0;accent-color:var(--dsw-alias-brand-primary);margin:2px 0;padding:0}.IIa07q_bodyDeleteConfirm{gap:16px;display:grid}.IIa07q_bodyDeleteConfirm>p{color:var(--mn-muted);margin:0;font-size:13px;line-height:20px}.IIa07q_bodyDeleteSummary{border-radius:var(--dsw-radius-md);background:color-mix(in srgb, var(--mn-danger) 6%, transparent);gap:4px;padding:12px;display:grid}.IIa07q_bodyDeleteSummary strong{font-size:13px;font-weight:500}.IIa07q_bodyDeleteContent{white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;font-weight:400;line-height:20px}.IIa07q_bodyDeleteSummary span{color:var(--mn-muted);font-size:12px;line-height:18px}.IIa07q_sectionHeading{justify-content:space-between;align-items:center;gap:16px;min-height:36px;margin-bottom:8px;display:flex}.IIa07q_sectionHeading h3{margin:0;font-size:14px;font-weight:500;line-height:22px}.IIa07q_sectionHeading>div>span{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_sectionHeading>strong{corner-shape:round;color:var(--mn-muted);background:var(--mn-fill);font-variant-numeric:tabular-nums;border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_sectionHeading button{border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--mn-caption);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;transition:background-color .12s,color .12s;display:inline-flex}.IIa07q_sectionHeading button:hover:not(:disabled){color:var(--mn-muted);background:var(--mn-hover)}.IIa07q_sectionHeading button:active:not(:disabled){background:var(--mn-pressed)}.IIa07q_runtimeNotice{border-radius:var(--dsw-radius-md);color:var(--mn-success);background:color-mix(in srgb, var(--mn-success) 8%, transparent);margin-bottom:12px;padding:8px 12px;font-size:12px;line-height:18px}.IIa07q_runtimeFootnote{color:var(--mn-faint);margin:12px 2px 0;font-size:12px;line-height:18px}.IIa07q_formGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:12px;display:grid}.IIa07q_listProgress{border-top:.5px solid var(--mn-line);min-height:56px;color:var(--mn-faint);font-variant-numeric:tabular-nums;justify-content:center;align-items:center;gap:12px;margin-top:12px;padding:10px;font-size:12px;line-height:18px;display:flex}.IIa07q_compactListProgress{border-top:.5px solid var(--mn-line);color:var(--mn-faint);text-align:center;font-variant-numeric:tabular-nums;justify-items:stretch;gap:8px;margin-top:8px;padding:10px 2px 2px;font-size:12px;line-height:18px;display:grid}.IIa07q_compactListProgress button{width:100%}.IIa07q_modalPortal{z-index:1000;isolation:isolate;pointer-events:none;position:fixed;inset:0}.IIa07q_modalTheme.IIa07q_modalTheme.IIa07q_modalTheme{width:auto;min-width:0;height:auto;min-height:0;color:var(--mn-text);pointer-events:none;background:0 0;display:block;position:absolute;inset:0;overflow:visible}.IIa07q_modalBackdrop{z-index:0;overscroll-behavior:contain;padding:max(24px, var(--dsh-frame-overlay-top,var(--dsh-frame-top-clearance,24px))) 24px;background:var(--dsw-alias-bg-mask-1);backdrop-filter:var(--dsw-mask-blur);touch-action:none;pointer-events:auto;justify-content:center;align-items:center;animation:.18s ease-out both IIa07q_mnemon-dialog-backdrop-enter;display:flex;position:fixed;inset:0;overflow:hidden}.IIa07q_modal{box-sizing:border-box;border-radius:var(--dsw-radius-panel);background:linear-gradient(var(--mn-layer-2), var(--mn-layer-2)), var(--mn-surface);width:min(640px,100%);min-height:0;max-height:min(860px,100dvh - 32px);box-shadow:var(--dsw-elevation-prominent);touch-action:auto;transform-origin:50% 100%;border:0;flex-direction:column;animation:.2s cubic-bezier(.2,.75,.2,1) both IIa07q_mnemon-dialog-enter;display:flex;overflow:hidden}.IIa07q_modal[data-dragging],.IIa07q_modal[data-closing]{will-change:transform, opacity}.IIa07q_modalBackdrop[data-closing],.IIa07q_modal[data-closing]{pointer-events:none}.IIa07q_modalDragHandle{display:none}.IIa07q_modalWide{width:min(760px,100%)}.IIa07q_modal>header{flex:none;justify-content:space-between;align-items:flex-start;gap:8px;padding:22px 14px 12px 24px;display:flex}.IIa07q_modal>header>div{min-width:0;padding-top:2px}.IIa07q_modal>header h2{margin:0;font-size:16px;font-weight:500;line-height:24px}.IIa07q_modal>header p{overflow-wrap:anywhere;max-width:64ch;color:var(--mn-muted);margin:4px 0 0;font-size:13px;line-height:20px}.IIa07q_modal>header .IIa07q_iconButton{color:var(--mn-muted);flex:none}.IIa07q_modalBody{overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:pan-y;-webkit-overflow-scrolling:touch;flex:auto;min-height:0;padding:8px 24px 16px;scroll-padding-bottom:16px;overflow:hidden auto}.IIa07q_modalFooter{z-index:2;border-top:.5px solid var(--mn-line);background:linear-gradient(var(--mn-layer-2), var(--mn-layer-2)), var(--mn-surface);flex:none;justify-content:flex-end;align-items:center;gap:12px;padding:12px 24px 18px;display:flex;position:relative}.IIa07q_modalFooter button{min-height:36px;padding-inline:14px}.IIa07q_modalFooterMeta{color:var(--mn-faint);margin-right:auto;font-size:12px;line-height:18px}.IIa07q_modalFooterActions{justify-content:flex-end;align-items:center;gap:8px;min-width:0;margin-left:auto;display:flex}@keyframes IIa07q_mnemon-dialog-backdrop-enter{0%{opacity:0}}@keyframes IIa07q_mnemon-dialog-enter{0%{opacity:0;transform:translateY(8px)scale(.985)}}@keyframes IIa07q_mnemon-sheet-enter{0%{transform:translateY(calc(100% + 32px))}to{transform:translate3d(0, var(--mn-modal-drag-y,0px), 0)}}@keyframes IIa07q_mnemon-metadata-sweep{to{transform:translate(120%)}}@keyframes IIa07q_mnemon-metadata-refreshed{0%{border-color:color-mix(in srgb, var(--mn-accent) 60%, var(--mn-card-line));box-shadow:0 0 0 2px color-mix(in srgb, var(--mn-accent) 14%, transparent)}to{border-color:var(--mn-card-line);box-shadow:0 0 #0000}}.IIa07q_healthStrip{grid-template-columns:repeat(auto-fit,minmax(168px,1fr));gap:10px;margin-bottom:16px;display:grid;position:relative}.IIa07q_asyncStatusBlock{min-width:0;min-height:36px;position:relative}.IIa07q_healthStrip article{box-sizing:border-box;border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);background:var(--mn-surface);align-items:flex-start;gap:10px;min-width:0;min-height:76px;padding:13px 14px;transition:border-color .14s,background-color .14s;display:flex}.IIa07q_healthStrip article:hover{border-color:var(--mn-line-strong)}.IIa07q_healthStrip article[data-interactive]{cursor:pointer;position:relative}.IIa07q_healthStrip article[data-interactive]:hover{border-color:var(--mn-field-line);background:var(--mn-hover)}.IIa07q_healthStrip article[data-interactive]:has(.IIa07q_healthCardAction:focus-visible){outline:var(--dsw-focus-ring-width,2px) solid var(--mn-focus);outline-offset:2px}.IIa07q_healthStrip article>div{flex:1;min-width:0}.IIa07q_healthCardAction{appearance:none;width:100%;color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;justify-content:space-between;align-items:center;gap:6px;margin-bottom:2px;padding:0;display:flex}.IIa07q_healthCardAction:after{content:\"\";border-radius:inherit;position:absolute;inset:0}.IIa07q_healthCardAction:focus-visible{outline:none}.IIa07q_healthCardAction small{margin-bottom:0}.IIa07q_healthCardChevron{color:var(--mn-caption);opacity:.65;flex:none;font-size:13px;line-height:1;transition:transform .15s cubic-bezier(.22,1,.36,1),opacity .14s,color .14s}.IIa07q_healthStrip article[data-interactive]:hover .IIa07q_healthCardChevron,.IIa07q_healthStrip article[data-interactive]:has(.IIa07q_healthCardAction:focus-visible) .IIa07q_healthCardChevron{color:var(--mn-muted);opacity:1;transform:translate(2px)}.IIa07q_healthStrip small{color:var(--mn-faint);margin-bottom:2px;font-size:12px;line-height:18px;display:block}.IIa07q_healthStrip strong{overflow-wrap:break-word;font-variant-numeric:tabular-nums;font-size:14px;font-weight:500;line-height:20px;display:block}.IIa07q_healthStrip p{color:var(--mn-faint);text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums;margin:2px 0 0;font-size:12px;line-height:18px;overflow:hidden}.IIa07q_healthIndicator{corner-shape:round;border-radius:50%;flex:none;width:6px;height:6px;margin-top:6px}.IIa07q_healthGood{background:var(--mn-success)}.IIa07q_healthMuted{background:var(--mn-idle)}.IIa07q_providerHealth{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);margin-bottom:16px;padding:16px;transition:border-color .12s,background-color .12s}.IIa07q_providerHealth:hover{border-color:var(--mn-line-strong)}.IIa07q_providerHealthList{margin-top:8px}.IIa07q_providerHealthList article{align-items:center;gap:12px;min-width:0;min-height:56px;padding:8px 0;display:flex}.IIa07q_providerHealthList article+article{border-top:.5px solid var(--mn-line)}.IIa07q_providerHealthOff{border-top:.5px solid var(--mn-line);min-width:0;color:var(--mn-faint);justify-content:space-between;align-items:center;gap:12px;margin-top:4px;padding-top:10px;font-size:12px;line-height:18px;display:flex}.IIa07q_providerHealthMark{box-sizing:border-box;border:.5px solid var(--mn-line-strong);border-radius:var(--dsw-radius-md);flex:none;place-items:center;width:36px;height:36px;padding:6px;display:grid;overflow:hidden}.IIa07q_providerHealthMark>img,.IIa07q_providerHealthMark>svg{object-fit:contain;border-radius:4px;width:100%;height:100%;display:block}.IIa07q_providerHealthCopy{flex:1;gap:0;min-width:0;display:grid}.IIa07q_providerHealthCopy strong{text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:500;line-height:20px;overflow:hidden}.IIa07q_providerHealthCopy small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_providerHealthCopy p{color:var(--mn-danger);text-overflow:ellipsis;white-space:nowrap;margin:2px 0 0;font-size:12px;line-height:18px;overflow:hidden}.IIa07q_providerHealthMeta{flex:none;align-items:center;gap:6px;display:flex}.IIa07q_providerHealthMeta small{color:var(--mn-faint);font-variant-numeric:tabular-nums;font-size:12px;line-height:18px}.IIa07q_providerHealthSignal{corner-shape:round;background:var(--mn-idle);border-radius:50%;width:6px;height:6px}.IIa07q_providerHealthList article[data-status=healthy] .IIa07q_providerHealthSignal{background:var(--mn-success)}.IIa07q_providerHealthList article[data-status=unhealthy] .IIa07q_providerHealthSignal{background:var(--mn-danger)}.IIa07q_providerHealthList article[data-status=idle] .IIa07q_providerHealthSignal{background:var(--mn-idle)}.IIa07q_storageDomains{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);margin-bottom:16px;padding:16px;transition:border-color .12s,background-color .12s}.IIa07q_storageDomains:hover{border-color:var(--mn-line-strong)}.IIa07q_storageRoot{border-radius:var(--dsw-radius-md);background:var(--mn-block-fill);justify-content:space-between;align-items:center;gap:16px;min-width:0;margin-top:12px;padding:10px 12px;display:flex}.IIa07q_storageRoot>div:first-child{min-width:0;color:var(--mn-muted);grid-template-columns:minmax(0,1fr);gap:2px;font-size:12px;line-height:18px;display:grid}.IIa07q_storageRoot>div:first-child>span:first-child,.IIa07q_storageRoot small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_storageRoot code{color:var(--mn-muted);text-overflow:ellipsis;white-space:nowrap;font-size:12px;overflow:hidden}.IIa07q_storageRoot>div:last-child{flex:none;justify-items:end;gap:2px;display:grid}.IIa07q_storageRoot strong{font-variant-numeric:tabular-nums;color:var(--mn-text);font-size:13px;font-weight:500}.IIa07q_storageAreaGrid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:8px;display:grid}.IIa07q_storageAreaGrid article{box-sizing:border-box;border-radius:var(--dsw-radius-md);background:var(--mn-block-fill);border:0;flex-direction:column;min-width:0;min-height:122px;padding:12px 14px;transition:background-color .12s;display:flex}.IIa07q_storageAreaGrid article:hover{background:var(--mn-hover)}.IIa07q_storageAreaGrid article>header{justify-content:space-between;align-items:center;gap:8px;display:flex}.IIa07q_storageAreaGrid article>header>div{align-items:center;gap:8px;min-width:0;display:flex}.IIa07q_storageAreaGrid article>header span{corner-shape:round;background:var(--mn-idle);border-radius:50%;flex:none;width:6px;height:6px}.IIa07q_storageAreaGrid article[data-status=ready]>header span{background:var(--mn-success)}.IIa07q_storageAreaGrid article[data-status=invalid]>header span{background:var(--mn-danger)}.IIa07q_storageAreaGrid article>header strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;overflow:hidden}.IIa07q_storageAreaGrid article>header em{color:var(--mn-faint);white-space:nowrap;font-size:11px;font-style:normal;line-height:14px}.IIa07q_storageAreaMetric{align-items:baseline;gap:6px;margin-top:10px;display:flex}.IIa07q_storageAreaMetric strong{font-variant-numeric:tabular-nums;font-size:20px;font-weight:500;line-height:26px}.IIa07q_storageAreaMetric span{color:var(--mn-faint);font-size:12px}.IIa07q_storageAreaMetric code{color:var(--mn-faint);font-variant-numeric:tabular-nums;margin-left:auto;font-size:11px}.IIa07q_storageAreaGrid article>p{min-height:18px;color:var(--mn-faint);margin:4px 0 10px;font-size:12px;line-height:18px}.IIa07q_storagePath{border-top:.5px solid var(--mn-line);min-width:0;color:var(--mn-faint);align-items:center;margin-top:auto;padding-top:8px;font-size:11px;line-height:16px;display:flex;overflow:hidden}.IIa07q_storagePath [data-path-label]{font-size:11px;line-height:16px}.IIa07q_storageAreaGrid article>small{color:var(--mn-danger);margin-top:6px;font-size:12px;line-height:18px;display:block}.IIa07q_storageUnavailable{border-radius:var(--dsw-radius-md);min-height:120px;color:var(--mn-muted);background:var(--mn-block-fill);text-align:center;place-content:center;gap:4px;margin-top:12px;display:grid}.IIa07q_storageUnavailable strong{font-size:13px;font-weight:500}.IIa07q_storageUnavailable p{max-width:520px;color:var(--mn-faint);margin:0;font-size:12px;line-height:18px}.IIa07q_storageFootnote{color:var(--mn-faint);margin:12px 0 0;font-size:12px;line-height:18px}.IIa07q_statusSectionHeader{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.IIa07q_statusSectionHeader h3{margin:0;font-size:14px;font-weight:500;line-height:22px}.IIa07q_statusSectionHeader p{max-width:640px;color:var(--mn-faint);margin:2px 0 0;font-size:12px;line-height:18px}.IIa07q_phaseBadge{corner-shape:round;height:22px;color:var(--mn-muted);background:var(--mn-fill);font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:999px;flex:none;align-items:center;padding:0 8px;font-size:11px;font-weight:500;line-height:1;display:inline-flex}.IIa07q_statusHeaderActions{align-items:center;gap:8px;display:flex}.IIa07q_versionDialogBody{grid-template-columns:minmax(0,1fr);gap:12px;display:grid}.IIa07q_versionChecking{min-height:112px;color:var(--mn-muted);justify-content:center;align-items:center;gap:10px;font-size:13px;display:flex}.IIa07q_versionChecking span{border:2px solid color-mix(in srgb, currentColor 25%, transparent);corner-shape:round;border-top-color:currentColor;border-radius:50%;width:14px;height:14px;animation:.9s linear infinite IIa07q_mnemon-spin}.IIa07q_versionError,.IIa07q_versionResult{border-radius:var(--dsw-radius-md);color:var(--mn-danger);background:color-mix(in srgb, var(--mn-danger) 8%, transparent);padding:10px 12px}.IIa07q_versionResult{color:var(--mn-success);background:color-mix(in srgb, var(--mn-success) 8%, transparent)}.IIa07q_versionError strong,.IIa07q_versionResult strong{font-size:13px;font-weight:500}.IIa07q_versionError p,.IIa07q_versionResult p{color:var(--mn-muted);margin:2px 0 0;font-size:12px;line-height:18px}.IIa07q_versionList{grid-template-columns:minmax(0,1fr);gap:8px;display:grid}.IIa07q_versionList article{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);padding:12px 14px}.IIa07q_versionList article>header{justify-content:space-between;align-items:center;gap:12px;display:flex}.IIa07q_versionList article>header>div{align-items:center;gap:8px;min-width:0;display:flex}.IIa07q_versionList article>header strong{font-size:14px;font-weight:500;line-height:22px}.IIa07q_versionList article>header span{corner-shape:round;height:20px;color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;align-items:center;padding:0 8px;font-size:11px;font-weight:500;line-height:1;display:inline-flex}.IIa07q_versionList article>header em{color:var(--mn-success);white-space:nowrap;align-items:center;font-size:12px;font-style:normal;line-height:1;display:inline-flex}.IIa07q_versionList article[data-outdated]>header em{color:var(--mn-accent)}.IIa07q_versionNumbers{flex-wrap:wrap;align-items:flex-end;gap:8px 24px;margin-top:10px;display:flex}.IIa07q_versionNumbers>div{gap:2px;display:grid}.IIa07q_versionNumbers small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_versionNumbers code{font-variant-numeric:tabular-nums;font-size:13px}.IIa07q_versionNumbers>span{color:var(--mn-faint);padding-bottom:1px}.IIa07q_versionLocation{min-width:0;color:var(--mn-faint);align-items:center;gap:6px;margin-top:8px;font-size:12px;line-height:18px;display:flex}.IIa07q_versionLocation>span{flex:none}.IIa07q_versionLocation>code{min-width:0;color:inherit;text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.IIa07q_versionList article>footer{border-top:.5px solid var(--mn-line);justify-content:space-between;align-items:center;gap:16px;margin-top:10px;padding-top:10px;display:flex}.IIa07q_versionList article>footer p{max-width:470px;color:var(--mn-muted);margin:0;font-size:12px;line-height:18px}.IIa07q_versionList article>footer button{flex:none}.IIa07q_versionList article>header em[data-state=unknown],.IIa07q_versionList article>header em[data-state=local],.IIa07q_versionList article>header em[data-state=missing]{color:var(--mn-faint)}.IIa07q_versionList article>header em[data-state=restart]{color:var(--mn-accent)}.IIa07q_versionNotice{color:var(--mn-muted);margin:8px 0 0;font-size:12px;line-height:18px}.IIa07q_versionGuidance{border-radius:var(--dsw-radius-md);background:var(--mn-block-fill);gap:6px;min-width:0;margin-top:10px;padding:10px 12px;display:grid}.IIa07q_versionGuidance>strong{font-size:13px;font-weight:500}.IIa07q_versionGuidance>p{color:var(--mn-muted);margin:0;font-size:12px;line-height:18px}.IIa07q_versionGuidance>a{color:var(--dsw-alias-link,var(--mn-accent));justify-self:start;font-size:12px}.IIa07q_versionGuidanceDetails{min-width:0;color:var(--mn-muted);font-size:12px;line-height:18px}.IIa07q_versionGuidanceDetails>summary{cursor:pointer}.IIa07q_versionGuidanceDetails>p{margin:8px 0}.IIa07q_versionGuidanceDetails>a{color:var(--dsw-alias-link,var(--mn-accent))}.IIa07q_versionCommand{border-radius:var(--dsw-radius-sm);background:var(--mn-layer-1);flex-wrap:wrap;align-items:center;gap:8px;min-width:0;padding:8px 10px;display:flex}.IIa07q_versionCommand>code{overflow-wrap:anywhere;white-space:pre-wrap;user-select:text;flex:1;min-width:0;font-size:12px}.IIa07q_versionCommand>button{flex:none}.IIa07q_versionCommand>small{color:var(--mn-faint);flex-basis:100%;font-size:12px}.IIa07q_versionPackages{border-top:.5px solid var(--mn-line);min-width:0;margin-top:12px}.IIa07q_versionPackagesToggle{width:100%;min-height:36px;color:var(--mn-text);text-align:start;cursor:pointer;background:0 0;border:0;flex-wrap:wrap;align-items:center;gap:8px;padding:8px 0 2px;display:flex}.IIa07q_versionPackagesToggle>strong{font-size:13px;font-weight:500}.IIa07q_versionPackagesToggle>small{color:var(--mn-faint);margin-left:auto;font-size:12px}.IIa07q_versionPackages h4{color:var(--mn-faint);margin:16px 0 8px;font-size:12px;font-weight:500;line-height:18px}.IIa07q_versionPackages ul{gap:8px;margin:0;padding:0;list-style:none;display:grid}.IIa07q_versionPackage{border:.5px solid var(--mn-line);border-radius:var(--dsw-radius-md);min-width:0;padding:10px 12px}.IIa07q_versionPackageHeader{flex-wrap:wrap;justify-content:space-between;align-items:baseline;gap:6px 12px;display:flex}.IIa07q_versionPackageHeader strong{overflow-wrap:anywhere;min-width:0;font-size:13px;font-weight:500}.IIa07q_versionPackageHeader em{color:var(--mn-faint);font-size:12px;font-style:normal}.IIa07q_versionPackageHeader em[data-state=available],.IIa07q_versionPackageHeader em[data-state=restart]{color:var(--mn-accent)}.IIa07q_versionPackageHeader em[data-state=current]{color:var(--mn-success)}.IIa07q_versionPackageMeta,.IIa07q_versionPackageNumbers{color:var(--mn-faint);flex-wrap:wrap;gap:6px 14px;margin-top:6px;font-size:12px;line-height:18px;display:flex}.IIa07q_versionPackageNumbers code{color:var(--mn-text)}.IIa07q_versionPackageAction{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-top:8px;display:flex}.IIa07q_versionPackageAction p{min-width:150px;color:var(--mn-muted);flex:1;margin:0;font-size:12px;line-height:18px}.IIa07q_versionPackageAction button{flex:none}@media (width<=1000px){.IIa07q_sourceManagementSummary{grid-template-columns:1fr 1fr}.IIa07q_sourceManagementCapabilities{grid-column:1/-1}.IIa07q_storageAreaGrid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width<=760px){.IIa07q_shell{min-height:0;overflow:hidden}.IIa07q_sourceManagementSummary{grid-template-columns:1fr}.IIa07q_sourceManagementSummary dl,.IIa07q_sourceManagementCapabilities{grid-column:auto}.IIa07q_masthead{padding:8px 16px 2px}.IIa07q_masthead[data-window-drag]{padding-left:calc(16px + var(--dsh-frame-leading-clearance,0px))}.IIa07q_alert,.IIa07q_notice{margin-inline:16px}.IIa07q_topNavigation{padding:0 16px}.IIa07q_workspacePicker>[data-part=label]{display:none}.IIa07q_workspacePicker button{width:min(170px,32vw)}.IIa07q_modalBackdrop{padding:max(10px, env(safe-area-inset-top,0px)) 0 0;align-items:flex-end}.IIa07q_modal,.IIa07q_modalWide{width:100vw;max-height:calc(100vh - max(10px, env(safe-area-inset-top,0px)));border-radius:var(--dsw-radius-xl) var(--dsw-radius-xl) 0 0;transform:translate3d(0, var(--mn-modal-drag-y,0px), 0);animation-name:IIa07q_mnemon-sheet-enter;animation-duration:.34s;animation-timing-function:cubic-bezier(.2,.82,.2,1)}.IIa07q_modalDragHandle{cursor:grab;touch-action:none;user-select:none;flex:none;place-items:center;width:100%;height:28px;display:grid}.IIa07q_modalDragHandle span{background:var(--mn-line-strong);border-radius:999px;width:36px;height:4px;transition:width .14s,background-color .14s}.IIa07q_modal[data-dragging] .IIa07q_modalDragHandle{cursor:grabbing}.IIa07q_modal[data-dragging] .IIa07q_modalDragHandle span{background:var(--dsw-alias-border-l4);width:44px}.IIa07q_modal>header{padding:10px max(14px, env(safe-area-inset-right,0px)) 12px max(14px, env(safe-area-inset-left,0px));gap:12px}.IIa07q_modal>header p{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.IIa07q_modal>header .IIa07q_iconButton{width:44px;height:44px;margin:-4px -5px -4px 0}.IIa07q_modalBody{padding:14px max(14px, env(safe-area-inset-right,0px)) 16px max(14px, env(safe-area-inset-left,0px));scrollbar-gutter:auto;scroll-padding-bottom:16px}.IIa07q_modalBody button{min-height:44px}.IIa07q_modalFooter{padding:10px max(14px, env(safe-area-inset-right,0px)) calc(10px + env(safe-area-inset-bottom,0px)) max(14px, env(safe-area-inset-left,0px));flex-direction:column;align-items:stretch;gap:8px}.IIa07q_modalFooterMeta{max-width:none;margin:0}.IIa07q_modalFooterActions{grid-template-columns:minmax(82px,.55fr) minmax(0,1.45fr);gap:8px;width:100%;margin:0;display:grid}.IIa07q_modalFooterActions button{white-space:normal;min-width:0;min-height:44px;padding-block:8px}.IIa07q_versionList article>footer{flex-direction:column;align-items:stretch}.IIa07q_nav{gap:22px}.IIa07q_page{padding:16px 16px 24px}.IIa07q_pageHeader{grid-template-columns:minmax(0,1fr);gap:10px;display:grid}.IIa07q_pageHeaderMeta{justify-content:space-between;align-items:center;width:100%}.IIa07q_healthStrip{grid-template-columns:repeat(2,minmax(0,1fr))}.IIa07q_providerHealthMeta{flex-direction:column;align-items:flex-end;gap:4px}.IIa07q_storageRoot{flex-direction:column;align-items:flex-start}.IIa07q_storageRoot>div:last-child{justify-items:start}.IIa07q_storageAreaGrid{grid-template-columns:1fr}}@media (width<=520px){.IIa07q_nav{scroll-snap-type:x proximity;gap:18px}.IIa07q_nav button{scroll-snap-align:start}.IIa07q_pageHeaderMeta{justify-content:space-between;align-items:center;width:100%}.IIa07q_pageHeaderMeta>code{align-items:center;display:inline-flex}.IIa07q_pageHeaderMeta>button{flex:none}.IIa07q_healthStrip{grid-template-columns:minmax(0,1fr)}.IIa07q_emptyState{min-height:180px;padding:24px 16px}.IIa07q_formGrid{grid-template-columns:1fr}}@media (width<=360px){.IIa07q_modalFooterActions{grid-template-columns:1fr}}@media (height<=420px){.IIa07q_modal>header p{white-space:nowrap;text-overflow:ellipsis;display:block;overflow:hidden}}@media (width>=761px) and (height<=560px){.IIa07q_modalBackdrop{padding:8px}}@supports (height:100dvh){@media (width<=760px){.IIa07q_modal,.IIa07q_modalWide{max-height:calc(100dvh - max(10px, env(safe-area-inset-top,0px)))}}}@media (width<=1000px) and (height<=760px){.IIa07q_shell{min-height:0}.IIa07q_masthead{min-height:44px}}@media (width<=760px) and (pointer:coarse){.IIa07q_shell input,.IIa07q_shell select,.IIa07q_shell textarea{font-size:16px!important}}@media (pointer:coarse){.IIa07q_modal>header .IIa07q_iconButton{width:44px;min-width:44px;height:44px;min-height:44px}.IIa07q_modalBody button,.IIa07q_modalFooter button{min-height:44px}}@media (prefers-reduced-motion:reduce){.IIa07q_shell *,.IIa07q_shell :before,.IIa07q_shell :after{scroll-behavior:auto!important;transition-duration:.01ms!important;animation-duration:.01ms!important;animation-iteration-count:1!important}.IIa07q_modalBackdrop,.IIa07q_modal{animation:none!important}}.IIa07q_page[data-source-page]>.IIa07q_workspacePicker{margin-bottom:16px}.IIa07q_page[data-source-page] .IIa07q_page{width:100%;min-height:0;margin:0;padding:0;animation:none}@container IIa07q_mnemon-workbench (width<=927px){.IIa07q_healthStrip{grid-template-columns:repeat(3,minmax(0,1fr))}}@container IIa07q_mnemon-workbench (width<=680px){.IIa07q_healthStrip{grid-template-columns:repeat(2,minmax(0,1fr))}}@container IIa07q_mnemon-workbench (width<=520px){.IIa07q_masthead{flex-wrap:wrap;gap:4px 8px;min-height:0;padding:8px 16px 2px}.IIa07q_masthead[data-window-drag]{padding-left:calc(16px + var(--dsh-frame-leading-clearance,0px))}.IIa07q_shell .IIa07q_brand{display:contents}.IIa07q_brand h1{text-overflow:ellipsis;white-space:nowrap;flex:1 1 0;min-width:0;overflow:hidden}.IIa07q_backButton>span,.IIa07q_storageMode{display:none}.IIa07q_backButton{min-width:28px;padding-inline:4px}.IIa07q_shell .IIa07q_masthead .IIa07q_headerActions{margin-left:auto}.IIa07q_shell .IIa07q_masthead .IIa07q_compositionStatus>span:not([data-state]){display:none}.IIa07q_shell .IIa07q_masthead .IIa07q_statusCluster>.IIa07q_iconButton{display:inline-flex}.IIa07q_shell .IIa07q_masthead .IIa07q_workspacePicker{flex:1 0 100%;order:1}.IIa07q_shell .IIa07q_masthead .IIa07q_workspacePicker>[data-part=label]{display:none}.IIa07q_shell .IIa07q_masthead .IIa07q_workspacePicker>:last-child{flex:1;min-width:0}.IIa07q_shell .IIa07q_masthead .IIa07q_workspacePicker button{width:100%;min-width:0}.IIa07q_shell .IIa07q_masthead .IIa07q_workspaceMismatch{flex:1 0 100%;order:2}.IIa07q_shell .IIa07q_masthead .IIa07q_workspaceMismatch>span{display:inline}.IIa07q_alert,.IIa07q_notice{margin-inline:16px}.IIa07q_topNavigation{padding-inline:16px}.IIa07q_healthStrip{grid-template-columns:minmax(0,1fr)}.IIa07q_noticeToggle{border-radius:var(--dsw-radius-md);min-width:0;min-height:28px;color:var(--dsw-alias-state-warn-label,var(--mn-text));background:var(--dsw-alias-state-warn-tertiary,color-mix(in srgb, var(--mn-warn) 12%, transparent));text-align:left;cursor:pointer;border:0;justify-content:space-between;align-items:center;gap:8px;margin:8px 16px 0;padding:4px 12px;font-size:12px;line-height:18px;display:flex}.IIa07q_noticeToggle>span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.IIa07q_noticeToggle>svg{flex:none;transform:rotate(-90deg)}.IIa07q_noticeContents{display:none}.IIa07q_noticeGroup[data-expanded] .IIa07q_noticeContents{display:flex}.IIa07q_noticeGroup[data-expanded] .IIa07q_noticeToggle>svg{transform:rotate(90deg)}}@media (pointer:coarse){.IIa07q_masthead :is(button,select),.IIa07q_noticeToggle,.IIa07q_nav button{min-height:44px}.IIa07q_sectionHeading button{min-width:44px;min-height:44px}.IIa07q_primaryButton,.IIa07q_secondaryButton,.IIa07q_ghostButton,.IIa07q_dangerButton,.IIa07q_dangerSolidButton,.IIa07q_page :is(input:not([type=checkbox]):not([type=radio]),select,textarea){min-height:44px}.IIa07q_canvas{overscroll-behavior:contain}}.IIa07q_composerNotice{color:var(--dsw-alias-label-secondary);justify-content:center;align-items:center;gap:12px;padding:8px 16px;font-size:12px;display:flex}.IIa07q_composerToggle{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-md);color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-base);font:inherit;cursor:pointer;flex:none;padding:5px 9px;font-size:12px}.IIa07q_composerToggle:focus-visible{outline:2px solid var(--dsw-alias-state-business-primary);outline-offset:2px}:where(.IIa07q_shell[data-mnemon-composer]) .IIa07q_page{padding-bottom:var(--mn-composer-inset)}"; const tagId$14 = "dsh-brain-mnemon/src/client/MnemonView.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$14) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$14; document.head.appendChild(tag); } if (tag.textContent !== css$18) tag.textContent = css$18; } var MnemonView_module_css_default = { "alert": "IIa07q_alert", "asyncStatusBlock": "IIa07q_asyncStatusBlock", "backButton": "IIa07q_backButton", "bodyDeleteConfirm": "IIa07q_bodyDeleteConfirm", "bodyDeleteContent": "IIa07q_bodyDeleteContent", "bodyDeleteSummary": "IIa07q_bodyDeleteSummary", "bodyEdit": "IIa07q_bodyEdit", "brand": "IIa07q_brand", "canvas": "IIa07q_canvas", "checking": "IIa07q_checking", "compactListProgress": "IIa07q_compactListProgress", "composerNotice": "IIa07q_composerNotice", "composerToggle": "IIa07q_composerToggle", "compositionHint": "IIa07q_compositionHint", "compositionLayers": "IIa07q_compositionLayers", "compositionStatus": "IIa07q_compositionStatus", "compositionStatusWrap": "IIa07q_compositionStatusWrap", "compositionStrategy": "IIa07q_compositionStrategy", "compositionSummary": "IIa07q_compositionSummary", "dangerButton": "IIa07q_dangerButton", "dangerSolidButton": "IIa07q_dangerSolidButton", "emptyGlyph": "IIa07q_emptyGlyph", "emptyState": "IIa07q_emptyState", "formGrid": "IIa07q_formGrid", "ghostButton": "IIa07q_ghostButton", "headerActions": "IIa07q_headerActions", "healthCardAction": "IIa07q_healthCardAction", "healthCardChevron": "IIa07q_healthCardChevron", "healthGood": "IIa07q_healthGood", "healthIndicator": "IIa07q_healthIndicator", "healthMuted": "IIa07q_healthMuted", "healthStrip": "IIa07q_healthStrip", "iconButton": "IIa07q_iconButton", "inlineError": "IIa07q_inlineError", "layerDisabledBadge": "IIa07q_layerDisabledBadge", "listProgress": "IIa07q_listProgress", "loading": "IIa07q_loading", "masthead": "IIa07q_masthead", "mnemon-dialog-backdrop-enter": "IIa07q_mnemon-dialog-backdrop-enter", "mnemon-dialog-enter": "IIa07q_mnemon-dialog-enter", "mnemon-metadata-refreshed": "IIa07q_mnemon-metadata-refreshed", "mnemon-metadata-sweep": "IIa07q_mnemon-metadata-sweep", "mnemon-page-fade": "IIa07q_mnemon-page-fade", "mnemon-sheet-enter": "IIa07q_mnemon-sheet-enter", "mnemon-spin": "IIa07q_mnemon-spin", "mnemon-workbench": "IIa07q_mnemon-workbench", "modal": "IIa07q_modal", "modalBackdrop": "IIa07q_modalBackdrop", "modalBody": "IIa07q_modalBody", "modalDragHandle": "IIa07q_modalDragHandle", "modalFooter": "IIa07q_modalFooter", "modalFooterActions": "IIa07q_modalFooterActions", "modalFooterMeta": "IIa07q_modalFooterMeta", "modalPortal": "IIa07q_modalPortal", "modalTheme": "IIa07q_modalTheme", "modalWide": "IIa07q_modalWide", "nav": "IIa07q_nav", "notice": "IIa07q_notice", "noticeContents": "IIa07q_noticeContents", "noticeGroup": "IIa07q_noticeGroup", "noticeToggle": "IIa07q_noticeToggle", "page": "IIa07q_page", "pageHeader": "IIa07q_pageHeader", "pageHeaderMeta": "IIa07q_pageHeaderMeta", "pageSpinner": "IIa07q_pageSpinner", "phaseBadge": "IIa07q_phaseBadge", "primaryButton": "IIa07q_primaryButton", "providerFieldControl": "IIa07q_providerFieldControl", "providerHealth": "IIa07q_providerHealth", "providerHealthCopy": "IIa07q_providerHealthCopy", "providerHealthList": "IIa07q_providerHealthList", "providerHealthMark": "IIa07q_providerHealthMark", "providerHealthMeta": "IIa07q_providerHealthMeta", "providerHealthOff": "IIa07q_providerHealthOff", "providerHealthSignal": "IIa07q_providerHealthSignal", "runtimeFootnote": "IIa07q_runtimeFootnote", "runtimeNotice": "IIa07q_runtimeNotice", "secondaryButton": "IIa07q_secondaryButton", "sectionHeading": "IIa07q_sectionHeading", "sectionSpinner": "IIa07q_sectionSpinner", "shell": "IIa07q_shell", "sourceManagementCapabilities": "IIa07q_sourceManagementCapabilities", "sourceManagementDiagnostics": "IIa07q_sourceManagementDiagnostics", "sourceManagementForm": "IIa07q_sourceManagementForm", "sourceManagementIdentity": "IIa07q_sourceManagementIdentity", "sourceManagementSummary": "IIa07q_sourceManagementSummary", "statusCluster": "IIa07q_statusCluster", "statusHeaderActions": "IIa07q_statusHeaderActions", "statusSectionHeader": "IIa07q_statusSectionHeader", "storageAreaGrid": "IIa07q_storageAreaGrid", "storageAreaMetric": "IIa07q_storageAreaMetric", "storageDomains": "IIa07q_storageDomains", "storageFootnote": "IIa07q_storageFootnote", "storageMode": "IIa07q_storageMode", "storagePath": "IIa07q_storagePath", "storageRoot": "IIa07q_storageRoot", "storageUnavailable": "IIa07q_storageUnavailable", "topNavigation": "IIa07q_topNavigation", "versionChecking": "IIa07q_versionChecking", "versionCommand": "IIa07q_versionCommand", "versionDialogBody": "IIa07q_versionDialogBody", "versionError": "IIa07q_versionError", "versionGuidance": "IIa07q_versionGuidance", "versionGuidanceDetails": "IIa07q_versionGuidanceDetails", "versionList": "IIa07q_versionList", "versionLocation": "IIa07q_versionLocation", "versionNotice": "IIa07q_versionNotice", "versionNumbers": "IIa07q_versionNumbers", "versionPackage": "IIa07q_versionPackage", "versionPackageAction": "IIa07q_versionPackageAction", "versionPackageHeader": "IIa07q_versionPackageHeader", "versionPackageMeta": "IIa07q_versionPackageMeta", "versionPackageNumbers": "IIa07q_versionPackageNumbers", "versionPackages": "IIa07q_versionPackages", "versionPackagesToggle": "IIa07q_versionPackagesToggle", "versionResult": "IIa07q_versionResult", "workspace": "IIa07q_workspace", "workspaceMismatch": "IIa07q_workspaceMismatch", "workspacePicker": "IIa07q_workspacePicker" }; const css$17 = "._Bh55G_shell._Bh55G_shell{background:var(--mn-surface);font-family:var(--dsw-font-family)}._Bh55G_shell ._Bh55G_masthead{background:var(--mn-surface)}._Bh55G_shell ._Bh55G_brand{min-width:0}._Bh55G_shell ._Bh55G_headerActions{gap:8px}._Bh55G_shell ._Bh55G_statusCluster{min-height:28px}._Bh55G_shell ._Bh55G_workspacePicker{flex:none}._Bh55G_shell ._Bh55G_workspaceMismatch{justify-content:flex-start}._Bh55G_shell ._Bh55G_topNavigation{background:var(--mn-surface);gap:0;min-height:0}._Bh55G_shell ._Bh55G_nav{padding-right:0}._Bh55G_shell ._Bh55G_nav button[data-active]{color:var(--dsw-alias-state-business-primary);border-bottom-color:var(--dsw-alias-state-business-primary)}._Bh55G_shell ._Bh55G_modalBackdrop{z-index:1000}._Bh55G_shell ._Bh55G_modal{flex-direction:column;max-height:min(860px,100dvh - 32px);display:flex;overflow:hidden}._Bh55G_shell ._Bh55G_modal._Bh55G_modalWide{width:min(760px,100%)}._Bh55G_shell ._Bh55G_modal>[class*=modalBody]{overscroll-behavior:contain;scrollbar-gutter:stable;touch-action:pan-y;-webkit-overflow-scrolling:touch;flex:auto;min-height:0;padding-bottom:16px;scroll-padding-bottom:16px;overflow:hidden auto}._Bh55G_shell ._Bh55G_modal>[class*=modalFooter]{z-index:2;border-top:.5px solid var(--mn-line);background:linear-gradient(var(--mn-layer-2), var(--mn-layer-2)), var(--mn-surface);flex:none;padding:12px 24px 18px;position:relative}._Bh55G_shell ._Bh55G_canvas{background:var(--mn-surface)}._Bh55G_shell button,._Bh55G_shell input,._Bh55G_shell select,._Bh55G_shell textarea{font-family:var(--dsw-font-family)}._Bh55G_shell textarea{font-family:var(--dsw-font-family);font-size:13px;font-weight:400}._Bh55G_shell select{cursor:pointer;font-weight:400}._Bh55G_shell textarea{line-height:20px}._Bh55G_shell ._Bh55G_memoryWorkspace{z-index:12;border-bottom:.5px solid var(--dsw-alias-border-l2);background:var(--mn-surface);flex:none;margin:-20px -24px 16px;padding:20px 24px 0;position:sticky;top:0}._Bh55G_shell ._Bh55G_memoryWorkspace>[class*=pageHeader],._Bh55G_shell ._Bh55G_memoryWorkspace~[class*=page]>[class*=pageHeader]{margin-bottom:12px}._Bh55G_shell ._Bh55G_memoryWorkspace~[class*=page]>[class*=pageHeader] h2{font-size:14px;line-height:22px}._Bh55G_shell ._Bh55G_memoryWorkspace~[class*=page]>[class*=pageHeader] p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._Bh55G_shell [class*=relatedPane],._Bh55G_shell [class*=entityRail]{position:static}._Bh55G_shell ._Bh55G_memoryNavigation{flex:none;align-items:flex-end;gap:12px;min-width:0;padding:0;display:flex}._Bh55G_shell ._Bh55G_memoryTabs{scrollbar-width:none;flex:1;gap:22px;min-width:0;display:flex;overflow-x:auto}._Bh55G_shell ._Bh55G_memoryTabs::-webkit-scrollbar{display:none}._Bh55G_shell ._Bh55G_memoryTabs button{min-width:max-content;min-height:0;color:var(--dsw-alias-label-tertiary);cursor:pointer;transition:color .15s var(--ds-ease-in-out,cubic-bezier(.4, 0, .2, 1)), border-bottom-color .15s var(--ds-ease-in-out,cubic-bezier(.4, 0, .2, 1));background:0 0;border:0;border-bottom:2px solid #0000;align-items:center;margin-bottom:-.5px;padding:6px 1px 9px;font-size:13px;line-height:20px;display:inline-flex;position:relative}._Bh55G_shell ._Bh55G_memoryTabs button:hover{color:var(--dsw-alias-label-primary)}._Bh55G_shell ._Bh55G_memoryTabs button[data-active]{border-bottom-color:var(--dsw-alias-label-primary);color:var(--dsw-alias-label-primary)}._Bh55G_shell ._Bh55G_memoryWriteButton{flex:none}._Bh55G_shell ._Bh55G_pageHeader{margin-bottom:16px}._Bh55G_shell ._Bh55G_pageHeader:has(+[class*=subNav]){margin-bottom:8px}._Bh55G_shell ._Bh55G_canvas[data-lock-page-header] [class*=pageHeader]{z-index:12;border-bottom:.5px solid var(--dsw-alias-border-l2);background:var(--mn-surface);margin:-20px -24px 16px;padding:20px 24px 12px;position:sticky;top:0}._Bh55G_shell ._Bh55G_canvas[data-lock-page-header] [class*=pageHeader]:has(+[class*=subNav]){margin-bottom:6px;padding-bottom:10px}._Bh55G_shell ._Bh55G_canvas[data-lock-page-header] [class*=pageHeader] [class*=pageHeaderMeta]{background:0 0;border:0;margin:0;padding:0;position:static}._Bh55G_shell ._Bh55G_itemActionButton{border-radius:var(--dsw-radius-sm);min-height:28px;padding:0 10px;font-size:12px;line-height:18px;transition:background-color .12s,color .12s,border-color .12s}._Bh55G_shell ._Bh55G_itemEditAction{border:.5px solid var(--dsw-alias-border-l3);color:var(--dsw-alias-label-primary);background:0 0}._Bh55G_shell ._Bh55G_itemEditAction:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover)}._Bh55G_shell ._Bh55G_itemEditAction:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}._Bh55G_shell ._Bh55G_itemDangerAction{color:var(--dsw-alias-state-error-primary);background:0 0;border:0}._Bh55G_shell ._Bh55G_itemDangerAction:hover:not(:disabled){background:var(--dsw-alias-interactive-bg-hover-danger,color-mix(in srgb, var(--dsw-alias-state-error-primary) 8%, transparent));text-decoration:none}@media (width<=760px){._Bh55G_shell ._Bh55G_headerActions{max-width:none}._Bh55G_shell ._Bh55G_statusCluster>span{display:inline}._Bh55G_shell ._Bh55G_workspacePicker>[data-part=label],._Bh55G_shell ._Bh55G_workspaceMismatch>span{display:none}._Bh55G_shell ._Bh55G_memoryWorkspace{margin:-16px -16px 16px;padding:16px 16px 0}._Bh55G_shell ._Bh55G_canvas[data-lock-page-header] [class*=pageHeader]{margin:-16px -16px 16px;padding:16px 16px 12px}._Bh55G_shell ._Bh55G_canvas[data-lock-page-header] [class*=pageHeader]:has(+[class*=subNav]){margin-bottom:6px;padding-bottom:10px}._Bh55G_shell ._Bh55G_modalBackdrop{padding:max(10px, env(safe-area-inset-top,0px)) 0 0;align-items:flex-end}._Bh55G_shell ._Bh55G_modal,._Bh55G_shell ._Bh55G_modal._Bh55G_modalWide{width:100vw;max-height:calc(100vh - max(10px, env(safe-area-inset-top,0px)));border-radius:var(--dsw-radius-xl) var(--dsw-radius-xl) 0 0}._Bh55G_shell ._Bh55G_modal>header{padding:10px max(14px, env(safe-area-inset-right,0px)) 12px max(14px, env(safe-area-inset-left,0px));gap:12px}._Bh55G_shell ._Bh55G_modal>header p{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}._Bh55G_shell ._Bh55G_modal>header [class*=iconButton]{width:44px;min-width:44px;height:44px;min-height:44px}._Bh55G_shell ._Bh55G_modal>[class*=modalBody]{padding:14px max(14px, env(safe-area-inset-right,0px)) 18px max(14px, env(safe-area-inset-left,0px));scrollbar-gutter:auto}._Bh55G_shell ._Bh55G_modal>[class*=modalBody] button{min-height:44px}._Bh55G_shell ._Bh55G_modal>[class*=modalFooter]{padding:10px max(14px, env(safe-area-inset-right,0px)) calc(10px + env(safe-area-inset-bottom,0px)) max(14px, env(safe-area-inset-left,0px))}._Bh55G_shell ._Bh55G_modal>[class*=modalFooter] [class*=modalFooterActions] button{min-height:44px;padding-block:8px}}@media (width>=761px) and (height<=560px){._Bh55G_shell ._Bh55G_modalBackdrop{padding:8px}}@supports (height:100dvh){@media (width<=760px){._Bh55G_shell ._Bh55G_modal,._Bh55G_shell ._Bh55G_modal._Bh55G_modalWide{max-height:calc(100dvh - max(10px, env(safe-area-inset-top,0px)))}}}@media (width<=520px){._Bh55G_shell ._Bh55G_headerActions{flex:none;max-width:none}._Bh55G_shell ._Bh55G_memoryTabs{gap:18px}._Bh55G_shell [class*=backButton]>span{display:none}._Bh55G_shell ._Bh55G_workspacePicker button{width:min(118px,30vw)}._Bh55G_shell ._Bh55G_statusCluster [class*=iconButton],._Bh55G_shell [class*=compositionStrategy]{display:none}}@media (height<=420px){._Bh55G_shell ._Bh55G_modal>header p{white-space:nowrap;text-overflow:ellipsis;display:block;overflow:hidden}}@media (pointer:coarse){._Bh55G_shell ._Bh55G_modal>header [class*=iconButton]{width:44px;min-width:44px;height:44px;min-height:44px}._Bh55G_shell ._Bh55G_modal>[class*=modalBody] button,._Bh55G_shell ._Bh55G_modal>[class*=modalFooter] button{min-height:44px}}@media (prefers-reduced-motion:reduce){._Bh55G_shell ._Bh55G_memoryTabs button,._Bh55G_shell ._Bh55G_itemActionButton{transition:none}}"; const tagId$13 = "dsh-brain-mnemon/src/client/MnemonSidebarView.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$13) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$13; document.head.appendChild(tag); } if (tag.textContent !== css$17) tag.textContent = css$17; } var MnemonSidebarView_module_css_default = { "brand": "_Bh55G_brand", "canvas": "_Bh55G_canvas", "headerActions": "_Bh55G_headerActions", "itemActionButton": "_Bh55G_itemActionButton", "itemDangerAction": "_Bh55G_itemDangerAction", "itemEditAction": "_Bh55G_itemEditAction", "masthead": "_Bh55G_masthead", "memoryNavigation": "_Bh55G_memoryNavigation", "memoryTabs": "_Bh55G_memoryTabs", "memoryWorkspace": "_Bh55G_memoryWorkspace", "memoryWriteButton": "_Bh55G_memoryWriteButton", "modal": "_Bh55G_modal", "modalBackdrop": "_Bh55G_modalBackdrop", "modalWide": "_Bh55G_modalWide", "nav": "_Bh55G_nav", "pageHeader": "_Bh55G_pageHeader", "shell": "_Bh55G_shell", "statusCluster": "_Bh55G_statusCluster", "topNavigation": "_Bh55G_topNavigation", "workspaceMismatch": "_Bh55G_workspaceMismatch", "workspacePicker": "_Bh55G_workspacePicker" }; // vendor/dsh-mnemon/src/client/MnemonDialog.tsx const SHEET_MEDIA = "(max-width: 760px)"; const REDUCED_MOTION_MEDIA = "(prefers-reduced-motion: reduce)"; const CLOSE_DURATION_MS = 240; const SNAP_DURATION_MS = 280; let activeBodyLocks = 0; let savedBodyOverflow = ""; function lockBodyScroll() { if (typeof document === "undefined") return () => {}; if (activeBodyLocks === 0) { savedBodyOverflow = document.body.style.overflow; document.body.style.overflow = "hidden"; } activeBodyLocks += 1; let released = false; return () => { if (released) return; released = true; activeBodyLocks = Math.max(0, activeBodyLocks - 1); if (activeBodyLocks === 0 && typeof document !== "undefined") { document.body.style.overflow = savedBodyOverflow; savedBodyOverflow = ""; } }; } function matches(query) { return typeof window.matchMedia === "function" && window.matchMedia(query).matches; } function currentTransform(element) { const value = window.getComputedStyle(element).transform; return value === "" || value === "none" ? "translate3d(0, 0, 0)" : value; } function currentTranslateY(element) { const transform = currentTransform(element); if (transform === "translate3d(0, 0, 0)") return 0; try { return Math.max(new DOMMatrixReadOnly(transform).m42, 0); } catch { const matrix3d = transform.match(/^matrix3d\((.+)\)$/); if (matrix3d !== null) return Math.max(Number(matrix3d[1]?.split(",")[13]) || 0, 0); const matrix = transform.match(/^matrix\((.+)\)$/); return matrix === null ? 0 : Math.max(Number(matrix[1]?.split(",")[5]) || 0, 0); } } function cancelAnimations(element) { if (element === null || typeof element.getAnimations !== "function") return; element.getAnimations().forEach((animation) => animation.cancel()); } function releaseDragCapture(drag) { try { if (typeof drag.captureTarget.hasPointerCapture !== "function" || drag.captureTarget.hasPointerCapture(drag.pointerId)) drag.captureTarget.releasePointerCapture?.(drag.pointerId); } catch {} } function waitForAnimations(animations, duration) { return new Promise((resolve) => { let settled = false; const finish = () => { if (settled) return; settled = true; window.clearTimeout(timeout); resolve(); }; const timeout = window.setTimeout(finish, duration + 100); Promise.allSettled(animations.map((animation) => animation.finished)).then(finish); }); } function MnemonDialog(props) { const titleId = (0, react.useId)(); const descriptionId = (0, react.useId)(); const backdropRef = (0, react.useRef)(null); const dialogRef = (0, react.useRef)(null); const closeButtonRef = (0, react.useRef)(null); const returnFocusRef = (0, react.useRef)(null); const dragRef = (0, react.useRef)(null); const detachDragListenersRef = (0, react.useRef)(null); const snapGenerationRef = (0, react.useRef)(0); const closingRef = (0, react.useRef)(false); const mountedRef = (0, react.useRef)(true); const busyRef = (0, react.useRef)(props.busy === true); const onCloseRef = (0, react.useRef)(props.onClose); busyRef.current = props.busy === true; onCloseRef.current = props.onClose; const detachDragListeners = (0, react.useCallback)(() => { detachDragListenersRef.current?.(); detachDragListenersRef.current = null; }, []); const focusPreferredControl = (0, react.useCallback)(() => { (dialogRef.current?.querySelector("[data-autofocus]:not(:disabled)") ?? dialogRef.current?.querySelector("input:not(:disabled), textarea:not(:disabled), select:not(:disabled)"))?.focus({ preventScroll: true }); }, []); const finishClose = (0, react.useCallback)(() => { if (mountedRef.current) onCloseRef.current(); }, []); const requestClose = (0, react.useCallback)(() => { if (busyRef.current || closingRef.current) return; detachDragListeners(); if (dragRef.current !== null) { releaseDragCapture(dragRef.current); dragRef.current = null; if (dialogRef.current !== null) delete dialogRef.current.dataset.dragging; } const dialog = dialogRef.current; const backdrop = backdropRef.current; if (dialog === null || backdrop === null || matches(REDUCED_MOTION_MEDIA) || typeof dialog.animate !== "function" || typeof backdrop.animate !== "function") { finishClose(); return; } closingRef.current = true; snapGenerationRef.current += 1; dialog.dataset.closing = "true"; backdrop.dataset.closing = "true"; const sheet = matches(SHEET_MEDIA); const fromTransform = currentTransform(dialog); const fromBackdropOpacity = window.getComputedStyle(backdrop).opacity; cancelAnimations(dialog); cancelAnimations(backdrop); const easing = sheet ? "cubic-bezier(.4, 0, 1, 1)" : "cubic-bezier(.4, 0, .2, 1)"; waitForAnimations([dialog.animate(sheet ? [{ opacity: 1, transform: fromTransform }, { opacity: 1, transform: "translate3d(0, calc(100% + 32px), 0)" }] : [{ opacity: 1, transform: fromTransform }, { opacity: 0, transform: "translate3d(0, 8px, 0) scale(.985)" }], { duration: CLOSE_DURATION_MS, easing, fill: "forwards" }), backdrop.animate([{ opacity: fromBackdropOpacity }, { opacity: 0 }], { duration: CLOSE_DURATION_MS, easing: "ease-out", fill: "forwards" })], CLOSE_DURATION_MS).then(finishClose); }, [detachDragListeners, finishClose]); const resetDrag = (0, react.useCallback)(() => { detachDragListeners(); const dialog = dialogRef.current; const backdrop = backdropRef.current; if (dialog === null || backdrop === null) { if (dragRef.current !== null) { releaseDragCapture(dragRef.current); dragRef.current = null; } return; } const drag = dragRef.current; const offset = drag?.offset ?? 0; const snapGeneration = ++snapGenerationRef.current; dragRef.current = null; if (drag !== null) releaseDragCapture(drag); delete dialog.dataset.dragging; if (offset <= 0 || matches(REDUCED_MOTION_MEDIA) || typeof dialog.animate !== "function" || typeof backdrop.animate !== "function") { dialog.style.removeProperty("--mn-modal-drag-y"); backdrop.style.removeProperty("opacity"); return; } const dialogAnimation = dialog.animate([{ transform: currentTransform(dialog) }, { transform: "translate3d(0, 0, 0)" }], { duration: SNAP_DURATION_MS, easing: "cubic-bezier(.2, .8, .2, 1)", fill: "forwards" }); const backdropAnimation = backdrop.animate([{ opacity: window.getComputedStyle(backdrop).opacity }, { opacity: 1 }], { duration: SNAP_DURATION_MS, easing: "ease-out", fill: "forwards" }); waitForAnimations([dialogAnimation, backdropAnimation], SNAP_DURATION_MS).then(() => { if (!mountedRef.current || snapGenerationRef.current !== snapGeneration) return; dialog.style.removeProperty("--mn-modal-drag-y"); backdrop.style.removeProperty("opacity"); dialogAnimation.cancel(); backdropAnimation.cancel(); }); }, [detachDragListeners]); const moveDrag = (0, react.useCallback)((event) => { const drag = dragRef.current; const dialog = dialogRef.current; const backdrop = backdropRef.current; if (drag === null || dialog === null || backdrop === null || drag.pointerId !== event.pointerId) return; event.preventDefault(); const rawOffset = Math.max(0, drag.initialOffset + event.clientY - drag.startY); const offset = rawOffset <= drag.height ? rawOffset : drag.height + (rawOffset - drag.height) * .16; const elapsed = Math.max(event.timeStamp - drag.lastTime, 1); const sampleVelocity = (event.clientY - drag.lastY) / elapsed; drag.velocity = drag.velocity * .35 + sampleVelocity * .65; drag.lastY = event.clientY; drag.lastTime = event.timeStamp; drag.offset = offset; dialog.style.setProperty("--mn-modal-drag-y", `${offset}px`); backdrop.style.opacity = String(1 - Math.min(offset / drag.height * .58, .52)); }, []); const endDrag = (0, react.useCallback)((event) => { const drag = dragRef.current; if (drag === null || drag.pointerId !== event.pointerId) return; const threshold = Math.min(Math.max(drag.height * .22, 96), 180); if (drag.offset >= threshold || drag.offset >= 28 && drag.velocity >= .55) { detachDragListeners(); dragRef.current = null; releaseDragCapture(drag); if (dialogRef.current !== null) delete dialogRef.current.dataset.dragging; requestClose(); } else resetDrag(); }, [ detachDragListeners, requestClose, resetDrag ]); const cancelDrag = (0, react.useCallback)((event) => { if (dragRef.current?.pointerId === event.pointerId) resetDrag(); }, [resetDrag]); const beginDrag = (event) => { if (busyRef.current || closingRef.current || !event.isPrimary || !matches(SHEET_MEDIA)) return; if (event.pointerType === "mouse" && event.button !== 0) return; const dialog = dialogRef.current; if (dialog === null) return; detachDragListeners(); snapGenerationRef.current += 1; const initialOffset = currentTranslateY(dialog); const backdrop = backdropRef.current; const initialBackdropOpacity = backdrop === null ? "" : window.getComputedStyle(backdrop).opacity; cancelAnimations(dialog); cancelAnimations(backdrop); const time = event.timeStamp; dragRef.current = { pointerId: event.pointerId, captureTarget: event.currentTarget, startY: event.clientY, initialOffset, lastY: event.clientY, lastTime: time, velocity: 0, offset: initialOffset, height: Math.max(dialog.getBoundingClientRect().height, 1) }; dialog.dataset.dragging = "true"; dialog.style.setProperty("--mn-modal-drag-y", `${initialOffset}px`); if (backdrop !== null) backdrop.style.opacity = initialBackdropOpacity; const cancelOnBlur = () => { if (dragRef.current !== null) resetDrag(); }; const cancelWhenHidden = () => { if (document.visibilityState === "hidden") cancelOnBlur(); }; window.addEventListener("pointermove", moveDrag, { passive: false }); window.addEventListener("pointerup", endDrag); window.addEventListener("pointercancel", cancelDrag); window.addEventListener("blur", cancelOnBlur); document.addEventListener("visibilitychange", cancelWhenHidden); detachDragListenersRef.current = () => { window.removeEventListener("pointermove", moveDrag); window.removeEventListener("pointerup", endDrag); window.removeEventListener("pointercancel", cancelDrag); window.removeEventListener("blur", cancelOnBlur); document.removeEventListener("visibilitychange", cancelWhenHidden); }; try { event.currentTarget.setPointerCapture?.(event.pointerId); } catch {} }; (0, react.useLayoutEffect)(() => { returnFocusRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null; (dialogRef.current?.querySelector("[data-autofocus]:not(:disabled)") ?? dialogRef.current?.querySelector("input:not(:disabled), textarea:not(:disabled), select:not(:disabled)") ?? dialogRef.current?.querySelector("button:not(:disabled)"))?.focus({ preventScroll: true }); return () => { if (returnFocusRef.current?.isConnected === true) returnFocusRef.current.focus({ preventScroll: true }); }; }, []); (0, react.useLayoutEffect)(() => { if (props.contentReady !== true) return; const active = document.activeElement; if (active !== closeButtonRef.current && active !== dialogRef.current) return; focusPreferredControl(); }, [focusPreferredControl, props.contentReady]); (0, react.useEffect)(() => { mountedRef.current = true; const unlockBodyScroll = lockBodyScroll(); return () => { mountedRef.current = false; detachDragListeners(); if (dragRef.current !== null) { releaseDragCapture(dragRef.current); dragRef.current = null; } unlockBodyScroll(); }; }, [detachDragListeners]); (0, react.useEffect)(() => { const onKey = (event) => { if (event.key === "Escape") { if (event.defaultPrevented) return; event.preventDefault(); requestClose(); return; } if (event.key !== "Tab" || closingRef.current) return; if (document.activeElement?.closest("[role=\"menu\"]") !== null) return; const controls = Array.from(dialogRef.current?.querySelectorAll("button:not(:disabled), input:not(:disabled), textarea:not(:disabled), select:not(:disabled), a[href], [tabindex]:not([tabindex=\"-1\"])") ?? []).filter((control) => control.getAttribute("aria-hidden") !== "true"); const first = controls[0]; const last = controls.at(-1); if (first === void 0 || last === void 0) { event.preventDefault(); return; } const active = document.activeElement; if (event.shiftKey && (active === first || !dialogRef.current?.contains(active))) { event.preventDefault(); last.focus(); } else if (!event.shiftKey && (active === last || !dialogRef.current?.contains(active))) { event.preventDefault(); first.focus(); } }; window.addEventListener("keydown", onKey); return () => window.removeEventListener("keydown", onKey); }, [requestClose]); const interceptCloseControl = (event) => { const target = event.target instanceof Element ? event.target.closest("[data-dialog-close]") : null; if (target === null || !dialogRef.current?.contains(target)) return; event.preventDefault(); event.stopPropagation(); requestClose(); }; if (typeof document === "undefined") return null; return (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.modalPortal, "data-mnemon-dialog-portal": "", children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: appearanceClass(appearanceClass(MnemonView_module_css_default.modalTheme, MnemonView_module_css_default.shell), MnemonSidebarView_module_css_default.shell), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { ref: backdropRef, className: appearanceClass(MnemonView_module_css_default.modalBackdrop, MnemonSidebarView_module_css_default.modalBackdrop), onPointerDown: (event) => { if (event.target === event.currentTarget) requestClose(); }, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { ref: dialogRef, className: appearanceClass(appearanceClass(MnemonView_module_css_default.modal, MnemonSidebarView_module_css_default.modal), props.wide === true ? appearanceClass(MnemonView_module_css_default.modalWide, MnemonSidebarView_module_css_default.modalWide) : void 0), role: "dialog", "aria-modal": "true", "aria-busy": props.contentReady === false || props.busy === true ? true : void 0, "aria-labelledby": titleId, "aria-describedby": props.description === void 0 ? void 0 : descriptionId, onClickCapture: interceptCloseControl, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.modalDragHandle, "data-dialog-drag-handle": "", "aria-hidden": "true", onPointerDown: beginDrag, onLostPointerCapture: (event) => { if (dragRef.current?.pointerId === event.pointerId) resetDrag(); }, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {}) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { id: titleId, children: props.title }), props.description !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { id: descriptionId, children: props.description })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { ref: closeButtonRef, type: "button", className: MnemonView_module_css_default.iconButton, disabled: props.busy, onClick: requestClose, "aria-label": props.closeLabel, title: props.closeLabel, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseOutlineRegular, { size: 16 }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.modalBody, children: props.children }), props.footer !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("footer", { className: MnemonView_module_css_default.modalFooter, children: props.footer }) ] }) }) }) }), document.body); } const css$16 = ".IIa07q_runtimeComposer{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);margin-bottom:12px;padding:16px}.IIa07q_runtimeComposerHeading{justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px;display:flex}.IIa07q_runtimeComposerHeading h3{margin:0 0 2px;font-size:14px;font-weight:500;line-height:22px}.IIa07q_runtimeComposerHeading p{color:var(--mn-faint);margin:0;font-size:12px;line-height:18px}.IIa07q_runtimeComposerHeading>span{color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_runtimeComposer>textarea,.IIa07q_runtimeEntry textarea{resize:vertical;border:.5px solid var(--mn-field-line);border-radius:var(--dsw-radius-md);width:100%;color:var(--mn-text);background:var(--mn-input);outline:0;padding:8px 10px;font-size:13px;line-height:20px}.IIa07q_runtimeComposer>textarea:focus,.IIa07q_runtimeEntry textarea:focus{border-color:var(--mn-accent)}.IIa07q_runtimeComposerActions{justify-content:flex-end;align-items:flex-end;gap:8px;margin-top:12px;display:flex}.IIa07q_runtimeComposerActions label{color:var(--mn-muted);gap:6px;font-size:12px;font-weight:500;line-height:18px;display:grid}.IIa07q_runtimeChoice button{min-width:136px}.IIa07q_runtimeReadOnly{border-radius:var(--dsw-radius-md);color:var(--mn-muted);background:var(--mn-block-fill,var(--mn-fill));margin-bottom:12px;padding:8px 12px;font-size:12px;line-height:18px}.IIa07q_runtimeSummaryGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:14px;display:grid}.IIa07q_runtimeSummaryCard{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);flex-direction:column;min-width:0;display:flex}.IIa07q_runtimeBrowser{min-width:0}.IIa07q_runtimeBrowserToolbar{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px 12px;padding:2px 0 12px;display:flex}.IIa07q_runtimeScopeFilter{--dsh-segment-count:3;--dsh-segment-index:0;border-radius:var(--dsw-radius-md);background:var(--mn-hover);grid-auto-columns:minmax(0,1fr);grid-auto-flow:column;align-items:stretch;gap:2px;max-width:100%;padding:4px;display:inline-grid;position:relative}.IIa07q_runtimeScopeFilter:before{content:\"\";width:calc((100% - 8px - 2px * (var(--dsh-segment-count) - 1)) / var(--dsh-segment-count));border-radius:var(--dsw-radius-sm);background:var(--mn-layer-1);height:calc(100% - 8px);box-shadow:var(--dsw-elevation-soft);transform:translateX(calc(var(--dsh-segment-index) * (100% + 2px)));pointer-events:none;transition:transform .16s cubic-bezier(.22,1,.36,1);position:absolute;top:4px;left:4px}.IIa07q_runtimeScopeFilter button{z-index:1;border-radius:var(--dsw-radius-sm);min-width:0;min-height:28px;color:var(--mn-muted);white-space:normal;overflow-wrap:anywhere;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0 12px;font-size:13px;font-weight:500;line-height:1;transition:color .12s;display:inline-flex;position:relative}.IIa07q_runtimeScopeFilter button:hover,.IIa07q_runtimeScopeFilter button[data-active]{color:var(--mn-text)}.IIa07q_runtimeScopeFilter button:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--mn-focus);outline-offset:-2px}.IIa07q_runtimeScopeFilter b{color:var(--mn-faint);font-variant-numeric:tabular-nums;white-space:nowrap;flex-shrink:0;margin-left:6px;font-size:12px;font-weight:400;line-height:1}.IIa07q_runtimeFilterQuery{width:min(320px,42%);min-width:210px}.IIa07q_runtimeUnifiedList{grid-template-columns:1fr;gap:10px;padding:0;display:grid}.IIa07q_runtimeEntryBadges{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.IIa07q_runtimeEntryMeta .IIa07q_runtimeEntryTarget{color:var(--mn-accent);background:color-mix(in srgb, var(--mn-accent) 10%, transparent)}.IIa07q_runtimeEntryMeta .IIa07q_runtimeEntryBranch{text-overflow:ellipsis;white-space:nowrap;max-width:140px;color:var(--mn-muted);background:var(--mn-fill);font-family:var(--mn-code);overflow:hidden}.IIa07q_runtimeComposerBranch{color:var(--mn-muted);gap:6px;font-size:12px;font-weight:500;line-height:18px;display:grid}.IIa07q_runtimeComposerBranch input{box-sizing:border-box;border:.5px solid var(--mn-field-line);border-radius:var(--dsw-radius-md);width:100%;height:36px;min-height:36px;color:var(--mn-text);background:var(--mn-input);outline:0;padding:0 10px;font-size:13px;font-weight:400}.IIa07q_runtimeComposerBranch input:focus{border-color:var(--mn-accent)}.IIa07q_bodyEditBranch{color:var(--mn-muted);gap:6px;font-size:12px;font-weight:500;line-height:18px;display:grid}.IIa07q_bodyEditBranch input{box-sizing:border-box;border:.5px solid var(--mn-field-line);border-radius:var(--dsw-radius-md);width:100%;height:36px;min-height:34px;color:var(--mn-text);background:var(--mn-input);outline:0;padding:0 10px;font-size:13px;font-weight:400}.IIa07q_bodyEditBranch input:focus{border-color:var(--mn-accent)}.IIa07q_bodyEditBranch small{color:var(--mn-faint);font-size:12px;font-weight:400}.IIa07q_runtimeTargetHeader{justify-content:space-between;align-items:center;gap:16px;padding:14px 16px 8px;display:flex}.IIa07q_runtimeTargetHeader>div{gap:0;display:grid}.IIa07q_runtimeTargetHeader span{color:var(--mn-faint);font-family:var(--mn-code);font-size:11px;line-height:16px}.IIa07q_runtimeTargetHeader h3{margin:0;font-size:14px;font-weight:500;line-height:22px}.IIa07q_runtimeTargetHeader>strong{min-width:24px;height:20px;color:var(--mn-muted);background:var(--mn-fill);font-variant-numeric:tabular-nums;border-radius:999px;justify-content:center;align-items:center;padding:0 7px;font-size:11px;font-weight:500;line-height:1;display:inline-flex}.IIa07q_capacityLine{align-items:center;gap:10px;padding:0 16px;display:flex}.IIa07q_capacityLine>div{background:var(--mn-fill);border-radius:999px;flex:1;height:4px;overflow:hidden}.IIa07q_capacityLine i{border-radius:inherit;background:var(--dsw-alias-brand-primary);height:100%;transition:width .25s;display:block}.IIa07q_capacityLine>span{min-width:88px;color:var(--mn-faint);text-align:right;font-variant-numeric:tabular-nums;font-size:11px}.IIa07q_runtimeTargetDescription{color:var(--mn-faint);margin:8px 16px 12px;font-size:12px;line-height:18px}.IIa07q_runtimePinMeta{border-top:.5px solid var(--mn-line);color:var(--mn-faint);font-variant-numeric:tabular-nums;margin:auto 16px 0;padding:9px 0 12px;font-size:12px;line-height:18px}.IIa07q_runtimeEntry{--mn-provider-color:var(--mn-accent);border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);padding:12px 14px 10px;transition:border-color .12s;position:relative}.IIa07q_runtimeEntry:hover{border-color:var(--mn-line-strong)}.IIa07q_runtimeEntry[data-importance=critical]{--mn-provider-color:var(--mn-priority)}.IIa07q_runtimeEntry[data-importance=low]{--mn-provider-color:var(--mn-faint)}.IIa07q_runtimeEntry[data-focused]{border-color:color-mix(in srgb, var(--mn-accent) 60%, var(--mn-card-line));box-shadow:0 0 0 2px color-mix(in srgb, var(--mn-accent) 14%, transparent)}.IIa07q_runtimeEntryMeta{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px 12px;display:flex}.IIa07q_runtimeEntryMeta>span,.IIa07q_runtimeEntryBadges>span{height:20px;color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;align-items:center;padding:0 8px;font-size:11px;font-weight:500;line-height:1;display:inline-flex}.IIa07q_runtimeEntry[data-importance=critical] .IIa07q_runtimeEntryMeta>span,.IIa07q_runtimeEntry[data-importance=critical] .IIa07q_runtimeEntryBadges>span:not(.IIa07q_runtimeEntryTarget){color:var(--mn-warn);background:color-mix(in srgb, var(--mn-warn) 12%, transparent)}.IIa07q_runtimeEntryMeta time{color:var(--mn-faint);white-space:nowrap;font-variant-numeric:tabular-nums;flex:none;font-size:11px;line-height:1}.IIa07q_runtimeEntry>p{white-space:pre-wrap;overflow-wrap:anywhere;margin:8px 0;font-size:14px;line-height:22px}.IIa07q_runtimeEntry>select{margin-top:8px}.IIa07q_runtimeEntry footer{border-top:.5px solid var(--mn-line);justify-content:flex-end;align-items:center;gap:8px;min-height:32px;margin-top:8px;padding-top:8px;display:flex}.IIa07q_runtimeEntry footer>span{color:var(--mn-danger);margin-right:auto;font-size:12px}.IIa07q_runtimeEmpty{min-height:128px;color:var(--mn-faint);text-align:center;align-content:center;place-items:center;gap:6px;display:grid}.IIa07q_runtimeEmpty>span{font-size:20px;line-height:1}.IIa07q_runtimeEmpty p{margin:0;font-size:13px;line-height:20px}@media (width<=1000px){.IIa07q_runtimeSummaryGrid{grid-template-columns:1fr}}@media (width<=760px){.IIa07q_runtimeComposerHeading,.IIa07q_runtimeComposerActions{flex-direction:column;align-items:stretch}.IIa07q_runtimeComposerActions>*,.IIa07q_runtimeComposerActions button{width:100%}.IIa07q_runtimeBrowserToolbar{flex-direction:column;align-items:stretch}.IIa07q_runtimeScopeFilter{width:100%}.IIa07q_runtimeScopeFilter button{padding-inline:6px}.IIa07q_runtimeFilterQuery{width:100%;min-width:0}}@media (prefers-reduced-motion:reduce){.IIa07q_runtimeScopeFilter:before,.IIa07q_runtimeScopeFilter button,.IIa07q_runtimeEntry,.IIa07q_capacityLine i{transition:none}}"; const tagId$12 = "dsh-brain-mnemon-source-runtime/presentation/page.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$12) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$12; document.head.appendChild(tag); } if (tag.textContent !== css$16) tag.textContent = css$16; } var page_module_css_default$3 = { "bodyEditBranch": "IIa07q_bodyEditBranch", "capacityLine": "IIa07q_capacityLine", "runtimeBrowser": "IIa07q_runtimeBrowser", "runtimeBrowserToolbar": "IIa07q_runtimeBrowserToolbar", "runtimeChoice": "IIa07q_runtimeChoice", "runtimeComposer": "IIa07q_runtimeComposer", "runtimeComposerActions": "IIa07q_runtimeComposerActions", "runtimeComposerBranch": "IIa07q_runtimeComposerBranch", "runtimeComposerHeading": "IIa07q_runtimeComposerHeading", "runtimeEmpty": "IIa07q_runtimeEmpty", "runtimeEntry": "IIa07q_runtimeEntry", "runtimeEntryBadges": "IIa07q_runtimeEntryBadges", "runtimeEntryBranch": "IIa07q_runtimeEntryBranch", "runtimeEntryMeta": "IIa07q_runtimeEntryMeta", "runtimeEntryTarget": "IIa07q_runtimeEntryTarget", "runtimeFilterQuery": "IIa07q_runtimeFilterQuery", "runtimePinMeta": "IIa07q_runtimePinMeta", "runtimeReadOnly": "IIa07q_runtimeReadOnly", "runtimeScopeFilter": "IIa07q_runtimeScopeFilter", "runtimeSummaryCard": "IIa07q_runtimeSummaryCard", "runtimeSummaryGrid": "IIa07q_runtimeSummaryGrid", "runtimeTargetDescription": "IIa07q_runtimeTargetDescription", "runtimeTargetHeader": "IIa07q_runtimeTargetHeader", "runtimeUnifiedList": "IIa07q_runtimeUnifiedList" }; const css$15 = "._Bh55G_shell ._Bh55G_modal form[class*=runtimeComposer]{background:0 0;border:0;border-radius:0;margin:0;padding:0}._Bh55G_shell ._Bh55G_modal form[class*=runtimeComposer]>[class*=runtimeComposerHeading]{display:none}._Bh55G_shell [class*=runtimeComposerBranch] input{box-sizing:border-box;height:36px;min-height:36px}._Bh55G_shell [class*=runtimeEntryBadges]>span{border-radius:999px;align-items:center;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px;display:inline-flex}._Bh55G_shell [class*=runtimeEntryBadges]>[class*=runtimeEntryTarget]{color:var(--dsw-alias-state-business-primary);background:color-mix(in srgb, var(--dsw-alias-state-business-primary) 10%, transparent);font-family:var(--dsw-font-family)}._Bh55G_shell [class*=runtimeEntry][data-importance=critical] [class*=runtimeEntryBadges]>span:last-child{color:var(--dsw-alias-state-warn-primary);background:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 12%, transparent)}"; const tagId$11 = "dsh-brain-mnemon-source-runtime/presentation/sidebar.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$11) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$11; document.head.appendChild(tag); } if (tag.textContent !== css$15) tag.textContent = css$15; } var sidebar_module_css_default$2 = { "modal": "_Bh55G_modal", "shell": "_Bh55G_shell" }; const css$14 = ".IIa07q_documentSummary{grid-template-columns:.7fr .7fr 1.6fr;gap:12px;margin-bottom:14px;display:grid}.IIa07q_documentSummary article{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);flex-direction:column;min-width:0;min-height:88px;padding:14px 16px;display:flex}.IIa07q_documentSummary article>span{color:var(--mn-faint);font-size:12px;line-height:18px;display:block}.IIa07q_documentSummary article>strong{font-variant-numeric:tabular-nums;margin:4px 0 2px;font-size:20px;font-weight:500;line-height:28px;display:block}.IIa07q_documentSummary article>small{color:var(--mn-faint);margin-top:auto;font-size:12px;line-height:18px}.IIa07q_documentCapacity>div{background:var(--mn-fill);border-radius:999px;height:4px;margin:8px 0 6px;overflow:hidden}.IIa07q_documentCapacity>div i{border-radius:inherit;background:var(--dsw-alias-brand-primary);height:100%;transition:width .3s;display:block}.IIa07q_documentToolbar{align-items:center;gap:10px;margin-bottom:12px;display:flex}.IIa07q_documentToolbar form{flex:1;align-items:center;gap:8px;min-width:260px;display:flex}.IIa07q_documentToolbar form>button{min-height:36px}.IIa07q_documentSearch{flex:1}.IIa07q_documentEditor input,.IIa07q_documentEditor textarea{border:.5px solid var(--mn-field-line);border-radius:var(--dsw-radius-md);width:100%;color:var(--mn-text);background:var(--mn-input);outline:0;padding:6px 10px;font-size:13px;line-height:20px}.IIa07q_documentEditor input:focus,.IIa07q_documentEditor textarea:focus{border-color:var(--mn-accent)}.IIa07q_documentToolbar>div{--dsh-segment-count:2;--dsh-segment-index:0;border-radius:var(--dsw-radius-md);background:var(--mn-hover);grid-auto-columns:1fr;grid-auto-flow:column;align-items:center;gap:2px;padding:4px;display:inline-grid;position:relative}.IIa07q_documentToolbar>div:before{content:\"\";width:calc((100% - 8px - 2px * (var(--dsh-segment-count) - 1)) / var(--dsh-segment-count));border-radius:var(--dsw-radius-sm);background:var(--mn-layer-1);height:calc(100% - 8px);box-shadow:var(--dsw-elevation-soft);transform:translateX(calc(var(--dsh-segment-index) * (100% + 2px)));pointer-events:none;transition:transform .16s cubic-bezier(.22,1,.36,1);position:absolute;top:4px;left:4px}.IIa07q_documentToolbar>div button{z-index:1;border-radius:var(--dsw-radius-sm);height:28px;color:var(--mn-muted);white-space:nowrap;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0 12px;font-size:13px;font-weight:500;line-height:1;transition:color .12s;display:inline-flex;position:relative}.IIa07q_documentToolbar>div button:hover,.IIa07q_documentToolbar>div button[data-active]{color:var(--mn-text)}.IIa07q_documentToolbar>div button:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--mn-focus);outline-offset:-2px}.IIa07q_documentToolbar>div b{color:var(--mn-faint);font-variant-numeric:tabular-nums;margin-left:6px;font-size:12px;font-weight:400;line-height:1}.IIa07q_documentWorkspace{grid-template-columns:minmax(250px,310px) minmax(0,1fr);gap:12px;min-height:590px;display:grid}.IIa07q_documentList,.IIa07q_documentReader{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);min-width:0;overflow:hidden}.IIa07q_documentList{align-self:stretch;padding-bottom:8px}.IIa07q_documentList>header{border-bottom:.5px solid var(--mn-line);min-height:44px;color:var(--mn-faint);justify-content:space-between;align-items:center;padding:0 14px;font-size:12px;line-height:18px;display:flex}.IIa07q_documentList>header code{color:var(--mn-muted);font-variant-numeric:tabular-nums}.IIa07q_documentList>button{--mn-provider-color:var(--mn-faint);border-radius:var(--dsw-radius-md);width:calc(100% - 12px);color:var(--mn-text);text-align:left;cursor:pointer;background:0 0;border:0;margin:6px 6px 0;padding:10px 12px;transition:background-color .15s;display:block}.IIa07q_documentList>button:hover{background:var(--mn-hover)}.IIa07q_documentList>button[data-selected]{background:var(--mn-fill)}.IIa07q_documentList>button>div{justify-content:space-between;align-items:center;gap:12px;display:flex}.IIa07q_documentList>button strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.IIa07q_documentList>button time{color:var(--mn-faint);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.IIa07q_documentList>button p{color:var(--mn-faint);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:4px 0 6px;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.IIa07q_documentList>button footer{color:var(--mn-faint);font-variant-numeric:tabular-nums;align-items:center;gap:8px;font-size:11px;line-height:16px;display:flex}.IIa07q_documentList>button footer code{margin-left:auto}.IIa07q_documentList>button footer em{color:var(--mn-danger);font-style:normal}.IIa07q_documentListEmpty{min-height:230px;color:var(--mn-muted);text-align:center;align-content:center;place-items:center;gap:4px;padding:24px;display:grid}.IIa07q_documentListEmpty>span{color:var(--mn-faint);margin-bottom:6px;font-size:24px;line-height:1}.IIa07q_documentListEmpty p{color:var(--mn-faint);margin:0;font-size:12px;line-height:18px}.IIa07q_documentReader{padding:clamp(16px,2vw,24px)}.IIa07q_documentReader>.IIa07q_emptyState{background:0 0;border:0;height:100%}.IIa07q_documentReader>.IIa07q_loading{justify-content:center;align-items:center;gap:8px;height:100%;min-height:240px;display:flex}.IIa07q_documentReader>.IIa07q_loading [class*=sectionSpinner]{position:static}.IIa07q_documentDetail>header{border-bottom:.5px solid var(--mn-line);justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:14px;display:flex}.IIa07q_documentDetail>header>div:first-child>span{height:20px;color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;align-items:center;margin-bottom:4px;padding:0 8px;font-size:11px;font-weight:500;line-height:1;display:inline-flex}.IIa07q_documentDetail>header h3{margin:2px 0;font-size:16px;font-weight:500;line-height:24px}.IIa07q_documentDetail>header p{color:var(--mn-faint);margin:0;font-size:12px;line-height:18px}.IIa07q_documentActions{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.IIa07q_documentDetail>dl{border-radius:var(--dsw-radius-md);background:var(--mn-block-fill);border:0;grid-template-columns:2fr .45fr .8fr .55fr;margin:12px 0 4px;display:grid;overflow:hidden}.IIa07q_documentDetail>dl>div{min-width:0;padding:8px 12px}.IIa07q_documentDetail>dl>div+div{border-left:.5px solid var(--mn-line)}.IIa07q_documentDetail dt{color:var(--mn-faint);margin-bottom:2px;font-size:11px;line-height:16px}.IIa07q_documentDetail dd{font-family:var(--mn-code);text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums;margin:0;font-size:12px;line-height:18px;overflow:hidden}.IIa07q_documentDetail dd code{font-size:inherit}.IIa07q_documentDetail dd [data-path-label]{font-size:inherit;line-height:inherit}.IIa07q_documentSources{flex-wrap:wrap;align-items:center;gap:6px;margin:12px 0;display:flex}.IIa07q_documentSources>span{color:var(--mn-faint);margin-right:4px;font-size:12px}.IIa07q_documentSources code,.IIa07q_documentArchiveReceipt code{max-width:100%;height:20px;color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;align-items:center;padding:0 8px;font-size:11px;line-height:1;display:inline-flex}.IIa07q_markdownBody{overflow-wrap:anywhere;min-height:280px;color:var(--mn-text);border:0;border-radius:0;margin:14px 0 0;padding:4px 0 0;font-size:14px;line-height:1.75}.IIa07q_markdownBody>:first-child{margin-top:0}.IIa07q_markdownBody>:last-child{margin-bottom:0}.IIa07q_markdownBody h1,.IIa07q_markdownBody h2,.IIa07q_markdownBody h3,.IIa07q_markdownBody h4{color:var(--mn-text);margin:1.5em 0 .6em;font-weight:500;line-height:1.35}.IIa07q_markdownBody h1{border-bottom:.5px solid var(--mn-line);padding-bottom:.35em;font-size:1.6em}.IIa07q_markdownBody h2{border-bottom:.5px solid var(--mn-line);padding-bottom:.3em;font-size:1.35em}.IIa07q_markdownBody h3{font-size:1.15em}.IIa07q_markdownBody p,.IIa07q_markdownBody ul,.IIa07q_markdownBody ol,.IIa07q_markdownBody blockquote,.IIa07q_markdownBody table,.IIa07q_markdownBody pre{margin:.85em 0}.IIa07q_markdownBody ul,.IIa07q_markdownBody ol{padding-left:1.6em}.IIa07q_markdownBody li+li{margin-top:.3em}.IIa07q_markdownBody blockquote{border-left:2px solid var(--mn-line-strong);color:var(--mn-muted);margin-inline:0;padding:.1em 1em}.IIa07q_markdownBody code{border-radius:var(--dsw-radius-xs);color:var(--mn-text);background:var(--dsw-alias-markdown-inline-code,var(--mn-fill));font:.88em/1.55 var(--mn-code);padding:.15em .4em}.IIa07q_markdownBody pre{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-markdown-code-block,var(--mn-fill));max-width:100%;padding:12px 16px;overflow:auto}.IIa07q_markdownBody pre code{background:0 0;padding:0;font-size:12px}.IIa07q_markdownBody a{color:var(--dsw-alias-link,var(--mn-accent));text-underline-offset:3px;text-decoration-thickness:1px}.IIa07q_markdownBody hr{border:0;border-top:.5px solid var(--mn-line);margin:1.8em 0}.IIa07q_markdownBody table{border-collapse:collapse;max-width:100%;display:block;overflow-x:auto}.IIa07q_markdownBody th,.IIa07q_markdownBody td{border:.5px solid var(--mn-line);text-align:left;vertical-align:top;padding:8px 10px}.IIa07q_markdownBody th{background:var(--mn-fill);font-weight:500}.IIa07q_markdownBody img{border-radius:var(--dsw-radius-sm);max-width:100%;height:auto}.IIa07q_documentArchiveReceipt{border-radius:var(--dsw-radius-md);background:color-mix(in srgb, var(--mn-success) 8%, transparent);margin:12px 0;padding:10px 12px}.IIa07q_documentArchiveReceipt p{color:var(--mn-muted);margin:2px 0 8px;font-size:12px;line-height:18px}.IIa07q_documentArchiveReceipt div{flex-wrap:wrap;gap:6px;display:flex}.IIa07q_documentDanger{border-top:.5px solid var(--mn-line);justify-content:flex-end;align-items:center;gap:8px;min-height:56px;margin-top:12px;padding-top:12px;display:flex}.IIa07q_documentDanger>div{margin-right:auto}.IIa07q_documentDanger strong{font-size:13px;font-weight:500;line-height:20px;display:block}.IIa07q_documentDanger p{color:var(--mn-faint);margin:2px 0 0;font-size:12px;line-height:18px}.IIa07q_documentDanger>span{color:var(--mn-danger);margin-right:auto;font-size:12px}.IIa07q_documentEditor{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);margin-bottom:12px;padding:16px}.IIa07q_documentReader>.IIa07q_documentEditor{background:0 0;border:0;margin:0;padding:0}.IIa07q_documentEditor>header{justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px;display:flex}.IIa07q_documentEditor h3{margin:0;font-size:14px;font-weight:500;line-height:22px}.IIa07q_documentEditor header p{color:var(--mn-faint);margin:2px 0 0;font-size:12px;line-height:18px}.IIa07q_documentEditor header>span,.IIa07q_documentEditor header>code{color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_documentEditor label{color:var(--mn-muted);gap:6px;margin-top:12px;font-size:12px;font-weight:500;line-height:18px;display:grid}.IIa07q_documentEditor textarea{resize:vertical;line-height:1.65}.IIa07q_documentEditorMeta{grid-template-columns:.8fr 1.2fr;gap:12px;display:grid}.IIa07q_documentEditorMeta label{margin:0}.IIa07q_documentEditor footer{justify-content:flex-end;gap:8px;margin-top:12px;display:flex}@container IIa07q_mnemon-workbench (width<=880px){.IIa07q_documentWorkspace{grid-template-columns:minmax(220px,270px) minmax(0,1fr)}.IIa07q_documentDetail>dl{grid-template-columns:repeat(2,minmax(0,1fr))}.IIa07q_documentDetail>dl>div+div{border-left:0}.IIa07q_documentDetail>dl>div:nth-child(2n){border-left:.5px solid var(--mn-line)}.IIa07q_documentDetail>dl>div:nth-child(n+3){border-top:.5px solid var(--mn-line)}}@container IIa07q_mnemon-workbench (width<=640px){.IIa07q_documentSummary{grid-template-columns:repeat(2,minmax(0,1fr))}.IIa07q_documentCapacity{grid-column:1/-1}.IIa07q_documentToolbar{flex-direction:column;align-items:stretch}.IIa07q_documentToolbar form{min-width:0}.IIa07q_documentToolbar>div,.IIa07q_documentToolbar>button{width:100%}.IIa07q_documentToolbar>div button{flex:1}.IIa07q_documentWorkspace{grid-template-columns:1fr;min-height:0}.IIa07q_documentList{-webkit-overflow-scrolling:touch;max-height:330px;overflow:auto}.IIa07q_documentReader{min-height:430px}.IIa07q_documentEditorMeta{grid-template-columns:1fr}}@media (width<=1000px){.IIa07q_documentWorkspace{grid-template-columns:minmax(220px,270px) minmax(0,1fr)}.IIa07q_documentDetail>dl{grid-template-columns:repeat(2,minmax(0,1fr))}.IIa07q_documentDetail>dl>div+div{border-left:0}.IIa07q_documentDetail>dl>div:nth-child(2n){border-left:.5px solid var(--mn-line)}.IIa07q_documentDetail>dl>div:nth-child(n+3){border-top:.5px solid var(--mn-line)}}@media (width<=760px){.IIa07q_documentSummary{grid-template-columns:repeat(2,minmax(0,1fr))}.IIa07q_documentCapacity{grid-column:1/-1}.IIa07q_documentToolbar{flex-direction:column;align-items:stretch}.IIa07q_documentToolbar form{min-width:0}.IIa07q_documentToolbar>div,.IIa07q_documentToolbar>button{width:100%}.IIa07q_documentToolbar>div button{flex:1}.IIa07q_documentWorkspace{grid-template-columns:1fr;min-height:0}.IIa07q_documentList{-webkit-overflow-scrolling:touch;max-height:330px;overflow:auto}.IIa07q_documentReader{min-height:430px}.IIa07q_documentEditorMeta{grid-template-columns:1fr}}@media (width<=520px){.IIa07q_documentDetail>header,.IIa07q_documentDanger{flex-direction:column;align-items:flex-start}.IIa07q_documentDetail>header>div:last-child,.IIa07q_documentDetail>header button{width:100%}.IIa07q_documentDanger>div,.IIa07q_documentDanger>span{margin-right:0}.IIa07q_documentDanger>button{width:100%}.IIa07q_documentDetail>dl{grid-template-columns:1fr}.IIa07q_documentDetail>dl>div:nth-child(2n){border-left:0}.IIa07q_documentDetail>dl>div+div{border-top:.5px solid var(--mn-line)}.IIa07q_markdownBody{padding:4px 0 0;font-size:13px}}@media (prefers-reduced-motion:reduce){.IIa07q_documentCapacity>div i,.IIa07q_documentToolbar>div:before,.IIa07q_documentToolbar>div button,.IIa07q_documentList>button{transition:none}}"; const tagId$10 = "dsh-brain-mnemon-source-documents/presentation/page.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$10) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$10; document.head.appendChild(tag); } if (tag.textContent !== css$14) tag.textContent = css$14; } var page_module_css_default$2 = { "documentActions": "IIa07q_documentActions", "documentArchiveReceipt": "IIa07q_documentArchiveReceipt", "documentCapacity": "IIa07q_documentCapacity", "documentDanger": "IIa07q_documentDanger", "documentDetail": "IIa07q_documentDetail", "documentEditor": "IIa07q_documentEditor", "documentEditorMeta": "IIa07q_documentEditorMeta", "documentList": "IIa07q_documentList", "documentListEmpty": "IIa07q_documentListEmpty", "documentReader": "IIa07q_documentReader", "documentSearch": "IIa07q_documentSearch", "documentSources": "IIa07q_documentSources", "documentSummary": "IIa07q_documentSummary", "documentToolbar": "IIa07q_documentToolbar", "documentWorkspace": "IIa07q_documentWorkspace", "emptyState": "IIa07q_emptyState", "loading": "IIa07q_loading", "markdownBody": "IIa07q_markdownBody", "mnemon-workbench": "IIa07q_mnemon-workbench" }; const css$13 = "._Bh55G_shell ._Bh55G_modal{flex-direction:column;max-height:min(86dvh,760px);display:flex;overflow:hidden}._Bh55G_shell ._Bh55G_modal>[class*=modalBody]{overscroll-behavior:contain;flex:auto;min-height:0;overflow-y:auto}._Bh55G_shell ._Bh55G_modal>[class*=modalFooter]{z-index:1;background:var(--dsw-alias-bg-layer-2,var(--mn-surface));flex:none;position:relative}._Bh55G_shell ._Bh55G_modal form[class*=documentEditor]{background:0 0;border:0;border-radius:0;flex-shrink:0;margin:0;padding:0}._Bh55G_shell ._Bh55G_modal form[class*=documentEditor]>header{display:none}._Bh55G_shell [class*=documentWorkspace]{height:clamp(420px, calc(100dvh - var(--dsh-frame-top-clearance,0px) - 344px), 720px);align-items:stretch;min-height:420px}._Bh55G_shell [class*=documentList],._Bh55G_shell [class*=documentReader]{overscroll-behavior:contain;scrollbar-gutter:stable;min-height:0;overflow-y:auto}@container _Bh55G_mnemon-workbench (width<=640px){._Bh55G_shell [class*=documentWorkspace]{height:auto;min-height:0}._Bh55G_shell [class*=documentList]{scrollbar-gutter:auto;overflow-y:auto}._Bh55G_shell [class*=documentReader]{scrollbar-gutter:auto;overflow:visible}}@media (width<=760px){._Bh55G_shell [class*=documentWorkspace]{height:auto;min-height:0}._Bh55G_shell [class*=documentList]{scrollbar-gutter:auto;overflow-y:auto}._Bh55G_shell [class*=documentReader]{scrollbar-gutter:auto;overflow:visible}}"; const tagId$9 = "dsh-brain-mnemon-source-documents/presentation/sidebar.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$9) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$9; document.head.appendChild(tag); } if (tag.textContent !== css$13) tag.textContent = css$13; } var sidebar_module_css_default$1 = { "mnemon-workbench": "_Bh55G_mnemon-workbench", "modal": "_Bh55G_modal", "shell": "_Bh55G_shell" }; const css$12 = ".IIa07q_entityHeading>span,.IIa07q_inspectorHeading>span{color:var(--mn-faint);font-size:12px;font-weight:500;line-height:18px}.IIa07q_memoryHeaderActions{align-items:center;gap:8px;display:flex}.IIa07q_memoryHeaderActions>button{white-space:nowrap}.IIa07q_workspaceErrorReveal{flex:none}.IIa07q_asyncRegion{min-width:0;position:relative}.IIa07q_asyncResults{min-width:0;min-height:120px;position:relative}.IIa07q_asyncPlaceholder{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);min-height:520px;color:var(--mn-faint);place-items:center;display:grid;position:relative}.IIa07q_muted{color:var(--mn-faint);padding:16px 0;font-size:13px}.IIa07q_readSources{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);gap:8px;margin:0 0 16px;padding:14px 18px;display:grid}.IIa07q_readSourcesCompact{flex-wrap:wrap;align-items:center;gap:8px 10px;min-width:0;margin:0 0 12px;padding:2px 0;display:flex}.IIa07q_readSourcesCompactTitle{color:var(--mn-faint);white-space:nowrap;flex:none;font-size:12px;font-weight:500;line-height:18px}.IIa07q_readSourcesCompactList{flex-wrap:wrap;flex:auto;align-items:center;gap:6px 8px;min-width:0;display:flex}.IIa07q_readSourcePill{border:.5px solid var(--mn-line);corner-shape:round;background:var(--mn-fill);max-width:100%;min-height:26px;color:var(--mn-text);border-radius:999px;align-items:center;gap:6px;padding:2px 10px;font-size:12px;line-height:18px;display:inline-flex}.IIa07q_readSourcePill>strong{text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:500;overflow:hidden}.IIa07q_readSourcePill>small{color:var(--mn-muted);white-space:nowrap;font-size:11px}.IIa07q_readSourcePill>em{color:var(--mn-faint);font-variant-numeric:tabular-nums;white-space:nowrap;font-size:11px;font-style:normal}.IIa07q_srOnlyHeading{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;margin:0;position:absolute;overflow:hidden}.IIa07q_readSourcePill>.IIa07q_providerBadge{background:var(--mn-layer-1);padding:0 6px;font-size:10px;line-height:16px}.IIa07q_readSourcePill[data-mode=projection] .IIa07q_readSourceSignal,.IIa07q_readSourcePill[data-mode=enumerable] .IIa07q_readSourceSignal{background:var(--mn-success)}.IIa07q_readSourcePill[data-mode=query-only] .IIa07q_readSourceSignal{background:var(--mn-warn)}.IIa07q_readSourcePill[data-status=unavailable] .IIa07q_readSourceSignal{background:var(--mn-danger)}.IIa07q_readSourcePill[data-status=unsupported] .IIa07q_readSourceSignal,.IIa07q_readSourcePill[data-status=empty] .IIa07q_readSourceSignal,.IIa07q_readSourcePill[data-status=loading] .IIa07q_readSourceSignal{background:var(--mn-idle)}.IIa07q_readSources>header{justify-content:space-between;align-items:flex-start;gap:16px;display:flex}.IIa07q_readSources>header>div{gap:2px;display:grid}.IIa07q_readSources>header strong{font-size:13px;font-weight:500;line-height:20px}.IIa07q_readSources>header p{max-width:92ch;color:var(--mn-faint);margin:0;font-size:12px;line-height:18px}.IIa07q_readSources>header>button{border:.5px solid var(--mn-line-strong);border-radius:var(--dsw-radius-sm);min-height:28px;color:var(--mn-text);cursor:pointer;background:0 0;flex:none;padding:0 10px;font-size:12px;line-height:18px}.IIa07q_readSources>header>button:hover{background:var(--mn-hover)}.IIa07q_readSources>header>button[data-selected]{background:var(--mn-fill);border-color:#0000}.IIa07q_readSources>div{grid-template-columns:repeat(auto-fit,minmax(min(260px,100%),1fr));gap:8px;display:grid}.IIa07q_readSourceCard,.IIa07q_bodyCard,.IIa07q_metadataList>label{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-md);color:var(--mn-text);background:0 0}.IIa07q_readSourceCard{text-align:left;grid-template-columns:6px minmax(0,1fr) auto;align-items:center;gap:10px;min-width:0;min-height:56px;padding:8px 10px 8px 12px;display:grid}button.IIa07q_readSourceCard{cursor:pointer}button.IIa07q_readSourceCard:hover{background:var(--mn-hover)}.IIa07q_readSourceCard[data-selected]{border-color:var(--mn-field-line);background:var(--mn-fill)}.IIa07q_readSourceSignal{corner-shape:round;background:var(--mn-success);border-radius:50%;width:6px;height:6px}.IIa07q_readSourceCard[data-mode=projection] .IIa07q_readSourceSignal,.IIa07q_readSourceCard[data-mode=enumerable] .IIa07q_readSourceSignal{background:var(--mn-success)}.IIa07q_readSourceCard[data-mode=query-only] .IIa07q_readSourceSignal{background:var(--mn-warn)}.IIa07q_readSourceCard[data-status=unavailable] .IIa07q_readSourceSignal{background:var(--mn-danger)}.IIa07q_readSourceCard[data-status=unsupported] .IIa07q_readSourceSignal,.IIa07q_readSourceCard[data-status=empty] .IIa07q_readSourceSignal{background:var(--mn-idle)}.IIa07q_readSourceCard[data-status=unsupported]{color:var(--mn-faint)}.IIa07q_readSourceIdentity,.IIa07q_readSourceState{gap:2px;min-width:0;display:grid}.IIa07q_readSourceIdentity strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.IIa07q_readSourceMeta{align-items:center;gap:6px;min-width:0;display:flex}.IIa07q_readSourceMeta>small{color:var(--mn-faint);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden}.IIa07q_readSourceState{text-align:right;justify-items:end}.IIa07q_readSourceState em{corner-shape:round;width:fit-content;color:var(--mn-muted);background:var(--mn-fill);white-space:nowrap;border-radius:999px;flex-shrink:0;padding:1px 8px;font-size:11px;font-style:normal;font-weight:500;line-height:17px}.IIa07q_readSourceCard[data-status=unsupported] .IIa07q_readSourceState em{border:.5px solid var(--mn-field-line);color:var(--mn-faint);background:0 0}.IIa07q_readSourceState small{color:var(--mn-faint);white-space:nowrap;font-size:11px;line-height:14px}.IIa07q_bodyDirectory{border:0;margin-bottom:14px;padding:0;position:relative}.IIa07q_bodyDirectoryHeader{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px 16px;margin-bottom:10px;display:flex}.IIa07q_bodyDirectoryHeader>div:first-child{flex:240px;min-width:0}.IIa07q_bodyDirectoryHeader h3{margin:0;font-size:13px;font-weight:500;line-height:20px}.IIa07q_bodyDirectoryHeader p{color:var(--mn-faint);margin:2px 0 0;font-size:12px;line-height:18px}.IIa07q_bodyDirectoryPath{max-width:100%;color:var(--mn-faint);text-overflow:ellipsis;white-space:nowrap;margin-top:4px;font-size:11px;line-height:16px;display:block;overflow:hidden}.IIa07q_bodyDirectoryControls{flex-wrap:wrap;flex:none;justify-content:flex-end;align-items:center;gap:8px;display:flex}.IIa07q_bodyDirectoryControls>strong{corner-shape:round;height:24px;color:var(--mn-muted);background:var(--mn-fill);font-variant-numeric:tabular-nums;border-radius:999px;flex:none;align-items:center;padding:0 9px;font-size:11px;font-weight:500;line-height:1;display:inline-flex}.IIa07q_syncFreshnessPill{border:.5px solid var(--mn-line);corner-shape:round;height:24px;color:var(--mn-faint);font-variant-numeric:tabular-nums;white-space:nowrap;background:0 0;border-radius:999px;align-items:center;gap:6px;padding:0 9px;font-size:11px;line-height:1;display:inline-flex}.IIa07q_syncFreshnessSpinner{border:1.5px solid color-mix(in srgb, var(--mn-faint) 28%, transparent);border-top-color:var(--mn-muted);corner-shape:round;border-radius:50%;flex:none;width:10px;height:10px;animation:.85s linear infinite IIa07q_mnemon-spin}.IIa07q_bodyGrid{grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:8px;display:grid}.IIa07q_bodyDirectoryEmpty{border-radius:var(--dsw-radius-md);min-height:96px;color:var(--mn-muted);background:var(--mn-block-fill,var(--mn-fill));grid-column:1/-1;justify-content:center;align-items:center;gap:12px;display:flex}.IIa07q_bodyDirectoryEmpty>span{color:var(--mn-faint);font-size:24px}.IIa07q_bodyDirectoryEmpty strong{color:var(--mn-text);font-weight:500;display:block}.IIa07q_bodyDirectoryEmpty p{color:var(--mn-faint);margin:2px 0 0;font-size:12px}.IIa07q_bodyCard{--mn-body-accent:var(--mn-success);min-width:0;padding:14px 16px;transition:border-color .16s,background-color .16s}.IIa07q_bodyCard:not([data-active]){background:var(--mn-fill);border-color:#0000}.IIa07q_bodyCard[data-reconnectable]{cursor:pointer}.IIa07q_bodyCard[data-reconnectable]:hover{border-color:var(--mn-field-line)}.IIa07q_bodyCard[data-reconnectable]:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--mn-focus);outline-offset:2px}.IIa07q_bodySignal{corner-shape:round;background:var(--mn-idle);border-radius:50%;width:6px;height:6px}.IIa07q_bodyCard[data-active] .IIa07q_bodySignal{background:var(--mn-body-accent)}.IIa07q_bodyCard:not([data-healthy]) .IIa07q_bodySignal{background:var(--mn-danger)}.IIa07q_bodyCard[data-status-loading] .IIa07q_bodySignal{background:var(--mn-idle)}.IIa07q_bodyCard[data-reconnecting] .IIa07q_bodySignal{box-sizing:border-box;border:1.5px solid color-mix(in srgb, var(--mn-faint) 25%, transparent);border-top-color:var(--mn-faint);background:0 0;width:8px;height:8px;animation:.9s linear infinite IIa07q_mnemon-spin}.IIa07q_bodyHealth{color:var(--mn-success);font-size:12px;line-height:18px}.IIa07q_bodyCard:not([data-healthy]) .IIa07q_bodyHealth{color:var(--mn-danger)}.IIa07q_bodyCard[data-status-loading] .IIa07q_bodyHealth{color:var(--mn-faint)}.IIa07q_mnemonDefaultBadge,.IIa07q_newSpaceBadge{corner-shape:round;width:fit-content;color:var(--mn-accent);background:color-mix(in srgb, var(--mn-accent) 10%, transparent);white-space:nowrap;border-radius:999px;flex-shrink:0;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_rediscoveryNotice{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);align-items:flex-start;gap:8px 12px;min-width:0;margin:0 0 12px;padding:10px 12px;display:flex}.IIa07q_rediscoveryNotice>div{flex:auto;gap:2px;min-width:0;display:grid}.IIa07q_rediscoveryNotice p{color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;margin:0;font-size:13px;line-height:20px}.IIa07q_rediscoveryNotice p[data-failed]{color:var(--mn-danger)}.IIa07q_rediscoveryNotice>button{flex:none}.IIa07q_providerBadge{corner-shape:round;width:fit-content;max-width:100%;color:var(--mn-muted);background:var(--mn-fill);text-align:center;text-overflow:ellipsis;vertical-align:middle;white-space:nowrap;border-radius:999px;flex:none;justify-content:center;align-items:center;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px;display:inline-flex;overflow:hidden}.IIa07q_providerBadge,.IIa07q_readSourceCard,.IIa07q_bodyCard,.IIa07q_metadataList>label,.IIa07q_graphNode,.IIa07q_providerBadge[data-provider=mnemon-native],.IIa07q_readSourceCard[data-provider=mnemon-native],.IIa07q_bodyCard[data-provider=mnemon-native],.IIa07q_metadataList>label[data-provider=mnemon-native],.IIa07q_graphNode[data-provider=mnemon-native]{--mn-provider-color:#64748b}.IIa07q_providerBadge[data-provider=openviking],.IIa07q_readSourceCard[data-provider=openviking],.IIa07q_bodyCard[data-provider=openviking],.IIa07q_metadataList>label[data-provider=openviking],.IIa07q_graphNode[data-provider=openviking]{--mn-provider-color:#3b82d0}.IIa07q_providerBadge[data-provider=honcho],.IIa07q_readSourceCard[data-provider=honcho],.IIa07q_bodyCard[data-provider=honcho],.IIa07q_metadataList>label[data-provider=honcho],.IIa07q_graphNode[data-provider=honcho]{--mn-provider-color:#c44fcf}.IIa07q_providerBadge[data-provider=mem0],.IIa07q_readSourceCard[data-provider=mem0],.IIa07q_bodyCard[data-provider=mem0],.IIa07q_metadataList>label[data-provider=mem0],.IIa07q_graphNode[data-provider=mem0]{--mn-provider-color:#8b5cf6}.IIa07q_providerBadge[data-provider=hindsight],.IIa07q_readSourceCard[data-provider=hindsight],.IIa07q_bodyCard[data-provider=hindsight],.IIa07q_metadataList>label[data-provider=hindsight],.IIa07q_graphNode[data-provider=hindsight]{--mn-provider-color:#0891b2}.IIa07q_providerBadge[data-provider=holographic],.IIa07q_readSourceCard[data-provider=holographic],.IIa07q_bodyCard[data-provider=holographic],.IIa07q_metadataList>label[data-provider=holographic],.IIa07q_graphNode[data-provider=holographic]{--mn-provider-color:#6366d9}.IIa07q_providerBadge[data-provider=retaindb],.IIa07q_readSourceCard[data-provider=retaindb],.IIa07q_bodyCard[data-provider=retaindb],.IIa07q_metadataList>label[data-provider=retaindb],.IIa07q_graphNode[data-provider=retaindb]{--mn-provider-color:#d08a28}.IIa07q_providerBadge[data-provider=byterover],.IIa07q_readSourceCard[data-provider=byterover],.IIa07q_bodyCard[data-provider=byterover],.IIa07q_metadataList>label[data-provider=byterover],.IIa07q_graphNode[data-provider=byterover]{--mn-provider-color:#0f9a83}.IIa07q_providerBadge[data-provider=supermemory],.IIa07q_readSourceCard[data-provider=supermemory],.IIa07q_bodyCard[data-provider=supermemory],.IIa07q_metadataList>label[data-provider=supermemory],.IIa07q_graphNode[data-provider=supermemory]{--mn-provider-color:#df4d72}.IIa07q_bodyCardActions{align-items:center;gap:8px;display:flex}.IIa07q_bodyCreateForm{flex-direction:column;flex-shrink:0;gap:16px;min-width:0;padding-top:0;padding-bottom:4px;display:flex}.IIa07q_createSection{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);flex-shrink:0;gap:12px;min-width:0;padding:14px 16px;display:grid}.IIa07q_createSectionHeading{align-items:flex-start;gap:10px;display:flex}.IIa07q_createSectionHeading>span{corner-shape:round;min-width:22px;height:22px;color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;flex:none;place-items:center;padding:0 6px;font-size:11px;font-weight:500;line-height:1;display:grid}.IIa07q_createSectionHeading>div{gap:2px;min-width:0;display:grid}.IIa07q_createSectionHeading strong{color:var(--mn-text);font-size:14px;font-weight:500;line-height:22px}.IIa07q_createSectionHeading small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_createIdentityGrid{grid-template-columns:minmax(0,1fr);align-items:stretch;gap:12px;display:grid}.IIa07q_createIdentityGrid>label{align-content:start}.IIa07q_createIdentityGrid textarea{min-height:72px}.IIa07q_strategyForm{flex-direction:column;flex-shrink:0;gap:16px;min-width:0;padding-top:0;padding-bottom:4px;display:flex}.IIa07q_strategyLoading{border-radius:var(--dsw-radius-md);min-height:88px;color:var(--mn-faint);background:var(--mn-fill);justify-content:center;align-items:center;font-size:12px;display:flex;position:relative}.IIa07q_strategyLoading .IIa07q_sectionSpinner{top:10px;right:10px}.IIa07q_placementMode{border:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;display:grid}.IIa07q_placementMode legend{color:var(--mn-muted);margin-bottom:6px;font-size:12px;font-weight:500;line-height:18px}.IIa07q_placementMode label{border:.5px solid var(--mn-line-strong);border-radius:var(--dsw-radius-md);cursor:pointer;grid-template-columns:16px minmax(0,1fr);align-items:center;gap:10px;min-width:0;padding:12px;transition:border-color .14s,background-color .14s,box-shadow .14s;display:grid;position:relative}.IIa07q_placementMode label:hover{background:var(--mn-hover)}.IIa07q_placementMode label[data-selected]{border-color:var(--mn-field-line);background:var(--mn-fill)}.IIa07q_placementMode label[data-disabled]{cursor:not-allowed;opacity:.5}.IIa07q_placementMode input{opacity:0;pointer-events:none;width:1px;height:1px;position:absolute}.IIa07q_placementMode span{gap:2px;display:grid}.IIa07q_placementMode strong{color:var(--mn-text);font-size:13px;font-weight:500;line-height:20px}.IIa07q_placementMode strong em{corner-shape:round;color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;margin-left:6px;padding:1px 8px;font-size:11px;font-style:normal;font-weight:500;line-height:17px}.IIa07q_placementMode small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_placementPolicy{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-md);flex-shrink:0;gap:10px;min-width:0;margin:0;padding:14px 16px;display:grid}.IIa07q_placementPolicyHeading{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.IIa07q_placementPolicyHeading>div{gap:2px;display:grid}.IIa07q_placementPolicyHeading strong{font-size:13px;font-weight:500;line-height:20px}.IIa07q_placementPolicyHeading small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_placementPolicyHeading>span{corner-shape:round;color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_placementPromptField{min-width:0;color:var(--mn-muted);gap:6px;font-size:12px;font-weight:500;line-height:18px;display:grid}.IIa07q_placementRuleGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.IIa07q_capabilityRules{border:0;flex-wrap:wrap;gap:6px;margin:0;padding:0;display:flex}.IIa07q_capabilityRules legend{width:100%;color:var(--mn-faint);margin-bottom:4px;font-size:12px;line-height:18px}.IIa07q_capabilityRules label{border:.5px solid var(--mn-line-strong);border-radius:var(--dsw-radius-sm);width:fit-content;min-height:28px;color:var(--mn-muted);cursor:pointer;align-items:center;gap:6px;padding:0 10px;font-size:12px;transition:border-color .14s,background-color .14s,box-shadow .14s;display:flex;position:relative}.IIa07q_capabilityRules label:hover{background:var(--mn-hover)}.IIa07q_capabilityRules label[data-selected]{border-color:var(--mn-field-line);color:var(--mn-text);background:var(--mn-fill)}.IIa07q_capabilityRules label[data-disabled]{cursor:not-allowed;opacity:.5}.IIa07q_capabilityRules input{opacity:0;pointer-events:none;width:1px;height:1px;position:absolute}.IIa07q_placementCandidates{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.IIa07q_placementCandidates>span,.IIa07q_placementCandidates>label{border:.5px solid var(--mn-line-strong);border-radius:var(--dsw-radius-md);grid-template-columns:28px minmax(0,1fr) 16px;align-items:center;gap:10px;min-width:0;padding:8px 10px;transition:border-color .14s,background-color .14s,box-shadow .14s;display:grid;position:relative}.IIa07q_placementCandidates>label{cursor:pointer}.IIa07q_placementCandidates>label:hover{background:var(--mn-hover)}.IIa07q_placementCandidates>[data-selected]{border-color:var(--mn-field-line);background:var(--mn-fill)}.IIa07q_placementCandidates>label[data-disabled]{cursor:not-allowed;opacity:.5}.IIa07q_placementCandidates input{opacity:0;pointer-events:none;width:1px;height:1px;position:absolute}.IIa07q_placementCandidates>span>span:not(.IIa07q_candidateIcon),.IIa07q_placementCandidates>label>span:not(.IIa07q_candidateIcon){gap:2px;min-width:0;display:grid}.IIa07q_placementCandidates strong{color:var(--mn-text);font-size:13px;font-weight:500;line-height:20px}.IIa07q_placementCandidates small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_providerChoice{border:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin:0;padding:0;display:grid}.IIa07q_providerChoice legend{color:var(--mn-muted);margin-bottom:6px;font-size:12px;font-weight:500;line-height:18px}.IIa07q_providerChoice label{border:.5px solid var(--mn-line-strong);border-radius:var(--dsw-radius-md);cursor:pointer;grid-template-columns:32px minmax(0,1fr) 16px;align-items:center;gap:10px;min-width:0;padding:10px 12px;transition:border-color .14s,background-color .14s,box-shadow .14s;display:grid;position:relative}.IIa07q_providerChoice label:hover{background:var(--mn-hover)}.IIa07q_providerChoice label[data-native]{grid-column:1/-1}.IIa07q_providerChoice label[data-selected]{border-color:var(--mn-field-line);background:var(--mn-fill)}.IIa07q_providerChoice label[data-disabled]{cursor:not-allowed;opacity:.5}.IIa07q_providerChoice input{opacity:0;pointer-events:none;width:1px;height:1px;position:absolute}.IIa07q_providerChoice span{gap:2px;display:grid}.IIa07q_providerChoice strong{color:var(--mn-text);font-size:13px;font-weight:500;line-height:20px}.IIa07q_providerChoice strong em{corner-shape:round;color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;margin-left:6px;padding:1px 8px;font-size:11px;font-style:normal;font-weight:500;line-height:17px}.IIa07q_providerChoice label[data-selected] strong em{background:var(--mn-layer-1)}.IIa07q_providerChoice small{color:var(--mn-faint);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.IIa07q_providerChoiceIcon,.IIa07q_candidateIcon,.IIa07q_providerFieldIcon{box-sizing:border-box;border:.5px solid var(--mn-line-strong);background:var(--mn-layer-1);place-items:center;display:grid;overflow:hidden}.IIa07q_providerChoiceIcon{border-radius:var(--dsw-radius-sm);width:32px;height:32px;padding:4px}.IIa07q_candidateIcon{border-radius:var(--dsw-radius-sm);width:28px;height:28px;padding:4px}.IIa07q_providerFieldIcon{border-radius:var(--dsw-radius-sm);flex:none;width:32px;height:32px;padding:4px}.IIa07q_providerChoiceIcon>img,.IIa07q_providerChoiceIcon>svg,.IIa07q_candidateIcon>img,.IIa07q_candidateIcon>svg,.IIa07q_providerFieldIcon>img,.IIa07q_providerFieldIcon>svg{object-fit:contain;border-radius:4px;width:100%;height:100%;display:block}.IIa07q_choiceControl{box-sizing:border-box;border:1px solid var(--mn-field-line);background:var(--mn-layer-1);border-radius:4px;flex:none;place-items:center;width:16px;height:16px;transition:border-color .14s,background-color .14s,box-shadow .14s;display:grid;position:relative}.IIa07q_choiceControl[data-kind=radio]{corner-shape:round;border-radius:50%}[data-selected]>.IIa07q_choiceControl{border-color:var(--dsw-alias-brand-primary);background:var(--dsw-alias-brand-primary)}[data-selected]>.IIa07q_choiceControl[data-kind=check]:after{border-bottom:1.5px solid var(--dsw-alias-label-primary-foreground);border-left:1.5px solid var(--dsw-alias-label-primary-foreground);content:\"\";width:7px;height:4px;transform:translateY(-1px)rotate(-45deg)}[data-selected]>.IIa07q_choiceControl[data-kind=radio]:after{corner-shape:round;content:\"\";background:var(--dsw-alias-label-primary-foreground);border-radius:50%;width:6px;height:6px}.IIa07q_placementMode label:has(input:focus-visible),.IIa07q_providerChoice label:has(input:focus-visible),.IIa07q_capabilityRules label:has(input:focus-visible),.IIa07q_placementCandidates label:has(input:focus-visible){outline:var(--dsw-focus-ring-width,2px) solid var(--mn-focus);outline-offset:1px}.IIa07q_providerFields{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-md);flex-shrink:0;gap:10px;min-width:0;padding:12px 14px;display:grid}.IIa07q_providerFieldHeading{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.IIa07q_providerFieldIdentity{align-items:center;gap:10px;min-width:0;display:flex}.IIa07q_providerFieldIdentity>div{gap:2px;min-width:0;display:grid}.IIa07q_providerFieldHeading strong{color:var(--mn-text);font-size:13px;font-weight:500;line-height:20px}.IIa07q_providerFieldHeading small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_providerFieldHeading>span{corner-shape:round;color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;flex:none;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_providerFields details{min-width:0}.IIa07q_providerFields summary{width:fit-content;color:var(--mn-muted);cursor:pointer;font-size:12px;line-height:18px}.IIa07q_providerFields summary:hover{color:var(--mn-text)}.IIa07q_providerEnableRow{flex-wrap:wrap;align-items:baseline;gap:4px 10px;min-width:0;margin-top:8px;display:flex}.IIa07q_providerEnableHint{color:var(--mn-faint);margin-top:8px;font-size:12px;line-height:18px;display:block}.IIa07q_providerEnableRow .IIa07q_providerEnableHint{margin-top:0}.IIa07q_providerEnableLink{appearance:none;border-radius:var(--dsw-radius-xs,4px);color:var(--dsw-alias-state-business-primary,var(--mn-accent));font:inherit;cursor:pointer;background:0 0;border:0;padding:0;font-size:12px;font-weight:500;line-height:18px}.IIa07q_providerEnableLink:hover{text-underline-offset:2px;text-decoration:underline}.IIa07q_providerEnableLink:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--mn-focus);outline-offset:2px}.IIa07q_providerAdvancedGrid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:8px;display:grid}.IIa07q_providerFieldControl .IIa07q_providerSecretClear{color:var(--mn-muted);cursor:pointer;align-items:center;gap:6px;font-size:12px;font-weight:400;display:flex}.IIa07q_providerWriteHint{color:var(--mn-faint);margin-top:4px;font-size:12px;line-height:18px;display:block}.IIa07q_placementReceipt{border-radius:var(--dsw-radius-sm);min-width:0;color:var(--mn-muted);background:var(--mn-fill);align-items:flex-start;gap:8px;margin:8px 0;padding:8px 10px;display:flex}.IIa07q_placementReceipt>span{flex:none;font-size:12px}.IIa07q_placementReceipt>div{grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;min-width:0;display:grid}.IIa07q_placementReceipt strong,.IIa07q_placementReceipt small{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.IIa07q_placementReceipt strong{color:var(--mn-text);font-size:12px;font-weight:500;line-height:18px}.IIa07q_placementReceipt small{color:var(--mn-faint);font-size:11px;line-height:18px}.IIa07q_placementReceipt p{color:var(--mn-faint);text-overflow:ellipsis;white-space:nowrap;grid-column:1/-1;margin:0;font-size:12px;line-height:18px;overflow:hidden}.IIa07q_bodyCard>p{min-height:18px;color:var(--mn-muted);margin:8px 0;font-size:13px;line-height:20px}.IIa07q_bodyCard footer{border-top:.5px solid var(--mn-line);min-width:0;color:var(--mn-faint);flex-wrap:nowrap;gap:4px 12px;padding-top:8px;font-size:12px;line-height:18px;display:flex;overflow:hidden}.IIa07q_bodyFooterBlock{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;min-width:0;display:block;overflow:hidden}.IIa07q_bodyFooterGrow{flex:auto}.IIa07q_smoothChevron{transition:transform .16s var(--ds-ease-in-out,cubic-bezier(.4, 0, .2, 1))}.IIa07q_embeddingManagedBody{flex-direction:column;gap:12px;min-width:0;padding-top:4px;display:flex}.IIa07q_settingsSection{border-top:.5px solid var(--dsw-alias-border-l2);padding-top:16px}.IIa07q_settingsPolicy,.IIa07q_settingsRecall{--mn-layer-1:var(--dsw-alias-bg-layer-1);--mn-layer-2:var(--dsw-alias-bg-layer-2);--mn-fill:var(--dsw-alias-bg-module-platform);--mn-block-fill:var(--dsw-alias-bg-module-platform);--mn-input:var(--dsw-alias-bg-layer-3,var(--dsw-alias-bg-layer-1));--mn-text:var(--dsw-alias-label-primary);--mn-muted:var(--dsw-alias-label-secondary);--mn-faint:var(--dsw-alias-label-tertiary);--mn-caption:var(--dsw-alias-label-caption);--mn-line:var(--dsw-alias-border-l2);--mn-line-strong:var(--dsw-alias-border-l3);--mn-field-line:var(--dsw-alias-border-l4);--mn-card-line:var(--dsw-alias-settings-card-stroke);--mn-accent:var(--dsw-alias-state-business-primary);--mn-hover:var(--dsw-alias-interactive-bg-hover);--mn-pressed:var(--dsw-alias-interactive-bg-active);--mn-danger:var(--dsw-alias-state-error-primary);--mn-success:var(--dsw-alias-state-success-primary);--mn-warn:var(--dsw-alias-state-warn-primary);--mn-idle:var(--dsw-alias-state-idle-primary);--mn-focus:var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary))}.IIa07q_settingsPolicyBody{flex-direction:column;gap:12px;min-width:0;margin-top:8px;display:flex}.IIa07q_settingsPolicyToggle{border-radius:var(--dsw-radius-md,8px);width:calc(100% + 16px);min-width:0;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;justify-content:space-between;align-items:center;gap:16px;margin:0 -8px;padding:9px 8px;transition:background-color .14s;display:flex}.IIa07q_settingsPolicyToggle:hover{background:var(--dsw-alias-interactive-bg-hover)}.IIa07q_settingsPolicyToggle:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}.IIa07q_settingsPolicyHeading{gap:2px;min-width:0;display:grid}.IIa07q_settingsPolicyHeading strong{font-size:14px;font-weight:400;line-height:22px}.IIa07q_settingsPolicyHeading small{color:var(--dsw-alias-label-tertiary);font-size:12px;font-weight:400;line-height:18px}.IIa07q_settingsPolicyMeta{color:var(--dsw-alias-label-tertiary);flex:none;align-items:center;gap:8px;display:inline-flex}.IIa07q_settingsProvidersBadge{border:.5px solid var(--dsw-alias-border-l2);corner-shape:round;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:999px;grid-area:1/2;place-self:center end;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_settingsPolicyBadge{border:.5px solid var(--dsw-alias-border-l2);corner-shape:round;color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-bg-module-platform);font-variant-numeric:tabular-nums;white-space:nowrap;border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_settingsPolicy[data-open] .IIa07q_settingsPolicyToggle .IIa07q_smoothChevron,.IIa07q_settingsRecall[data-open] .IIa07q_settingsPolicyToggle .IIa07q_smoothChevron{transform:rotate(180deg)}.IIa07q_settingsPolicy .IIa07q_placementPromptField{color:var(--dsw-alias-label-primary);font-size:13px;line-height:20px}.IIa07q_settingsPolicy textarea{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md,8px);width:100%;min-width:0;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3,var(--dsw-alias-bg-base));font:inherit;resize:vertical;outline:none;padding:8px 12px;font-size:13px;font-weight:400;line-height:20px}.IIa07q_settingsPolicy textarea::placeholder{color:var(--dsw-alias-label-dimmed)}.IIa07q_settingsPolicy textarea:focus-visible{border-color:var(--dsw-alias-state-business-primary)}.IIa07q_settingsPolicy textarea:disabled{opacity:.5}.IIa07q_settingsRows{flex-direction:column;min-width:0;display:flex}.IIa07q_settingsRows>:last-child{border-bottom:0}.IIa07q_settingsRow{border-bottom:.5px solid var(--dsw-alias-border-l2);justify-content:space-between;align-items:center;gap:8px 16px;min-width:0;padding:14px 0;display:flex}.IIa07q_settingsRowCopy{flex-direction:column;flex:auto;gap:2px;min-width:0;display:flex}.IIa07q_settingsRowCopy strong,.IIa07q_settingsRowCopy label{color:var(--dsw-alias-label-primary);font-size:14px;font-weight:400;line-height:22px}.IIa07q_settingsRowCopy small{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}.IIa07q_settingsRowControl{flex:none;justify-content:flex-end;align-items:center;gap:8px;min-width:0;display:flex}.IIa07q_settingsSelector{appearance:none;border-radius:var(--dsw-radius-md,8px);max-width:280px;height:36px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform);font:inherit;white-space:nowrap;cursor:pointer;border:0;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;transition:background-color .12s,color .12s;display:inline-flex}.IIa07q_settingsSelector>span{text-overflow:ellipsis;min-width:0;overflow:hidden}.IIa07q_settingsSelector>svg{color:var(--dsw-alias-label-tertiary);flex:none}.IIa07q_settingsSelector:hover:not(:disabled),.IIa07q_settingsSelector[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}.IIa07q_settingsSelector:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}.IIa07q_settingsSelector:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline:none}.IIa07q_settingsSelector:disabled{cursor:default;opacity:.4}.IIa07q_settingsSelectMenu{min-width:220px}.IIa07q_settingsSelectOption{white-space:normal;gap:1px;min-width:0;display:grid}.IIa07q_settingsSelectOption>small{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}.IIa07q_settingsNumberInput{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md,8px);width:128px;height:34px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-layer-3,var(--dsw-alias-bg-base));font:inherit;text-align:right;font-variant-numeric:tabular-nums;outline:none;padding:0 10px;font-size:13px;line-height:20px;transition:border-color .12s}.IIa07q_settingsNumberInput:focus-visible{border-color:var(--dsw-alias-state-business-primary)}.IIa07q_settingsNumberInput[aria-invalid=true]{border-color:var(--dsw-alias-state-error-primary)}.IIa07q_settingsNumberInput:disabled{cursor:default;opacity:.5}.IIa07q_graphLayout{grid-template-columns:minmax(0,1fr) minmax(240px,280px);gap:12px;min-height:520px;display:grid}.IIa07q_graphPanel,.IIa07q_graphInspector{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg)}.IIa07q_graphPanel{min-width:0;position:relative;overflow:hidden}.IIa07q_graphToolbar,.IIa07q_graphFooter{min-height:44px;color:var(--mn-faint);justify-content:space-between;align-items:center;gap:16px;padding:0 14px;font-size:12px;line-height:18px;display:flex}.IIa07q_graphToolbar{border-bottom:.5px solid var(--mn-line)}.IIa07q_graphToolbar>div:first-child{align-items:center;gap:8px;display:flex}.IIa07q_graphToolbarRight{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px 12px;display:flex}.IIa07q_graphModeToggle{--seg-index:0;border-radius:var(--dsw-radius-sm,6px);background:var(--mn-hover);grid-template-columns:repeat(2,1fr);align-items:center;gap:2px;padding:3px;display:inline-grid;position:relative}.IIa07q_graphModeToggle[data-view=\"3d\"]{--seg-index:1}.IIa07q_graphModeToggle:before{content:\"\";box-sizing:border-box;border:.5px solid var(--mn-line);border-radius:var(--dsw-radius-xs,4px);background:var(--mn-layer-1);width:calc(50% - 4px);height:calc(100% - 6px);box-shadow:var(--dsw-elevation-soft);transform:translateX(calc(var(--seg-index) * (100% + 2px)));pointer-events:none;transition:transform .16s cubic-bezier(.22,1,.36,1);position:absolute;top:3px;left:3px}.IIa07q_graphModeToggle button{z-index:1;border-radius:var(--dsw-radius-xs,4px);min-width:34px;height:24px;color:var(--mn-muted);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0 9px;font-size:11px;font-weight:500;line-height:1;transition:color .14s;display:inline-flex;position:relative}.IIa07q_graphModeToggle button:hover,.IIa07q_graphModeToggle button[data-active]{color:var(--mn-text)}.IIa07q_graphModeToggle button:focus-visible{box-shadow:0 0 0 2px var(--mn-focus);outline:none}.IIa07q_graphToolbar small{color:var(--mn-faint);font-variant-numeric:tabular-nums}.IIa07q_liveDot{corner-shape:round;background:var(--mn-success);border-radius:50%;width:6px;height:6px}.IIa07q_graphLegend{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:4px 12px;display:flex}.IIa07q_graphLegend span{align-items:center;gap:6px;display:inline-flex}.IIa07q_graphLegend span:before{content:\"\";background:var(--edge-color);border-radius:2px;width:14px;height:2px}.IIa07q_graphLegend [data-edge=temporal]{--edge-color:color-mix(in srgb, var(--dsw-alias-label-secondary,var(--mn-muted)) 72%, #87909f)}.IIa07q_graphLegend [data-edge=scope]{--edge-color:color-mix(in srgb, var(--dsw-alias-label-secondary,var(--mn-muted)) 78%, #708199)}.IIa07q_graphLegend [data-edge=scope]:before{background:repeating-linear-gradient(90deg, var(--edge-color) 0 4px, transparent 4px 7px)}.IIa07q_graphLegend [data-edge=semantic]{--edge-color:color-mix(in srgb, var(--dsw-alias-state-business-primary,var(--mn-accent)) 82%, #4d7cfe)}.IIa07q_graphLegend [data-edge=causal]{--edge-color:#f07667}.IIa07q_graphLegend [data-edge=entity]{--edge-color:#25b383}.IIa07q_graphViewport{min-height:clamp(390px,42vw,560px);position:relative;overflow:hidden}.IIa07q_graphCanvasControls{z-index:2;border:.5px solid var(--mn-line);border-radius:var(--dsw-radius-md);background:var(--dsw-specific-menu,var(--mn-layer-2));box-shadow:var(--dsw-elevation-soft);backdrop-filter:var(--dsw-menu-backdrop-filter);align-items:center;gap:2px;padding:4px;display:inline-flex;position:absolute;top:10px;right:10px}.IIa07q_graphCanvasControls span{border-right:.5px solid var(--mn-line);height:26px;color:var(--mn-faint);white-space:nowrap;align-items:center;gap:6px;margin-right:2px;padding:0 8px;font-size:12px;line-height:1;display:inline-flex}.IIa07q_graphCanvasControls span i{corner-shape:round;background:var(--mn-accent);border-radius:50%;width:6px;height:6px}.IIa07q_graphCanvasControls button{border-radius:var(--dsw-radius-sm);min-width:28px;height:26px;color:var(--mn-muted);white-space:nowrap;cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0 9px;font-size:12px;font-weight:500;line-height:1;transition:background-color .12s,color .12s;display:inline-flex}.IIa07q_graphCanvasControls button:hover{color:var(--mn-text);background:var(--mn-hover)}.IIa07q_graphCanvasControls button[data-active]{color:var(--mn-text);background:var(--mn-fill)}.IIa07q_graphCanvasControls button:focus-visible{box-shadow:0 0 0 2px var(--mn-focus);outline:none}.IIa07q_graphSvg{touch-action:pan-y pinch-zoom;user-select:none;width:100%;height:clamp(390px,42vw,560px);display:block}.IIa07q_graphCanvas{touch-action:none;user-select:none;cursor:grab;outline:none;width:100%;height:clamp(390px,42vw,560px);display:block}.IIa07q_graphCanvas:focus-visible{outline:2px solid var(--mn-accent);outline-offset:-2px}.IIa07q_graphNodePicker{border-top:.5px solid var(--mn-line);background:color-mix(in srgb, var(--mn-fill) 38%, transparent);min-width:0;color:var(--mn-faint);justify-content:space-between;align-items:center;gap:10px;padding:8px 14px;font-size:12px;line-height:18px;display:flex}.IIa07q_graphNodePicker>span{white-space:nowrap;flex:none;font-weight:500}.IIa07q_graphNodePicker select{appearance:none;border:.5px solid var(--mn-line-strong);border-radius:var(--dsw-radius-sm,6px);min-width:0;max-width:340px;height:30px;color:var(--mn-text);background-color:var(--mn-layer-1);font:inherit;cursor:pointer;background-image:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%2381858C' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E\");background-position:right 10px center;background-repeat:no-repeat;background-size:12px 12px;flex:auto;padding:0 30px 0 10px;font-size:12px;transition:border-color .12s,background-color .12s}.IIa07q_graphNodePicker select:hover:not(:disabled){border-color:var(--mn-field-line)}.IIa07q_graphNodePicker select:focus-visible{border-color:var(--mn-focus);box-shadow:0 0 0 2px color-mix(in srgb, var(--mn-focus) 25%, transparent);outline:none}.IIa07q_graphNodePicker select:disabled{cursor:default;opacity:.5}.IIa07q_graphCanvas[data-hover]{cursor:pointer}.IIa07q_graphCanvas[data-dragging]{cursor:grabbing}.IIa07q_graphBackdrop{fill:var(--dsw-alias-bg-layer-1,var(--mn-layer-1))}.IIa07q_graphGridLine{stroke:var(--dsw-alias-border-l2,var(--mn-line));stroke-width:.6px;opacity:.65}.IIa07q_graphEdge{fill:none;stroke:color-mix(in srgb, var(--dsw-alias-label-secondary,var(--mn-muted)) 72%, #87909f);stroke-width:1.05px;opacity:.44;vector-effect:non-scaling-stroke}.IIa07q_graphEdge[data-edge=scope]{stroke:color-mix(in srgb, var(--dsw-alias-label-secondary,var(--mn-muted)) 78%, #708199);stroke-dasharray:4 5;opacity:.4}.IIa07q_graphEdge[data-edge=semantic]{stroke:color-mix(in srgb, var(--dsw-alias-state-business-primary,var(--mn-accent)) 82%, #4d7cfe);opacity:.6}.IIa07q_graphEdge[data-edge=causal]{stroke:#f07667;opacity:.64}.IIa07q_graphEdge[data-edge=entity]{stroke:#25b383;stroke-width:1.45px;opacity:.82}.IIa07q_graphNode{--node:#8290a8;cursor:grab;touch-action:none;outline:none}.IIa07q_graphNode[data-dragging]{cursor:grabbing}.IIa07q_graphNode[data-category=decision]{--node:#ef8354}.IIa07q_graphNode[data-category=preference]{--node:#a879e1}.IIa07q_graphNode[data-category=fact]{--node:#4d7cfe}.IIa07q_graphNode[data-category=insight]{--node:#19a77d}.IIa07q_graphNode[data-category=context]{--node:#d8a624}.IIa07q_graphNode[data-kind=space]{--node:var(--mn-provider-color)}.IIa07q_graphNode[data-kind=entity]{--node:#2b9db9}.IIa07q_nodeHalo{fill:color-mix(in srgb, var(--node) 20%, var(--dsw-alias-bg-layer-1,var(--mn-layer-1)));stroke:color-mix(in srgb, var(--node) 68%, var(--dsw-alias-bg-layer-1,var(--mn-layer-1)));stroke-width:1.5px;transition:r .16s}.IIa07q_nodeCore{fill:var(--node)}.IIa07q_nodeLabel{fill:color-mix(in srgb, var(--dsw-alias-label-primary,var(--mn-text)) 78%, var(--dsw-alias-label-secondary,var(--mn-muted)));font:11px var(--mn-sans);pointer-events:auto}.IIa07q_nodeBodyLabel{fill:var(--dsw-alias-label-secondary,var(--mn-muted));font:500 11px var(--mn-sans);pointer-events:auto}.IIa07q_graphSvg[data-density=sparse] .IIa07q_nodeLabel{font-size:12px}.IIa07q_graphNode:hover .IIa07q_nodeHalo,.IIa07q_graphNode:focus .IIa07q_nodeHalo,.IIa07q_graphNode[data-selected] .IIa07q_nodeHalo{fill:color-mix(in srgb, var(--node) 30%, var(--dsw-alias-bg-layer-1,var(--mn-layer-1)));stroke:var(--node)}.IIa07q_graphNode[data-selected] .IIa07q_nodeLabel{fill:var(--dsw-alias-label-primary,var(--mn-text));font-weight:500}.IIa07q_graphPanel[data-quiet] .IIa07q_graphLegend{display:none}.IIa07q_graphSvg[data-quiet] .IIa07q_graphNode{--node:var(--dsw-alias-label-secondary,var(--mn-muted))}.IIa07q_graphSvg[data-quiet] .IIa07q_graphNode[data-selected]{--node:var(--dsw-alias-state-business-primary,var(--mn-accent))}.IIa07q_graphSvg[data-quiet] .IIa07q_graphNode[data-dimmed]{opacity:.4}.IIa07q_graphSvg[data-quiet] .IIa07q_graphNode:hover,.IIa07q_graphSvg[data-quiet] .IIa07q_graphNode:focus{opacity:1}.IIa07q_graphSvg[data-quiet] .IIa07q_nodeHalo{filter:none}.IIa07q_graphSvg[data-quiet] .IIa07q_graphEdge{stroke:var(--dsw-alias-label-tertiary,var(--mn-faint));stroke-width:.85px;stroke-dasharray:none;opacity:.46;pointer-events:none}.IIa07q_graphSvg[data-quiet] .IIa07q_graphEdge[data-dimmed]{opacity:.2}.IIa07q_graphSvg[data-quiet] .IIa07q_nodeLabel,.IIa07q_graphSvg[data-quiet] .IIa07q_nodeBodyLabel{visibility:hidden;pointer-events:none}.IIa07q_graphSvg[data-quiet] .IIa07q_graphNode:hover text,.IIa07q_graphSvg[data-quiet] .IIa07q_graphNode:focus text,.IIa07q_graphSvg[data-quiet] .IIa07q_graphNode[data-selected] text{visibility:visible}.IIa07q_graphFooter{border-top:.5px solid var(--mn-line);min-height:40px;color:var(--mn-faint)}.IIa07q_graphInspector{min-width:0;min-height:calc(clamp(390px,42vw,560px) + 84px);padding:16px 18px;overflow:hidden}.IIa07q_inspectorEmpty{text-align:center;flex-direction:column;justify-content:center;align-items:center;height:100%;display:flex}.IIa07q_inspectorLogo{border-radius:var(--dsw-radius-lg);opacity:.72;width:48px;height:48px;margin-bottom:12px}.IIa07q_inspectorEmpty h3{margin:6px 0 2px;font-size:14px;font-weight:500;line-height:22px}.IIa07q_inspectorEmpty p{color:var(--mn-faint);margin:0;font-size:12px;line-height:18px}.IIa07q_inspectorHeading{justify-content:space-between;align-items:center;display:flex}.IIa07q_inspectorHeading button{border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--mn-muted);cursor:pointer;background:0 0;border:0;place-items:center;display:grid}.IIa07q_inspectorHeading button:hover{background:var(--mn-hover)}.IIa07q_inspectorChips{flex-wrap:wrap;align-items:center;gap:6px;margin-top:20px;display:flex}.IIa07q_categoryChip{corner-shape:round;color:var(--mn-muted);background:var(--mn-fill);white-space:nowrap;border-radius:999px;flex-shrink:0;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px;display:inline-flex}.IIa07q_inspectorTitleRow{align-items:flex-start;gap:8px;min-width:0;margin:12px 0 20px;display:flex}.IIa07q_inspectorTitle{overflow-wrap:anywhere;white-space:pre-wrap;-webkit-line-clamp:6;-webkit-box-orient:vertical;flex:1;min-width:0;margin:0;font-size:14px;font-weight:400;line-height:22px;display:-webkit-box;overflow:hidden}.IIa07q_inspectorEye{border:.5px solid var(--mn-line-strong);border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--mn-muted);cursor:pointer;background:0 0;flex:none;place-items:center;transition:color .15s,background-color .15s;display:grid}.IIa07q_inspectorEye:hover{color:var(--mn-text);background:var(--mn-hover)}.IIa07q_inspectorMeta{margin:0}.IIa07q_inspectorMeta>div{border-top:.5px solid var(--mn-line);gap:2px;padding:10px 0;display:grid}.IIa07q_inspectorMeta dt{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_inspectorMeta dd{overflow-wrap:anywhere;color:var(--mn-muted);margin:0;font-size:13px;line-height:20px}.IIa07q_inspectorActions{gap:8px;margin-top:20px;display:grid}.IIa07q_previewContent{white-space:pre-wrap;overflow-wrap:anywhere;color:var(--mn-text);margin:0;font-size:14px;line-height:22px}.IIa07q_searchBar{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);margin-bottom:16px;padding:14px 16px}.IIa07q_queryField{border-radius:var(--dsw-radius-md,8px);width:100%;height:34px;min-height:34px}.IIa07q_queryField input{min-height:34px}.IIa07q_searchChoice{align-items:center;gap:8px;min-width:0;display:inline-flex}.IIa07q_searchChoice>span{color:var(--mn-faint);white-space:nowrap;flex:none;font-size:12px;line-height:18px}.IIa07q_searchChoice button[aria-haspopup=menu]{border-radius:var(--dsw-radius-md,8px);min-width:124px;height:34px;min-height:34px;font-size:13px;line-height:20px}.IIa07q_searchControls{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:10px 12px;padding-top:12px;display:flex}.IIa07q_searchFilters{flex-wrap:wrap;align-items:center;gap:10px 14px;min-width:0;display:flex}.IIa07q_searchActions{flex:none;align-items:center;gap:8px;margin-left:auto;display:flex}.IIa07q_searchActions>button{border-radius:var(--dsw-radius-md,8px);height:34px;min-height:34px}.IIa07q_agentAnswer{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);margin-bottom:16px;padding:16px 18px}.IIa07q_agentAnswerHeading{justify-content:space-between;align-items:flex-start;gap:16px;display:flex}.IIa07q_agentAnswerHeading span{color:var(--mn-faint);font-size:12px;font-weight:500;line-height:18px}.IIa07q_agentAnswerHeading h3{margin:2px 0 0;font-size:14px;font-weight:500;line-height:22px}.IIa07q_agentAnswerHeading>code{color:var(--mn-faint);font-size:11px}.IIa07q_agentAnswer>p{white-space:pre-wrap;color:var(--mn-text);margin:12px 0;font-size:14px;line-height:22px}.IIa07q_agentCitations{border-top:.5px solid var(--mn-line);flex-wrap:wrap;align-items:center;gap:6px;padding-top:10px;display:flex}.IIa07q_agentCitations small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_agentCitations span{corner-shape:round;max-width:100%;color:var(--mn-muted);background:var(--mn-fill);text-overflow:ellipsis;white-space:nowrap;border-radius:999px;padding:1px 8px;font-size:12px;line-height:18px;overflow:hidden}.IIa07q_fieldWide{color:var(--mn-muted);gap:6px;font-size:12px;font-weight:500;line-height:18px;display:grid}.IIa07q_supervisedForm textarea:focus{border-color:var(--mn-accent)}.IIa07q_singleColumn{width:100%;max-width:980px;margin-inline:auto}.IIa07q_resultLayout{grid-template-columns:minmax(0,1.15fr) minmax(300px,.85fr);align-items:start;gap:16px;display:grid}.IIa07q_results,.IIa07q_relatedPane,.IIa07q_entityResults{min-width:0}.IIa07q_relatedPane{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);-webkit-overflow-scrolling:touch;max-height:calc(100dvh - 230px);padding:16px 18px;scroll-margin-top:14px;position:sticky;top:12px;overflow:auto}.IIa07q_relatedSource{border-radius:var(--dsw-radius-sm);color:var(--mn-muted);background:var(--mn-fill);margin:0 0 12px;padding:10px 12px;font-size:13px;line-height:20px}.IIa07q_insightCard{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);min-width:0;margin-bottom:8px;padding:16px 18px;transition:background-color .15s,border-color .15s}.IIa07q_insightCard:hover{background:color-mix(in srgb, var(--mn-hover) 50%, transparent)}.IIa07q_cardTop{justify-content:space-between;align-items:center;gap:12px;display:flex}.IIa07q_badges,.IIa07q_tags,.IIa07q_entities{flex-wrap:wrap;gap:6px;display:flex}.IIa07q_badge{corner-shape:round;color:var(--mn-muted);background:var(--mn-fill);white-space:nowrap;border-radius:999px;flex-shrink:0;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_id{color:var(--mn-faint);font-size:11px}.IIa07q_content{white-space:pre-wrap;overflow-wrap:anywhere;margin:10px 0;font-size:14px;line-height:22px}.IIa07q_tags{color:var(--mn-accent);font-size:12px;line-height:18px}.IIa07q_entities{margin-top:8px}.IIa07q_entities span{border:.5px solid var(--mn-field-line);corner-shape:round;color:var(--mn-faint);white-space:nowrap;border-radius:999px;flex-shrink:0;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_cardActions{border-top:.5px solid var(--mn-line);justify-content:flex-end;align-items:center;gap:4px;min-height:32px;margin-top:10px;padding-top:8px;display:flex}.IIa07q_entityLayout{grid-template-columns:264px minmax(0,1fr);align-items:start;gap:16px;display:grid}.IIa07q_entityRail{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);padding:14px;position:sticky;top:0}.IIa07q_entitySearch{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px;display:grid}.IIa07q_entitySearch input{min-width:0}.IIa07q_entitySearch>button{border-radius:var(--dsw-radius-md,8px);min-height:34px}.IIa07q_entityHeading{justify-content:space-between;align-items:center;margin:16px 4px 6px;display:flex}.IIa07q_entityHeading small{color:var(--mn-faint);font-variant-numeric:tabular-nums;font-size:12px}.IIa07q_entityList{gap:2px;display:grid}.IIa07q_entityList button{border-radius:var(--dsw-radius-sm);min-height:32px;color:var(--mn-muted);cursor:pointer;text-align:left;background:0 0;border:0;justify-content:space-between;align-items:center;gap:10px;padding:0 10px;display:flex}.IIa07q_entityList button:hover,.IIa07q_entityList button[aria-pressed=true]{color:var(--mn-text);background:var(--mn-hover)}.IIa07q_entityList button[aria-pressed=true]{background:var(--mn-fill)}.IIa07q_entityList button>span{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;overflow:hidden}.IIa07q_entityList strong{color:var(--mn-faint);font-variant-numeric:tabular-nums;white-space:nowrap;flex:none;font-size:12px;font-weight:400}.IIa07q_entityResults>.IIa07q_emptyState{min-height:360px}.IIa07q_entitySection{min-width:0}.IIa07q_entitySection+.IIa07q_entitySection{margin-top:24px}.IIa07q_entitySectionBody{min-height:116px}.IIa07q_entityQuiet{color:var(--mn-faint);margin:0 0 8px;padding:12px 2px;font-size:13px;line-height:20px}.IIa07q_entityRetry{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 12px;display:flex}.IIa07q_entityRelatedHead{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.IIa07q_entityRelatedHead>div:first-child{flex:1;min-width:0}.IIa07q_entityRelatedHead>button{flex:none;margin-top:2px}.IIa07q_insightSkeleton{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);align-content:start;gap:12px;min-height:108px;margin-bottom:8px;padding:16px 18px;display:grid;position:relative;overflow:hidden}.IIa07q_insightSkeleton>span{corner-shape:round;background:var(--mn-fill);border-radius:999px;height:10px;display:block}.IIa07q_insightSkeleton>span:first-child{width:36%}.IIa07q_insightSkeleton>span:nth-child(2){width:94%}.IIa07q_insightSkeleton>span:nth-child(3){width:68%}.IIa07q_entityRailSkeleton{border-radius:var(--dsw-radius-sm);background:color-mix(in srgb, var(--mn-fill) 55%, transparent);height:32px;display:block;position:relative;overflow:hidden}.IIa07q_insightSkeleton:after,.IIa07q_entityRailSkeleton:after{content:\"\";background:linear-gradient(105deg, transparent 20%, color-mix(in srgb, var(--mn-text) 5%, transparent) 45%, transparent 70%);pointer-events:none;animation:1.2s ease-in-out infinite IIa07q_entity-skeleton-sweep;position:absolute;inset:0;transform:translate(-120%)}@keyframes IIa07q_entity-skeleton-sweep{to{transform:translate(120%)}}.IIa07q_readSourceCard[data-status=loading] .IIa07q_readSourceSignal{background:var(--mn-idle)}.IIa07q_supervisedComposer{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);overflow:hidden}.IIa07q_supervisedForm{padding:16px 18px}.IIa07q_candidateHeading{justify-content:space-between;align-items:center;gap:8px;min-width:0;margin-bottom:8px;display:flex}.IIa07q_candidateHeading>label{color:var(--mn-text);font-size:13px;font-weight:500;line-height:20px}.IIa07q_supervisedForm textarea{resize:vertical;border:.5px solid var(--mn-field-line);border-radius:var(--dsw-radius-md);width:100%;color:var(--mn-text);background:var(--mn-input);outline:0;padding:10px 12px;font-size:14px;line-height:22px}.IIa07q_sessionHint{color:var(--mn-danger);margin:8px 0 0;font-size:12px;line-height:18px}.IIa07q_fieldWide{grid-column:1/-1}.IIa07q_advancedWrite{border-top:.5px solid var(--mn-line)}.IIa07q_advancedWrite summary{cursor:pointer;justify-content:space-between;align-items:center;gap:16px;min-height:56px;padding:10px 16px;list-style:none;display:flex}.IIa07q_advancedWrite summary:hover{background:var(--mn-hover)}.IIa07q_advancedWrite summary::-webkit-details-marker{display:none}.IIa07q_advancedWrite summary>span:first-child{gap:2px;display:grid}.IIa07q_advancedWrite summary strong{font-size:13px;font-weight:500;line-height:20px}.IIa07q_advancedWrite summary small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_advancedWriteIndicator{color:var(--mn-faint);flex:none;align-items:center;gap:6px;font-size:12px;line-height:18px;display:inline-flex}.IIa07q_advancedWriteChevron{transition:transform .16s var(--ds-ease-in-out,cubic-bezier(.4, 0, .2, 1));flex:none}.IIa07q_advancedWrite[open] summary{border-bottom:.5px solid var(--mn-line)}.IIa07q_advancedWrite[open] .IIa07q_advancedWriteToggleText{display:none}.IIa07q_advancedWrite[open] .IIa07q_advancedWriteChevron{transform:rotate(180deg)}.IIa07q_manualForm{padding:4px 16px 16px}.IIa07q_manualActions{justify-content:space-between;align-items:center;gap:16px;margin-top:16px;display:flex}.IIa07q_manualActions p{max-width:520px;color:var(--mn-faint);margin:0;font-size:12px;line-height:18px}.IIa07q_listToolbar{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);grid-template-columns:minmax(0,1fr) 180px auto;align-items:center;gap:8px;padding:14px 18px;display:grid}.IIa07q_listToolbar>*{min-width:0}.IIa07q_listToolbar button[aria-haspopup=menu]{border-radius:var(--dsw-radius-md,8px);height:34px;min-height:34px;font-size:13px;line-height:20px}.IIa07q_listToolbar>button{border-radius:var(--dsw-radius-md,8px);min-height:34px}.IIa07q_listNotice{color:var(--mn-faint);margin:10px 2px 16px;font-size:12px;line-height:18px}.IIa07q_listNotice span{corner-shape:round;color:var(--mn-success);background:color-mix(in srgb, var(--mn-success) 10%, transparent);border-radius:999px;margin-right:8px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_memoryList{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:8px;display:grid}.IIa07q_memoryList .IIa07q_insightCard{height:100%;margin:0}.IIa07q_modalFooterNote{max-width:54ch;color:var(--mn-faint);margin:0 auto 0 0;font-size:12px;line-height:18px}.IIa07q_metadataDialog{gap:12px;display:grid}.IIa07q_metadataToolbar{color:var(--mn-faint);justify-content:space-between;align-items:center;gap:12px;font-size:12px;line-height:18px;display:flex}.IIa07q_metadataToolbar>span{align-items:center;gap:8px;min-width:0;display:flex}.IIa07q_metadataToolbar em{corner-shape:round;color:var(--mn-muted);background:var(--mn-fill);font-variant-numeric:tabular-nums;border-radius:999px;padding:1px 8px;font-size:11px;font-style:normal;font-weight:500;line-height:17px}.IIa07q_metadataList{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;display:grid}.IIa07q_metadataEmpty{border-radius:var(--dsw-radius-md);color:var(--mn-faint);background:var(--mn-fill);text-align:center;grid-column:1/-1;padding:20px;font-size:12px}.IIa07q_metadataList>label{cursor:pointer;grid-template-columns:16px minmax(0,1fr);align-items:start;gap:10px;min-width:0;min-height:76px;padding:12px;display:grid;position:relative}.IIa07q_metadataList>label:hover{background:var(--mn-hover)}.IIa07q_metadataList>label[data-selected]{border-color:var(--mn-field-line);background:var(--mn-fill)}.IIa07q_metadataList>label[data-refreshing]{overflow:hidden}.IIa07q_metadataList>label[data-refreshing]:after{content:\"\";background:linear-gradient(105deg, transparent 20%, color-mix(in srgb, var(--mn-accent) 10%, transparent) 45%, transparent 70%);pointer-events:none;animation:.9s ease-in-out infinite IIa07q_mnemon-metadata-sweep;position:absolute;inset:0;transform:translate(-120%)}.IIa07q_metadataList>label[data-refreshed]{animation:.9s ease-out IIa07q_mnemon-metadata-refreshed}.IIa07q_metadataList>label[data-failed]{border-color:color-mix(in srgb, var(--mn-danger) 40%, transparent)}.IIa07q_metadataList>label>input{opacity:0;pointer-events:none;width:1px;height:1px;position:absolute}.IIa07q_metadataList>label>span{gap:4px;min-width:0;display:grid}.IIa07q_metadataList strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.IIa07q_metadataList small{color:var(--mn-faint);-webkit-line-clamp:2;-webkit-box-orient:vertical;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.IIa07q_metadataList>label>span>span{align-items:center;gap:6px;min-width:0;display:flex}.IIa07q_metadataList code{color:var(--mn-faint);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.IIa07q_metadataTaskStatus{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12px;line-height:18px;overflow:hidden}.IIa07q_metadataTaskStatus[data-status=running]{color:var(--mn-faint)}.IIa07q_metadataTaskStatus[data-status=success]{color:var(--mn-success)}.IIa07q_metadataTaskStatus[data-status=error]{color:var(--mn-danger)}@container IIa07q_mnemon-workbench (width<=1020px){.IIa07q_graphLayout{min-height:380px;display:block;position:relative}.IIa07q_graphInspector{width:auto;min-height:0;box-shadow:none;margin-top:12px;position:static;overflow:visible}.IIa07q_graphInspector[data-empty]{display:none}.IIa07q_resultLayout{grid-template-columns:1fr}.IIa07q_relatedPane{grid-row:1;max-height:none;position:static}.IIa07q_memoryList{grid-template-columns:1fr}}@media (width<=1020px){.IIa07q_graphLayout{min-height:380px;display:block;position:relative}.IIa07q_graphInspector{width:auto;min-height:0;box-shadow:none;margin-top:12px;position:static;overflow:visible}.IIa07q_graphInspector[data-empty]{display:none}.IIa07q_resultLayout{grid-template-columns:1fr}.IIa07q_relatedPane{grid-row:1;max-height:none;position:static}.IIa07q_memoryList{grid-template-columns:1fr}}@container IIa07q_mnemon-workbench (width<=760px){.IIa07q_asyncPlaceholder{min-height:380px}.IIa07q_entityLayout{grid-template-columns:1fr}.IIa07q_entityRail{position:static}.IIa07q_searchControls{grid-template-columns:minmax(0,1fr);gap:10px;display:grid}.IIa07q_searchFilters{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.IIa07q_searchActions{margin-left:0}.IIa07q_searchActions>button{flex:1}.IIa07q_listToolbar{grid-template-columns:1fr}.IIa07q_bodyDirectoryHeader{grid-template-columns:minmax(0,1fr);display:grid}.IIa07q_bodyDirectoryHeader>div{min-width:0}.IIa07q_bodyDirectoryPath{max-width:100%}.IIa07q_bodyDirectoryControls{flex-wrap:wrap;justify-content:flex-start}.IIa07q_graphViewport{min-height:360px}.IIa07q_graphSvg,.IIa07q_graphCanvas{height:390px}.IIa07q_graphCanvasControls{top:8px;right:8px}.IIa07q_graphCanvasControls span{display:none}}@media (width<=760px){.IIa07q_asyncPlaceholder{min-height:380px}.IIa07q_metadataList{grid-template-columns:1fr}.IIa07q_modalFooterNote{max-width:none;margin:0}.IIa07q_modal .IIa07q_supervisedForm textarea{min-height:clamp(130px,30vh,210px)}.IIa07q_entityLayout{grid-template-columns:1fr}.IIa07q_manualActions{flex-direction:column;align-items:stretch}.IIa07q_entityRail{position:static}.IIa07q_searchControls{grid-template-columns:minmax(0,1fr);gap:10px;display:grid}.IIa07q_searchFilters{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;display:grid}.IIa07q_searchActions{margin-left:0}.IIa07q_searchActions>button{flex:1}.IIa07q_listToolbar{grid-template-columns:1fr}.IIa07q_bodyDirectoryHeader{grid-template-columns:minmax(0,1fr);display:grid}.IIa07q_bodyDirectoryHeader>div{min-width:0}.IIa07q_bodyDirectoryPath{max-width:100%}.IIa07q_bodyDirectoryControls{flex-wrap:wrap;justify-content:flex-start}.IIa07q_createIdentityGrid,.IIa07q_placementMode,.IIa07q_placementRuleGrid,.IIa07q_placementCandidates,.IIa07q_providerChoice,.IIa07q_providerAdvancedGrid{grid-template-columns:1fr}.IIa07q_graphViewport{min-height:360px}.IIa07q_graphSvg,.IIa07q_graphCanvas{height:390px}.IIa07q_graphCanvasControls{top:8px;right:8px}.IIa07q_graphCanvasControls span{display:none}}@media (width<=520px){.IIa07q_memoryHeaderActions{width:100%}.IIa07q_memoryHeaderActions>button{flex:1 1 0;justify-content:center}.IIa07q_bodyDirectoryControls{justify-content:flex-start;width:100%}.IIa07q_bodyDirectoryControls>strong{margin-right:auto}.IIa07q_syncFreshnessPill:not([data-loading]){display:none}.IIa07q_cardTop{flex-direction:column;align-items:flex-start}.IIa07q_cardActions{flex-wrap:wrap;align-items:stretch}.IIa07q_cardActions button{flex:1}.IIa07q_searchFilters{grid-template-columns:1fr}.IIa07q_settingsNumberInput{width:96px}.IIa07q_graphNodePicker{flex-wrap:wrap}.IIa07q_graphNodePicker select{width:100%;max-width:none}}@supports (height:100dvh){@media (width<=760px){.IIa07q_modal .IIa07q_supervisedForm textarea{min-height:clamp(130px,30dvh,210px)}}}@media (width<=1020px) and (height<=760px){.IIa07q_graphViewport{min-height:300px}.IIa07q_graphSvg,.IIa07q_graphCanvas{height:300px}}@keyframes IIa07q_inlineExpand{0%{opacity:0;translate:0 -4px}to{opacity:1;translate:0}}.IIa07q_inlineExpand{animation:IIa07q_inlineExpand .16s var(--dsw-ease-out,cubic-bezier(.22, 1, .36, 1))}@media (prefers-reduced-motion:reduce){.IIa07q_bodyCard,.IIa07q_insightCard,.IIa07q_nodeHalo,.IIa07q_inspectorEye,.IIa07q_choiceControl,.IIa07q_placementMode label,.IIa07q_providerChoice label,.IIa07q_capabilityRules label,.IIa07q_placementCandidates>label,.IIa07q_smoothChevron,.IIa07q_settingsPolicyToggle,.IIa07q_settingsNumberInput,.IIa07q_graphModeToggle:before,.IIa07q_graphModeToggle button,.IIa07q_graphCanvasControls button,.IIa07q_graphNodePicker select,.IIa07q_advancedWriteChevron{transition:none}.IIa07q_inlineExpand,.IIa07q_syncFreshnessSpinner,.IIa07q_bodyCard[data-reconnecting] .IIa07q_bodySignal,.IIa07q_insightSkeleton:after,.IIa07q_entityRailSkeleton:after,.IIa07q_metadataList>label[data-refreshing]:after,.IIa07q_metadataList>label[data-refreshed]{animation:none}}"; const tagId$8 = "dsh-brain-mnemon-source-memory-spaces/presentation/page.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$8) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$8; document.head.appendChild(tag); } if (tag.textContent !== css$12) tag.textContent = css$12; } var page_module_css_default$1 = { "advancedWrite": "IIa07q_advancedWrite", "advancedWriteChevron": "IIa07q_advancedWriteChevron", "advancedWriteIndicator": "IIa07q_advancedWriteIndicator", "advancedWriteToggleText": "IIa07q_advancedWriteToggleText", "agentAnswer": "IIa07q_agentAnswer", "agentAnswerHeading": "IIa07q_agentAnswerHeading", "agentCitations": "IIa07q_agentCitations", "asyncPlaceholder": "IIa07q_asyncPlaceholder", "asyncRegion": "IIa07q_asyncRegion", "asyncResults": "IIa07q_asyncResults", "badge": "IIa07q_badge", "badges": "IIa07q_badges", "bodyCard": "IIa07q_bodyCard", "bodyCardActions": "IIa07q_bodyCardActions", "bodyCreateForm": "IIa07q_bodyCreateForm", "bodyDirectory": "IIa07q_bodyDirectory", "bodyDirectoryControls": "IIa07q_bodyDirectoryControls", "bodyDirectoryEmpty": "IIa07q_bodyDirectoryEmpty", "bodyDirectoryHeader": "IIa07q_bodyDirectoryHeader", "bodyDirectoryPath": "IIa07q_bodyDirectoryPath", "bodyFooterBlock": "IIa07q_bodyFooterBlock", "bodyFooterGrow": "IIa07q_bodyFooterGrow", "bodyGrid": "IIa07q_bodyGrid", "bodyHealth": "IIa07q_bodyHealth", "bodySignal": "IIa07q_bodySignal", "candidateHeading": "IIa07q_candidateHeading", "candidateIcon": "IIa07q_candidateIcon", "capabilityRules": "IIa07q_capabilityRules", "cardActions": "IIa07q_cardActions", "cardTop": "IIa07q_cardTop", "categoryChip": "IIa07q_categoryChip", "choiceControl": "IIa07q_choiceControl", "content": "IIa07q_content", "createIdentityGrid": "IIa07q_createIdentityGrid", "createSection": "IIa07q_createSection", "createSectionHeading": "IIa07q_createSectionHeading", "embeddingManagedBody": "IIa07q_embeddingManagedBody", "emptyState": "IIa07q_emptyState", "entities": "IIa07q_entities", "entity-skeleton-sweep": "IIa07q_entity-skeleton-sweep", "entityHeading": "IIa07q_entityHeading", "entityLayout": "IIa07q_entityLayout", "entityList": "IIa07q_entityList", "entityQuiet": "IIa07q_entityQuiet", "entityRail": "IIa07q_entityRail", "entityRailSkeleton": "IIa07q_entityRailSkeleton", "entityRelatedHead": "IIa07q_entityRelatedHead", "entityResults": "IIa07q_entityResults", "entityRetry": "IIa07q_entityRetry", "entitySearch": "IIa07q_entitySearch", "entitySection": "IIa07q_entitySection", "entitySectionBody": "IIa07q_entitySectionBody", "fieldWide": "IIa07q_fieldWide", "graphBackdrop": "IIa07q_graphBackdrop", "graphCanvas": "IIa07q_graphCanvas", "graphCanvasControls": "IIa07q_graphCanvasControls", "graphEdge": "IIa07q_graphEdge", "graphFooter": "IIa07q_graphFooter", "graphGridLine": "IIa07q_graphGridLine", "graphInspector": "IIa07q_graphInspector", "graphLayout": "IIa07q_graphLayout", "graphLegend": "IIa07q_graphLegend", "graphModeToggle": "IIa07q_graphModeToggle", "graphNode": "IIa07q_graphNode", "graphNodePicker": "IIa07q_graphNodePicker", "graphPanel": "IIa07q_graphPanel", "graphSvg": "IIa07q_graphSvg", "graphToolbar": "IIa07q_graphToolbar", "graphToolbarRight": "IIa07q_graphToolbarRight", "graphViewport": "IIa07q_graphViewport", "id": "IIa07q_id", "inlineExpand": "IIa07q_inlineExpand", "insightCard": "IIa07q_insightCard", "insightSkeleton": "IIa07q_insightSkeleton", "inspectorActions": "IIa07q_inspectorActions", "inspectorChips": "IIa07q_inspectorChips", "inspectorEmpty": "IIa07q_inspectorEmpty", "inspectorEye": "IIa07q_inspectorEye", "inspectorHeading": "IIa07q_inspectorHeading", "inspectorLogo": "IIa07q_inspectorLogo", "inspectorMeta": "IIa07q_inspectorMeta", "inspectorTitle": "IIa07q_inspectorTitle", "inspectorTitleRow": "IIa07q_inspectorTitleRow", "listNotice": "IIa07q_listNotice", "listToolbar": "IIa07q_listToolbar", "liveDot": "IIa07q_liveDot", "manualActions": "IIa07q_manualActions", "manualForm": "IIa07q_manualForm", "memoryHeaderActions": "IIa07q_memoryHeaderActions", "memoryList": "IIa07q_memoryList", "metadataDialog": "IIa07q_metadataDialog", "metadataEmpty": "IIa07q_metadataEmpty", "metadataList": "IIa07q_metadataList", "metadataTaskStatus": "IIa07q_metadataTaskStatus", "metadataToolbar": "IIa07q_metadataToolbar", "mnemon-metadata-refreshed": "IIa07q_mnemon-metadata-refreshed", "mnemon-metadata-sweep": "IIa07q_mnemon-metadata-sweep", "mnemon-spin": "IIa07q_mnemon-spin", "mnemon-workbench": "IIa07q_mnemon-workbench", "mnemonDefaultBadge": "IIa07q_mnemonDefaultBadge", "modal": "IIa07q_modal", "modalFooterNote": "IIa07q_modalFooterNote", "muted": "IIa07q_muted", "newSpaceBadge": "IIa07q_newSpaceBadge", "nodeBodyLabel": "IIa07q_nodeBodyLabel", "nodeCore": "IIa07q_nodeCore", "nodeHalo": "IIa07q_nodeHalo", "nodeLabel": "IIa07q_nodeLabel", "placementCandidates": "IIa07q_placementCandidates", "placementMode": "IIa07q_placementMode", "placementPolicy": "IIa07q_placementPolicy", "placementPolicyHeading": "IIa07q_placementPolicyHeading", "placementPromptField": "IIa07q_placementPromptField", "placementReceipt": "IIa07q_placementReceipt", "placementRuleGrid": "IIa07q_placementRuleGrid", "previewContent": "IIa07q_previewContent", "providerAdvancedGrid": "IIa07q_providerAdvancedGrid", "providerBadge": "IIa07q_providerBadge", "providerChoice": "IIa07q_providerChoice", "providerChoiceIcon": "IIa07q_providerChoiceIcon", "providerEnableHint": "IIa07q_providerEnableHint", "providerEnableLink": "IIa07q_providerEnableLink", "providerEnableRow": "IIa07q_providerEnableRow", "providerFieldControl": "IIa07q_providerFieldControl", "providerFieldHeading": "IIa07q_providerFieldHeading", "providerFieldIcon": "IIa07q_providerFieldIcon", "providerFieldIdentity": "IIa07q_providerFieldIdentity", "providerFields": "IIa07q_providerFields", "providerSecretClear": "IIa07q_providerSecretClear", "providerWriteHint": "IIa07q_providerWriteHint", "queryField": "IIa07q_queryField", "readSourceCard": "IIa07q_readSourceCard", "readSourceIdentity": "IIa07q_readSourceIdentity", "readSourceMeta": "IIa07q_readSourceMeta", "readSourcePill": "IIa07q_readSourcePill", "readSourceSignal": "IIa07q_readSourceSignal", "readSourceState": "IIa07q_readSourceState", "readSources": "IIa07q_readSources", "readSourcesCompact": "IIa07q_readSourcesCompact", "readSourcesCompactList": "IIa07q_readSourcesCompactList", "readSourcesCompactTitle": "IIa07q_readSourcesCompactTitle", "rediscoveryNotice": "IIa07q_rediscoveryNotice", "relatedPane": "IIa07q_relatedPane", "relatedSource": "IIa07q_relatedSource", "resultLayout": "IIa07q_resultLayout", "results": "IIa07q_results", "searchActions": "IIa07q_searchActions", "searchBar": "IIa07q_searchBar", "searchChoice": "IIa07q_searchChoice", "searchControls": "IIa07q_searchControls", "searchFilters": "IIa07q_searchFilters", "sectionSpinner": "IIa07q_sectionSpinner", "sessionHint": "IIa07q_sessionHint", "settingsNumberInput": "IIa07q_settingsNumberInput", "settingsPolicy": "IIa07q_settingsPolicy", "settingsPolicyBadge": "IIa07q_settingsPolicyBadge", "settingsPolicyBody": "IIa07q_settingsPolicyBody", "settingsPolicyHeading": "IIa07q_settingsPolicyHeading", "settingsPolicyMeta": "IIa07q_settingsPolicyMeta", "settingsPolicyToggle": "IIa07q_settingsPolicyToggle", "settingsProvidersBadge": "IIa07q_settingsProvidersBadge", "settingsRecall": "IIa07q_settingsRecall", "settingsRow": "IIa07q_settingsRow", "settingsRowControl": "IIa07q_settingsRowControl", "settingsRowCopy": "IIa07q_settingsRowCopy", "settingsRows": "IIa07q_settingsRows", "settingsSection": "IIa07q_settingsSection", "settingsSelectMenu": "IIa07q_settingsSelectMenu", "settingsSelectOption": "IIa07q_settingsSelectOption", "settingsSelector": "IIa07q_settingsSelector", "singleColumn": "IIa07q_singleColumn", "smoothChevron": "IIa07q_smoothChevron", "srOnlyHeading": "IIa07q_srOnlyHeading", "strategyForm": "IIa07q_strategyForm", "strategyLoading": "IIa07q_strategyLoading", "supervisedComposer": "IIa07q_supervisedComposer", "supervisedForm": "IIa07q_supervisedForm", "syncFreshnessPill": "IIa07q_syncFreshnessPill", "syncFreshnessSpinner": "IIa07q_syncFreshnessSpinner", "tags": "IIa07q_tags", "workspaceErrorReveal": "IIa07q_workspaceErrorReveal" }; const css$11 = "._Bh55G_shell ._Bh55G_memoryWorkspace{z-index:12;border-bottom:.5px solid var(--dsw-alias-border-l2);background:var(--mn-surface);flex:none;margin:-20px -24px 16px;padding:20px 24px 0;position:sticky;top:0}._Bh55G_shell ._Bh55G_memoryWorkspace>[class*=pageHeader],._Bh55G_shell ._Bh55G_memoryWorkspace~[class*=page]>[class*=pageHeader]{margin-bottom:12px}._Bh55G_shell ._Bh55G_memoryWorkspace~[class*=page]>[class*=pageHeader] h2{font-size:14px;line-height:22px}._Bh55G_shell ._Bh55G_memoryWorkspace~[class*=page]>[class*=pageHeader] p{color:var(--dsw-alias-label-tertiary);font-size:12px;line-height:18px}._Bh55G_shell [class*=relatedPane],._Bh55G_shell [class*=entityRail]{position:static}._Bh55G_shell ._Bh55G_memoryNavigation{flex:none;align-items:flex-end;gap:12px;min-width:0;padding:0;display:flex}._Bh55G_shell ._Bh55G_memoryTabs{scrollbar-width:none;flex:1;gap:22px;min-width:0;display:flex;overflow-x:auto}._Bh55G_shell ._Bh55G_memoryTabs::-webkit-scrollbar{display:none}._Bh55G_shell ._Bh55G_memoryTabs button{min-width:max-content;min-height:0;color:var(--dsw-alias-label-tertiary);cursor:pointer;background:0 0;border:0;border-bottom:2px solid #0000;margin-bottom:-.5px;padding:6px 1px 9px;font-size:13px;line-height:20px;transition:color .14s,border-bottom-color .14s;position:relative}._Bh55G_shell ._Bh55G_memoryTabs button:hover{color:var(--dsw-alias-label-primary)}._Bh55G_shell ._Bh55G_memoryTabs button[data-active]{border-bottom-color:var(--dsw-alias-label-primary);color:var(--dsw-alias-label-primary)}._Bh55G_shell ._Bh55G_memoryWriteButton{flex:none}._Bh55G_shell ._Bh55G_modal{flex-direction:column;max-height:min(82dvh,720px);display:flex;overflow:hidden}._Bh55G_shell ._Bh55G_modal>[class*=modalBody]{overscroll-behavior:contain;flex:auto;min-height:0;overflow-y:auto}._Bh55G_shell ._Bh55G_modal>[class*=modalFooter]{z-index:1;background:var(--dsw-alias-bg-layer-2,var(--mn-surface));flex:none;position:relative}._Bh55G_shell ._Bh55G_modal section[class*=supervisedComposer]{border:0;overflow:visible}._Bh55G_shell ._Bh55G_modal form[class*=supervisedForm]{padding:0}._Bh55G_shell ._Bh55G_modal [class*=supervisedHeading]{margin-bottom:12px}._Bh55G_shell ._Bh55G_modal [class*=supervisedHeading] h3{display:none}._Bh55G_shell ._Bh55G_modal details[class*=advancedWrite]{border:.5px solid var(--dsw-alias-settings-card-stroke);border-radius:var(--dsw-radius-md);margin-top:16px;overflow:hidden}._Bh55G_shell [class*=inspectorEye],._Bh55G_shell [class*=inspectorHeading] button{border-radius:var(--dsw-radius-sm);width:28px;height:28px;min-height:0;color:var(--dsw-alias-label-caption);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;padding:0;font-size:13px;transition:background-color .12s,color .12s;display:inline-flex}._Bh55G_shell [class*=inspectorEye]:hover:not(:disabled),._Bh55G_shell [class*=inspectorHeading] button:hover:not(:disabled){color:var(--dsw-alias-label-secondary);background:var(--dsw-alias-interactive-bg-hover)}._Bh55G_shell [class*=inspectorEye]:disabled{cursor:default;opacity:.4}._Bh55G_shell [class*=bodyGrid]{grid-template-columns:repeat(auto-fit,minmax(min(320px,100%),1fr))}._Bh55G_shell article[class*=bodyCard]{flex-direction:column;height:100%;display:flex}._Bh55G_shell ._Bh55G_bodyCardHeader{justify-content:space-between;align-items:flex-start;gap:12px;min-width:0;display:flex}._Bh55G_shell ._Bh55G_bodyDirectoryActions{flex:none;align-items:center;gap:8px;display:flex}._Bh55G_shell ._Bh55G_bodyCardIdentity{flex:1;align-items:flex-start;gap:8px;min-width:0;display:flex}._Bh55G_shell ._Bh55G_bodyCardIdentity>[class*=bodySignal]{flex:none;width:6px;height:6px;margin-top:7px}._Bh55G_shell article[class*=bodyCard][data-reconnecting] ._Bh55G_bodyCardIdentity>[class*=bodySignal]{width:8px;height:8px;margin-top:6px}._Bh55G_shell ._Bh55G_bodyCardIdentity>div{flex:1;gap:2px;min-width:0;display:grid}._Bh55G_shell ._Bh55G_bodyCardIdentity strong{text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:500;line-height:20px;overflow:hidden}._Bh55G_shell ._Bh55G_bodyCardMeta{flex-wrap:wrap;align-items:center;gap:4px 8px;min-width:0;display:flex}._Bh55G_shell ._Bh55G_bodyCardMeta code{min-width:0;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}._Bh55G_shell ._Bh55G_bodyCardMeta [class*=bodyHealth],._Bh55G_shell ._Bh55G_bodyCardHeader>[role=switch]{flex:none}._Bh55G_shell article[class*=bodyCard]>p{-webkit-line-clamp:2;-webkit-box-orient:vertical;min-height:40px;max-height:40px;margin:10px 0;display:-webkit-box;overflow:hidden}._Bh55G_shell ._Bh55G_bodyCardFooter{white-space:nowrap;grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:12px;min-width:0;margin-top:auto;padding-top:10px;display:grid}._Bh55G_shell ._Bh55G_bodyCardStats{flex-wrap:nowrap;align-items:center;gap:12px;min-width:0;display:flex;overflow:hidden}._Bh55G_shell ._Bh55G_bodyCardFooter [class*=bodyCardActions]{flex-wrap:nowrap;flex:none;align-items:center;gap:8px;display:flex}._Bh55G_shell [class*=cardActions]{gap:8px}._Bh55G_shell ._Bh55G_inspectorGlyph{border:.5px solid var(--dsw-alias-border-l3);border-radius:var(--dsw-radius-lg);width:48px;height:48px;color:var(--dsw-alias-label-tertiary);place-items:center;margin-bottom:12px;font-size:20px;line-height:1;display:grid}@media (width<=760px){._Bh55G_shell ._Bh55G_memoryWorkspace{margin:-16px -16px 16px;padding:16px 16px 0}}@container _Bh55G_mnemon-workbench (width<=560px){._Bh55G_shell ._Bh55G_bodyCardFooter{white-space:normal;grid-template-columns:minmax(0,1fr);gap:8px}._Bh55G_shell ._Bh55G_bodyCardStats{flex-wrap:wrap;gap:4px 12px;overflow:visible}._Bh55G_shell ._Bh55G_bodyCardFooter [class*=bodyCardActions]{justify-content:flex-end}}@media (width<=560px){._Bh55G_shell ._Bh55G_bodyCardFooter{white-space:normal;grid-template-columns:minmax(0,1fr);gap:8px}._Bh55G_shell ._Bh55G_bodyCardStats{flex-wrap:wrap;gap:4px 12px;overflow:visible}._Bh55G_shell ._Bh55G_bodyCardFooter [class*=bodyCardActions]{justify-content:flex-end}}@media (width<=520px){._Bh55G_shell ._Bh55G_memoryTabs{gap:18px}._Bh55G_shell ._Bh55G_memoryWriteButton{flex:1 1 0;justify-content:center}}@media (prefers-reduced-motion:reduce){._Bh55G_shell ._Bh55G_memoryTabs button,._Bh55G_shell [class*=inspectorEye],._Bh55G_shell [class*=inspectorHeading] button{transition:none}}"; const tagId$7 = "dsh-brain-mnemon-source-memory-spaces/presentation/sidebar.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$7) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$7; document.head.appendChild(tag); } if (tag.textContent !== css$11) tag.textContent = css$11; } var sidebar_module_css_default = { "bodyCardFooter": "_Bh55G_bodyCardFooter", "bodyCardHeader": "_Bh55G_bodyCardHeader", "bodyCardIdentity": "_Bh55G_bodyCardIdentity", "bodyCardMeta": "_Bh55G_bodyCardMeta", "bodyCardStats": "_Bh55G_bodyCardStats", "bodyDirectoryActions": "_Bh55G_bodyDirectoryActions", "inspectorGlyph": "_Bh55G_inspectorGlyph", "memoryNavigation": "_Bh55G_memoryNavigation", "memoryTabs": "_Bh55G_memoryTabs", "memoryWorkspace": "_Bh55G_memoryWorkspace", "memoryWriteButton": "_Bh55G_memoryWriteButton", "mnemon-workbench": "_Bh55G_mnemon-workbench", "modal": "_Bh55G_modal", "shell": "_Bh55G_shell" }; // vendor/dsh-mnemon/src/client/page-kit.tsx const I18nContext = (0, react.createContext)(translateZh); const LocaleContext = (0, react.createContext)("zh"); const LocaleFallbackContext = (0, react.createContext)(void 0); function useLocalePreference$4(language) { const fallbacks = (0, react.useContext)(LocaleFallbackContext); if (fallbacks === void 0) return language; const active = fallbacks[0]; return active !== void 0 && (language === active || language === formatLocale(active)) ? fallbacks : language; } function useT$4() { return (0, react.useContext)(I18nContext); } function formatLocale(locale) { return locale === "en" ? "en-US" : locale === "zh" ? "zh-CN" : locale; } function useLocale() { return formatLocale((0, react.useContext)(LocaleContext)); } function humanBytes(bytes) { if (bytes < 1024) return `${bytes} B`; if (bytes < 1048576) return `${(bytes / 1024).toFixed(1)} KB`; return `${(bytes / 1024 / 1024).toFixed(1)} MB`; } function message(error) { return error instanceof Error ? error.message : String(error); } function parseBranchesInput(raw) { const parsed = raw.split(",").map((value) => value.trim()).filter((value) => value !== ""); return parsed.length === 0 ? void 0 : parsed; } function short(value, max) { return value.length <= max ? value : `${value.slice(0, max - 1)}…`; } function PageHeader(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: appearanceClass(MnemonView_module_css_default.pageHeader, MnemonSidebarView_module_css_default.pageHeader), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { children: props.title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: props.description })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.pageHeaderMeta, children: [ props.loadingLabel !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageSpinner, { label: props.loadingLabel }), props.meta !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: props.meta }), props.action ] })] }); } function PageSpinner({ label }) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonView_module_css_default.pageSpinner, role: "status", "aria-label": label, title: label, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { "aria-hidden": "true" }) }); } function SectionSpinner({ label }) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonView_module_css_default.sectionSpinner, role: "status", "aria-label": label, title: label, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { "aria-hidden": "true" }) }); } function ProgressiveFooter(props) { const t = useT$4(); if (props.total === 0) return null; const remaining = Math.max(0, props.total - props.visible); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: props.compact === true ? MnemonView_module_css_default.compactListProgress : MnemonView_module_css_default.listProgress, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("common.showing", { visible: props.visible, total: props.total }) }), remaining > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonView_module_css_default.secondaryButton, onClick: props.onMore, children: t("common.showMore", { count: Math.min(props.pageSize, remaining) }) })] }); } function SidebarModal(props) { const t = useT$4(); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonDialog, { ...props, closeLabel: t("common.close") }); } const SEARCH_GLYPH = "⌕"; function EmptyState(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.emptyState, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.emptyGlyph, "aria-hidden": "true", children: props.glyph === SEARCH_GLYPH ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSearchOutlineRegular, { size: 18 }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.glyph }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: props.title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: props.children })] })] }); } const memoryPageStyles = { ...MnemonView_module_css_default, ...page_module_css_default$3, ...page_module_css_default$2, ...page_module_css_default$1 }; const memorySidebarStyles = { ...MnemonSidebarView_module_css_default, ...sidebar_module_css_default$2, ...sidebar_module_css_default$1, ...sidebar_module_css_default }; // vendor/dsh-mnemon/src/client/settings-panel.tsx function useScope(scope) { const subscribe = (0, react.useMemo)(() => scope.subscribe.bind(scope), [scope]); const getSnapshot = (0, react.useMemo)(() => scope.getSnapshot.bind(scope), [scope]); return (0, react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot); } function useStaged(value, write) { const [draft, setDraft] = (0, react.useState)(value); const [edited, setDirty] = (0, react.useState)(false); const [saving, setSaving] = (0, react.useState)(false); const [failed, setFailed] = (0, react.useState)(null); const [applied, setApplied] = (0, react.useState)(false); const serialized = JSON.stringify(value); const dirty = edited && JSON.stringify(draft) !== serialized; (0, react.useEffect)(() => { if (!dirty) setDraft(value); }, [serialized]); return { draft, dirty, saving, failed, applied, edit: (next) => { setDraft((current) => ({ ...current, ...next })); setDirty(true); setFailed(null); setApplied(false); }, discard: () => { setDraft(value); setDirty(false); setFailed(null); }, apply: async () => { setSaving(true); setFailed(null); try { await write(draft); setDirty(false); setApplied(true); } catch (reason) { setFailed(message(reason)); } finally { setSaving(false); } } }; } function useLive(saved, write) { const [pending, setPending] = (0, react.useState)(null); const [failed, setFailed] = (0, react.useState)(null); const request = (0, react.useRef)(0); return { value: pending === null ? saved : pending.value, failed, set: (value) => { const current = ++request.current; setPending({ value }); setFailed(null); write(value).then(() => { if (request.current === current) setPending(null); }, (reason) => { if (request.current === current) { setPending(null); setFailed(message(reason)); } }); } }; } function WriteFailure(props) { return props.error === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.panelError, role: "alert", children: props.t("config.saveFailed", { error: props.error }) }); } function PanelActions(props) { const { t } = props; if (!props.dirty) return props.applied ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.panelNote, role: "status", children: t("config.ready") }) : null; const problem = props.invalid ?? (props.failed === null ? null : t("config.saveFailed", { error: props.failed })); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.panelActions, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { role: problem === null ? void 0 : "alert", className: problem === null ? void 0 : MnemonSettingsCard_module_css_default.panelError, children: problem ?? props.note ?? t("config.unsaved") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: props.saving, onClick: props.onDiscard, children: t("config.discard") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: props.saving || props.disabled || props.invalid !== null, "aria-busy": props.saving || void 0, onClick: props.onApply, children: props.saving ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { active: true, children: t("options.applying") }) : t("options.apply") }) ] }); } // vendor/dsh-mnemon/src/client/component-options.tsx const LIST_ITEMS = 32; const LIST_ITEM_LENGTH = 500; const TEXT_LENGTH = 4e3; function listOf(value) { return Array.isArray(value) ? value.filter((item) => typeof item === "string") : []; } function staged(field, value, own) { const shown = value ?? field.defaultValue; return { text: field.input === "string-list" ? listOf(shown).join("\n") : typeof shown === "number" || typeof shown === "string" ? String(shown) : "", sources: field.input === "source-list" ? listOf(shown) : [], own }; } function initial(entry) { return Object.fromEntries(entry.fields.map((field) => [field.key, staged(field, entry.config[field.key], Object.hasOwn(entry.config, field.key))])); } function parse(field, value, t) { if (field.input === "number") { const number = Number(value.text.trim()); if (value.text.trim() !== "" && Number.isInteger(number) && (field.minimum === void 0 || number >= field.minimum) && (field.maximum === void 0 || number <= field.maximum)) return { value: number }; return { error: field.minimum !== void 0 && field.maximum !== void 0 ? t("options.between", { min: field.minimum, max: field.maximum }) : field.minimum !== void 0 ? t("options.atLeast", { min: field.minimum }) : field.maximum !== void 0 ? t("options.atMost", { max: field.maximum }) : t("options.integer") }; } if (field.input === "string-list" || field.input === "source-list") { const items = field.input === "source-list" ? value.sources : value.text.split("\n").map((item) => item.trim()).filter((item) => item !== ""); return items.length <= LIST_ITEMS && items.every((item) => item.length <= LIST_ITEM_LENGTH) && new Set(items).size === items.length ? { value: items } : { error: t("options.listLimit", { count: LIST_ITEMS, length: LIST_ITEM_LENGTH }) }; } const maximum = field.maximum ?? TEXT_LENGTH; return value.text.length <= maximum ? { value: value.text } : { error: t("options.tooLong", { max: maximum }) }; } function ComponentOptions(props) { const { entry, t } = props; const localePreference = useLocalePreference$4(props.language); const id = (0, react.useId)(); const [draft, setDraft] = (0, react.useState)(() => initial(entry)); const [confirmEmptySources, setConfirmEmptySources] = (0, react.useState)(false); const text = (value) => pickLocalizedText(value, localePreference); const results = entry.fields.map((field) => ({ field, result: parse(field, draft[field.key], t) })); const invalid = results.some(({ field, result }) => draft[field.key].own && "error" in result); const config = Object.fromEntries(results.flatMap(({ field, result }) => draft[field.key].own && "value" in result ? [[field.key, result.value]] : [])); const edited = JSON.stringify(draft) !== JSON.stringify(initial(entry)); const edit = (field, next) => { setConfirmEmptySources(false); setDraft((current) => ({ ...current, [field.key]: { ...current[field.key], ...next, own: true } })); }; const reset = (field) => { setConfirmEmptySources(false); setDraft((current) => ({ ...current, [field.key]: staged(field, void 0, false) })); }; const locked = props.disabled || props.pending; const sourceName = (sourceTypeId, fallback) => { const component = props.dashboard.entries.find((candidate) => candidate.roles.includes("source") && candidate.typeId === sourceTypeId); return component === void 0 ? fallback : componentCopy(component, localePreference).label; }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.optionsPanel, role: "group", "aria-label": t("options.aria", { component: props.name }), children: [ results.map(({ field, result }) => { const value = draft[field.key]; const control = `${id}-${field.key}`; const error = value.own && "error" in result ? result.error : void 0; const description = text(field.description); const hint = error ?? [description, field.input === "string-list" ? t("options.listHint") : ""].filter((part) => part !== "").join(t("config.sentenceGap")); const describedBy = hint === "" ? void 0 : `${control}-hint`; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.optionField, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.optionLabel, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", { htmlFor: field.input === "source-list" ? void 0 : control, id: `${control}-label`, children: text(field.label) }), value.own ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonSettingsCard_module_css_default.optionReset, disabled: locked, onClick: () => reset(field), children: t("options.reset") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.optionDefault, children: t("options.default") })] }), field.input === "source-list" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SourceChoice, { field, value, defaultAll: entry.typeId === "scoped" && field.key === "sourceKeys", sources: props.dashboard.sources, name: sourceName, labelledBy: `${control}-label`, disabled: locked, t, onChange: (sources) => edit(field, { sources }) }) : field.input === "textarea" || field.input === "string-list" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { id: control, className: MnemonSettingsCard_module_css_default.optionInput, rows: field.input === "string-list" ? 3 : 4, value: value.text, disabled: locked, "aria-invalid": error !== void 0, "aria-describedby": describedBy, onChange: (event) => edit(field, { text: event.target.value }) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: control, className: MnemonSettingsCard_module_css_default.optionInput, type: "text", inputMode: field.input === "number" ? "numeric" : void 0, value: value.text, disabled: locked, "aria-invalid": error !== void 0, "aria-describedby": describedBy, onChange: (event) => edit(field, { text: event.target.value }) }), describedBy !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { id: describedBy, className: MnemonSettingsCard_module_css_default.optionHint, "data-error": error === void 0 ? void 0 : "", children: hint }) ] }, field.key); }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: edited, saving: props.pending, invalid: invalid ? t("options.fix") : null, failed: null, applied: false, disabled: props.disabled, t, onDiscard: () => { setConfirmEmptySources(false); setDraft(initial(entry)); }, onApply: () => { if (entry.typeId === "scoped" && Array.isArray(config.sourceKeys) && config.sourceKeys.length === 0) { setConfirmEmptySources(true); return; } props.onApply(config); } }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, { open: confirmEmptySources, ...MnemonSettingsCard_module_css_default.confirmDialog === void 0 ? {} : { className: MnemonSettingsCard_module_css_default.confirmDialog }, onClose: () => { if (!props.pending) setConfirmEmptySources(false); }, title: t("options.emptySourcesTitle"), closeLabel: t("common.close"), footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", disabled: props.pending, onClick: () => setConfirmEmptySources(false), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", disabled: locked, onClick: () => { setConfirmEmptySources(false); props.onApply(config); }, children: t("options.apply") })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: `${MnemonSettingsCard_module_css_default.surface} ${MnemonSettingsCard_module_css_default.confirmCopy}`, children: t("options.emptySourcesConfirm") }) }) ] }); } function SourceChoice(props) { const { field, value, t } = props; const eligible = props.sources.filter((source) => field.sourceRoles === void 0 || field.sourceRoles.length === 0 || field.sourceRoles.includes(source.role)); const defaultRoles = [ "working-context", "narrative", "durable-evidence" ]; const selected = !value.own && props.defaultAll ? eligible.filter((source) => defaultRoles.includes(source.role)).sort((a, b) => defaultRoles.indexOf(a.role) - defaultRoles.indexOf(b.role) || a.sourceInstanceKey.localeCompare(b.sourceInstanceKey)).map((source) => source.sourceInstanceKey) : value.sources; const missing = selected.filter((key) => !eligible.some((source) => source.sourceInstanceKey === key)); const several = (sourceTypeId) => eligible.filter((source) => source.sourceTypeId === sourceTypeId).length > 1; const toggle = (key, on) => props.onChange(on ? [...selected, key] : selected.filter((item) => item !== key)); if (eligible.length === 0 && missing.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.optionEmpty, children: t("options.noSources") }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.optionChoices, role: "group", "aria-labelledby": props.labelledBy, children: [eligible.map((source) => { const label = props.name(source.sourceTypeId, source.label); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, { checked: selected.includes(source.sourceInstanceKey), disabled: props.disabled, label: several(source.sourceTypeId) ? `${label} · ${source.sourceInstanceKey}` : label, onChange: (on) => toggle(source.sourceInstanceKey, on) }, source.sourceInstanceKey); }), missing.map((key) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, { checked: true, disabled: props.disabled, label: t("options.sourceUnavailable", { source: key }), onChange: (on) => toggle(key, on) }, key))] }); } // vendor/dsh-mnemon/src/client/component-details.tsx function ComponentDetails(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, { open: true, onClose: props.onClose, title: props.name(props.entry), description: props.hint, closeLabel: props.t("common.close"), className: MnemonSettingsCard_module_css_default.detailsDialog ?? "", contentClassName: MnemonSettingsCard_module_css_default.detailsScroll ?? "", children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComponentPage, { ...props }) }); } function ComponentPage(props) { const { entry, dashboard, name, t } = props; const bodyRef = (0, react.useRef)(null); (0, react.useEffect)(() => { const target = props.section?.trim(); const body = bodyRef.current; if (target === void 0 || target === "" || body === null) return; const escapeAttr = typeof CSS !== "undefined" && typeof CSS.escape === "function" ? CSS.escape(target) : target.replace(/["\\]/gu, "\\$&"); const reveal = () => { const element = body.querySelector(`[data-settings-section="${escapeAttr}"]`); if (element === null) return false; let current = element; while (current !== null && current !== body) { if (current instanceof HTMLDetailsElement && !current.open) current.open = true; if (current.hasAttribute("data-disclosure-open")) current.click(); else [...current.children].find((child) => child instanceof HTMLElement && child.hasAttribute("data-disclosure-open"))?.click(); current = current.parentElement; } const reducedMotion = typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true; element.scrollIntoView?.({ behavior: reducedMotion ? "auto" : "smooth", block: "start" }); return true; }; if (reveal()) return; if (typeof MutationObserver === "undefined") return; const observer = new MutationObserver(() => { if (reveal()) { clearTimeout(timeout); observer.disconnect(); } }); const timeout = setTimeout(() => observer.disconnect(), 4e3); observer.observe(body, { childList: true, subtree: true }); return () => { clearTimeout(timeout); observer.disconnect(); }; }, [props.section, entry.entryId]); const relations = relationsOf(dashboard, entry); const names = (entries) => nameList(entries.map(name), t); const plan = entry.roles.includes("strategy") ? void 0 : switchPlan(dashboard, entry, !entry.enabled); const others = plan?.changes?.filter((change) => change.entry !== entry) ?? []; const on = names(others.filter((change) => change.enabled).map((change) => change.entry)); const off = names(others.filter((change) => !change.enabled).map((change) => change.entry)); const effect = plan?.blocked === "last-source" ? t("details.effectLast") : entry.enabled ? off === "" ? void 0 : t("details.effectOff", { names: off }) : on === "" && off === "" ? void 0 : off === "" ? t("details.effectOn", { names: on }) : on === "" ? t("details.effectOnReplace", { names: off }) : t("details.effectOnMixed", { on, off }); const needs = relations.needs.filter((need) => need.providers.length > 0 || !need.met); const hasRelations = needs.length > 0 || relations.neededBy.length > 0 || relations.conflictsWith.length > 0 || effect !== void 0; const link = (other, on) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonSettingsCard_module_css_default.detailsName, onClick: () => props.onOpen(other), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: on ? "done" : "idle" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: name(other) })] }, other.entryId); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { ref: bodyRef, className: `${MnemonSettingsCard_module_css_default.surface} ${MnemonSettingsCard_module_css_default.detailsBody}`, children: [ props.back !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonSettingsCard_module_css_default.detailsBack, onClick: props.back.go, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronLeftOutlineRegular, { size: 12, "aria-hidden": "true" }), t("details.back", { component: props.back.name })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.detailsHead, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.detailsHeadLine, children: [ props.state !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.boardState, "data-tone": props.state.pending === true ? "ongoing" : props.state.tone, children: props.state.pending === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "ongoing" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { active: true, children: props.state.text })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [props.state.tone !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: props.state.tone }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.state.text })] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: isShipped(entry) ? "neutral" : "info", children: t(isShipped(entry) ? "details.shipped" : "details.installed") }), isExperimental(entry) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "info", children: t("board.experimental") }), props.headed !== true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { className: MnemonSettingsCard_module_css_default.detailsPackage, children: entry.packageName }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.detailsControl, children: props.control }) ] }) }), hasRelations && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonSettingsCard_module_css_default.detailsSection, "aria-label": t("details.relations"), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("details.relations") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dl", { className: MnemonSettingsCard_module_css_default.detailsRelations, children: [ needs.map((need) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t(need.providers.length > 1 ? "details.needsAny" : "details.needs") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: need.providers.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.detailsMissing, children: t("details.needsMissing", { capability: need.requirement }) }) : need.providers.map((provider) => link(provider, provider.enabled)) })] }, need.requirement)), relations.neededBy.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("details.neededBy") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: relations.neededBy.map((dependent) => link(dependent, true)) })] }), relations.conflictsWith.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("details.conflicts") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: relations.conflictsWith.map((other) => link(other, other.enabled)) })] }) ] }), effect !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.detailsEffect, children: effect }) ] }), entry.fields.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonSettingsCard_module_css_default.detailsSection, "aria-label": t("details.options"), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("details.options") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComponentOptions, { entry, name: name(entry), dashboard, language: props.language, t, disabled: !props.writable || !entry.writable, pending: props.applying, onApply: props.onApply }, entry.entryId + JSON.stringify(entry.config))] }), props.settings !== void 0 && props.settings !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.detailsContributed, children: props.settings }) ] }); } function MainChoice(props) { return props.selected ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "solid", children: props.t("details.currentMain") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: props.disabled, onClick: props.onChoose, children: props.t("details.useMain") }); } const css$10 = ".lD-nda_reveal{opacity:1;grid-template-rows:1fr;transition:grid-template-rows .22s cubic-bezier(.2,0,0,1),opacity .16s ease-out;display:grid}.lD-nda_reveal[data-state=closing]{opacity:0;pointer-events:none;grid-template-rows:0fr}@starting-style{.lD-nda_reveal[data-state=open]{opacity:0;grid-template-rows:0fr}}.lD-nda_revealBody{min-width:0;min-height:0;overflow:hidden}[data-mnemon-flash]{animation:1.3s ease-out lD-nda_mnemon-flash}@keyframes lD-nda_mnemon-flash{0%,25%{background-color:color-mix(in srgb, var(--dsw-alias-state-business-primary) 12%, transparent)}to{background-color:#0000}}.lD-nda_callout{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);flex-wrap:wrap;align-items:center;gap:8px 10px;min-width:0;padding:10px 12px;font-size:12px;line-height:18px;display:flex}.lD-nda_callout[data-tone=error]{background:color-mix(in srgb, var(--dsw-alias-state-error-primary) 7%, var(--dsw-alias-bg-module-platform))}.lD-nda_callout[data-tone=warning]{background:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 8%, var(--dsw-alias-bg-module-platform))}.lD-nda_calloutDot{flex:none;align-self:flex-start;margin-top:4px}.lD-nda_calloutCopy{overflow-wrap:anywhere;flex-direction:column;flex:1 1 0;gap:2px;min-width:min(220px,100%);display:flex}.lD-nda_calloutCopy strong{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:20px}.lD-nda_calloutCopy span{color:var(--dsw-alias-label-secondary)}.lD-nda_calloutActions{flex-wrap:wrap;flex:none;gap:6px;margin-left:auto;display:flex}.lD-nda_actionButton{white-space:nowrap}.lD-nda_chip{border:.5px solid var(--dsw-alias-border-l3);corner-shape:round;background:var(--dsw-alias-bg-base);max-width:100%;min-height:28px;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;border-radius:999px;align-items:center;gap:6px;padding:0 10px;font-size:12px;line-height:18px;transition:background-color .15s,border-color .15s,color .15s;display:inline-flex}button.lD-nda_chip{cursor:pointer}button.lD-nda_chip:hover{background:var(--dsw-alias-interactive-bg-hover)}.lD-nda_chip[data-state=idle]{color:var(--dsw-alias-label-tertiary);border-style:dashed}.lD-nda_chip[data-state=warning]{border-color:color-mix(in srgb, var(--dsw-alias-state-warn-primary) 45%, transparent)}.lD-nda_chip[data-state=error]{border-color:color-mix(in srgb, var(--dsw-alias-state-error-primary) 45%, transparent)}.lD-nda_chipLabel{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.lD-nda_chipNote{color:var(--dsw-alias-label-tertiary);white-space:nowrap}@media (prefers-reduced-motion:reduce){.lD-nda_reveal,.lD-nda_chip{transition:none}[data-mnemon-flash]{animation:none}}"; const tagId$6 = "dsh-brain-mnemon/src/client/MnemonFeedback.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$6) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$6; document.head.appendChild(tag); } if (tag.textContent !== css$10) tag.textContent = css$10; } var MnemonFeedback_module_css_default = { "actionButton": "lD-nda_actionButton", "callout": "lD-nda_callout", "calloutActions": "lD-nda_calloutActions", "calloutCopy": "lD-nda_calloutCopy", "calloutDot": "lD-nda_calloutDot", "chip": "lD-nda_chip", "chipLabel": "lD-nda_chipLabel", "chipNote": "lD-nda_chipNote", "mnemon-flash": "lD-nda_mnemon-flash", "reveal": "lD-nda_reveal", "revealBody": "lD-nda_revealBody" }; // vendor/dsh-mnemon/src/client/feedback.tsx function holdMs(toast) { const reading = Math.min(8e3, Math.max(3e3, toast.text.length * 80)); return toast.actions === void 0 || toast.actions.length === 0 ? reading : Math.max(reading, 6e3); } function useToast() { const [current, setCurrent] = (0, react.useState)(null); const seq = (0, react.useRef)(0); const show = (0, react.useCallback)((toast) => { seq.current += 1; setCurrent({ seq: seq.current, toast }); }, []); if (current === null) return { show, element: null }; const dismiss = () => setCurrent((existing) => existing?.seq === current.seq ? null : existing); const { toast } = current; return { show, element: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Toast, { text: toast.text, holdMs: holdMs(toast), onDone: dismiss, ...toast.tone === "success" ? { tone: "success" } : toast.tone === "warning" ? { icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconWarningOutlineRegular, {}) } : {}, ...toast.actions === void 0 ? {} : { actions: toast.actions.map((action) => ({ label: action.label, onClick: () => { dismiss(); action.run(); } })) } }, current.seq) }; } const REVEAL_MS = 220; function Reveal({ children, className }) { const open = children !== null && children !== void 0 && children !== false; const last = (0, react.useRef)(null); if (open) last.current = children; const [closing, setClosing] = (0, react.useState)(false); const wasOpen = (0, react.useRef)(open); (0, react.useEffect)(() => { if (open) { wasOpen.current = true; setClosing(false); return; } if (!wasOpen.current) return; wasOpen.current = false; setClosing(true); const timer = setTimeout(() => { last.current = null; setClosing(false); }, REVEAL_MS); return () => clearTimeout(timer); }, [open]); if (!open && !closing) return null; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: [MnemonFeedback_module_css_default.reveal, className].filter(Boolean).join(" "), "data-state": open ? "open" : "closing", "aria-hidden": open ? void 0 : true, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonFeedback_module_css_default.revealBody, children: open ? children : last.current }) }); } function reducedMotion() { return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches === true; } const TARGET = "data-mnemon-target"; function locate(root, targets, options = {}) { if (root === null) return; const marked = [...root.querySelectorAll(`[${TARGET}]`)]; const elements = targets.flatMap((target) => marked.filter((element) => element.getAttribute(TARGET) === target)); if (elements.length === 0) return; const still = reducedMotion(); if (options.scroll === true) elements[0].scrollIntoView({ block: "center", behavior: still ? "auto" : "smooth" }); if (still) return; for (const element of elements) { element.removeAttribute("data-mnemon-flash"); element.offsetWidth; element.setAttribute("data-mnemon-flash", ""); setTimeout(() => { element.removeAttribute("data-mnemon-flash"); }, 1400); } } function Callout(props) { const role = props.live === false ? void 0 : props.tone === "error" ? "alert" : "status"; const titleId = (0, react.useId)(); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: [MnemonFeedback_module_css_default.callout, props.className].filter(Boolean).join(" "), "data-tone": props.tone, "aria-labelledby": titleId, ...role === void 0 ? {} : { role }, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: props.tone, className: MnemonFeedback_module_css_default.calloutDot }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonFeedback_module_css_default.calloutCopy, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { id: titleId, children: props.title }), props.children !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.children })] }), props.actions !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonFeedback_module_css_default.calloutActions, children: props.actions }) ] }); } function ActionButton(props) { const pending = props.pending === true; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: props.primary === true ? "primary" : "outline", size: "sm", className: MnemonFeedback_module_css_default.actionButton, disabled: props.disabled === true || pending, "aria-busy": pending || void 0, ...props.ariaLabel === void 0 ? {} : { "aria-label": props.ariaLabel }, onClick: props.onClick, children: pending ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { active: true, children: props.pendingLabel ?? props.label }) : props.label }); } // vendor/dsh-mnemon/src/client/settings-controls.tsx const memorySettingsStyles = MnemonSettingsCard_module_css_default; const targetOf = (target) => target === void 0 ? {} : { [TARGET]: target }; function SettingRow(props) { const title = props.htmlFor === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { id: props.titleId, children: props.title }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", { id: props.titleId, htmlFor: props.htmlFor, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: props.title }) }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.settingRow, "data-stacked": props.stacked === true ? "" : void 0, ...targetOf(props.target), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.settingCopy, children: [props.badge !== void 0 && props.badge !== null && props.badge !== false ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rowTitleLine, children: [title, props.badge] }) : title, props.hint !== void 0 && props.hint !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: props.hint })] }), props.children !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.settingControl, children: props.children })] }); } function SettingSelect(props) { const [open, setOpen] = (0, react.useState)(false); const valueId = (0, react.useId)(); const current = props.options.find((option) => option.value === props.value); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, { open, onClose: () => setOpen(false), align: "end", portal: true, selectedId: props.value, listClassName: MnemonSettingsCard_module_css_default.selectMenu, items: props.options.map((option) => ({ id: option.value, label: option.detail === void 0 ? option.label : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.selectOption, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: option.label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: option.detail })] }), ...option.disabled === true ? { disabled: true } : {} })), onSelect: (id) => { setOpen(false); if (id !== props.value) props.onChange(id); }, anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonSettingsCard_module_css_default.selector, "aria-haspopup": "menu", "aria-expanded": open, "aria-labelledby": `${props.labelledBy} ${valueId}`, disabled: props.disabled, onClick: () => setOpen((value) => !value), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { id: valueId, children: current?.label ?? props.value }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 12 })] }) }); } function SelectRow(props) { const titleId = `${props.id}-title`; const detail = props.options.find((option) => option.value === props.value)?.detail; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, { title: props.label, titleId, hint: props.hint ?? detail, target: props.target, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingSelect, { labelledBy: titleId, value: props.value, options: props.options, disabled: props.disabled === true, onChange: props.onChange }) }); } function ToggleRow(props) { const title = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { id: props.titleId, children: props.label }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.toggleRow, id: props.id, ...targetOf(props.target), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.settingCopy, children: [ props.badge !== void 0 && props.badge !== null && props.badge !== false ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rowTitleLine, children: [title, props.badge] }) : title, props.hint !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: props.hint }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: props.note === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rowNote, children: props.note }) }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, { className: MnemonSettingsCard_module_css_default.switch, checked: props.checked, label: props.ariaLabel ?? props.label, disabled: props.disabled, onChange: props.onChange })] }); } function AdvancedSection(props) { const [open, setOpen] = (0, react.useState)(() => props.defaultOpen === true || props.section !== void 0 && props.activeSection === props.section); const userToggled = (0, react.useRef)(false); const titleId = (0, react.useId)(); const bodyId = (0, react.useId)(); (0, react.useEffect)(() => { if (props.section !== void 0 && props.activeSection === props.section) setOpen(true); }, [props.section, props.activeSection]); (0, react.useEffect)(() => { if (props.defaultOpen === true && !userToggled.current) setOpen(true); }, [props.defaultOpen]); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: [MnemonSettingsCard_module_css_default.advanced, props.className].filter(Boolean).join(" "), "data-open": open ? "" : void 0, ...props.section === void 0 ? {} : { "data-settings-section": props.section }, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonSettingsCard_module_css_default.advancedToggle, "aria-expanded": open, "aria-labelledby": titleId, ...open ? { "aria-controls": bodyId } : {}, "data-disclosure-open": open ? void 0 : "", onClick: () => { userToggled.current = true; setOpen((value) => !value); }, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.advancedHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { id: titleId, className: MnemonSettingsCard_module_css_default.advancedTitle, children: props.title }), props.hint !== void 0 && props.hint !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: MnemonSettingsCard_module_css_default.advancedHint, children: props.hint })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.advancedMeta, children: [props.badge !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.advancedBadge, children: props.badge }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 14, "aria-hidden": "true" })] })] }), open && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { id: bodyId, className: MnemonSettingsCard_module_css_default.advancedBody, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.advancedContent, children: props.children }) })] }); } // vendor/dsh-mnemon/src/client/shared/store.ts var ExternalStore = class { snapshot; listeners = /* @__PURE__ */ new Set(); constructor(initial) { this.snapshot = initial; } getSnapshot = () => this.snapshot; subscribe = (listener) => { this.listeners.add(listener); return () => { this.listeners.delete(listener); }; }; get listenerCount() { return this.listeners.size; } setSnapshot(next, force = false) { if (!force && Object.is(this.snapshot, next)) return; this.snapshot = next; this.notify(); } notify() { for (const listener of [...this.listeners]) listener(); } }; var ChangeSignal = class extends ExternalStore { settleMs; pending; constructor(settleMs = 100) { super(0); this.settleMs = settleMs; } bump = () => { if (this.pending !== void 0) return; this.pending = setTimeout(() => { this.pending = void 0; this.setSnapshot(this.snapshot + 1); }, this.settleMs); }; }; function isDocumentVisible() { return typeof document === "undefined" || document.visibilityState !== "hidden"; } var DocumentVisibilityStore = class { listeners = /* @__PURE__ */ new Set(); listening = false; handleVisibilityChange = () => { for (const listener of [...this.listeners]) listener(); }; getSnapshot = () => isDocumentVisible(); subscribe = (listener) => { this.listeners.add(listener); if (!this.listening && typeof document !== "undefined") { document.addEventListener("visibilitychange", this.handleVisibilityChange); this.listening = true; } return () => { this.listeners.delete(listener); if (this.listeners.size === 0 && this.listening && typeof document !== "undefined") { document.removeEventListener("visibilitychange", this.handleVisibilityChange); this.listening = false; } }; }; }; const documentVisibilityStore = new DocumentVisibilityStore(); // vendor/dsh-mnemon/src/client/view-store.ts const STALE_REVISION_PATTERN = /configuration changed/u; const OWN_WRITE_ECHO_WINDOW_MS = 5e3; function rebase(request, dashboard) { return Object.fromEntries(Object.entries(request.entries).map(([entryId, preference]) => { const current = dashboard.entries.find((entry) => entry.entryId === entryId); const config = request.configured.includes(entryId) ? preference.config : current?.config ?? preference.config; return [entryId, { enabled: preference.enabled, config: structuredClone(config) }]; })); } function switchedEntries(before, after) { return after.entries.filter((entry) => { const previous = before.entries.find((candidate) => candidate.entryId === entry.entryId); return previous !== void 0 && previous.enabled !== entry.enabled; }); } function reconfiguredEntries(before, after) { return after.entries.filter((entry) => { const previous = before.entries.find((candidate) => candidate.entryId === entry.entryId); return previous !== void 0 && JSON.stringify(previous.config) !== JSON.stringify(entry.config); }); } function moved(before, after) { return before.strategyTypeId !== after.strategyTypeId || switchedEntries(before, after).length > 0 || reconfiguredEntries(before, after).length > 0; } var MnemonViewStore = class extends ExternalStore { client; ticket = 0; seq = 0; last; own; constructor(client) { super({ status: client === void 0 ? "unavailable" : "loading", dashboard: null, working: null, failure: null, change: null }); this.client = client; } async load() { if (this.client === void 0 || this.snapshot.working !== null) return; const ticket = ++this.ticket; const previous = this.snapshot.status === "ready" ? this.snapshot.dashboard : null; if (this.snapshot.status !== "ready") this.setSnapshot({ ...this.snapshot, status: "loading" }); try { const dashboard = await this.client.viewDashboard(); if (ticket !== this.ticket) return; const external = previous !== null && moved(previous, dashboard) && !this.echoes(previous, dashboard); this.setSnapshot({ ...this.snapshot, status: "ready", dashboard, failure: null, change: external ? { seq: ++this.seq, origin: "external", before: previous, after: dashboard } : this.snapshot.change }); } catch { if (ticket === this.ticket) this.setSnapshot({ ...this.snapshot, status: "unavailable", dashboard: null }); } } async apply(key, strategyTypeId, entries, configured = []) { const previous = this.snapshot.dashboard; if (this.client === void 0 || previous === null || this.snapshot.working !== null) return false; const ticket = ++this.ticket; const request = { key, strategyTypeId, entries, configured }; this.last = request; this.own = { at: Date.now(), request }; const optimistic = { ...previous, strategyTypeId: strategyTypeId ?? previous.strategyTypeId, entries: previous.entries.map((entry) => entries[entry.entryId] === void 0 ? entry : { ...entry, enabled: entries[entry.entryId].enabled, active: entries[entry.entryId].enabled, ...configured.includes(entry.entryId) ? { config: entries[entry.entryId].config } : {} }) }; this.setSnapshot({ ...this.snapshot, working: { key, before: previous, after: optimistic }, failure: null, dashboard: optimistic }); let base = previous; try { for (let attempt = 0;; attempt += 1) try { await this.client.applyView({ expectedRevision: base.revision, strategyTypeId: strategyTypeId ?? base.strategyTypeId, entries: rebase(request, base) }); break; } catch (reason) { const latest = attempt === 0 && STALE_REVISION_PATTERN.test(message(reason)) ? await this.client.viewDashboard().catch(() => void 0) : void 0; if (latest === void 0 || ticket !== this.ticket) throw reason; base = latest; } } catch { if (ticket !== this.ticket) return false; const current = await this.client.viewDashboard().catch(() => previous); if (ticket === this.ticket) this.setSnapshot({ ...this.snapshot, dashboard: current, working: null, failure: { seq: ++this.seq, key, kind: "apply" } }); return false; } try { const next = await this.client.viewDashboard(); if (ticket === this.ticket) this.setSnapshot({ ...this.snapshot, status: "ready", dashboard: next, working: null, change: { seq: ++this.seq, origin: "own", key, before: base, after: next } }); } catch { if (ticket === this.ticket) this.setSnapshot({ ...this.snapshot, dashboard: this.snapshot.dashboard === null ? null : { ...this.snapshot.dashboard, writable: false }, working: null, failure: { seq: ++this.seq, key, kind: "refresh" } }); } return true; } setEnabled(key, changes) { return this.apply(key, void 0, Object.fromEntries(changes.map(({ entry, enabled }) => [entry.entryId, { enabled, config: structuredClone(entry.config) }]))); } configure(key, entry, config) { return this.apply(key, void 0, { [entry.entryId]: { enabled: entry.enabled, config: structuredClone(config) } }, [entry.entryId]); } revert(change) { const reconfigured = reconfiguredEntries(change.before, change.after).map((entry) => entry.entryId); const touched = /* @__PURE__ */ new Set([...switchedEntries(change.before, change.after).map((entry) => entry.entryId), ...reconfigured]); const entries = Object.fromEntries([...touched].map((entryId) => { const before = change.before.entries.find((candidate) => candidate.entryId === entryId); return [entryId, { enabled: before.enabled, config: structuredClone(before.config) }]; })); return this.apply("revert:" + String(change.seq), change.before.strategyTypeId, entries, reconfigured); } retry() { const last = this.last; return last === void 0 ? Promise.resolve(false) : this.apply(last.key, last.strategyTypeId, last.entries, last.configured); } echoes(before, after) { const own = this.own; if (own === void 0 || Date.now() - own.at > OWN_WRITE_ECHO_WINDOW_MS) return false; if (before.strategyTypeId !== after.strategyTypeId && after.strategyTypeId !== own.request.strategyTypeId) return false; return switchedEntries(before, after).every((entry) => own.request.entries[entry.entryId]?.enabled === entry.enabled) && reconfiguredEntries(before, after).every((entry) => own.request.configured.includes(entry.entryId)); } }; function useViewStore(client, refreshKey) { const store = (0, react.useMemo)(() => new MnemonViewStore(client), [client]); const state = (0, react.useSyncExternalStore)(store.subscribe, store.getSnapshot, store.getSnapshot); (0, react.useEffect)(() => { store.load(); }, [store, refreshKey]); return { store, state }; } // vendor/dsh-mnemon/src/client/CompositionBoard.tsx const ROLE_GROUPS = [{ role: "source", title: "board.sources" }, { role: "strategy-extension", title: "board.enhancements" }]; const MIN_SEARCH_COMPONENTS = 8; function usePageTrail() { const [state, setState] = (0, react.useState)({ trail: [] }); const open = (0, react.useCallback)((entryId, from, section) => { const normalized = section?.trim() ? section.trim() : void 0; setState((current) => ({ trail: from === "page" ? current.trail.at(-1) === entryId ? current.trail : [...current.trail, entryId] : [entryId], ...normalized === void 0 ? {} : { section: normalized } })); }, []); const back = (0, react.useCallback)(() => setState((current) => ({ trail: current.trail.slice(0, -1) })), []); const close = (0, react.useCallback)(() => setState({ trail: [] }), []); return (0, react.useMemo)(() => ({ trail: state.trail, ...state.section === void 0 ? {} : { section: state.section }, open, back, close }), [ state.trail, state.section, open, back, close ]); } function PageLink(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonSettingsCard_module_css_default.pageLink, "aria-haspopup": "dialog", onClick: props.onOpen, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.label }) }); } function SettingsGear(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonSettingsCard_module_css_default.boardIconButton, "aria-haspopup": "dialog", "aria-label": props.label, title: props.label, onClick: props.onOpen, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSettingsOutlineRegular, { size: 16 }) }); } function ComponentChips(props) { if (props.chips.length === 0) return null; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.boardLinks, children: [props.label !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.boardLinksLabel, children: props.label }), props.chips.map((chip) => chip.open === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.boardLink, title: chip.title, "data-on": chip.on ? "" : void 0, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconLinkOutlineRegular, { size: 12 }), chip.name] }, chip.key) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonSettingsCard_module_css_default.boardLink, "aria-haspopup": "dialog", title: chip.title, "data-on": chip.on ? "" : void 0, onClick: chip.open, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconLinkOutlineRegular, { size: 12 }), chip.name] }, chip.key))] }); } function requestOf(plan) { return plan.changes === void 0 ? void 0 : Object.fromEntries(plan.changes.map(({ entry, enabled }) => [entry.entryId, { enabled, config: structuredClone(entry.config) }])); } function chooseMain(store, dashboard, entry) { const entries = requestOf(mainPlan(dashboard, entry)); return entries === void 0 ? Promise.resolve(false) : store.apply("strategy:" + entry.entryId, entry.typeId, entries); } function switchComponent(store, dashboard, entry, enabled) { const plan = switchPlan(dashboard, entry, enabled); return plan.changes === void 0 ? Promise.resolve(false) : store.setEnabled("component:" + entry.entryId, plan.changes); } async function switchLayer(view, system, layers, layerId, on) { const dashboard = view.state.dashboard; const component = dashboard === null ? void 0 : sourceOf(dashboard, layerId); const saved = system?.configuration.layers[layerId]?.enabled !== false; if (component === void 0 || !component.writable) { if (saved !== on) await layers.set(layerId, on); return; } if (on && !saved) await layers.set(layerId, true); if (component.enabled !== on) await switchComponent(view.store, dashboard, component, on); } function BoardRow(props) { const { item, t } = props; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.boardRow, [TARGET]: item.target, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.boardRowLine, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.settingCopy, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.boardRowTitle, children: [props.onOpen === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: item.label }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageLink, { label: item.label, onOpen: props.onOpen }), item.entry !== void 0 && isExperimental(item.entry) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "info", children: t("board.experimental") })] }), item.hint !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: item.hint }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComponentChips, { chips: item.relations }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.boardControl, children: [ item.state !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StateLabel, { state: item.state }), props.onOpen !== void 0 && props.configurable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsGear, { label: t("options.aria", { component: item.label }), onOpen: props.onOpen }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, { className: MnemonSettingsCard_module_css_default.switch, checked: item.checked, label: item.label, disabled: item.disabled, onChange: item.onSwitch }) ] })] }) }); } function StateLabel(props) { const { state } = props; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.boardState, "data-tone": state.pending === true ? "ongoing" : state.tone, children: state.pending === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "ongoing" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { active: true, children: state.text })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [state.tone !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: state.tone }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: state.text })] }) }); } function CompositionBoard(props) { const { view, system, t, language } = props; const localePreference = useLocalePreference$4(language); const instance = (0, react.useId)(); const [layerPending, setLayerPending] = (0, react.useState)(null); const ownPages = usePageTrail(); const pages = props.pages ?? ownPages; const [othersOpen, setOthersOpen] = (0, react.useState)(false); const [query, setQuery] = (0, react.useState)(""); const dashboard = view.state.dashboard; const componentsUnavailable = dashboard === null && view.state.status === "unavailable"; const pageMode = props.page !== void 0; if (componentsUnavailable && (pageMode || system === null)) return pageMode ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.boardEmpty, role: "status", children: t("board.componentsUnavailable") }) : null; const name = (entry) => componentCopy(entry, localePreference).label; const model = dashboard === null ? void 0 : componentModel(dashboard); const working = view.state.working; const changing = new Map(working === null ? [] : switchedEntries(working.before, working.after).map((entry) => [entry.entryId, entry.enabled])); const busy = working !== null || layerPending !== null || props.readOnly; const locked = busy || dashboard?.writable !== true; const selectedRunning = model !== void 0 && model.selected !== void 0 && model.selected === model.composing; const pendingText = (on) => t(on ? "board.turningOn" : "board.turningOff"); const placeholders = (count) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.boardGroup, "aria-hidden": "true", children: Array.from({ length: count }, (_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.placeholderRow, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {})] }, index)) }); const frame = (content, pending) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: `${MnemonSettingsCard_module_css_default.section} ${MnemonSettingsCard_module_css_default.boardSection}`, "aria-labelledby": `${instance}-heading`, "aria-busy": pending, [TARGET]: "overview", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.sectionHeading, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { id: `${instance}-heading`, children: t("board.title") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("board.description") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.appliesNow, children: t("config.appliesNow") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.board, children: content })] }); if (model === void 0 && !componentsUnavailable) { if (pageMode) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { className: MnemonSettingsCard_module_css_default.boardLoading, role: "status", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "ongoing" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { active: true, children: t("board.loading") })] }); return frame(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { className: MnemonSettingsCard_module_css_default.boardLoading, role: "status", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "ongoing" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { active: true, children: t("board.loading") })] }), placeholders(4)] }), true); } const problem = model === void 0 ? { tone: "idle", text: t("board.componentsUnavailable"), actions: [] } : working === null ? problemOf(props, model, dashboard, name) : void 0; const stateOf = (entry) => { const pending = changing.get(entry.entryId); if (pending !== void 0) return { text: pendingText(pending), pending: true }; if (!entry.enabled) return entry.roles.includes("source") ? { tone: "idle", text: t("board.off") } : void 0; const unmet = unmetRequirements(dashboard, entry)[0]; if (unmet !== void 0) return { tone: "warning", text: unmet.providers[0] === void 0 ? t("board.needsMissing") : t("board.needs", { component: name(unmet.providers[0]) }) }; if (!entry.active) return { tone: "warning", text: t("board.notRunning") }; if (entry.roles.includes("strategy-extension") && !enhancementApplies(entry, model.composing)) return { tone: "idle", text: t("board.unused") }; if (entry.roles.includes("source") && switchPlan(dashboard, entry, false).blocked === "last-source") return { tone: "done", text: t("board.lastSource") }; return { tone: "done", text: t("board.running") }; }; const relationsFor = (entry) => { const relations = relationsOf(dashboard, entry); const needs = relations.needs.flatMap((need) => need.providers.length === 1 ? [need.providers[0]] : []).map((other) => ({ key: "needs:" + other.entryId, name: name(other), on: other.enabled, title: t("board.relationNeeds", { component: name(other) }), open: () => pages.open(other.entryId, "configuration") })); const neededBy = relations.neededBy.map((other) => ({ key: "by:" + other.entryId, name: name(other), on: true, title: t("board.relationNeededBy", { component: name(other) }), open: () => pages.open(other.entryId, "configuration") })); return [...needs, ...neededBy]; }; const componentItem = (entry, target) => { const plan = switchPlan(dashboard, entry, !entry.enabled); const missing = !entry.enabled && unmetRequirements(dashboard, entry).some((unmet) => unmet.providers.length === 0); return { key: entry.entryId, entry, label: name(entry), hint: componentCopy(entry, localePreference).hint, relations: relationsFor(entry), state: stateOf(entry), checked: changing.get(entry.entryId) ?? entry.enabled, target, disabled: locked || !entry.writable || !selectedRunning || missing || plan.blocked !== void 0, onSwitch: (next) => { switchComponent(view.store, dashboard, entry, next); } }; }; const layerIds = Object.keys(system?.configuration.layers ?? {}); const sources = dashboard?.entries.filter((entry) => entry.roles.includes("source")) ?? []; const sourceItems = [.../* @__PURE__ */ new Set([...layerIds, ...sources.map((entry) => layerOf(entry) ?? "component:" + entry.entryId)])].map((key) => { const layerId = key.startsWith("component:") ? void 0 : key; const component = layerId === void 0 ? sources.find((entry) => "component:" + entry.entryId === key) : dashboard === null ? void 0 : sourceOf(dashboard, layerId); if (layerId === void 0) return componentItem(component, key); const saved = system?.configuration.layers[layerId]?.enabled !== false; const pending = layerPending !== null && layerPending.layerId === layerId ? layerPending.on : void 0; const run = (next) => { if (component === void 0 || !component.writable || !saved) setLayerPending({ layerId, on: next }); switchLayer(view, system, props.layers, layerId, next).finally(() => setLayerPending((current) => current?.layerId === layerId ? null : current)); }; if (component !== void 0) { const item = componentItem(component, "layer:" + layerId); return { ...item, onSwitch: run, checked: pending ?? (saved && item.checked), state: pending !== void 0 ? { text: pendingText(pending), pending: true } : !saved ? { tone: "idle", text: t("board.off") } : item.state, disabled: busy || item.disabled && component.writable && saved }; } const running = system?.sources.some((source) => source.sourceTypeId === layerId) === true; return { key, entry: void 0, label: system?.sources.find((source) => source.sourceTypeId === layerId)?.management.label ?? layerId, hint: "", relations: [], target: "layer:" + layerId, onSwitch: run, disabled: busy, checked: pending ?? saved, state: pending !== void 0 ? { text: pendingText(pending), pending: true } : !saved ? { tone: "idle", text: t("board.off") } : running ? { tone: "done", text: t("board.running") } : { tone: "warning", text: t("board.notRunning") } }; }); const others = dashboard?.entries.filter((entry) => !entry.roles.includes("strategy") && !entry.roles.includes("source")) ?? []; const roles = [...new Set(others.map((entry) => entry.roles.find((role) => role !== "strategy" && role !== "source")))].sort((left, right) => rank(left) - rank(right) || left.localeCompare(right)); const total = sourceItems.length + others.length; const needle = query.trim().toLowerCase(); const matches = (item) => needle === "" || [ item.label, item.hint, item.entry?.packageName ?? "" ].some((text) => text.toLowerCase().includes(needle)); const openRow = (entry) => entry === void 0 ? void 0 : () => pages.open(entry.entryId, "configuration"); const configurable = (entry) => entry !== void 0 && (entry.fields.length > 0 || props.componentSettings?.has(entry.packageName) === true); const rows = (items) => items.filter(matches).map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BoardRow, { item, configurable: configurable(item.entry), t, onOpen: openRow(item.entry) }, item.key)); const count = (items) => t("board.enabledCount", { on: items.filter((item) => item.checked).length, total: items.length }); const otherItems = others.map((entry) => componentItem(entry, "enhancement:" + entry.entryId)); const groups = roles.map((role) => { const items = otherItems.filter((item) => item.entry.roles.includes(role)); const title = ROLE_GROUPS.find((group) => group.role === role)?.title; const fits = (entry) => role !== "strategy-extension" || entry.enabled || changing.has(entry.entryId) || enhancementApplies(entry, model?.composing ?? model?.selected); const shown = items.filter((item) => fits(item.entry)); const later = items.filter((item) => !fits(item.entry)); const visible = rows(shown); const hidden = rows(later); if (needle !== "" && visible.length === 0 && hidden.length === 0) return null; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.boardGroup, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.boardGroupHead, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: title === void 0 ? role : t(title) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: count(items) })] }), visible, later.length > 0 && (needle === "" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.boardOthers, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonSettingsCard_module_css_default.boardOthersToggle, "aria-expanded": othersOpen, onClick: () => setOthersOpen((value) => !value), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 12 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("board.otherEnhancements", { count: later.length }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: othersOpen ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.boardOthersList, children: hidden }) : null })] }) : hidden) ] }, role); }); const sourceRows = rows(sourceItems); const mainState = (entry) => { const pending = changing.get(entry.entryId); if (pending !== void 0) return { text: pendingText(pending), pending: true }; if (entry === model?.composing) return { tone: "done", text: t("board.composing") }; return entry.enabled ? { tone: "warning", text: t("board.notRunning") } : { tone: "idle", text: t("board.off") }; }; const pageOf = (entry, board, section) => { const isMain = entry.roles.includes("strategy"); const item = isMain ? void 0 : [...sourceItems, ...otherItems].find((candidate) => candidate.entry === entry); const control = isMain ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MainChoice, { selected: entry.typeId === board.strategyTypeId, disabled: locked || !entry.writable, t, onChoose: () => { chooseMain(view.store, board, entry); } }) : item === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, { className: MnemonSettingsCard_module_css_default.switch, checked: item.checked, label: item.label, disabled: item.disabled, onChange: item.onSwitch }); return { entry, dashboard: board, name, hint: componentCopy(entry, localePreference).hint, state: isMain ? mainState(entry) : item?.state, control, writable: !locked, applying: working?.key === "options:" + entry.entryId, language, t, ...section === void 0 ? {} : { section }, settings: props.componentSettings?.has(entry.packageName) === true ? props.componentSettings.render(entry, !props.readOnly, section) : void 0, onApply: (config) => view.store.configure("options:" + entry.entryId, entry, config) }; }; const openedId = pages.trail.at(-1); const open = openedId === void 0 || dashboard === null ? void 0 : dashboard.entries.find((entry) => entry.entryId === openedId); const previous = pages.trail.length < 2 || dashboard === null ? void 0 : dashboard.entries.find((entry) => entry.entryId === pages.trail.at(-2)); const details = open === void 0 || dashboard === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComponentDetails, { ...pageOf(open, dashboard, pages.section), ...previous === void 0 ? {} : { back: { name: name(previous), go: pages.back } }, onOpen: (other) => pages.open(other.entryId, "page"), onClose: pages.close }); if (pageMode) { const own = dashboard?.entries.find((entry) => entry.packageName === props.page); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonSettingsCard_module_css_default.componentRowPage, "aria-busy": working !== null, children: [own === void 0 || dashboard === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.boardEmpty, role: "status", children: t("board.componentsUnavailable") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComponentPage, { ...pageOf(own, dashboard), headed: true, onOpen: (other) => pages.open(other.entryId, "configuration") }), details] }); } return frame(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: problem === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Callout, { tone: problem.tone, className: MnemonSettingsCard_module_css_default.boardProblem, title: problem.text, ...problem.actions.length === 0 ? {} : { actions: problem.actions.map((action) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ActionButton, { label: action.label, disabled: locked, ...action.primary === true ? { primary: true } : {}, onClick: action.run }, action.key)) } }) }), model !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MainStrategyRow, { ...props, model, dashboard, locked, name, pending: working?.key.startsWith("strategy:") === true, onOpen: model.selected === void 0 ? void 0 : () => pages.open(model.selected.entryId, "configuration") }), total > MIN_SEARCH_COMPONENTS && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { className: MnemonSettingsCard_module_css_default.boardSearch, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSearchOutlineRegular, { size: 14 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "search", value: query, placeholder: t("board.search"), "aria-label": t("board.search"), onChange: (event) => setQuery(event.target.value) })] }), sourceRows.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.boardGroup, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.boardGroupHead, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("board.sources") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: count(sourceItems) })] }), sourceRows] }) : needle === "" && props.systemPending === true ? placeholders(3) : null, groups, needle !== "" && sourceRows.length === 0 && groups.every((group) => group === null) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.boardEmpty, children: t("board.searchEmpty", { query: query.trim() }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.boardFootnote, children: t("board.more") }), details ] }), working !== null); } function rank(role) { const index = ROLE_GROUPS.findIndex((group) => group.role === role); return index < 0 ? ROLE_GROUPS.length : index; } function MainStrategyRow(props) { const { model, dashboard, t } = props; const localePreference = useLocalePreference$4(props.language); const id = (0, react.useId)(); const { mains, selected } = model; if (mains.length === 0) return null; const choose = (typeId) => { const entry = mains.find((candidate) => candidate.typeId === typeId); if (entry !== void 0) chooseMain(props.view.store, dashboard, entry); }; const hint = selected === void 0 ? t("board.strategyMissing") : componentCopy(selected, localePreference).hint; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: `${MnemonSettingsCard_module_css_default.boardRow} ${MnemonSettingsCard_module_css_default.boardMain}`, [TARGET]: "strategy", children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.boardRowLine, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.settingCopy, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { id: `${id}-title`, children: t("config.strategyTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: hint })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.boardControl, children: [ props.pending && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StateLabel, { state: { text: t("board.switching"), pending: true } }), props.onOpen !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsGear, { label: t("details.open", { component: props.name(selected) }), onOpen: props.onOpen }), mains.length === 1 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.boardValue, children: props.name(mains[0]) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingSelect, { labelledBy: `${id}-title`, value: dashboard.strategyTypeId, disabled: props.locked, onChange: choose, options: mains.map((entry) => ({ value: entry.typeId, label: props.name(entry), detail: componentCopy(entry, localePreference).hint, ...entry.writable ? {} : { disabled: true } })) }) ] })] }) }); } function problemOf(props, model, dashboard, name) { const { view, system, t } = props; const { selected, composing, idle, contenders } = model; const choose = (entry) => () => { chooseMain(view.store, dashboard, entry); }; const enableSelected = selected !== void 0 && !selected.enabled ? [{ key: "strategy:" + selected.entryId, label: t("config.enableStrategy", { strategy: name(selected) }), primary: true, run: choose(selected) }] : []; if (composing === void 0) { const text = selected === void 0 ? t("board.noMainMissing") : contenders.length > 0 ? t("board.contenders", { strategy: name(selected), strategies: nameList(contenders.map(name), t) }) : !selected.enabled ? t("board.noMainOff", { strategy: name(selected) }) : t("board.noMainWaiting", { strategy: name(selected) }); const alternatives = selected === void 0 ? model.mains.filter((entry) => entry.writable).slice(0, 2).map((entry) => ({ key: "strategy:" + entry.entryId, label: t("config.useStrategy", { strategy: name(entry) }), run: choose(entry) })) : []; return { tone: "error", text, actions: [...enableSelected, ...alternatives] }; } if (composing !== selected) return { tone: "warning", text: selected === void 0 ? t("board.fallbackMissing", { composing: name(composing) }) : t("board.fallback", { selected: name(selected), composing: name(composing) }), actions: [...enableSelected, { key: "strategy:" + composing.entryId, label: t("config.useStrategy", { strategy: name(composing) }), run: choose(composing) }] }; if (system !== null && !system.serving) { const missing = dashboard.entries.find((entry) => entry.roles.includes("source") && !entry.enabled && entry.writable); return { tone: "error", text: t(system.evaluation.diagnostics.some((diagnostic) => diagnostic.code === "missing-source") ? "board.noSource" : "board.memoryOff"), actions: missing === void 0 ? [] : [{ key: "component:" + missing.entryId, label: t("config.enableComponentNamed", { component: name(missing) }), primary: true, run: () => { switchComponent(view.store, dashboard, missing, true); } }] }; } if (system !== null && system.evaluation.state !== "ready") return { tone: "warning", text: t("board.stale"), actions: [] }; if (idle.length > 0) { const names = nameList(idle.map(name), t); return { tone: "warning", text: t("board.idle", { strategies: names }), actions: [{ key: "strategy:idle", label: t("config.stopStrategies", { strategies: names }), run: () => { view.store.setEnabled("strategy:idle", idle.map((entry) => ({ entry, enabled: false }))); } }] }; } } // vendor/dsh-mnemon/src/client/component-page-request.ts let pending$1; const listeners = /* @__PURE__ */ new Set(); function requestComponentPage(packageName, section) { pending$1 = section === void 0 || section.trim() === "" ? { packageName } : { packageName, section: section.trim() }; for (const listener of [...listeners]) listener(); } function takeComponentPageRequest() { const value = pending$1; pending$1 = void 0; return value; } function subscribeComponentPage(listener) { listeners.add(listener); return () => { listeners.delete(listener); }; } // vendor/dsh-mnemon/src/client/component-feedback.ts function targetsOf(entry) { if (entry.roles.includes("strategy")) return ["strategy"]; if (entry.roles.includes("strategy-extension")) return ["enhancement:" + entry.entryId]; const layer = layerOf(entry); if (layer === void 0) return []; return layer === "memory-spaces" ? ["layer:" + layer, "providers"] : ["layer:" + layer]; } function primaryOf(change) { const key = change.key ?? ""; for (const prefix of [ "component:", "strategy:", "options:" ]) if (key.startsWith(prefix)) return key.slice(prefix.length); } function announces(change) { if (change.origin === "external" || change.key?.startsWith("revert:") === true) return true; if (reconfiguredEntries(change.before, change.after).length > 0) return true; if (change.before.strategyTypeId !== change.after.strategyTypeId || switchedEntries(change.before, change.after).length !== 1) return true; return componentModel(change.before).composing?.entryId !== componentModel(change.after).composing?.entryId; } function describeChange(before, after, origin, name, t, primary) { const switched = switchedEntries(before, after); const reconfigured = reconfiguredEntries(before, after); if (switched.length === 0 && reconfigured.length === 0 && before.strategyTypeId === after.strategyTypeId) return void 0; const was = componentModel(before); const now = componentModel(after); const targets = [.../* @__PURE__ */ new Set([ "overview", ...switched.flatMap(targetsOf), ...reconfigured.flatMap(targetsOf), ...before.strategyTypeId === after.strategyTypeId ? [] : ["strategy"] ])]; const own = origin === "own"; const list = (entries) => entries.map((entry) => t("config.quoted", { name: name(entry) })).join(t("config.listSeparator")); if (switched.length === 0 && before.strategyTypeId === after.strategyTypeId) { const component = reconfigured.length === 1 ? name(reconfigured[0]) : void 0; return { text: component === void 0 ? t(own ? "feedback.several" : "feedback.externalSeveral", { count: reconfigured.length }) : t(own ? "feedback.optionsSaved" : "feedback.externalOptions", { component }), tone: own ? "success" : "info", targets }; } if (was.composing !== void 0 && now.composing === void 0) return { text: t("feedback.memoryOff"), tone: "warning", targets }; if (was.composing === void 0 && now.composing !== void 0) return { text: t("feedback.memoryRestored", { strategy: name(now.composing) }), tone: "success", targets }; if (now.composing !== void 0 && now.composing !== now.selected && was.composing?.entryId !== now.composing.entryId) return { text: now.selected === void 0 ? t("feedback.fallbackMissing", { composing: name(now.composing) }) : t("feedback.fallback", { selected: name(now.selected), composing: name(now.composing) }), tone: "warning", targets }; if (was.composing?.entryId !== now.composing?.entryId && now.composing !== void 0) { const strategy = name(now.composing); if (!own) return { text: t("feedback.externalMain", { strategy }), tone: "info", targets }; const others = switched.filter((entry) => entry !== now.composing); const on = others.filter((entry) => entry.enabled); const off = others.filter((entry) => !entry.enabled); return { text: on.length === 0 && off.length === 0 ? t("feedback.switchedMain", { strategy }) : on.length === 0 ? t("feedback.switchedMainOff", { strategy, others: list(off) }) : off.length === 0 ? t("feedback.switchedMainWith", { strategy, others: list(on) }) : t("feedback.switchedMainMixed", { strategy, on: list(on), off: list(off) }), tone: "success", targets }; } if (switched.length !== 1) { const lead = switched.find((entry) => entry.entryId === primary); if (own && lead !== void 0) { const on = switched.filter((entry) => entry !== lead && entry.enabled); const off = switched.filter((entry) => entry !== lead && !entry.enabled); const component = name(lead); const text = !lead.enabled ? on.length === 0 ? t("feedback.disabledWith", { component, others: list(off) }) : void 0 : off.length === 0 ? t("feedback.enabledWith", { component, others: list(on) }) : on.length === 0 ? t("feedback.enabledReplacing", { component, others: list(off) }) : t("feedback.enabledMixed", { component, on: list(on), off: list(off) }); if (text !== void 0) return { text, tone: "success", targets }; } return { text: t(own ? "feedback.several" : "feedback.externalSeveral", { count: switched.length }), tone: own ? "success" : "info", targets }; } const entry = switched[0]; const component = name(entry); if (entry.enabled && now.idle.includes(entry)) return { text: t("feedback.idleMain", { component }), tone: "warning", targets }; const source = layerOf(entry) !== void 0; return { text: t(own ? source ? entry.enabled ? "feedback.sourceOn" : "feedback.sourceOff" : entry.enabled ? "feedback.componentOn" : "feedback.componentOff" : source ? entry.enabled ? "feedback.externalSourceOn" : "feedback.externalSourceOff" : entry.enabled ? "feedback.externalComponentOn" : "feedback.externalComponentOff", { component }), tone: own ? "success" : "info", targets }; } // vendor/dsh-mnemon/src/client/view-feedback.tsx function useViewFeedback(view, root, t, language) { const localePreference = useLocalePreference$4(language); const toast = useToast(); const show = toast.show; const name = (0, react.useCallback)((entry) => componentCopy(entry, localePreference).label, [localePreference]); const { store, state } = view; const seenChange = (0, react.useRef)(state.change?.seq ?? 0); (0, react.useEffect)(() => { const change = state.change; if (change === null || change.seq === seenChange.current) return; seenChange.current = change.seq; if (!announces(change)) return; const summary = describeChange(change.before, change.after, change.origin, name, t, primaryOf(change)); if (summary === void 0) return; locate(root.current, summary.targets.filter((target) => target !== "overview")); if (change.key?.startsWith("revert:") === true) { show({ text: t("feedback.undone"), tone: "success" }); return; } show({ text: summary.text, tone: summary.tone, actions: change.origin === "own" ? [{ label: t("feedback.undo"), run: () => { store.revert(change); } }] : [{ label: t("feedback.show"), run: () => locate(root.current, ["overview"], { scroll: true }) }] }); }, [ state.change, store, name, root, show, t ]); const seenFailure = (0, react.useRef)(state.failure?.seq ?? 0); (0, react.useEffect)(() => { const failure = state.failure; if (failure === null || failure.seq === seenFailure.current) return; seenFailure.current = failure.seq; if (failure.kind === "refresh") { show({ text: t("config.enhancementsRefreshFailed"), tone: "warning" }); return; } const text = failure.key.startsWith("strategy:") ? t("config.strategyFailed") : t("feedback.failed"); show({ text, tone: "warning", actions: [{ label: t("feedback.retry"), run: () => { store.retry(); } }] }); }, [ state.failure, store, show, t ]); return toast.element; } // vendor/dsh-mnemon/src/client/task-agent-model.tsx function routeOf(value) { const configured = value?.taskAgentModel; return { mode: configured?.mode === "fixed" ? "fixed" : configured?.followConversation === true ? "conversation" : "inherit", provider: configured?.provider?.trim() ?? "", model: configured?.model?.trim() ?? "" }; } function stored(route) { return route.mode === "fixed" ? { mode: "fixed", provider: route.provider, model: route.model } : route.mode === "conversation" ? { mode: "inherit", followConversation: true } : { mode: "inherit" }; } function startingRoute(catalog, current) { const listed = (provider) => catalog.groups.some((group) => group.id === provider); const provider = (listed(current.provider) ? current.provider : "") || catalog.defaultSelection?.provider || catalog.groups[0]?.id || ""; const models = catalog.groups.find((group) => group.id === provider)?.models ?? []; const model = (current.provider === provider ? current.model : "") || (catalog.defaultSelection?.provider === provider ? catalog.defaultSelection.model : "") || models[0]?.id || ""; return provider === "" || model === "" ? void 0 : { provider, model }; } function effectiveRoute(route, catalog, settled = true) { if (!settled) return catalog?.effective; if (route.mode === "fixed") return route.provider === "" || route.model === "" ? void 0 : { provider: route.provider, model: route.model, source: "fixed" }; if (route.mode === "conversation" && catalog?.session !== void 0) return { ...catalog.session, source: "session" }; return catalog?.inherited ?? (catalog?.defaultSelection === void 0 ? void 0 : { ...catalog.defaultSelection, source: "dsh-default" }); } function routeSourceKey(source) { return `config.taskAgentSource.${source}`; } function useTaskAgentModel(options) { const { scope, connection, sessionId, workspaceId } = options; const snapshot = useScope(scope); const saved = routeOf(snapshot.value); const route = useLive(saved, async (next) => { await scope.mutate([{ op: "set", path: ["taskAgentModel"], value: stored(next) }]); }); const [catalog, setCatalog] = (0, react.useState)({ state: connection === void 0 ? "unavailable" : "loading", value: null, error: null, full: false }); const request = (0, react.useRef)(0); const client = (0, react.useMemo)(() => connection === void 0 ? void 0 : new MnemonClient(connection, sessionId, workspaceId), [ connection, sessionId, workspaceId ]); const loaded = (0, react.useRef)({ client: void 0, level: "none" }); const level = () => loaded.current.client === client ? loaded.current.level : "none"; const load = (0, react.useCallback)((full) => { if (client === void 0) return; const current = ++request.current; setCatalog((value) => ({ ...value, state: "loading", error: null })); client.taskAgentModels(full).then((value) => { if (request.current !== current) return; loaded.current = { client, level: full ? "full" : "route" }; setCatalog({ state: "ready", value, error: null, full }); }, (reason) => { if (request.current === current) setCatalog((value) => ({ ...value, state: "error", error: message(reason) })); }); }, [client]); (0, react.useEffect)(() => () => { request.current += 1; }, []); const fullFixed = saved.mode === "fixed"; (0, react.useEffect)(() => { if (fullFixed ? level() === "full" : level() !== "none") return; load(fullFixed); }, [fullFixed, load]); const [choosing, setChoosing] = (0, react.useState)(false); (0, react.useEffect)(() => { if (!choosing) return; if (catalog.state === "error") { setChoosing(false); return; } if (!catalog.full || catalog.value === null) return; setChoosing(false); const start = startingRoute(catalog.value, route.value); if (start !== void 0) route.set({ mode: "fixed", ...start }); }, [choosing, catalog]); const setMode = (mode) => { if (mode !== "fixed") { setChoosing(false); if (route.value.mode === mode) return; route.set({ mode, provider: "", model: "" }); return; } const start = catalog.full && catalog.value !== null ? startingRoute(catalog.value, route.value) : void 0; if (start !== void 0) { route.set({ mode: "fixed", ...start }); return; } setChoosing(true); load(true); }; return { route: route.value, settled: snapshot.status === "ready", catalog, choosing, failed: route.failed, retry: () => { load(fullFixed || choosing || level() === "full"); }, setMode, setRoute: (next) => { route.set({ mode: "fixed", ...next }); } }; } function EffectiveRoute(props) { const { t } = props; const effective = props.choosing === true ? void 0 : effectiveRoute(props.route, props.catalog, props.settled !== false); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.routeValue, children: effective === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: props.state === "loading" || props.choosing === true ? t("config.taskAgentLoading") : t("config.taskAgentUnavailable") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("code", { children: [ effective.provider, " / ", effective.model ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t(routeSourceKey(effective.source)) })] }) }); } function TaskAgentModelRows(props) { const { route, t } = props; const groups = props.state === "ready" ? props.catalog?.groups ?? [] : []; const group = groups.find((candidate) => candidate.id === route.provider); const fixed = props.mode === "fixed" && props.state === "ready"; const shared = (name) => groups.filter((candidate) => candidate.name === name).length > 1; const providers = [...route.provider !== "" && group === void 0 ? [{ value: route.provider, label: route.provider }] : [], ...groups.map((candidate) => ({ value: candidate.id, label: candidate.name, ...shared(candidate.name) ? { detail: candidate.id } : {} }))]; const models = [...route.model !== "" && group?.models.some((model) => model.id === route.model) !== true ? [{ value: route.model, label: route.model }] : [], ...(group?.models ?? []).map((model) => ({ value: model.id, label: model.name, ...model.inputModalities?.includes("image") === true ? { detail: t("config.taskAgentImageInput") } : {} }))]; const prefix = props.idPrefix ?? "mnemon-task-agent"; const chooseProvider = (provider) => { const model = groups.find((candidate) => candidate.id === provider)?.models[0]?.id; if (model !== void 0) props.onRoute({ provider, model }); }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: prefix, label: t("config.taskAgentTitle"), value: props.mode, disabled: props.disabled, onChange: props.onMode, options: [ { value: "inherit", label: t("config.taskAgentInherit"), detail: t("config.taskAgentInheritHint") }, { value: "conversation", label: t("config.taskAgentConversation"), detail: t("config.taskAgentConversationHint") }, { value: "fixed", label: t("config.taskAgentFixed"), detail: t("config.taskAgentFixedHint"), ...props.state === "unavailable" ? { disabled: true } : {} } ] }), fixed && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: `${prefix}-provider`, label: t("config.taskAgentProvider"), value: route.provider, disabled: props.disabled || props.state !== "ready", options: providers, onChange: chooseProvider }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: `${prefix}-model`, label: t("config.taskAgentModel"), value: route.model, disabled: props.disabled || props.state !== "ready" || group === void 0, options: models, onChange: (model) => props.onRoute({ provider: route.provider, model }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rowDetail, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.effectiveRoute, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("config.taskAgentEffective") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EffectiveRoute, { route, settled: props.settled, choosing: props.choosing, catalog: props.catalog, state: props.state, t })] }), props.note, props.state === "error" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { className: MnemonSettingsCard_module_css_default.warning, children: [t("config.taskAgentLoadFailed", { error: props.error ?? "" }), props.retry !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", onClick: props.retry, children: t("config.taskAgentRetry") })] }), (props.catalog?.failures?.length ?? 0) > 0 && groups.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.warning, children: t("config.taskAgentPartial", { count: props.catalog.failures.length }) }) ] }) ] }); } // vendor/dsh-mnemon/src/client/is-record.ts function isRecord(value) { return typeof value === "object" && value !== null && !Array.isArray(value); } function jsonRecord(value) { return isRecord(value) ? value : void 0; } // vendor/dsh-mnemon/src/client/sync-view.ts function transportOf(url) { const value = url.trim(); if (/^https:\/\//iu.test(value)) return "https"; if (/^ssh:\/\//iu.test(value) || /^[A-Za-z0-9._-]+@[A-Za-z0-9._-]+:/u.test(value)) return "ssh"; return "local"; } function onGitHub(url) { try { const parsed = new URL(url.trim()); return parsed.protocol === "https:" && parsed.hostname.toLowerCase() === "github.com"; } catch { return false; } } function repositoryName(url) { const value = url.trim(); if (transportOf(value) !== "https" && !/^ssh:\/\//iu.test(value)) return value; try { const parsed = new URL(value); return (parsed.host + parsed.pathname).replace(/\.git$/u, "").replace(/\/$/u, ""); } catch { return value; } } function repositoryProblem(url) { const value = url.trim(); return value === "" ? void 0 : syncRepositoryProblem(value, portableAbsolutePath); } function branchValid(value) { return syncBranchValid(value.trim()); } function directoryValid(value) { return syncDirectoryParts(value) !== void 0; } function emailValid(value) { return syncEmailValid(value.trim()); } function machineNameValid(value) { return machineLabelValid(value.trim()); } function repositoryNameValid(value) { return githubRepositoryNameValid(value.trim()); } function authorModeOf(name, email) { if (name === "dsh-brain-mnemon sync" && email === "mnemon@localhost") return "default"; if (name === "" && email === "") return "machine"; return "custom"; } const DEFAULT_AUTHOR = "dsh-brain-mnemon sync "; const AUTO_SYNC_CHOICES = [ 0, 60, 180, 360, 720, 1440, 4320, 10080 ]; function intervalLabel(t, minutes) { if (minutes <= 0) return t("config.syncAutoOff"); if (minutes === 60) return t("config.syncAutoHour"); if (minutes === 1440) return t("config.syncAutoDay"); if (minutes % 1440 === 0) return t("config.syncAutoDays", { days: minutes / 1440 }); return t("config.syncAutoHours", { hours: minutes / 60 }); } function when(value, now = /* @__PURE__ */ new Date()) { if (value === void 0) return ""; const at = new Date(value); if (Number.isNaN(at.getTime())) return value; return at.getFullYear() === now.getFullYear() && at.getMonth() === now.getMonth() && at.getDate() === now.getDate() ? at.toLocaleTimeString(void 0, { hour: "2-digit", minute: "2-digit" }) : at.toLocaleString(void 0, { year: "numeric", month: "short", day: "numeric", hour: "2-digit", minute: "2-digit" }); } function issueText(t, issue, url, error, credential = "none") { const transport = transportOf(url); switch (issue) { case "auth": if (transport === "https" && credential !== "none") return rejectedText(t, url, credential); if (transport === "https") return onGitHub(url) ? t("config.syncIssueAuthHttps") : t("config.syncIssueAuthToken"); return transport === "ssh" ? t("config.syncIssueAuthSsh") : t("config.syncIssueAuth"); case "not-found": return onGitHub(url) ? t("config.syncIssueNotFoundGitHub") : t("config.syncIssueNotFound"); case "network": return t("config.syncIssueNetwork"); case "timeout": return t("config.syncIssueTimeout"); default: return t("config.syncIssueUnknown", { error: error ?? "" }); } } function rejectedText(t, url, credential) { const github = onGitHub(url); if (credential === "environment") return t(github ? "config.syncIssueRejectedGitHubEnvironment" : "config.syncIssueRejectedEnvironment", { env: MNEMON_SYNC_TOKEN_ENV }); if (credential === "github") return t("config.syncIssueRejectedGitHub"); return t(github ? "config.syncIssueRejectedGitHubToken" : "config.syncIssueRejected"); } const REMOTE_ISSUE = { "remote-auth": "auth", "remote-not-found": "not-found", "remote-network": "network", "remote-timeout": "timeout" }; function failureText(t, reason, message, url, credential = "none") { const issue = reason === void 0 ? void 0 : REMOTE_ISSUE[reason]; if (issue !== void 0) return issueText(t, issue, url, message, credential); switch (reason) { case "busy": return t("config.syncReasonBusy"); case "no-repository": return t("config.syncReasonNoRepository"); case "git-missing": return t("config.syncReasonGitMissing"); case "remote-empty": return t("config.syncReasonRemoteEmpty"); case "push-rejected": return t("config.syncReasonRejected"); case "github-unauthorized": return t("config.syncGitHubExpiredGrant"); default: return message; } } function reasonOf(error) { const reason = error instanceof Error ? error.reason : void 0; return typeof reason === "string" ? reason : void 0; } function credentialText(t, status) { const transport = transportOf(status.config.repoUrl ?? ""); if (transport === "ssh") return t("config.syncViaSsh"); if (transport === "local") return void 0; switch (status.config.credentialSource) { case "github": return status.config.credentialLogin === void 0 ? t("config.syncViaGitHubAnonymous") : t("config.syncViaGitHub", { login: status.config.credentialLogin }); case "environment": return t("config.syncViaEnvironment", { env: MNEMON_SYNC_TOKEN_ENV }); case "token": return t("config.syncViaToken"); default: return; } } function runtimeArchiveNotice(t, archived) { return archived === void 0 || archived <= 0 ? "" : ` ${t("config.runtimeMergeArchived", { count: archived })}`; } // vendor/dsh-mnemon/src/client/MnemonPackSection.tsx function usePackTarget(connection, sessionId, workspaceId, refreshKey, sharedClient) { const client = (0, react.useMemo)(() => sharedClient ?? (connection === void 0 ? null : new MnemonClient(connection, sessionId, workspaceId)), [ connection, sessionId, sharedClient, workspaceId ]); const [state, setState] = (0, react.useState)({ target: null, failed: null }); (0, react.useEffect)(() => { if (client === null) return; let active = true; client.packTarget().then((target) => { if (active) setState({ target, failed: null }); }, (reason) => { if (active) setState({ target: null, failed: message(reason) }); }); return () => { active = false; }; }, [client, refreshKey]); return state; } const ZIP_ACCEPT = ".zip,application/zip"; const BASE64_ENCODE_CHUNK_BYTES = 24576; const BASE64_DECODE_CHUNK_CHARS = 32768; function base64FromBytes(bytes) { if (bytes.byteLength === 0) return ""; const parts = []; for (let offset = 0; offset < bytes.byteLength; offset += BASE64_ENCODE_CHUNK_BYTES) { const chunk = bytes.subarray(offset, Math.min(offset + BASE64_ENCODE_CHUNK_BYTES, bytes.byteLength)); parts.push(btoa(String.fromCharCode.apply(null, chunk))); } return parts.join(""); } function bytesFromBase64(base64) { const clean = base64.replace(/\s+/gu, ""); if (clean.length === 0) return /* @__PURE__ */ new ArrayBuffer(0); if (clean.length % 4 !== 0) throw new Error("Invalid base64 archive length"); const padding = clean.endsWith("==") ? 2 : clean.endsWith("=") ? 1 : 0; const totalBytes = clean.length * 3 / 4 - padding; const buffer = new ArrayBuffer(totalBytes); const bytes = new Uint8Array(buffer); let writeOffset = 0; for (let readOffset = 0; readOffset < clean.length; readOffset += BASE64_DECODE_CHUNK_CHARS) { const slice = clean.slice(readOffset, Math.min(readOffset + BASE64_DECODE_CHUNK_CHARS, clean.length)); const decoded = atob(slice); for (let index = 0; index < decoded.length; index += 1) bytes[writeOffset + index] = decoded.charCodeAt(index); writeOffset += decoded.length; } return buffer; } async function fileBase64(file) { if (typeof FileReader === "function") return await new Promise((resolve, reject) => { const reader = new FileReader(); reader.onerror = () => reject(reader.error ?? /* @__PURE__ */ new Error("Could not read ZIP file")); reader.onload = () => { const value = reader.result; if (typeof value !== "string") return reject(/* @__PURE__ */ new Error("Could not read ZIP file")); const separator = value.indexOf(","); if (separator < 0) return reject(/* @__PURE__ */ new Error("ZIP file encoding is invalid")); resolve(value.slice(separator + 1)); }; reader.readAsDataURL(file); }); return base64FromBytes(new Uint8Array(await file.arrayBuffer())); } function download(result) { const blob = new Blob([bytesFromBase64(result.base64)], { type: result.mimeType }); const url = URL.createObjectURL(blob); const anchor = document.createElement("a"); anchor.href = url; anchor.download = result.fileName; anchor.hidden = true; document.body.append(anchor); anchor.click(); anchor.remove(); window.setTimeout(() => URL.revokeObjectURL(url), 0); } function MnemonPackSection({ client: sharedClient, connection, sessionId, workspaceId, target, onImported, t }) { const client = (0, react.useMemo)(() => sharedClient ?? (connection === void 0 ? null : new MnemonClient(connection, sessionId, workspaceId)), [ connection, sessionId, sharedClient, workspaceId ]); const input = (0, react.useRef)(null); const [pending, setPending] = (0, react.useState)(null); const [busy, setBusy] = (0, react.useState)(null); const [failed, setFailed] = (0, react.useState)(null); const [notice, setNotice] = (0, react.useState)(null); const exportZip = async () => { if (client === null || busy !== null) return; setBusy("export"); setFailed(null); setNotice(null); try { const result = await client.exportPack(); download(result); setNotice(t("config.packExported", { file: result.fileName, size: humanBytes(result.bytes) })); } catch (reason) { setFailed(message(reason)); } finally { setBusy(null); } }; const inspectZip = async (file) => { if (client === null || busy !== null) return; setBusy("inspect"); setFailed(null); setNotice(null); setPending(null); try { const base64 = await fileBase64(file); const preview = await client.inspectPack(base64, file.name); setPending({ base64, preview }); } catch (reason) { setFailed(message(reason)); } finally { setBusy(null); } }; const chooseFile = (event) => { const file = event.currentTarget.files?.[0]; event.currentTarget.value = ""; if (file !== void 0) inspectZip(file); }; const importZip = async () => { if (client === null || pending === null || busy !== null) return; setBusy("import"); setFailed(null); setNotice(null); try { const result = await client.importPack(pending.base64); setNotice(t("config.packImportedWhole", { root: result.targetRoot }) + runtimeArchiveNotice(t, result.runtime?.archived)); setPending(null); } catch (reason) { setFailed(message(reason)); } finally { setBusy(null); onImported?.(); } }; const items = pending?.preview.manifest.summary.reduce((sum, component) => sum + component.items, 0) ?? 0; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.packRow, role: "group", "aria-labelledby": "mnemon-pack-heading", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SettingRow, { title: t("config.packTitle"), titleId: "mnemon-pack-heading", hint: t("config.packSimpleDescription"), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rowActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: client === null || busy !== null, onClick: () => input.current?.click(), children: busy === "inspect" ? t("config.packInspecting") : t("config.packImportZip") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: client === null || busy !== null || target === null, onClick: () => void exportZip(), children: busy === "export" ? t("config.packExporting") : t("config.packExportZip") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { ref: input, className: MnemonSettingsCard_module_css_default.visuallyHidden, type: "file", accept: ZIP_ACCEPT, "aria-label": t("config.packChooseZip"), onChange: chooseFile })] }), pending !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.importBar, role: "status", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: pending.preview.fileName ?? t("config.packUnnamedZip") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("config.packZipReady", { components: pending.preview.manifest.components.length, items, size: humanBytes(pending.preview.archiveBytes) }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: busy !== null, onClick: () => setPending(null), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: busy !== null, onClick: () => void importZip(), children: busy === "import" ? t("config.packImporting") : t("config.packImportZipAction") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.packFeedback, "aria-live": "polite", children: [ failed !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.error, role: "alert", children: t("config.packFailed", { error: failed }) }), notice !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.packSuccess, children: notice }), client === null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.readOnly, children: t("config.packUnavailable") }) ] }) ] }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-runtime/src/defaults.ts const DEFAULT_RUNTIME_MEMORY_LIMIT_BYTES = 10240; const DEFAULT_RUNTIME_USER_LIMIT_BYTES = 4096; const MAX_RUNTIME_MEMORY_LIMIT_BYTES = 1048576; // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-runtime/src/contracts.ts const RUNTIME_MEMORY_LIMITS = { memory: DEFAULT_RUNTIME_MEMORY_LIMIT_BYTES, user: DEFAULT_RUNTIME_USER_LIMIT_BYTES }; const RUNTIME_MEMORY_LIMIT_MAX_BYTES = MAX_RUNTIME_MEMORY_LIMIT_BYTES; // vendor/dsh-mnemon/src/client/source-pages.tsx const MNEMON_SOURCE_PAGE_SLOT = "mnemon.source.page"; const MNEMON_SOURCE_CONFIGURATION_READ = "configuration"; const MNEMON_SOURCE_CONFIGURATION_MUTATE = "configuration"; const SOURCE_TYPE_ID = /^[a-z][a-z0-9-]{0,127}$/u; const PAGE_ID = /^[a-z][a-z0-9-]{0,127}$/u; function memorySourcePageEntryId(sourceTypeId, pageId) { if (!SOURCE_TYPE_ID.test(sourceTypeId)) throw new Error("memory Source UI sourceTypeId must match [a-z][a-z0-9-]{0,127}"); if (!PAGE_ID.test(pageId)) throw new Error("memory Source UI page id must match [a-z][a-z0-9-]{0,127}"); return `${sourceTypeId}/${pageId}`; } function installMemorySourceUI(ctx, contribution) { if (contribution.pages.length === 0) throw new Error("memory Source UI requires at least one page"); const seen = /* @__PURE__ */ new Set(); const pages = contribution.pages.map((page, index) => { const entryId = memorySourcePageEntryId(contribution.sourceTypeId, page.id); if (seen.has(entryId)) throw new Error(`memory Source UI page is duplicated: ${entryId}`); seen.add(entryId); return { page, entryId, order: page.order ?? 1e3 + index }; }); return ctx.slots.inject(MNEMON_SOURCE_PAGE_SLOT, () => { const disposers = []; try { for (const { page, entryId, order } of pages) disposers.push(ctx.slots.register({ name: MNEMON_SOURCE_PAGE_SLOT, id: entryId, order, label: page.label }, Object.assign((props) => (0, react.createElement)(page.component, props), { mnemonNavigation: page.navigation }))); } catch (error) { for (const dispose of disposers.reverse()) dispose(); throw error; } return () => { for (const dispose of disposers.reverse()) dispose(); }; }); } function createMemorySourcePageDirectory(ctx) { let version = -1; let localeSnapshot; let snapshot = Object.freeze([]); const read = () => { const currentVersion = ctx.slots.getVersion(MNEMON_SOURCE_PAGE_SLOT); const currentLocale = ctx.locale.getSnapshot(); if (currentVersion === version && currentLocale === localeSnapshot) return snapshot; version = currentVersion; localeSnapshot = currentLocale; snapshot = Object.freeze(ctx.slots.entriesOfSlot(MNEMON_SOURCE_PAGE_SLOT).flatMap((entry) => { const id = entry.options.id; if (id === void 0) return []; const separator = id.indexOf("/"); if (separator <= 0 || separator === id.length - 1) return []; let label; try { label = typeof entry.options.label === "function" ? entry.options.label() : entry.options.label; } catch {} const metadata = entry.component?.mnemonNavigation; let navigation; if (metadata !== void 0) { let detail; try { detail = typeof metadata.detail === "function" ? metadata.detail() : metadata.detail; } catch {} navigation = { ...metadata, ...detail === void 0 ? { detail: void 0 } : { detail } }; } return [{ id, sourceTypeId: id.slice(0, separator), pageId: id.slice(separator + 1), label: label?.trim() || id.slice(separator + 1), order: entry.options.order ?? 0, ...navigation === void 0 ? {} : { navigation } }]; }).sort((left, right) => left.order - right.order || left.id.localeCompare(right.id))); return snapshot; }; return { getSnapshot: read, subscribe(listener) { const changed = () => { read(); listener(); }; const stopSlots = ctx.slots.subscribe(MNEMON_SOURCE_PAGE_SLOT, changed); const stopLocale = ctx.locale.subscribe(changed); return () => { stopLocale(); stopSlots(); }; } }; } // vendor/dsh-mnemon/src/client/GlobalLocationSetting.tsx function GlobalLocationSetting(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: `${MnemonSettingsCard_module_css_default.globalLocationSetting}${props.className === void 0 ? "" : ` ${props.className}`}`, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.nativeLocation, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.settingCopy, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: props.label }), props.hint !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: props.hint })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.inlineChoices, role: "radiogroup", "aria-label": props.ariaLabel, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "radio", name: props.name, checked: props.workspace || !props.custom, disabled: props.disabled || props.workspace, onClick: props.onInteract, onChange: () => props.onChange(false) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.defaultLabel })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "radio", name: props.name, checked: !props.workspace && props.custom, disabled: props.disabled || props.workspace, onClick: props.onInteract, onChange: () => props.onChange(true) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.customLabel })] })] })] }), !props.workspace && props.custom ? props.children : null] }); } const css$9 = ".Zl-6yW_search{min-width:0}.Zl-6yW_field{gap:6px;min-width:0;display:inline-grid}.Zl-6yW_fieldLabel{color:var(--dsw-alias-label-secondary);font-size:12px;font-weight:500;line-height:18px}.Zl-6yW_hiddenLabel{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.Zl-6yW_selector{appearance:none;border-radius:var(--dsw-radius-md);min-width:0;max-width:100%;height:36px;color:var(--dsw-alias-label-primary);background:var(--dsw-alias-bg-module-platform);font:inherit;white-space:nowrap;cursor:pointer;border:0;justify-content:space-between;align-items:center;gap:12px;padding:0 14px;font-size:14px;line-height:22px;transition:background-color .12s,color .12s;display:inline-flex}.Zl-6yW_selector>span{text-overflow:ellipsis;min-width:0;overflow:hidden}.Zl-6yW_selector>svg{color:var(--dsw-alias-label-tertiary);flex:none}.Zl-6yW_selector:hover:not(:disabled),.Zl-6yW_selector[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover)}.Zl-6yW_selector:active:not(:disabled){background:var(--dsw-alias-interactive-bg-active)}.Zl-6yW_selector:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.Zl-6yW_selector:disabled{cursor:default;opacity:.4}.Zl-6yW_menuRoot{min-width:0;display:block}.Zl-6yW_field:not([data-inline]) .Zl-6yW_selector{width:100%}.Zl-6yW_field[data-inline]{align-items:center;gap:8px;display:inline-flex}.Zl-6yW_field[data-inline] .Zl-6yW_menuRoot{display:inline-block}.Zl-6yW_field[data-inline]>.Zl-6yW_fieldLabel{color:var(--dsw-alias-label-tertiary);white-space:nowrap;font-weight:400}.Zl-6yW_field[data-size=sm] .Zl-6yW_selector{border-radius:var(--dsw-radius-sm);gap:8px;height:28px;padding:0 10px;font-size:12px;line-height:18px}.Zl-6yW_menu{min-width:200px;max-height:var(--dsh-select-menu-max,calc(100vh - 220px))!important}.Zl-6yW_option{white-space:normal;gap:1px;min-width:0;display:grid}.Zl-6yW_option>small{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}.Zl-6yW_field .Zl-6yW_selector[data-trigger-detail]{white-space:normal;height:auto;min-height:28px;padding:3px 10px}.Zl-6yW_field .Zl-6yW_selector[data-trigger-detail]>span{text-align:left;white-space:normal;gap:1px;min-width:0;display:grid}.Zl-6yW_field .Zl-6yW_selector[data-trigger-detail]>span>span{text-overflow:ellipsis;overflow:hidden}.Zl-6yW_field .Zl-6yW_selector[data-trigger-detail]>span>small{color:var(--dsw-alias-label-tertiary);overflow-wrap:anywhere;font-size:12px;line-height:18px}.Zl-6yW_receipt{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-bg-module-platform);flex-wrap:wrap;align-items:flex-start;gap:8px 10px;min-width:0;margin-top:12px;padding:10px 12px;display:flex}.Zl-6yW_receipt>p{min-width:0;color:var(--dsw-alias-label-secondary);overflow-wrap:anywhere;flex:240px;margin:0;font-size:13px;line-height:20px}.Zl-6yW_receipt>:first-child{flex:none;margin-top:1px}.Zl-6yW_receiptAction{flex:none;margin-left:auto}.Zl-6yW_receipt>.Zl-6yW_receiptNote{color:var(--dsw-alias-label-tertiary);flex-basis:100%;font-size:12px;line-height:18px}.Zl-6yW_receipt>.Zl-6yW_receiptNote[data-tone=caution]{color:var(--dsw-alias-state-warn-label,var(--dsw-alias-label-secondary))}@media (prefers-reduced-motion:reduce){.Zl-6yW_selector{transition:none}}"; const tagId$5 = "dsh-brain-mnemon/src/client/PageControls.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$5) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$5; document.head.appendChild(tag); } if (tag.textContent !== css$9) tag.textContent = css$9; } var PageControls_module_css_default = { "field": "Zl-6yW_field", "fieldLabel": "Zl-6yW_fieldLabel", "hiddenLabel": "Zl-6yW_hiddenLabel", "menu": "Zl-6yW_menu", "menuRoot": "Zl-6yW_menuRoot", "option": "Zl-6yW_option", "receipt": "Zl-6yW_receipt", "receiptAction": "Zl-6yW_receiptAction", "receiptNote": "Zl-6yW_receiptNote", "search": "Zl-6yW_search", "selector": "Zl-6yW_selector" }; // vendor/dsh-mnemon/src/client/page-controls.tsx function SearchField({ label, className, ...input }) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, { ...input, "aria-label": label, icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSearchOutlineRegular, { size: 16 }), className: [PageControls_module_css_default.search, className].filter(Boolean).join(" ") }); } function SelectField(props) { const [open, setOpen] = (0, react.useState)(false); const [side, setSide] = (0, react.useState)("bottom"); const labelId = (0, react.useId)(); const nameId = (0, react.useId)(); const valueId = (0, react.useId)(); const current = props.options.find((option) => option.value === props.value); const detail = props.triggerDetail === true && current?.detail !== void 0; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: [PageControls_module_css_default.field, props.className].filter(Boolean).join(" "), "data-inline": props.inline === true ? "" : void 0, "data-size": props.size === "sm" ? "sm" : void 0, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { id: labelId, "data-part": "label", className: props.hideLabel === true ? PageControls_module_css_default.hiddenLabel : PageControls_module_css_default.fieldLabel, "aria-hidden": props.ariaLabel === void 0 ? void 0 : true, children: props.label }), props.ariaLabel !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { id: nameId, className: PageControls_module_css_default.hiddenLabel, children: props.ariaLabel }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, { open, onClose: () => setOpen(false), align: "start", side, portal: true, selectedId: props.value, className: PageControls_module_css_default.menuRoot, listClassName: PageControls_module_css_default.menu, items: props.options.map((option) => ({ id: option.value, label: option.detail === void 0 ? option.label : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: PageControls_module_css_default.option, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: option.label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: option.detail })] }), ...option.disabled === true ? { disabled: true } : {} })), onSelect: (id) => { setOpen(false); if (id !== props.value) props.onChange(id); }, anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: PageControls_module_css_default.selector, "data-trigger-detail": detail ? "" : void 0, "aria-haspopup": "menu", "aria-expanded": open, "aria-labelledby": `${props.ariaLabel === void 0 ? labelId : nameId} ${valueId}`, disabled: props.disabled === true, onClick: (event) => { if (open) { setOpen(false); return; } const rect = event.currentTarget.getBoundingClientRect(); const below = Math.floor(window.innerHeight - rect.bottom - 4 - 12); const above = Math.floor(rect.top - 4 - 12); const flip = below < 220 && above > below; const nextValue = `${Math.max(160, flip ? above : below)}px`; const root = document.documentElement; if (root.style.getPropertyValue("--dsh-select-menu-max").trim() !== nextValue) root.style.setProperty("--dsh-select-menu-max", nextValue); setSide(flip ? "top" : "bottom"); setOpen(true); }, children: [detail ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { id: valueId, className: PageControls_module_css_default.option, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: current.label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: current.detail })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { id: valueId, children: current?.label ?? props.value }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 12 })] }) }) ] }); } const OUTCOMES = { stored: "written", added: "written", created: "written", merged: "written", linked: "written", updated: "updated", replaced: "updated", accepted: "pending", candidate: "pending", skipped: "skipped", partial: "partial" }; function writeOutcome(action) { return OUTCOMES[action] ?? "unfinished"; } const TONES = { written: "success", updated: "success", pending: "info", skipped: "neutral", partial: "warning", unfinished: "warning" }; const LABELS = { written: "receipt.written", updated: "receipt.updated", pending: "receipt.pending", skipped: "receipt.skipped", partial: "receipt.partial", unfinished: "receipt.unfinished" }; function WriteReceipt(props) { const shared = useT$4(); const t = props.t ?? shared; if (props.error !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: PageControls_module_css_default.receipt, role: "alert", "data-outcome": "failed", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "danger", children: t("receipt.failed") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: props.error })] }); const outcome = writeOutcome(props.action ?? ""); const viewable = outcome !== "skipped" && outcome !== "unfinished"; const vectorless = props.unembedded === true && (outcome === "written" || outcome === "updated" || outcome === "partial"); const expected = props.embeddingManaged === false; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: PageControls_module_css_default.receipt, role: "status", "data-outcome": outcome, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: TONES[outcome], children: t(LABELS[outcome]) }), props.summary !== void 0 && props.summary !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: props.summary }), props.onView !== void 0 && viewable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", className: PageControls_module_css_default.receiptAction, onClick: props.onView, children: props.viewLabel ?? t("receipt.view") }), vectorless && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: PageControls_module_css_default.receiptNote, "data-tone": expected ? "neutral" : "caution", children: t(expected ? "receipt.unembeddedNoService" : "receipt.unembedded") }) ] }); } function TaskAgentTag(props) { const shared = useT$4(); const t = props.t ?? shared; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: props.available ? "success" : "warning", children: t(props.available ? "taskAgent.ready" : "taskAgent.unavailable") }); } // vendor/dsh-mnemon/src/client/page-client.tsx function MemorySourcePageFrame(props) { const enclosing = (0, react.useContext)(I18nContext); const dictionary = translateFor(useLocalePreference$4(props.locale)); const translate = (0, react.useMemo)(() => isBuiltInTranslate(enclosing) ? dictionary : (key, params) => { const text = enclosing(key, params); return text === key ? dictionary(key, params) : text; }, [enclosing, dictionary]); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(I18nContext.Provider, { value: translate, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LocaleContext.Provider, { value: props.locale, children: props.children }) }); } function createMemorySourcePageClient(management) { let revision = management.revision; let sequence = 0; let accepted = 0; async function request(mode, operation, input, confirmed = true, options) { const ticket = ++sequence; if (mode === "assist" && !management.assistance?.operations.includes(operation)) throw new Error("Host assistance is unavailable for this Source instance: " + operation); const result = mode === "assist" ? await management.assistance.execute(operation, input, { expectedRevision: revision, confirmed }) : mode === "read" ? await (options === void 0 ? management.read(operation, input) : management.read(operation, input, options)) : await management.mutate(operation, input, { confirmed: true, expectedRevision: revision }); if (ticket >= accepted) { accepted = ticket; revision = result.revision; } return result.value; } return { canAssist: (operation) => management.assistance?.operations.includes(operation) === true, assist: (operation, input, confirmed) => request("assist", operation, input, confirmed), read: (operation, input = null, options) => request("read", operation, input, true, options), mutate: (operation, input, confirmed) => { if (confirmed !== true) return Promise.reject(/* @__PURE__ */ new Error("Source page mutation requires explicit confirmation")); return request("mutate", operation, input); } }; } // vendor/dsh-mnemon/src/client/MnemonLogo.tsx function MnemonLogo({ className, title = "Mnemon" }) { return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", { className, xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 400 400", role: "img", "aria-label": title, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", { width: "400", height: "400", fill: "#1A1A1A" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M 91.5,153.5 L 98.5,146.5 L 98.5,98.5 L 146.5,98.5 L 153.5,91.5 L 91.5,91.5 Z", fill: "#D4D4D8" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M 246.5,91.5 L 253.5,98.5 L 301.5,98.5 L 301.5,146.5 L 308.5,153.5 L 308.5,91.5 Z", fill: "#D4D4D8" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M 91.5,246.5 L 98.5,253.5 L 98.5,301.5 L 146.5,301.5 L 153.5,308.5 L 91.5,308.5 Z", fill: "#D4D4D8" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M 308.5,246.5 L 301.5,253.5 L 301.5,301.5 L 253.5,301.5 L 246.5,308.5 L 308.5,308.5 Z", fill: "#D4D4D8" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("polyline", { points: "265,187 278,200 265,213", fill: "none", stroke: "#D4D4D8", strokeWidth: "2", strokeLinecap: "square" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("polyline", { points: "135,187 122,200 135,213", fill: "none", stroke: "#D4D4D8", strokeWidth: "2", strokeLinecap: "square" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("polygon", { points: "200,155 245,200 200,245 155,200", fill: "none", stroke: "#D4D4D8", strokeWidth: "7" }) ] }); } // vendor/dsh-mnemon/src/client/use-request-version.ts function useRequestVersion() { const current = (0, react.useRef)(0); (0, react.useEffect)(() => () => { current.current += 1; }, []); return (0, react.useMemo)(() => ({ begin: () => { current.current += 1; return current.current; }, isCurrent: (version) => current.current === version }), []); } // vendor/dsh-mnemon/src/client/extension-sdk.ts var extension_sdk_exports = /* @__PURE__ */ __exportAll({ AdvancedSection: () => AdvancedSection, Callout: () => Callout, EmptyState: () => EmptyState, GlobalLocationSetting: () => GlobalLocationSetting, I18nContext: () => I18nContext, IconChevronLeftOutline14: () => IconChevronLeftOutline14, LocaleContext: () => LocaleContext, LocaleFallbackContext: () => LocaleFallbackContext, MNEMON_COMPONENT_FALLBACK_PRIORITY: () => 100, MNEMON_COMPONENT_SETTINGS_SLOT: () => MNEMON_COMPONENT_SETTINGS_SLOT, MNEMON_COMPONENT_STATUS_SLOT: () => MNEMON_COMPONENT_STATUS_SLOT, MNEMON_LOCALE_IDS: () => MNEMON_LOCALE_IDS, MNEMON_SOURCE_CONFIGURATION_MUTATE: () => MNEMON_SOURCE_CONFIGURATION_MUTATE, MNEMON_SOURCE_CONFIGURATION_READ: () => MNEMON_SOURCE_CONFIGURATION_READ, MNEMON_SOURCE_PAGE_SLOT: () => MNEMON_SOURCE_PAGE_SLOT, MemorySourcePageFrame: () => MemorySourcePageFrame, MnemonDialog: () => MnemonDialog, MnemonLogo: () => MnemonLogo, PageHeader: () => PageHeader, PageSpinner: () => PageSpinner, PanelActions: () => PanelActions, ProgressiveFooter: () => ProgressiveFooter, Reveal: () => Reveal, SearchField: () => SearchField, SectionSpinner: () => SectionSpinner, SelectField: () => SelectField, SelectRow: () => SelectRow, SettingRow: () => SettingRow, SettingSelect: () => SettingSelect, SidebarModal: () => SidebarModal, TaskAgentTag: () => TaskAgentTag, ToggleRow: () => ToggleRow, WriteFailure: () => WriteFailure, WriteReceipt: () => WriteReceipt, appearanceClass: () => appearanceClass, createMemorySourcePageClient: () => createMemorySourcePageClient, humanBytes: () => humanBytes, installMemoryComponentUI: () => installMemoryComponentUI, installMemorySourceUI: () => installMemorySourceUI, memoryPageStyles: () => memoryPageStyles, memorySettingsStyles: () => memorySettingsStyles, memorySidebarStyles: () => memorySidebarStyles, memorySourcePageEntryId: () => memorySourcePageEntryId, message: () => message, parseBranchesInput: () => parseBranchesInput, pickLocalizedText: () => pickLocalizedText, resolveMnemonLocale: () => resolveMnemonLocale, short: () => short, supportsMemoryComponentSettingsSection: () => supportsMemoryComponentSettingsSection, translateEn: () => translateEn, translateFor: () => translateFor, translateZh: () => translateZh, useLive: () => useLive, useLocale: () => useLocale, useLocalePreference: () => useLocalePreference$4, useRequestVersion: () => useRequestVersion, useStaged: () => useStaged, useT: () => useT$4, writeOutcome: () => writeOutcome }); // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/presentation/locales.json var locales_default$3 = { zh: { "term.space": "记忆空间", "term.spaces": "记忆空间", "category.decision": "决策", "category.preference": "偏好", "category.fact": "事实", "category.insight": "洞察", "category.context": "上下文", "category.general": "通用", "nav.memory.aria": "记忆空间页面", "nav.overview": "概览", "nav.search": "检索", "nav.entities": "实体", "nav.rememberAction": "存入记忆", "nav.content": "内容", "overview.description": "由 Mnemon Native 或第三方 Provider 承载的长期记忆;已激活的空间参与召回。", "overview.pageDescription": "管理记忆空间,查看各 Provider 的连接状态与关联快照。", "overview.fullSyncPending": "等待首次全量同步", "overview.fullSyncJustNow": "上次全量同步:刚刚", "overview.fullSyncSeconds": "上次全量同步:{count} 秒前", "overview.fullSyncMinutes": "上次全量同步:{count} 分钟前", "overview.fullSyncHours": "上次全量同步:{count} 小时前", "overview.fullSyncDays": "上次全量同步:{count} 天前", "overview.directory": "记忆空间目录", "overview.directory.description": "点击卡片检查连接,开关决定它是否参与召回。", "overview.directory.unsynced": "目录尚未同步", "overview.directory.unsyncedBadge": "目录待同步", "overview.directoryLoading": "正在加载记忆空间目录", "overview.healthLoading": "正在检测各记忆空间状态", "overview.storageHealthy": "存储正常", "overview.storageUnhealthy": "存储异常", "overview.storageChecking": "检测中", "overview.reconnecting": "重连中", "overview.reconnectHint": "点击卡片重新检测并同步这个记忆空间", "overview.reconnectAria": "重新连接{name}", "overview.snapshotLoading": "正在加载多记忆空间实时快照", "overview.metadataAction": "整理", "overview.metadataTitle": "AI 维护记忆空间元信息", "overview.metadataDescription": "通过各 Provider 最快的原生查询路径读取少量样本,由任务 Agent 生成标题与说明。", "overview.metadataUnavailable": "暂时无法运行:未找到与当前记忆范围匹配的活跃 Agent", "overview.metadataLoading": "正在载入可维护的记忆空间…", "overview.metadataEmpty": "当前没有可由 AI 维护元信息的已激活记忆空间。", "overview.metadataSelected": "已选择 {count} 个记忆空间", "overview.metadataSelectAll": "全选", "overview.metadataClear": "清空", "overview.metadataSafety": "仅更新本地标题与说明,不修改或删除记忆内容。", "overview.metadataGenerate": "AI 生成({count})", "overview.metadataRunningCount": "{count} 个生成中", "overview.metadataTaskRunning": "生成中…", "overview.metadataTaskSuccess": "已更新", "overview.metadataTaskError": "失败:{error}", "overview.metadataTaskUnknown": "未知错误", "overview.mnemonDefault": "Mnemon 默认", "overview.toggleAria": "{name}读取开关", "overview.toggling": "切换中", "overview.noDescription": "尚未提供路由说明。", "overview.unsyncedTitle": "记忆空间目录尚未同步", "overview.unsyncedShort": "当前 Web 客户端与 DSH Host 状态不一致;重启 Host 后会重新登记既有 Store。", "overview.unsyncedLong": "当前 Host 仍在使用旧插件契约;重启 DSH 后会重新发现既有 Store,期间不会删除任何 .db。", "overview.emptyTitle": "还没有记忆空间", "overview.emptyShort": "创建第一个记忆空间并写入稳定上下文后,它会出现在这里。", "overview.emptyLong": "创建一个 Mnemon 记忆空间,或在“插件 → 可组合记忆”页面启用第三方 Provider 以同步其已有记忆空间。", "overview.noActiveTitle": "没有激活的记忆空间", "overview.noActiveText": "开启至少一个记忆空间的读取开关,即可在这里聚合它的实时图谱。", "overview.noContentTitle": "已激活记忆空间尚无内容", "overview.noContentText": "存入记忆后,这里会显示节点与关系。", "overview.newAction": "新建", "overview.createTitle": "创建记忆空间", "overview.createDialogHint": "设置用途并选择底层 Provider;服务凭据与数据目录沿用全局配置。", "overview.createIdentityTitle": "记忆空间信息", "overview.createIdentityHint": "名称用于识别;描述会帮助 Agent 判断什么内容应写入和召回。", "overview.createPlacementTitle": "记忆空间 Provider", "overview.createPlacementHint": "明确的手动创建,直接绑定所选已启用 Provider。", "overview.createName": "新记忆空间名称", "overview.createNamePlaceholder": "名称", "overview.createDescription": "新记忆空间描述", "overview.createDescriptionPlaceholder": "说明哪些内容属于它,以及何时应被召回", "overview.placementMode": "底层选择方式", "overview.placementManual": "手动指定", "overview.placementAutomatic": "智能选择", "overview.recommended": "推荐", "overview.placementPolicy": "选择策略", "overview.placementPolicyHint": "规则由系统强制执行,Prompt 只影响合格候选之间的判断。", "overview.placementPrompt": "策略 Prompt(可选)", "overview.placementPromptPlaceholder": "例如:这是团队协作知识;在满足精确写入要求时优先本地,否则优先共享。", "overview.dataBoundary": "数据边界", "overview.dataBoundaryRemote": "允许远程服务", "overview.dataBoundaryLocal": "仅限本地", "overview.preference": "软偏好", "overview.preferenceBalanced": "综合平衡", "overview.preferenceLocal": "本地优先", "overview.preferenceShared": "共享优先", "overview.requiredCapabilities": "必须具备(可多选)", "overview.capability.graph": "关系图谱", "overview.capability.exact-write": "精确写入", "overview.capability.forget": "安全遗忘", "overview.candidateNativeReady": "官方原生 · 跟随当前记忆范围", "overview.providerServiceRequired": "未启用", "overview.nativeCliRequired": "需要在本机安装 Mnemon CLI;其他 Provider 不受影响", "overview.workspaceBinding.automatic": "跟随当前记忆范围", "overview.workspaceBinding.optional-override": "跟随当前范围;全局可自定义位置", "overview.workspaceBinding.provider-global": "始终使用全局范围", "overview.candidateLocal": "本地 Provider · 跟随当前记忆范围", "overview.candidateRemote": "远程 Provider · 使用全局服务配置", "overview.placementByLlm": "Agent 智能选择", "overview.placementByRules": "规则自动确定", "overview.placementConfidence": "置信度:{confidence}", "overview.confidence.high": "高", "overview.confidence.medium": "中", "overview.confidence.low": "低", "overview.providerLabel": "记忆引擎", "overview.nativeOfficial": "官方原生", "strategy.action": "空间策略", "strategy.title": "空间策略", "strategy.description": "任务 Agent 新建记忆空间时的 Provider 选择规则。", "strategy.loading": "正在读取 Provider 目录…", "strategy.modeTitle": "Provider 选择方式", "strategy.modeHint": "仅作用于 Agent 自动新建的空间;手动创建时始终由你指定。", "strategy.manualHint": "固定使用一个 Provider,Agent 无法改选", "strategy.automaticHint": "先执行硬规则,再由任务 Agent 选择合格 Provider", "strategy.manualTitle": "固定 Provider", "strategy.manualDescription": "当现有记忆空间都不适合时,新记忆空间固定创建在这个 Provider 中。", "strategy.automaticTitle": "智能选择规则", "strategy.automaticDescription": "数据边界与能力由系统强制校验,Prompt 仅引导合格候选间的取舍。", "strategy.save": "保存", "strategy.saving": "保存中…", "overview.providerSummary.mnemon-native": "官方原生、本地优先,保留完整图谱与软删除能力", "overview.providerSummary.openviking": "文件系统形态的共享记忆,支持经验证的精确写入与语义召回", "overview.providerSummary.honcho": "跨会话用户建模、Peer 档案、辩证推理与持久结论", "overview.providerSummary.mem0": "自动事实提取、语义召回、重排与去重", "overview.providerSummary.hindsight": "知识图谱记忆,具备实体解析、多策略召回与反思", "overview.providerSummary.holographic": "本地结构化事实记忆,支持可信度、实体解析与组合召回", "overview.providerSummary.retaindb": "云端混合向量/BM25 召回、用户画像与类型化事实", "overview.providerSummary.byterover": "通过 brv CLI 使用的本地优先分层知识树", "overview.providerSummary.supermemory": "语义记忆、持久画像、会话摄取与多容器召回", "overview.providerEndpoint": "服务地址", "overview.providerTargetUri": "记忆范围 URI", "overview.providerApiKey": "API Key", "overview.providerApiKeyOptional": "未启用鉴权时可留空", "overview.providerApiKeyKeep": "已保存;留空表示保持不变", "overview.providerAccount": "Account", "overview.providerDiscoveryUser": "User Key 所属用户(跳过 Admin)", "overview.providerUser": "User", "overview.providerActorPeer": "Actor Peer", "overview.providerField.workspace": "工作区", "overview.providerField.userId": "用户 ID", "overview.providerField.agentId": "Agent ID", "overview.providerField.mode": "接入模式", "overview.providerField.rerank": "重排检索结果", "overview.providerField.bankId": "记忆库", "overview.providerField.budget": "召回预算", "overview.providerField.dataPath": "事实存储路径", "overview.providerField.defaultDirectory": "默认知识目录", "overview.providerField.defaultTrust": "默认可信度", "overview.providerField.minTrust": "最低召回可信度", "overview.providerField.project": "项目标识", "overview.providerField.cliPath": "brv 可执行文件", "overview.providerField.workingDirectory": "知识目录", "overview.providerField.containerTag": "容器标签", "overview.providerField.searchMode": "检索模式", "overview.providerOption.platform": "Mem0 Platform", "overview.providerOption.self-hosted": "自托管服务", "overview.providerOption.low": "低", "overview.providerOption.mid": "中", "overview.providerOption.high": "高", "overview.providerOption.hybrid": "混合检索", "overview.providerOption.memories": "仅记忆", "overview.providerOption.documents": "仅文档", "overview.providerKindLocal": "本地引擎", "overview.providerKindRemote": "远程服务", "overview.providerSecretClear": "清除已保存的凭据", "overview.providerWriteExact": "精确写入", "overview.providerWriteAsync": "异步语义提炼", "overview.providerGraphReady": "支持关系图谱", "overview.providerSearchReady": "支持统一检索", "overview.providerRemote": "三方远程记忆", "overview.providerLocal": "三方本地记忆", "overview.creating": "创建中…", "overview.createAction": "创建", "overview.editName": "名称", "overview.editDescription": "路由说明", "overview.deleteTitle": "删除“{name}”?", "overview.deleteWarning": "该操作会永久删除这个记忆空间及其中的全部记忆与关系,无法撤销。", "overview.lastStoreDeleteHint": "Mnemon 需要保留至少一个原生 Store;可将最后一个记忆空间设为未激活,但不能删除。", "overview.deleteAction": "确认删除", "overview.disconnectTitle": "断开“{name}”?", "overview.disconnectWarning": "这里只会从 DSH 记忆空间目录移除 {provider} 连接;底层引擎中的记忆不会被删除。", "overview.disconnectAction": "确认断开", "overview.snapshot": "多记忆空间实时快照", "overview.snapshotSources": "快照可观察范围", "overview.snapshotSourcesHint": "真实关系图、内容投影与仅查询空间分别呈现,不伪造缺失关系。", "overview.noVisualTitle": "当前记忆空间只支持按需查询", "overview.noVisualText": "这些 Provider 不提供可枚举内容或图谱;请前往“检索”输入明确问题。", "overview.waitingSnapshot": "等待首个快照", "overview.updatedAt": "更新于 {time}", "overview.edgeScope": "空间归属", "overview.edgeTemporal": "时间", "overview.edgeSemantic": "语义", "overview.edgeCausal": "因果", "overview.edgeEntity": "实体关联", "overview.graphComposition": "{spaces} 个空间 · {memories} 条记忆 · {entities} 个实体", "overview.graphCount": "展示 {visible} / {total} 个元素", "overview.graphEdges": "{count} 条图谱连接", "overview.inspector": "记忆详情", "overview.inspectorSpace": "记忆空间详情", "overview.inspectorEntity": "实体详情", "overview.selectNode": "选择一个图谱元素", "overview.selectNodeText": "查看记忆空间、实体或记忆的精确上下文。", "overview.closeInspector": "关闭节点详情", "overview.memoryId": "记忆 ID", "overview.spaceId": "记忆空间 ID", "overview.containedMemories": "包含记忆", "overview.entityMentions": "索引次数", "overview.exploreNode": "检索相关", "overview.previewAria": "查看全文", "overview.previewTitle": "内容全文", "overview.loading": "正在同步多记忆空间实时快照…", "graph.layoutAria": "图谱布局", "graph.quietAction": "简洁显示", "graph.quietHint": "隐藏网格和常显标签;选中节点查看邻居,点击空白或按 Esc 恢复。仅保存在当前浏览器。", "graph.layoutNatural": "自然布局", "graph.layoutUniform": "均匀布局", "graph.layoutCustom": "自定义布局", "graph.layoutStatus": "布局状态:{layout}", "graph.draggable": "{layout} · 可拖拽", "graph.naturalAction": "自然铺开", "graph.uniformAction": "均匀重置", "graph.aria": "Mnemon 实时记忆图谱,{nodes} 个元素,{edges} 条连接", "graph.aria3d": "Mnemon 3D 记忆图谱,{nodes} 个元素,{edges} 条连接", "graph.viewModeAria": "图谱维度视图", "graph.view2d": "2D", "graph.view3d": "3D", "graph.selectNodeAction": "选择节点", "graph.noNodeSelected": "未选择节点", "graph.orbitAria": "3D 视角控制", "graph.orbitHint": "3D · 拖拽旋转 · 滚轮缩放", "graph.orbitShort": "3D 视角", "graph.zoomInAction": "放大", "graph.zoomOutAction": "缩小", "graph.resetViewAction": "重置视角", "graph.kindSpace": "记忆空间", "graph.kindEntity": "实体", "search.title": "检索记忆", "search.description": "检索返回原文,AI 问答返回带引用的回答。", "search.maxResults": "最多 {count} 条", "search.placeholder": "为什么选用 SQLite?这个项目有哪些发布约定?", "search.queryAria": "记忆查询", "search.categoryAria": "记忆分类", "search.strategy": "策略", "search.modeAria": "检索模式", "search.modeSmart": "智能召回", "search.modeKeyword": "关键词检索", "search.modeBasic": "基础匹配", "search.searching": "检索中…", "search.action": "检索", "search.agentAction": "AI 问答", "search.agentSearching": "Agent 分析中…", "search.agentAnswer": "Agent 查询结果", "search.agentAnswerHint": "基于下方召回证据", "search.startTitle": "从一个明确问题开始", "search.startText": "聚焦实体、决策或时间线,比批量加载整库更可靠。", "search.emptyTitle": "没有命中", "search.emptyText": "换一个更具体的实体、决策或时间线关键词试试。", "search.results": "原始召回内容", "search.related": "关联记忆", "search.closeRelated": "关闭关联记忆", "search.traversing": "正在遍历图谱…", "search.noRelated": "没有找到两跳内的关联节点。", "search.sourcesTitle": "本次检索范围", "entities.title": "实体查阅", "entities.description": "查看实体在事实、决策与上下文之间的关联。", "entities.sourcesTitle": "实体能力范围", "entities.unsupportedTitle": "没有支持实体索引的记忆空间", "entities.unsupportedText": "当前激活 Provider 仍可通过“检索”召回,但不会在这里伪装成实体图谱。", "entities.count": "{count} 个活跃实体", "entities.nameAria": "实体名称", "entities.placeholder": "输入任意实体…", "entities.action": "查阅", "entities.top": "高频实体", "entities.frequency": "按出现频率", "entities.filterHint": "输入时即时过滤左侧列表(按 Esc 清空)", "entities.emptyRail": "写入带实体的记忆后,这里会形成入口。", "entities.filterEmpty": "本地无匹配。点“查阅”向宿主发起查询。", "entities.loading": "正在读取实体的记忆…", "entities.selectTitle": "选择或输入一个实体", "entities.selectText": "选中后列出带有它的全部记忆;需要时,可再查找召回认为相关的其他记忆。", "entities.emptyTitle": "没有关联记忆", "entities.emptyText": "尝试更完整的名称或另一个实体别名。", "entities.railLoading": "正在读取实体…", "entities.memoriesHint": "带有此实体的记忆", "entities.relatedTitle": "相关记忆", "entities.relatedHint": "召回认为相关、但不带此实体的记忆", "entities.findRelated": "相关记忆", "entities.hideRelated": "收起", "entities.noCarrying": "没有记忆带有此实体。", "entities.noRelated": "没有其他相关记忆。", "entities.retry": "重试", "entities.sourceReady": "{count} 个实体", "entities.sourcePartial": "{count} 个实体 · 部分", "readSources.status.loading": "正在读取", "remember.title": "存入记忆", "remember.description": "由任务 Agent 判断是否保存,提炼去重后写入记忆空间。", "remember.readOnlyTitle": "当前为只读模式", "remember.readOnlyText": "当前部署禁止记忆写入;如需调整,请修改 DSH 的 Mnemon 配置并保存。", "remember.candidate": "内容", "remember.placeholder": "输入希望长期保留的背景、偏好、决策或结论。", "remember.taskAgentHint": "当前 Host 暂时无法创建独立任务 Agent,请刷新状态后重试。", "remember.processing": "任务 Agent 处理中…", "remember.action": "保存", "remember.advanced": "高级选项", "remember.advancedHint": "指定目标记忆空间、分类与重要性", "remember.expand": "展开", "remember.target": "目标记忆空间", "remember.asyncProviderHint": "该记忆空间会等待远程提炼任务完成后再返回真实写入回执。", "remember.entities": "实体(逗号分隔)", "remember.tags": "标签(逗号分隔)", "remember.advancedText": "这些约束同样经过任务 Agent 的去重与回执。", "remember.saving": "任务 Agent 处理中…", "remember.advancedAction": "按约束保存", "content.title": "记忆内容", "content.description": "浏览各记忆空间保存的内容。", "content.sourcesTitle": "Provider 内容模型", "content.count": "{count} 条记忆", "content.filterAria": "筛选记忆内容", "content.filterPlaceholder": "筛选内容或 ID…", "content.categoryAria": "记忆分类", "content.apply": "筛选", "content.notice": "查询型 Provider 需要输入关键词后才显示内容。", "content.queryRequiredTitle": "查询型记忆空间等待问题", "content.queryRequiredText": "输入一个明确查询即可读取 ByteRover 等不提供全量列表的 Provider。", "content.emptyTitle": "没有符合条件的记忆", "content.emptyText": "清空筛选,或先存入第一条记忆。", "nav.spaces": "记忆空间", "overview.editSpace": "编辑", "overview.editSpaceAria": "编辑{name}", "overview.saveSpace": "保存", "overview.savingSpace": "保存中…", "overview.deleteSpace": "删除", "overview.deleteSpaceAria": "删除{name}", "overview.disconnectSpace": "断开", "overview.disconnectSpaceAria": "断开{name}", "overview.deletingSpace": "删除中…", "common.score": "相关度 {value}", "overview.providerEnableHint": "未启用的 Provider 可在“插件 → 可组合记忆”的“记忆空间”页面中启用。", "search.citations": "引用", "overview.rediscoverAction": "重新发现", "overview.rediscovering": "正在发现…", "overview.rediscoverHint": "再次询问已启用的 Provider;新出现的空间会挂载,但不加入召回", "overview.rediscoveryAdded": "发现 {count} 个新空间,尚未加入召回,打开开关即可启用。", "overview.rediscoveryNone": "没有新的空间。", "overview.rediscoveryDisconnected": "{count} 个断开过的空间保持断开;重新保存对应 Provider 的设置可以恢复。", "overview.rediscoveryFailed": "{provider} 无法完成发现:{error}", "overview.rediscoveryTimedOut": "{provider} 没有按时响应,稍后可以再次发现。", "overview.rediscoveryDismiss": "知道了", "overview.newSpace": "新发现", "common.copyId": "复制 ID", "common.readOnly": "只读模式", "common.activationOnly": "仅可切换激活状态", "common.active": "已激活", "common.category": "分类", "common.importanceLabel": "重要性", "common.importance": "重要性 {value}", "common.hops": "{count} 跳", "common.allCategories": "全部分类", "common.memories": "{count} 条记忆", "common.edges": "{count} 条连接", "card.confirmText": "软删除这条记忆?", "card.processing": "处理中…", "card.confirmForget": "确认忘记", "card.related": "关联", "card.clone": "基于此新建", "card.forget": "忘记", "readSources.all": "全部 Provider", "readSources.mode.search": "原生检索", "readSources.mode.graph": "真实关系图", "readSources.mode.projection": "内容投影", "readSources.mode.enumerable": "可枚举内容", "readSources.mode.query-only": "仅查询", "readSources.mode.entities": "实体索引", "readSources.mode.unsupported": "不支持", "readSources.status.ready": "{count} 条可观察", "readSources.status.empty": "已连接 · 暂无内容", "readSources.status.query-required": "输入查询后读取", "readSources.status.unsupported": "当前表面不可用", "readSources.status.unavailable": "连接不可用", "readSources.edges": "{count} 条真实关系", "readSources.model.mnemon-native": "事实、实体与类型关系", "readSources.model.openviking": "目录与分层内容", "readSources.model.honcho": "Peer 结论与画像", "readSources.model.mem0": "提炼后的语义记忆", "readSources.model.hindsight": "记忆单元与知识图", "readSources.model.holographic": "可信事实与实体", "readSources.model.retaindb": "画像与类型化事实", "readSources.model.byterover": "知识树查询", "readSources.model.supermemory": "记忆与摄取文档", "common.inactive": "未激活", "config.providerSecretShow": "显示凭证", "config.providerSecretHide": "隐藏凭证", "config.providerSecretStoredValue": "已保存凭证", "config.providersSpacesOffTitle": "“记忆空间”已关闭", "config.providersSpacesOffDetail": "已保存的连接会保留", "config.providersSpacesOn": "开启“记忆空间”", "config.providersReadOnlyTitle": "dsh-brain-mnemon 当前为只读", "config.providersReadOnlyDetail": "writeEnabled 为 false 时,不能启用或停用 Provider。", "spaces.offNote": "开启后可配置 Provider 与嵌入", "config.providersTitle": "记忆 Provider", "config.providersDescription": "Provider 为记忆空间提供存储。启用或保存会同步其中已有的记忆空间;关闭只移除本地映射,不会删除第三方数据。", "config.nativeSummary": "官方原生长期记忆与完整关系图", "config.officialNative": "官方原生", "config.nativeCliMissing": "未安装 CLI(可选)", "config.embeddingTitle": "本地向量嵌入", "config.embeddingDescription": "为 Mnemon CLI 注入嵌入 Endpoint 与模型;/v1 结尾默认走 OpenAI 兼容协议,其余走 Ollama 协议。", "config.embeddingManaged": "由 DSH 管理嵌入配置", "config.embeddingManagedHint": "开启后以这里保存的值覆盖 Mnemon 子进程环境;关闭后继续沿用 Host 环境与 Mnemon 默认值。", "config.embeddingEndpoint": "嵌入 Endpoint", "config.embeddingModel": "嵌入模型", "config.embeddingApiKey": "API Key(可选,OpenAI 兼容服务)", "config.embeddingApiKeyInvalid": "API Key 不能包含控制字符,且长度不超过 2048。", "config.embeddingProtocol": "协议", "config.embeddingProtocolAuto": "自动(按 /v1 探测)", "config.embeddingProtocolOllama": "Ollama", "config.embeddingProtocolOpenai": "OpenAI 兼容", "config.embeddingProtocolInvalid": "协议必须是 自动 / Ollama / OpenAI 兼容 之一。", "config.embeddingEndpointInvalid": "嵌入 Endpoint 必须是不含凭据、查询参数或片段的 HTTP(S) 绝对 URL。", "config.embeddingModelInvalid": "嵌入模型必须包含 1–200 个字符,且不能包含控制字符。", "config.embeddingSecurity": "记忆与查询会发送至此 Endpoint;密钥由 DSH 凭据库保管,远程服务请使用 HTTPS。", "config.embeddingTest": "测试状态", "config.embeddingNotTested": "尚未检查嵌入服务的连接与各 Mnemon Native 空间的覆盖率。", "config.embeddingTesting": "正在通过 Mnemon 检查嵌入服务与覆盖率…", "config.embeddingSaveBeforeTest": "请先保存嵌入配置,再测试实际运行值。", "config.embeddingTestUnavailable": "当前 DSH Host 不提供嵌入状态检查。", "config.embeddingCliMissing": "测试需要 Mnemon CLI;向量设置只作用于 Mnemon Native。", "config.embeddingStatusAvailable": "嵌入模型可用 · {model} · 已嵌入 {embedded}/{total}({coverage})", "config.embeddingStatusAvailableWithProtocol": "嵌入模型可用 · {model} · 协议 {protocol} · 已嵌入 {embedded}/{total}({coverage})", "config.embeddingStatusUnavailable": "嵌入模型不可用 · {model} · 已嵌入 {embedded}/{total}({coverage})", "config.embeddingStatusUnavailableWithProtocol": "嵌入模型不可用 · {model} · 协议 {protocol} · 已嵌入 {embedded}/{total}({coverage})", "config.embeddingStatusFailed": "嵌入状态检查失败:{error}", "config.embeddingSpaces": "各 Mnemon Native 空间", "config.embeddingSpaceCounts": "已嵌入 {embedded}/{total}({coverage})", "config.embeddingSpaceFailed": "无法读取:{error}", "config.embeddingMissing": "没有向量的记忆不参与语义匹配。", "config.embeddingMissingFill": "没有向量的记忆不参与语义匹配;点空间旁的「补齐」即可生成缺少的向量。", "config.embeddingMissingOffline": "没有向量的记忆不参与语义匹配;嵌入服务可用后,可以在这里补齐。", "config.embeddingSpacesUnread": "无法读取的空间没有计入合计。", "config.embeddingFill": "补齐", "config.embeddingFilling": "补齐中…", "config.embeddingFillLabel": "补齐「{name}」的向量", "config.embeddingFillingLabel": "正在补齐「{name}」的向量", "config.embeddingFillDone": "已为「{name}」补齐 {filled} 条向量。", "config.embeddingFillMore": "已为「{name}」补齐 {filled} 条向量,还缺 {remaining} 条,再点「补齐」继续。", "config.embeddingFillPartly": "已为「{name}」补齐 {filled} 条向量;其余 {remaining} 条嵌入服务没有返回向量,可以稍后再点「补齐」。", "config.embeddingFillRefused": "嵌入服务没有为「{name}」返回向量,请确认它在运行并提供模型 {model}。", "config.embeddingFillFailed": "「{name}」的向量没有补齐:{error}", "config.providerGlobalLocation": "全局数据位置", "config.providerGlobalLocationHint": "{provider} 默认使用全局范围目录,也可以指定一个自定义位置。", "config.providerGlobalLocationWorkspaceHint": "当前使用工作区默认位置;切换到全局范围后可指定自定义位置。", "config.providerDefaultLocation": "默认(跟随范围)", "config.providerSaveFailed": "配置保存失败:{error}", "config.providerServiceTitle": "服务配置", "config.providerServiceHint": "供该 Provider 的所有记忆空间复用;启用或保存时会刷新记忆空间目录中的映射与元信息。", "config.providerEnableHint": "填写服务配置并保存后,Provider 会启用并同步所有可见记忆空间。", "config.providerEnabled": "已启用", "config.providerDisabled": "未启用", "config.providerDisabledConfigured": "已关闭 · 配置已保留", "config.providerNeedsConfiguration": "需要完成配置", "config.providerToggleAria": "启用 {provider}", "config.providerToggleFailed": "切换失败:{error}", "config.enableProvider": "保存并启用", "config.providerServiceSaved": "服务配置已保存,记忆空间目录已同步", "config.saveProviderService": "保存", "config.providerUnavailable": "当前 DSH 主机不支持 Provider 服务配置。", "config.saveScopeBeforeProviders": "存储范围有未保存修改。请先保存范围,再配置对应目录中的 Provider。", "config.providerTargetWorkspace": "当前工作区:{workspace};标记“工作区”的 Provider 配置与记忆空间使用此范围。", "config.loadingProviders": "正在读取 Provider 配置…", "config.providerLoadFailed": "读取 Provider 配置失败:{error}", "config.retryProviders": "重试", "config.saving": "保存中…", "config.embeddingApiKeyEnv": "API Key 环境变量(可选)", "config.embeddingEnvInvalid": "请输入有效的 Host 环境变量名,例如 MY_EMBEDDING_API_KEY。", "config.embeddingAuthChoice": "请填写 API Key 或环境变量名,二选一。", "config.embeddingKeyPlaceholder": "留空保留已有密钥", "config.embeddingCredentialSaved": "已保存 DSH 凭据引用;密钥不会回传到此页面。", "config.embeddingClearKey": "移除本连接的密钥和环境变量引用", "config.embeddingMigrateKey": "将已有明文密钥迁入 DSH 凭据库", "config.embeddingUpgradeHost": "升级 dsh-brain-mnemon Starter 后即可管理凭据。现有连接仍可使用;此处暂不接受新的密钥。", "overview.openProvidersSettings": "前往启用 Provider", "config.policyTitle": "空间策略", "config.policyDescription": "任务 Agent 自动新建记忆空间时的默认 Provider 放置规则;手动创建时始终由你指定。", "config.policyConnectionIncomplete": "请填写所选 Provider 的必填连接项。", "config.policyCandidatesEmpty": "请至少选择一个候选 Provider。", "config.policyBoundaryMismatch": "“仅限本地”边界下不能保留远程候选 Provider。", "config.policyPromptInvalid": "策略 Prompt 最多包含 4000 个字符。", "config.recallTitle": "检索与超时", "config.recallDescription": "配置单次召回条数上限、质量过滤策略与 Provider 调用超时。", "config.providersBadge": "{enabled}/{total} 已启用", "config.recallBadge": "{limit} 条 · {policy}", "config.recallPolicyShort.strict-v1": "严格", "config.recallPolicyShort.balanced-v1": "均衡", "config.recallPolicyShort.exhaustive-v1": "全保留", "config.defaultRecallLimit": "默认召回上限", "config.defaultRecallLimitHint": "单次召回返回的最多记忆条数(1–50,默认 10)。", "config.defaultRecallLimitInvalid": "默认召回上限必须是 1 到 50 之间的整数。", "config.recallQualityPolicy": "召回质量策略", "config.recallPolicy.strict-v1": "严格过滤(strict-v1)", "config.recallPolicy.strict-v1.detail": "默认策略;剔除低分候选,并限制中等相关与未校准结果的条数。", "config.recallPolicy.balanced-v1": "均衡召回(balanced-v1)", "config.recallPolicy.balanced-v1.detail": "优先返回高相关记忆,在名额剩余时保留低分正向匹配。", "config.recallPolicy.exhaustive-v1": "尽可能保留(exhaustive-v1)", "config.recallPolicy.exhaustive-v1.detail": "保留全部有效候选直至达到召回上限。", "config.timeoutMs": "操作超时(毫秒)", "config.timeoutMsHint": "单次 Provider 或 CLI 调用的最长等待时间(100–120000 ms,默认 10000)。", "config.timeoutMsInvalid": "操作超时必须是 100 到 120000 之间的整数毫秒值。" }, en: { "term.space": "Memory Space", "term.spaces": "Memory Spaces", "category.decision": "Decision", "category.preference": "Preference", "category.fact": "Fact", "category.insight": "Insight", "category.context": "Context", "category.general": "General", "nav.memory.aria": "Memory Space pages", "nav.overview": "Overview", "nav.search": "Recall", "nav.entities": "Entities", "nav.rememberAction": "Save to memory", "nav.content": "Content", "overview.description": "Long-term memory held by Mnemon Native or third-party Providers; active spaces take part in recall.", "overview.pageDescription": "Manage Memory Spaces and inspect provider health and live snapshots.", "overview.fullSyncPending": "Waiting for the first full sync", "overview.fullSyncJustNow": "Last full sync: just now", "overview.fullSyncSeconds": "Last full sync: {count}s ago", "overview.fullSyncMinutes": "Last full sync: {count}m ago", "overview.fullSyncHours": "Last full sync: {count}h ago", "overview.fullSyncDays": "Last full sync: {count}d ago", "overview.directory": "Memory Space Directory", "overview.directory.description": "Click a card to check connection; toggle to include it in recall.", "overview.directory.unsynced": "Directory not synchronized", "overview.directory.unsyncedBadge": "Directory pending", "overview.directoryLoading": "Loading the Memory Space directory", "overview.healthLoading": "Checking Memory Space health", "overview.storageHealthy": "Storage healthy", "overview.storageUnhealthy": "Storage unavailable", "overview.storageChecking": "Checking", "overview.reconnecting": "Reconnecting", "overview.reconnectHint": "Click the card to reconnect and synchronize this Memory Space", "overview.reconnectAria": "Reconnect {name}", "overview.snapshotLoading": "Loading the multi-space live snapshot", "overview.metadataAction": "Tidy", "overview.metadataTitle": "Maintain Memory Space metadata with AI", "overview.metadataDescription": "Samples each space via its fastest native path and generates titles and descriptions.", "overview.metadataUnavailable": "Temporarily unavailable: no active Agent matches the current memory scope", "overview.metadataLoading": "Loading maintainable Memory Spaces…", "overview.metadataEmpty": "There are no active Memory Spaces whose metadata can be maintained by AI.", "overview.metadataSelected": "{count} Memory Spaces selected", "overview.metadataSelectAll": "Select all", "overview.metadataClear": "Clear", "overview.metadataSafety": "Updates local titles and descriptions only; stored memories stay untouched.", "overview.metadataGenerate": "Generate with AI ({count})", "overview.metadataRunningCount": "{count} running", "overview.metadataTaskRunning": "Generating…", "overview.metadataTaskSuccess": "Updated", "overview.metadataTaskError": "Failed: {error}", "overview.metadataTaskUnknown": "Unknown error", "overview.mnemonDefault": "Mnemon default", "overview.toggleAria": "{name} read toggle", "overview.toggling": "Switching", "overview.noDescription": "No routing description yet.", "overview.unsyncedTitle": "Memory Space directory is not synchronized", "overview.unsyncedShort": "The Web client and DSH Host are using different contracts. Restart the Host to register existing Stores.", "overview.unsyncedLong": "The Host is still using the previous plugin contract. Restart DSH to rediscover existing Stores; no .db file will be deleted.", "overview.emptyTitle": "No Memory Spaces yet", "overview.emptyShort": "Create the first space and distill durable context into it.", "overview.emptyLong": "Create a Mnemon Memory Space, or enable a third-party provider on the dsh-brain-mnemon page under Plugins to synchronize its existing namespaces.", "overview.noActiveTitle": "No active Memory Spaces", "overview.noActiveText": "Enable read access for at least one space to aggregate its live graph here.", "overview.noContentTitle": "Active spaces have no content yet", "overview.noContentText": "Save memories to see their nodes and relations here.", "overview.newAction": "New", "overview.createTitle": "Create Memory Space", "overview.createDialogHint": "Define the space and pick a Provider; credentials and paths follow settings.", "overview.createIdentityTitle": "Memory Space details", "overview.createIdentityHint": "The name identifies the space; the description guides when the agent writes and recalls it.", "overview.createPlacementTitle": "Memory Space provider", "overview.createPlacementHint": "Explicit manual creation bound to the chosen enabled Provider.", "overview.createName": "New Memory Space name", "overview.createNamePlaceholder": "Name", "overview.createDescription": "New Memory Space description", "overview.createDescriptionPlaceholder": "Describe what belongs here and when it should be recalled", "overview.placementMode": "Engine selection", "overview.placementManual": "Choose manually", "overview.placementAutomatic": "Smart selection", "overview.recommended": "Recommended", "overview.placementPolicy": "Selection policy", "overview.placementPolicyHint": "The host enforces rules. The prompt only guides judgment among eligible candidates.", "overview.placementPrompt": "Strategy prompt (optional)", "overview.placementPromptPlaceholder": "For example: This is collaborative knowledge. Prefer local storage when exact writes are required; otherwise prefer sharing.", "overview.dataBoundary": "Data boundary", "overview.dataBoundaryRemote": "Remote services allowed", "overview.dataBoundaryLocal": "Local only", "overview.preference": "Soft preference", "overview.preferenceBalanced": "Balanced", "overview.preferenceLocal": "Local first", "overview.preferenceShared": "Shared first", "overview.requiredCapabilities": "Required capabilities (select any)", "overview.capability.graph": "Relation graph", "overview.capability.exact-write": "Exact writes", "overview.capability.forget": "Safe forget", "overview.candidateNativeReady": "Official native · follows the active memory scope", "overview.providerServiceRequired": "Off", "overview.nativeCliRequired": "Needs the Mnemon CLI on this machine; other providers work without it", "overview.workspaceBinding.automatic": "Follows the active memory scope", "overview.workspaceBinding.optional-override": "Follows the active scope; global location can be customized", "overview.workspaceBinding.provider-global": "Always uses the global scope", "overview.candidateLocal": "Local provider · follows the active memory scope", "overview.candidateRemote": "Remote provider · uses the global service configuration", "overview.placementByLlm": "Agent selected", "overview.placementByRules": "Rule selected", "overview.placementConfidence": "Confidence: {confidence}", "overview.confidence.high": "High", "overview.confidence.medium": "Medium", "overview.confidence.low": "Low", "overview.providerLabel": "Memory engine", "overview.nativeOfficial": "Official native", "strategy.action": "Space policy", "strategy.title": "Space policy", "strategy.description": "How task Agents pick a Provider when creating a new Memory Space.", "strategy.loading": "Loading Provider directory…", "strategy.modeTitle": "Provider selection", "strategy.modeHint": "Applies only to Agent-created spaces; manual creation stays explicit.", "strategy.manualHint": "Fix one Provider; the Agent cannot override it", "strategy.automaticHint": "Apply hard rules first, then let the task Agent choose an eligible Provider", "strategy.manualTitle": "Fixed Provider", "strategy.manualDescription": "When no existing space fits, create the new space on this Provider.", "strategy.automaticTitle": "Smart selection rules", "strategy.automaticDescription": "Boundary and capability rules are enforced; the prompt guides ties.", "strategy.save": "Save", "strategy.saving": "Saving…", "overview.providerSummary.mnemon-native": "Official native, local-first storage with the full graph and soft-delete semantics", "overview.providerSummary.openviking": "Filesystem-shaped shared memory with verified exact writes and semantic retrieval", "overview.providerSummary.honcho": "Cross-session user modelling, peer profiles, dialectic reasoning, and persistent conclusions", "overview.providerSummary.mem0": "Automatic fact extraction, semantic retrieval, reranking, and deduplication", "overview.providerSummary.hindsight": "Knowledge-graph memory with entity resolution, multi-strategy recall, and reflection", "overview.providerSummary.holographic": "Local structured fact memory with trust scoring, entity resolution, and compositional retrieval", "overview.providerSummary.retaindb": "Cloud hybrid vector/BM25 retrieval, user profiles, and typed durable facts", "overview.providerSummary.byterover": "Local-first hierarchical knowledge tree accessed through the brv CLI", "overview.providerSummary.supermemory": "Semantic memory, persistent profiles, conversation ingest, and multi-container recall", "overview.providerEndpoint": "Service endpoint", "overview.providerTargetUri": "Memory scope URI", "overview.providerApiKey": "API Key", "overview.providerApiKeyOptional": "Leave blank when authentication is disabled", "overview.providerApiKeyKeep": "Saved; leave blank to keep unchanged", "overview.providerAccount": "Account", "overview.providerDiscoveryUser": "User key owner (skip admin)", "overview.providerUser": "User", "overview.providerActorPeer": "Actor Peer", "overview.providerField.workspace": "Workspace", "overview.providerField.userId": "User ID", "overview.providerField.agentId": "Agent ID", "overview.providerField.mode": "Mode", "overview.providerField.rerank": "Rerank search results", "overview.providerField.bankId": "Memory bank", "overview.providerField.budget": "Recall budget", "overview.providerField.dataPath": "Fact store path", "overview.providerField.defaultDirectory": "Default knowledge directory", "overview.providerField.defaultTrust": "Default trust", "overview.providerField.minTrust": "Minimum recall trust", "overview.providerField.project": "Project", "overview.providerField.cliPath": "brv executable", "overview.providerField.workingDirectory": "Knowledge directory", "overview.providerField.containerTag": "Container tag", "overview.providerField.searchMode": "Search mode", "overview.providerOption.platform": "Mem0 Platform", "overview.providerOption.self-hosted": "Self-hosted server", "overview.providerOption.low": "Low", "overview.providerOption.mid": "Medium", "overview.providerOption.high": "High", "overview.providerOption.hybrid": "Hybrid", "overview.providerOption.memories": "Memories", "overview.providerOption.documents": "Documents", "overview.providerKindLocal": "Local engine", "overview.providerKindRemote": "Remote service", "overview.providerSecretClear": "Clear the saved credential", "overview.providerWriteExact": "Exact writes", "overview.providerWriteAsync": "Asynchronous semantic extraction", "overview.providerGraphReady": "Relation graph available", "overview.providerSearchReady": "Unified search available", "overview.providerRemote": "Third-party remote memory", "overview.providerLocal": "Third-party local memory", "overview.creating": "Creating…", "overview.createAction": "Create", "overview.editName": "Name", "overview.editDescription": "Routing description", "overview.deleteTitle": "Delete “{name}”?", "overview.deleteWarning": "This permanently deletes the Memory Space and every memory and relation it contains. This cannot be undone.", "overview.lastStoreDeleteHint": "Mnemon must retain at least one native Store. The last Memory Space may be inactive, but it cannot be deleted.", "overview.deleteAction": "Delete permanently", "overview.disconnectTitle": "Disconnect “{name}”?", "overview.disconnectWarning": "This only removes the {provider} connection from the DSH Memory Space directory. Memories in the underlying engine remain untouched.", "overview.disconnectAction": "Disconnect", "overview.snapshot": "Live multi-space snapshot", "overview.snapshotSources": "Snapshot observability", "overview.snapshotSourcesHint": "Relation graphs, projections, and query-only spaces stay distinct.", "overview.noVisualTitle": "Active spaces are query-only", "overview.noVisualText": "These providers expose neither enumerable content nor a graph. Open Recall and ask a focused question.", "overview.waitingSnapshot": "Waiting for the first snapshot", "overview.updatedAt": "Updated at {time}", "overview.edgeScope": "Space scope", "overview.edgeTemporal": "Temporal", "overview.edgeSemantic": "Semantic", "overview.edgeCausal": "Causal", "overview.edgeEntity": "Entity relation", "overview.graphComposition": "{spaces} spaces · {memories} memories · {entities} entities", "overview.graphCount": "Showing {visible} / {total} elements", "overview.graphEdges": "{count} graph edges", "overview.inspector": "Memory details", "overview.inspectorSpace": "Memory Space details", "overview.inspectorEntity": "Entity details", "overview.selectNode": "Select a graph element", "overview.selectNodeText": "Inspect the exact context for a Memory Space, entity, or memory.", "overview.closeInspector": "Close node details", "overview.memoryId": "Memory ID", "overview.spaceId": "Memory Space ID", "overview.containedMemories": "Contained memories", "overview.entityMentions": "Indexed mentions", "overview.exploreNode": "Recall", "overview.previewAria": "View full content", "overview.previewTitle": "Full content", "overview.loading": "Synchronizing the multi-space live snapshot…", "graph.layoutAria": "Graph layout", "graph.quietAction": "Quiet display", "graph.quietHint": "Hide the grid and persistent labels; select a node to focus its neighbors, then click the background or press Escape to clear. Saved only in this browser.", "graph.layoutNatural": "Natural layout", "graph.layoutUniform": "Uniform layout", "graph.layoutCustom": "Custom layout", "graph.layoutStatus": "Layout: {layout}", "graph.draggable": "{layout} · draggable", "graph.naturalAction": "Natural spread", "graph.uniformAction": "Uniform reset", "graph.aria": "Mnemon live memory graph with {nodes} elements and {edges} edges", "graph.aria3d": "Mnemon 3D memory graph with {nodes} elements and {edges} edges", "graph.viewModeAria": "Graph dimension view", "graph.view2d": "2D", "graph.view3d": "3D", "graph.selectNodeAction": "Select node", "graph.noNodeSelected": "No node selected", "graph.orbitAria": "3D camera controls", "graph.orbitHint": "3D · drag to orbit · scroll to zoom", "graph.orbitShort": "3D", "graph.zoomInAction": "Zoom in", "graph.zoomOutAction": "Zoom out", "graph.resetViewAction": "Reset view", "graph.kindSpace": "Memory Space", "graph.kindEntity": "Entity", "search.title": "Recall Memory", "search.description": "Search returns stored entries; Ask AI answers with citations.", "search.maxResults": "Up to {count} results", "search.placeholder": "Why did we choose SQLite? What release conventions apply?", "search.queryAria": "Memory query", "search.categoryAria": "Memory category", "search.strategy": "Strategy", "search.modeAria": "Recall mode", "search.modeSmart": "Smart recall", "search.modeKeyword": "Keyword search", "search.modeBasic": "Basic match", "search.searching": "Recalling…", "search.action": "Search", "search.agentAction": "Ask AI", "search.agentSearching": "Agent analyzing…", "search.agentAnswer": "Agent answer", "search.agentAnswerHint": "Grounded in the recalled evidence below", "search.startTitle": "Start with a focused question", "search.startText": "A focused entity, decision, or timeline is more reliable than loading the whole database.", "search.emptyTitle": "No matches", "search.emptyText": "Try a more specific entity, decision, or timeline keyword.", "search.results": "Raw recalled evidence", "search.related": "Related memories", "search.closeRelated": "Close related memories", "search.traversing": "Traversing the graph…", "search.noRelated": "No related nodes found within two hops.", "search.sourcesTitle": "Search coverage", "entities.title": "Entity Explorer", "entities.description": "See how entities connect facts, decisions and context.", "entities.sourcesTitle": "Entity capability coverage", "entities.unsupportedTitle": "No active space exposes an entity index", "entities.unsupportedText": "The active providers remain searchable through Recall, but are not presented here as a fabricated entity graph.", "entities.count": "{count} active entities", "entities.nameAria": "Entity name", "entities.placeholder": "Enter any entity…", "entities.action": "Explore", "entities.top": "Top entities", "entities.frequency": "By frequency", "entities.filterHint": "Type to filter the rail locally (Esc to clear).", "entities.emptyRail": "Entities appear here after memories with entity metadata are stored.", "entities.filterEmpty": "No local match. Press Explore to query the host.", "entities.loading": "Reading the entity's memories…", "entities.selectTitle": "Select or enter an entity", "entities.selectText": "Selecting one lists every memory that carries it; Find related memories then adds others recall relates to it.", "entities.emptyTitle": "No related memories", "entities.emptyText": "Try the full name or another entity alias.", "entities.railLoading": "Reading entities…", "entities.memoriesHint": "Memories that carry this entity", "entities.relatedTitle": "Related memories", "entities.relatedHint": "Recalled as related, without this entity", "entities.findRelated": "Related memories", "entities.hideRelated": "Hide", "entities.noCarrying": "No memory carries this entity.", "entities.noRelated": "No other related memories.", "entities.retry": "Retry", "entities.sourceReady": "{count} entities", "entities.sourcePartial": "{count} entities · partial", "readSources.status.loading": "Reading", "remember.title": "Save to memory", "remember.description": "Task Agent decides whether to save, then distills and writes to a Memory Space.", "remember.readOnlyTitle": "Read-only mode", "remember.readOnlyText": "This deployment disables memory writes. Change and save the DSH Mnemon configuration to enable them.", "remember.candidate": "Content", "remember.placeholder": "Background, preferences, decisions or conclusions worth keeping.", "remember.taskAgentHint": "The Host cannot currently create an isolated task Agent. Refresh status and try again.", "remember.processing": "Task Agent working…", "remember.action": "Save", "remember.advanced": "Advanced options", "remember.advancedHint": "Choose the target space, category and importance", "remember.expand": "Expand", "remember.target": "Target Memory Space", "remember.asyncProviderHint": "This Memory Space waits for remote extraction to settle before returning a truthful write receipt.", "remember.entities": "Entities (comma-separated)", "remember.tags": "Tags (comma-separated)", "remember.advancedText": "Constraints still go through the task Agent’s duplicate check and receipt.", "remember.saving": "Task Agent working…", "remember.advancedAction": "Save with options", "content.title": "Memory Content", "content.description": "Browse what each Memory Space holds.", "content.sourcesTitle": "Provider content models", "content.count": "{count} memories", "content.filterAria": "Filter memory content", "content.filterPlaceholder": "Filter content or ID…", "content.categoryAria": "Memory category", "content.apply": "Filter", "content.notice": "Query-only Providers show content once you enter a query.", "content.queryRequiredTitle": "Query-only spaces are waiting", "content.queryRequiredText": "Enter a focused query to inspect providers such as ByteRover that do not expose a complete list.", "content.emptyTitle": "No matching memories", "content.emptyText": "Clear the filters or save a first memory.", "nav.spaces": "Memory Spaces", "overview.editSpace": "Edit", "overview.editSpaceAria": "Edit {name}", "overview.saveSpace": "Save", "overview.savingSpace": "Saving…", "overview.deleteSpace": "Delete", "overview.deleteSpaceAria": "Delete {name}", "overview.disconnectSpace": "Disconnect", "overview.disconnectSpaceAria": "Disconnect {name}", "overview.deletingSpace": "Deleting…", "common.score": "Score {value}", "overview.providerEnableHint": "Turn on more Providers on Memory Spaces’ page under Plugins → dsh-brain-mnemon.", "search.citations": "Cites", "overview.rediscoverAction": "Rediscover", "overview.rediscovering": "Rediscovering…", "overview.rediscoverHint": "Ask the enabled Providers again; new spaces are added without joining recall", "overview.rediscoveryAdded": "New spaces found: {count}. They join recall once you switch them on.", "overview.rediscoveryNone": "No new spaces.", "overview.rediscoveryDisconnected": "Spaces you disconnected stay disconnected: {count}. Save the Provider’s settings again to bring them back.", "overview.rediscoveryFailed": "{provider} could not finish discovery: {error}", "overview.rediscoveryTimedOut": "{provider} did not answer in time; try Rediscover later.", "overview.rediscoveryDismiss": "Dismiss", "overview.newSpace": "New", "common.copyId": "Copy ID", "common.readOnly": "Read only", "common.activationOnly": "Activation control only", "common.active": "Active", "common.category": "Category", "common.importanceLabel": "Importance", "common.importance": "Importance {value}", "common.hops": "{count} hops", "common.allCategories": "All categories", "common.memories": "{count} memories", "common.edges": "{count} edges", "card.confirmText": "Soft-delete this memory?", "card.processing": "Processing…", "card.confirmForget": "Confirm forget", "card.related": "Related", "card.clone": "Create from this", "card.forget": "Forget", "readSources.all": "All providers", "readSources.mode.search": "Native search", "readSources.mode.graph": "True relation graph", "readSources.mode.projection": "Content projection", "readSources.mode.enumerable": "Enumerable content", "readSources.mode.query-only": "Query only", "readSources.mode.entities": "Entity index", "readSources.mode.unsupported": "Unsupported", "readSources.status.ready": "{count} observable", "readSources.status.empty": "Connected · no content", "readSources.status.query-required": "Read after a query", "readSources.status.unsupported": "Unavailable on this surface", "readSources.status.unavailable": "Connection unavailable", "readSources.edges": "{count} true relations", "readSources.model.mnemon-native": "Facts, entities, and typed relations", "readSources.model.openviking": "Hierarchy and tiered content", "readSources.model.honcho": "Peer conclusions and profiles", "readSources.model.mem0": "Extracted semantic memories", "readSources.model.hindsight": "Memory units and knowledge graph", "readSources.model.holographic": "Trusted facts and entities", "readSources.model.retaindb": "Profiles and typed facts", "readSources.model.byterover": "Knowledge-tree queries", "readSources.model.supermemory": "Memories and ingested documents", "common.inactive": "Inactive", "config.providerSecretShow": "Show credential", "config.providerSecretHide": "Hide credential", "config.providerSecretStoredValue": "Saved credential", "config.providersSpacesOffTitle": "Memory Spaces is off", "config.providersSpacesOffDetail": "Saved connections are kept", "config.providersSpacesOn": "Turn on “Memory Spaces”", "config.providersReadOnlyTitle": "dsh-brain-mnemon is read-only", "config.providersReadOnlyDetail": "With writeEnabled false, Providers cannot be switched on or off.", "spaces.offNote": "Turn it on to configure Providers and embedding", "config.providersTitle": "Memory providers", "config.providersDescription": "Providers store memory spaces. Enabling or saving one synchronizes its existing spaces; turning it off removes only the local mapping, never third-party data.", "config.nativeSummary": "Official native long-term memory with a complete relation graph", "config.officialNative": "Official native", "config.nativeCliMissing": "CLI not installed (optional)", "config.embeddingTitle": "Local vector embeddings", "config.embeddingDescription": "Injects the embedding endpoint and model into Mnemon CLI (/v1 uses OpenAI-compatible, else Ollama).", "config.embeddingManaged": "Manage embedding settings in DSH", "config.embeddingManagedHint": "When enabled, saved values override the Mnemon child-process environment. When off, Mnemon keeps the Host environment and its built-in defaults.", "config.embeddingEndpoint": "Embedding endpoint", "config.embeddingModel": "Embedding model", "config.embeddingApiKey": "API key (optional, OpenAI-compatible servers)", "config.embeddingApiKeyInvalid": "The API key must contain no control characters and at most 2048 characters.", "config.embeddingProtocol": "Protocol", "config.embeddingProtocolAuto": "Auto (detect via /v1)", "config.embeddingProtocolOllama": "Ollama", "config.embeddingProtocolOpenai": "OpenAI-compatible", "config.embeddingProtocolInvalid": "The protocol must be one of Auto / Ollama / OpenAI-compatible.", "config.embeddingEndpointInvalid": "The embedding endpoint must be an absolute HTTP(S) URL without credentials, a query, or a fragment.", "config.embeddingModelInvalid": "The embedding model must contain 1–200 characters and no control characters.", "config.embeddingSecurity": "Memory and query text are sent to this endpoint; keys stay in DSH credentials (use HTTPS remotely).", "config.embeddingTest": "Test status", "config.embeddingNotTested": "The embedding connection and the coverage of each Mnemon Native space have not been checked.", "config.embeddingTesting": "Checking the embedding server and coverage through Mnemon…", "config.embeddingSaveBeforeTest": "Save the embedding settings before testing their effective runtime values.", "config.embeddingTestUnavailable": "This DSH Host does not provide embedding status checks.", "config.embeddingCliMissing": "Testing needs the Mnemon CLI; these embedding settings only apply to Mnemon Native.", "config.embeddingStatusAvailable": "Embedding model available · {model} · {embedded}/{total} embedded ({coverage})", "config.embeddingStatusAvailableWithProtocol": "Embedding model available · {model} · protocol {protocol} · {embedded}/{total} embedded ({coverage})", "config.embeddingStatusUnavailable": "Embedding model unavailable · {model} · {embedded}/{total} embedded ({coverage})", "config.embeddingStatusUnavailableWithProtocol": "Embedding model unavailable · {model} · protocol {protocol} · {embedded}/{total} embedded ({coverage})", "config.embeddingStatusFailed": "Embedding status check failed: {error}", "config.embeddingSpaces": "Each Mnemon Native space", "config.embeddingSpaceCounts": "{embedded}/{total} embedded ({coverage})", "config.embeddingSpaceFailed": "Could not read: {error}", "config.embeddingMissing": "Memories without a vector are left out of semantic matching.", "config.embeddingMissingFill": "Memories without a vector are left out of semantic matching; Fill in beside a space creates its missing vectors.", "config.embeddingMissingOffline": "Memories without a vector are left out of semantic matching; once the embedding service answers, their vectors can be filled in here.", "config.embeddingSpacesUnread": "Spaces that could not be read are left out of the total.", "config.embeddingFill": "Fill in", "config.embeddingFilling": "Filling in…", "config.embeddingFillLabel": "Fill in the vectors of {name}", "config.embeddingFillingLabel": "Filling in the vectors of {name}", "config.embeddingFillDone": "Filled in {filled} vectors for {name}.", "config.embeddingFillMore": "Filled in {filled} vectors for {name}; {remaining} are still missing. Press Fill in to go on.", "config.embeddingFillPartly": "Filled in {filled} vectors for {name}; the embedding service returned none for the other {remaining}. Press Fill in later to try again.", "config.embeddingFillRefused": "The embedding service returned no vectors for {name}. Check that it is running and serves the model {model}.", "config.embeddingFillFailed": "The vectors of {name} were not filled in: {error}", "config.providerGlobalLocation": "Global data location", "config.providerGlobalLocationHint": "{provider} uses the global scope directory by default, or you can choose a custom location.", "config.providerGlobalLocationWorkspaceHint": "The workspace default is active. Switch to Global to choose a custom location.", "config.providerDefaultLocation": "Default (follows scope)", "config.providerSaveFailed": "Could not save configuration: {error}", "config.providerServiceTitle": "Service configuration", "config.providerServiceHint": "Shared by this provider’s Memory Spaces; enabling or saving refreshes their directory mappings and metadata.", "config.providerEnableHint": "Complete and save the service configuration to enable the provider and synchronize every visible namespace.", "config.providerEnabled": "Enabled", "config.providerDisabled": "Not enabled", "config.providerDisabledConfigured": "Off · configuration kept", "config.providerNeedsConfiguration": "Configuration required", "config.providerToggleAria": "Enable {provider}", "config.providerToggleFailed": "Could not change provider state: {error}", "config.enableProvider": "Save and enable", "config.providerServiceSaved": "Service configuration saved and Memory Spaces synchronized", "config.saveProviderService": "Save", "config.providerUnavailable": "This DSH host does not support provider service configuration.", "config.saveScopeBeforeProviders": "The storage scope has unsaved changes. Save the scope before configuring providers in that directory.", "config.providerTargetWorkspace": "Current workspace: {workspace}. Providers tagged Workspace use this scope for configuration and Memory Spaces.", "config.loadingProviders": "Loading provider configurations…", "config.providerLoadFailed": "Could not load provider configurations: {error}", "config.retryProviders": "Retry", "config.saving": "Saving…", "config.embeddingApiKeyEnv": "API key environment variable (optional)", "config.embeddingEnvInvalid": "Enter a valid Host environment variable name, such as MY_EMBEDDING_API_KEY.", "config.embeddingAuthChoice": "Provide an API key or an environment variable name, not both.", "config.embeddingKeyPlaceholder": "Leave blank to keep the existing key", "config.embeddingCredentialSaved": "A DSH credential reference is saved; the key is never returned to this page.", "config.embeddingClearKey": "Remove this connection's key and environment variable references", "config.embeddingMigrateKey": "Move the existing plaintext key to DSH credentials", "config.embeddingUpgradeHost": "Upgrade dsh-brain-mnemon Starter to manage credentials. The existing connection still works; new keys cannot be entered here yet.", "overview.openProvidersSettings": "Configure Providers", "config.policyTitle": "Space policy", "config.policyDescription": "Default Provider placement rules when a task Agent creates a new Memory Space; manual creation stays explicit.", "config.policyConnectionIncomplete": "Complete the required connection fields for the selected Provider.", "config.policyCandidatesEmpty": "Select at least one candidate Provider.", "config.policyBoundaryMismatch": "Remote candidate Providers cannot be selected when the data boundary is local only.", "config.policyPromptInvalid": "The strategy prompt must contain at most 4000 characters.", "config.recallTitle": "Recall & timeouts", "config.recallDescription": "Configure the per-recall result limit, quality filtering policy, and Provider call timeout.", "config.providersBadge": "{enabled}/{total} enabled", "config.recallBadge": "{limit} · {policy}", "config.recallPolicyShort.strict-v1": "Strict", "config.recallPolicyShort.balanced-v1": "Balanced", "config.recallPolicyShort.exhaustive-v1": "Exhaustive", "config.defaultRecallLimit": "Default recall limit", "config.defaultRecallLimitHint": "Maximum memories returned per recall (1–50, default 10).", "config.defaultRecallLimitInvalid": "The default recall limit must be an integer from 1 through 50.", "config.recallQualityPolicy": "Recall quality policy", "config.recallPolicy.strict-v1": "Strict (strict-v1)", "config.recallPolicy.strict-v1.detail": "Default policy; drops low-score hits and bounds medium or uncalibrated results.", "config.recallPolicy.balanced-v1": "Balanced (balanced-v1)", "config.recallPolicy.balanced-v1.detail": "Orders high and medium hits first while retaining positive low-score matches.", "config.recallPolicy.exhaustive-v1": "Exhaustive (exhaustive-v1)", "config.recallPolicy.exhaustive-v1.detail": "Keeps every finite candidate up to the recall limit.", "config.timeoutMs": "Operation timeout (ms)", "config.timeoutMsHint": "Maximum wait per Provider or CLI call (100–120000 ms, default 10000).", "config.timeoutMsInvalid": "The operation timeout must be an integer from 100 through 120000 ms." }, ja: { "term.space": "メモリスペース", "term.spaces": "メモリスペース", "category.decision": "意思決定", "category.preference": "好み", "category.fact": "事実", "category.insight": "知見", "category.context": "コンテキスト", "category.general": "一般", "nav.memory.aria": "メモリスペースページ", "nav.overview": "概要", "nav.search": "検索", "nav.entities": "エンティティ", "nav.rememberAction": "メモリに保存", "nav.content": "コンテンツ", "overview.description": "Mnemon Native またはサードパーティプロバイダーが保持する長期メモリ。有効なスペースが検索対象になります。", "overview.pageDescription": "メモリスペースの管理、プロバイダーの接続状態、リアルタイムスナップショットの確認を行います。", "overview.fullSyncPending": "初回の完全同期を待機中", "overview.fullSyncJustNow": "最終完全同期:たった今", "overview.fullSyncSeconds": "最終完全同期:{count} 秒前", "overview.fullSyncMinutes": "最終完全同期:{count} 分前", "overview.fullSyncHours": "最終完全同期:{count} 時間前", "overview.fullSyncDays": "最終完全同期:{count} 日前", "overview.directory": "メモリスペース一覧", "overview.directory.description": "カードをクリックして接続を確認し、スイッチで検索対象に含めるか切り替えます。", "overview.directory.unsynced": "ディレクトリ未同期", "overview.directory.unsyncedBadge": "同期待ち", "overview.directoryLoading": "メモリスペース一覧を読み込み中", "overview.healthLoading": "メモリスペースの状態を確認中", "overview.storageHealthy": "ストレージ正常", "overview.storageUnhealthy": "ストレージ異常", "overview.storageChecking": "確認中", "overview.reconnecting": "再接続中", "overview.reconnectHint": "カードをクリックしてこのメモリスペースを再接続・同期します", "overview.reconnectAria": "{name} に再接続", "overview.snapshotLoading": "複数スペースのリアルタイムスナップショットを読み込み中", "overview.metadataAction": "整理", "overview.metadataTitle": "AI でメモリスペースのメタ情報を整理", "overview.metadataDescription": "各スペースを最速のネイティブ経路でサンプリングし、タイトルと説明を生成します。", "overview.metadataUnavailable": "一時的に利用不可:現在のメモリ範囲に一致する稼働中エージェントがありません", "overview.metadataLoading": "整理対象のメモリスペースを読み込み中…", "overview.metadataEmpty": "AI でメタ情報を整理できる有効なメモリスペースがありません。", "overview.metadataSelected": "{count} 件のメモリスペースを選択中", "overview.metadataSelectAll": "すべて選択", "overview.metadataClear": "クリア", "overview.metadataSafety": "ローカルのタイトルと説明のみ更新します。保存済みのメモリ内容は変更されません。", "overview.metadataGenerate": "AI で生成({count})", "overview.metadataRunningCount": "{count} 件実行中", "overview.metadataTaskRunning": "生成中…", "overview.metadataTaskSuccess": "更新済み", "overview.metadataTaskError": "失敗:{error}", "overview.metadataTaskUnknown": "不明なエラー", "overview.mnemonDefault": "Mnemon デフォルト", "overview.toggleAria": "{name} の読み取り切り替え", "overview.toggling": "切り替え中", "overview.noDescription": "ルーティング説明はまだありません。", "overview.unsyncedTitle": "メモリスペース一覧が同期されていません", "overview.unsyncedShort": "Web クライアントと DSH ホストのコントラクトが一致していません。ホストを再起動して既存のストアを再登録してください。", "overview.unsyncedLong": "ホストが以前のプラグインコントラクトを使用しています。DSH を再起動すると既存のストアが再検出されます(.db ファイルが削除されることはありません)。", "overview.emptyTitle": "メモリスペースはまだありません", "overview.emptyShort": "最初のスペースを作成し、長期的なコンテキストを蓄積してください。", "overview.emptyLong": "Mnemon メモリスペースを作成するか、「プラグイン → dsh-brain-mnemon」ページでサードパーティプロバイダーを有効にして既存のネームスペースを同期してください。", "overview.noActiveTitle": "有効なメモリスペースがありません", "overview.noActiveText": "少なくとも 1 つのスペースの読み取りを有効にすると、ここにリアルタイムグラフが集約されます。", "overview.noContentTitle": "有効なスペースにまだ内容がありません", "overview.noContentText": "メモリを保存すると、ノードと関係がここに表示されます。", "overview.newAction": "新規", "overview.createTitle": "メモリスペースを作成", "overview.createDialogHint": "用途を定義し、プロバイダーを選択します。認証情報と保存先は設定に従います。", "overview.createIdentityTitle": "メモリスペース情報", "overview.createIdentityHint": "名前はスペースの識別に使われ、説明はエージェントが書き込み・検索を判断する手がかりになります。", "overview.createPlacementTitle": "メモリスペースプロバイダー", "overview.createPlacementHint": "選択した有効なプロバイダーに直接紐づけて手動作成します。", "overview.createName": "新しいメモリスペース名", "overview.createNamePlaceholder": "名前", "overview.createDescription": "新しいメモリスペースの説明", "overview.createDescriptionPlaceholder": "どのような情報を保存し、いつ検索すべきかを記述", "overview.placementMode": "エンジン選択方式", "overview.placementManual": "手動指定", "overview.placementAutomatic": "スマート選択", "overview.recommended": "推奨", "overview.placementPolicy": "選択ポリシー", "overview.placementPolicyHint": "ルールはホストが強制します。プロンプトは条件を満たす候補間の判断のみを補助します。", "overview.placementPrompt": "戦略プロンプト(任意)", "overview.placementPromptPlaceholder": "例:チーム共有の知識ベース。正確な書き込みが必要な場合はローカル優先、それ以外は共有を優先する。", "overview.dataBoundary": "データ境界", "overview.dataBoundaryRemote": "リモートサービスを許可", "overview.dataBoundaryLocal": "ローカルのみ", "overview.preference": "優先傾向", "overview.preferenceBalanced": "バランス", "overview.preferenceLocal": "ローカル優先", "overview.preferenceShared": "共有優先", "overview.requiredCapabilities": "必須機能(複数選択可)", "overview.capability.graph": "関係グラフ", "overview.capability.exact-write": "正確な書き込み", "overview.capability.forget": "安全な忘却", "overview.candidateNativeReady": "公式ネイティブ · 現在のメモリ範囲に従う", "overview.providerServiceRequired": "オフ", "overview.nativeCliRequired": "このマシンに Mnemon CLI が必要です(他のプロバイダーは不要)", "overview.workspaceBinding.automatic": "現在のメモリ範囲に従う", "overview.workspaceBinding.optional-override": "現在の範囲に従う(グローバル保存先は変更可能)", "overview.workspaceBinding.provider-global": "常にグローバル範囲を使用", "overview.candidateLocal": "ローカルプロバイダー · 現在のメモリ範囲に従う", "overview.candidateRemote": "リモートプロバイダー · グローバルサービス設定を使用", "overview.placementByLlm": "エージェント選択", "overview.placementByRules": "ルール選択", "overview.placementConfidence": "信頼度:{confidence}", "overview.confidence.high": "高", "overview.confidence.medium": "中", "overview.confidence.low": "低", "overview.providerLabel": "メモリエンジン", "overview.nativeOfficial": "公式ネイティブ", "strategy.action": "スペースポリシー", "strategy.title": "スペースポリシー", "strategy.description": "タスクエージェントが新しいメモリスペースを作成する際のプロバイダー選択ルール。", "strategy.loading": "プロバイダー一覧を読み込み中…", "strategy.modeTitle": "プロバイダー選択方式", "strategy.modeHint": "エージェントが自動作成するスペースにのみ適用されます。手動作成時は常に明示的に指定します。", "strategy.manualHint": "1 つのプロバイダーに固定します(エージェントは変更不可)", "strategy.automaticHint": "必須ルールを先に適用し、適合するプロバイダーからタスクエージェントが選択します", "strategy.manualTitle": "固定プロバイダー", "strategy.manualDescription": "既存のスペースに適切なものがない場合、新しいスペースはこのプロバイダー上に作成されます。", "strategy.automaticTitle": "スマート選択ルール", "strategy.automaticDescription": "データ境界と必須機能はシステムが強制し、プロンプトは候補間の優先判断を導きます。", "strategy.save": "保存", "strategy.saving": "保存中…", "overview.providerSummary.mnemon-native": "公式ネイティブのローカル優先ストレージ。完全な関係グラフと論理削除に対応", "overview.providerSummary.openviking": "ファイルシステム型の共有メモリ。検証済みの正確な書き込みとセマンティック検索に対応", "overview.providerSummary.honcho": "セッション横断のユーザーモデリング、Peer プロファイル、弁証法的推論、永続的結論", "overview.providerSummary.mem0": "自動事実抽出、セマンティック検索、リランキング、重複除去", "overview.providerSummary.hindsight": "エンティティ解決、マルチ戦略検索、リフレクションを備えた知識グラフメモリ", "overview.providerSummary.holographic": "信頼度スコア、エンティティ解決、複合検索を備えたローカル構造化事実メモリ", "overview.providerSummary.retaindb": "クラウド型ハイブリッドベクトル / BM25 検索、ユーザープロファイル、型付き永続事実", "overview.providerSummary.byterover": "brv CLI 経由でアクセスするローカル優先の階層型ナレッジツリー", "overview.providerSummary.supermemory": "セマンティックメモリ、永続プロファイル、会話取り込み、マルチコンテナ検索", "overview.providerEndpoint": "サービスエンドポイント", "overview.providerTargetUri": "メモリ範囲 URI", "overview.providerApiKey": "API キー", "overview.providerApiKeyOptional": "認証が無効な場合は空欄のままにできます", "overview.providerApiKeyKeep": "保存済み(変更しない場合は空欄)", "overview.providerAccount": "Account", "overview.providerDiscoveryUser": "User Key 所有者(Admin をスキップ)", "overview.providerUser": "User", "overview.providerActorPeer": "Actor Peer", "overview.providerField.workspace": "ワークスペース", "overview.providerField.userId": "ユーザー ID", "overview.providerField.agentId": "エージェント ID", "overview.providerField.mode": "モード", "overview.providerField.rerank": "検索結果をリランク", "overview.providerField.bankId": "メモリバンク", "overview.providerField.budget": "検索バジェット", "overview.providerField.dataPath": "ファクトストアパス", "overview.providerField.defaultDirectory": "デフォルト知識ディレクトリ", "overview.providerField.defaultTrust": "デフォルト信頼度", "overview.providerField.minTrust": "最小検索信頼度", "overview.providerField.project": "プロジェクト", "overview.providerField.cliPath": "brv 実行ファイル", "overview.providerField.workingDirectory": "知識ディレクトリ", "overview.providerField.containerTag": "コンテナタグ", "overview.providerField.searchMode": "検索モード", "overview.providerOption.platform": "Mem0 Platform", "overview.providerOption.self-hosted": "セルフホストサーバー", "overview.providerOption.low": "低", "overview.providerOption.mid": "中", "overview.providerOption.high": "高", "overview.providerOption.hybrid": "ハイブリッド", "overview.providerOption.memories": "メモリのみ", "overview.providerOption.documents": "ドキュメントのみ", "overview.providerKindLocal": "ローカルエンジン", "overview.providerKindRemote": "リモートサービス", "overview.providerSecretClear": "保存済み認証情報をクリア", "overview.providerWriteExact": "正確な書き込み", "overview.providerWriteAsync": "非同期セマンティック抽出", "overview.providerGraphReady": "関係グラフ対応", "overview.providerSearchReady": "統合検索対応", "overview.providerRemote": "サードパーティリモートメモリ", "overview.providerLocal": "サードパーティローカルメモリ", "overview.creating": "作成中…", "overview.createAction": "作成", "overview.editName": "名前", "overview.editDescription": "ルーティング説明", "overview.deleteTitle": "「{name}」を削除しますか?", "overview.deleteWarning": "このメモリスペースと含まれるすべてのメモリ・関係が完全に削除されます。この操作は元に戻せません。", "overview.lastStoreDeleteHint": "Mnemon には少なくとも 1 つのネイティブストアが必要です。最後のメモリスペースは無効にできますが削除できません。", "overview.deleteAction": "完全に削除", "overview.disconnectTitle": "「{name}」の接続を解除しますか?", "overview.disconnectWarning": "DSH のメモリスペース一覧から {provider} の接続のみを削除します。基盤エンジン上のメモリデータは削除されません。", "overview.disconnectAction": "接続解除", "overview.snapshot": "複数スペースのリアルタイムスナップショット", "overview.snapshotSources": "スナップショットの可視範囲", "overview.snapshotSourcesHint": "関係グラフ、コンテンツ投影、クエリ専用スペースは区別して表示されます。", "overview.noVisualTitle": "有効なスペースはクエリ専用です", "overview.noVisualText": "これらのプロバイダーは一覧取得やグラフを公開していません。「検索」を開いて具体的な質問を入力してください。", "overview.waitingSnapshot": "最初のスナップショットを待機中", "overview.updatedAt": "更新日時:{time}", "overview.edgeScope": "所属スペース", "overview.edgeTemporal": "時系列", "overview.edgeSemantic": "意味的関連", "overview.edgeCausal": "因果関係", "overview.edgeEntity": "エンティティ関連", "overview.graphComposition": "スペース {spaces} · メモリ {memories} · エンティティ {entities}", "overview.graphCount": "{visible} / {total} 要素を表示中", "overview.graphEdges": "グラフエッジ {count} 本", "overview.inspector": "メモリの詳細", "overview.inspectorSpace": "メモリスペースの詳細", "overview.inspectorEntity": "エンティティの詳細", "overview.selectNode": "グラフ要素を選択", "overview.selectNodeText": "メモリスペース、エンティティ、またはメモリの正確なコンテキストを確認できます。", "overview.closeInspector": "ノード詳細を閉じる", "overview.memoryId": "メモリ ID", "overview.spaceId": "メモリスペース ID", "overview.containedMemories": "収録メモリ数", "overview.entityMentions": "索引登場回数", "overview.exploreNode": "関連を検索", "overview.previewAria": "全文を表示", "overview.previewTitle": "全文", "overview.loading": "複数スペースのリアルタイムスナップショットを同期中…", "graph.layoutAria": "グラフレイアウト", "graph.quietAction": "シンプル表示", "graph.quietHint": "グリッドと常時ラベルを非表示にします。ノード選択で隣接ノードにフォーカスし、背景クリックまたは Escape で解除します(このブラウザ内にのみ保存)。", "graph.layoutNatural": "自然レイアウト", "graph.layoutUniform": "均等レイアウト", "graph.layoutCustom": "カスタムレイアウト", "graph.layoutStatus": "レイアウト:{layout}", "graph.draggable": "{layout} · ドラッグ可能", "graph.naturalAction": "自然に展開", "graph.uniformAction": "均等配置に戻す", "graph.aria": "Mnemon リアルタイムメモリグラフ({nodes} 要素、{edges} エッジ)", "graph.aria3d": "Mnemon 3D メモリグラフ({nodes} 要素、{edges} エッジ)", "graph.viewModeAria": "グラフ次元表示", "graph.view2d": "2D", "graph.view3d": "3D", "graph.selectNodeAction": "ノードを選択", "graph.noNodeSelected": "ノード未選択", "graph.orbitAria": "3D カメラ操作", "graph.orbitHint": "3D · ドラッグで回転 · スクロールで拡大縮小", "graph.orbitShort": "3D", "graph.zoomInAction": "拡大", "graph.zoomOutAction": "縮小", "graph.resetViewAction": "視点をリセット", "graph.kindSpace": "メモリスペース", "graph.kindEntity": "エンティティ", "search.title": "メモリ検索", "search.description": "検索は保存済みエントリを返し、AI に質問は引用付きで回答します。", "search.maxResults": "最大 {count} 件", "search.placeholder": "なぜ SQLite を選んだのか?リリース規約は何があるか?", "search.queryAria": "メモリ検索クエリ", "search.categoryAria": "メモリカテゴリ", "search.strategy": "戦略", "search.modeAria": "検索モード", "search.modeSmart": "スマート検索", "search.modeKeyword": "キーワード検索", "search.modeBasic": "基本一致", "search.searching": "検索中…", "search.action": "検索", "search.agentAction": "AI に質問", "search.agentSearching": "エージェントが分析中…", "search.agentAnswer": "エージェントの回答", "search.agentAnswerHint": "以下の検索結果に基づいています", "search.startTitle": "具体的な質問から始めましょう", "search.startText": "特定のエンティティ、意思決定、時系列に絞って尋ねるほうが、データベース全体を読み込むより確実です。", "search.emptyTitle": "一致する項目がありません", "search.emptyText": "より具体的なエンティティ名、意思決定、時系列のキーワードを試してください。", "search.results": "元の検索結果", "search.related": "関連メモリ", "search.closeRelated": "関連メモリを閉じる", "search.traversing": "グラフを探索中…", "search.noRelated": "2 ホップ以内に関連ノードは見つかりませんでした。", "search.sourcesTitle": "検索対象の範囲", "entities.title": "エンティティ探索", "entities.description": "エンティティが事実、意思決定、コンテキストをどう結びつけているか確認します。", "entities.sourcesTitle": "エンティティ機能の対応範囲", "entities.unsupportedTitle": "エンティティ索引を提供する有効なスペースがありません", "entities.unsupportedText": "有効なプロバイダーは引き続き「検索」から利用できますが、存在しないエンティティグラフを擬似表示することはありません。", "entities.count": "有効なエンティティ {count} 件", "entities.nameAria": "エンティティ名", "entities.placeholder": "任意のエンティティを入力…", "entities.action": "探索", "entities.top": "主要エンティティ", "entities.frequency": "出現頻度順", "entities.filterHint": "入力して左一覧をローカル絞り込み(Esc でクリア)。", "entities.emptyRail": "エンティティ情報を含むメモリを保存すると、ここに表示されます。", "entities.filterEmpty": "ローカルに一致がありません。「探索」を押してホストに照会してください。", "entities.loading": "エンティティのメモリを読み込み中…", "entities.selectTitle": "エンティティを選択または入力", "entities.selectText": "選択するとそのエンティティを含む全メモリが表示され、「関連メモリ」で関連付けられた他のメモリも確認できます。", "entities.emptyTitle": "関連メモリがありません", "entities.emptyText": "正式名称や別のエイリアスを試してください。", "entities.railLoading": "エンティティを読み込み中…", "entities.memoriesHint": "このエンティティを含むメモリ", "entities.relatedTitle": "関連メモリ", "entities.relatedHint": "このエンティティを含まないが関連として検索されたメモリ", "entities.findRelated": "関連メモリ", "entities.hideRelated": "非表示", "entities.noCarrying": "このエンティティを含むメモリはありません。", "entities.noRelated": "その他の関連メモリはありません。", "entities.retry": "再試行", "entities.sourceReady": "エンティティ {count} 件", "entities.sourcePartial": "エンティティ {count} 件 · 一部", "readSources.status.loading": "読み込み中", "remember.title": "メモリに保存", "remember.description": "タスクエージェントが保存の要否を判断し、要約・重複除去してメモリスペースに書き込みます。", "remember.readOnlyTitle": "読み取り専用モード", "remember.readOnlyText": "このデプロイメントではメモリ書き込みが無効です。有効にするには DSH の Mnemon 設定を変更して保存してください。", "remember.candidate": "内容", "remember.placeholder": "長期的に残すべき背景、好み、意思決定、結論を入力してください。", "remember.taskAgentHint": "現在ホストは独立したタスクエージェントを作成できません。ステータスを更新して再試行してください。", "remember.processing": "タスクエージェントが処理中…", "remember.action": "保存", "remember.advanced": "詳細オプション", "remember.advancedHint": "保存先スペース、カテゴリ、重要度を指定", "remember.expand": "展開", "remember.target": "保存先メモリスペース", "remember.asyncProviderHint": "このメモリスペースはリモートの抽出処理が完了するのを待ってから、実際の書き込み結果を返します。", "remember.entities": "エンティティ(カンマ区切り)", "remember.tags": "タグ(カンマ区切り)", "remember.advancedText": "制約を指定した場合も、タスクエージェントによる重複チェックと記録生成を経由します。", "remember.saving": "タスクエージェントが処理中…", "remember.advancedAction": "オプション指定で保存", "content.title": "メモリコンテンツ", "content.description": "各メモリスペースに保存されている内容を閲覧します。", "content.sourcesTitle": "プロバイダーのデータモデル", "content.count": "メモリ {count} 件", "content.filterAria": "メモリコンテンツを絞り込む", "content.filterPlaceholder": "内容または ID で絞り込み…", "content.categoryAria": "メモリカテゴリ", "content.apply": "絞り込み", "content.notice": "クエリ専用プロバイダーは検索語を入力すると内容が表示されます。", "content.queryRequiredTitle": "クエリ専用スペースが入力待ちです", "content.queryRequiredText": "ByteRover のように全件一覧を提供しないプロバイダーを確認するには、具体的な検索語を入力してください。", "content.emptyTitle": "一致するメモリがありません", "content.emptyText": "絞り込みを解除するか、最初のメモリを保存してください。", "nav.spaces": "メモリスペース", "overview.editSpace": "編集", "overview.editSpaceAria": "{name} を編集", "overview.saveSpace": "保存", "overview.savingSpace": "保存中…", "overview.deleteSpace": "削除", "overview.deleteSpaceAria": "{name} を削除", "overview.disconnectSpace": "接続解除", "overview.disconnectSpaceAria": "{name} の接続を解除", "overview.deletingSpace": "削除中…", "common.score": "スコア {value}", "overview.providerEnableHint": "無効なプロバイダーは「プラグイン → dsh-brain-mnemon」の「メモリスペース」ページで有効にできます。", "search.citations": "引用", "overview.rediscoverAction": "再検出", "overview.rediscovering": "検出中…", "overview.rediscoverHint": "有効なプロバイダーを再スキャンします。見つかった新しいスペースは検索対象に含めずに追加されます", "overview.rediscoveryAdded": "新しいスペースを {count} 件検出しました。スイッチをオンにすると検索対象になります。", "overview.rediscoveryNone": "新しいスペースはありません。", "overview.rediscoveryDisconnected": "接続解除したスペース {count} 件は解除状態のまま保持されます。復元するには該当プロバイダーの設定を再保存してください。", "overview.rediscoveryFailed": "{provider} の検出を完了できませんでした:{error}", "overview.rediscoveryTimedOut": "{provider} の応答がタイムアウトしました。時間をおいて再度「再検出」を試してください。", "overview.rediscoveryDismiss": "了解", "overview.newSpace": "新規", "common.copyId": "ID をコピー", "common.readOnly": "読み取り専用", "common.activationOnly": "有効化切り替えのみ可能", "common.active": "有効", "common.category": "カテゴリ", "common.importanceLabel": "重要度", "common.importance": "重要度 {value}", "common.hops": "{count} ホップ", "common.allCategories": "すべてのカテゴリ", "common.memories": "メモリ {count} 件", "common.edges": "エッジ {count} 本", "card.confirmText": "このメモリを論理削除しますか?", "card.processing": "処理中…", "card.confirmForget": "忘却を確定", "card.related": "関連", "card.clone": "これを元に作成", "card.forget": "忘却", "readSources.all": "すべてのプロバイダー", "readSources.mode.search": "ネイティブ検索", "readSources.mode.graph": "実関係グラフ", "readSources.mode.projection": "コンテンツ投影", "readSources.mode.enumerable": "一覧取得可能", "readSources.mode.query-only": "クエリ専用", "readSources.mode.entities": "エンティティ索引", "readSources.mode.unsupported": "非対応", "readSources.status.ready": "{count} 件表示可能", "readSources.status.empty": "接続済み · 内容なし", "readSources.status.query-required": "検索後に読み込み", "readSources.status.unsupported": "この画面では利用不可", "readSources.status.unavailable": "接続不可", "readSources.edges": "実関係 {count} 件", "readSources.model.mnemon-native": "事実、エンティティ、型付き関係", "readSources.model.openviking": "階層構造と段階的コンテンツ", "readSources.model.honcho": "Peer 結論とプロファイル", "readSources.model.mem0": "抽出されたセマンティックメモリ", "readSources.model.hindsight": "メモリユニットと知識グラフ", "readSources.model.holographic": "信頼済み事実とエンティティ", "readSources.model.retaindb": "プロファイルと型付き事実", "readSources.model.byterover": "ナレッジツリー検索", "readSources.model.supermemory": "メモリと取り込み済みドキュメント", "common.inactive": "無効", "config.providerSecretShow": "認証情報を表示", "config.providerSecretHide": "認証情報を隠す", "config.providerSecretStoredValue": "保存済みの認証情報", "config.providersSpacesOffTitle": "メモリスペースはオフです", "config.providersSpacesOffDetail": "保存済みの接続設定は保持されます", "config.providersSpacesOn": "「メモリスペース」をオンにする", "config.providersReadOnlyTitle": "dsh-brain-mnemon は読み取り専用です", "config.providersReadOnlyDetail": "writeEnabled が false のときはプロバイダーを切り替えられません。", "spaces.offNote": "オンにするとプロバイダーと埋め込みを設定できます", "config.providersTitle": "メモリプロバイダー", "config.providersDescription": "プロバイダーはメモリスペースを格納します。有効化や保存で既存スペースが同期され、オフにしてもローカルのマッピングのみ削除されサードパーティのデータは消えません。", "config.nativeSummary": "完全な関係グラフを備えた公式ネイティブ長期メモリ", "config.officialNative": "公式ネイティブ", "config.nativeCliMissing": "CLI 未インストール(任意)", "config.embeddingTitle": "ローカルベクトル埋め込み", "config.embeddingDescription": "Mnemon CLI に埋め込みエンドポイントとモデルを注入します(末尾が /v1 なら OpenAI 互換、それ以外は Ollama)。", "config.embeddingManaged": "DSH で埋め込み設定を管理", "config.embeddingManagedHint": "オンにすると保存値で Mnemon 子プロセスの環境変数を上書きします。オフの場合はホスト環境と Mnemon の組み込みデフォルトを維持します。", "config.embeddingEndpoint": "埋め込みエンドポイント", "config.embeddingModel": "埋め込みモデル", "config.embeddingApiKey": "API キー(任意、OpenAI 互換サーバー向け)", "config.embeddingApiKeyInvalid": "API キーには制御文字を含められず、長さは 2048 文字以下にしてください。", "config.embeddingProtocol": "プロトコル", "config.embeddingProtocolAuto": "自動(/v1 で判定)", "config.embeddingProtocolOllama": "Ollama", "config.embeddingProtocolOpenai": "OpenAI 互換", "config.embeddingProtocolInvalid": "プロトコルは 自動 / Ollama / OpenAI 互換 のいずれかにしてください。", "config.embeddingEndpointInvalid": "埋め込みエンドポイントは、認証情報・クエリ・フラグメントを含まない HTTP(S) 絶対 URL にしてください。", "config.embeddingModelInvalid": "埋め込みモデル名は制御文字を含まない 1〜200 文字で指定してください。", "config.embeddingSecurity": "メモリ本文と検索クエリがこのエンドポイントへ送信されます。キーは DSH 認証情報ストアに保管されます(リモート時は HTTPS を推奨)。", "config.embeddingTest": "ステータス確認", "config.embeddingNotTested": "埋め込み接続と各 Mnemon Native スペースのカバー率はまだ確認されていません。", "config.embeddingTesting": "Mnemon 経由で埋め込みサーバーとカバー率を確認中…", "config.embeddingSaveBeforeTest": "実際の稼働値をテストする前に、埋め込み設定を保存してください。", "config.embeddingTestUnavailable": "この DSH ホストは埋め込みステータス確認に対応していません。", "config.embeddingCliMissing": "テストには Mnemon CLI が必要です。これらの埋め込み設定は Mnemon Native のみに適用されます。", "config.embeddingStatusAvailable": "埋め込みモデル利用可能 · {model} · {embedded}/{total} 埋め込み済み({coverage})", "config.embeddingStatusAvailableWithProtocol": "埋め込みモデル利用可能 · {model} · プロトコル {protocol} · {embedded}/{total} 埋め込み済み({coverage})", "config.embeddingStatusUnavailable": "埋め込みモデル利用不可 · {model} · {embedded}/{total} 埋め込み済み({coverage})", "config.embeddingStatusUnavailableWithProtocol": "埋め込みモデル利用不可 · {model} · プロトコル {protocol} · {embedded}/{total} 埋め込み済み({coverage})", "config.embeddingStatusFailed": "埋め込みステータスの確認に失敗しました:{error}", "config.embeddingSpaces": "各 Mnemon Native スペース", "config.embeddingSpaceCounts": "{embedded}/{total} 埋め込み済み({coverage})", "config.embeddingSpaceFailed": "読み取り不可:{error}", "config.embeddingMissing": "ベクトルのないメモリはセマンティック検索の対象外です。", "config.embeddingMissingFill": "ベクトルのないメモリはセマンティック検索の対象外です。スペース横の「補完」で不足ベクトルを生成できます。", "config.embeddingMissingOffline": "ベクトルのないメモリはセマンティック検索の対象外です。埋め込みサービスが応答するようになればここから補完できます。", "config.embeddingSpacesUnread": "読み取れなかったスペースは合計から除外されています。", "config.embeddingFill": "補完", "config.embeddingFilling": "補完中…", "config.embeddingFillLabel": "「{name}」のベクトルを補完", "config.embeddingFillingLabel": "「{name}」のベクトルを補完中", "config.embeddingFillDone": "「{name}」に {filled} 件のベクトルを補完しました。", "config.embeddingFillMore": "「{name}」に {filled} 件のベクトルを補完しました(残り {remaining} 件)。続けるには再度「補完」を押してください。", "config.embeddingFillPartly": "「{name}」に {filled} 件のベクトルを補完しましたが、残り {remaining} 件は埋め込みサービスから返されませんでした。時間をおいて再度「補完」を試してください。", "config.embeddingFillRefused": "埋め込みサービスが「{name}」のベクトルを返しませんでした。サービスが稼働しておりモデル {model} を提供しているか確認してください。", "config.embeddingFillFailed": "「{name}」のベクトルを補完できませんでした:{error}", "config.providerGlobalLocation": "グローバルデータ保存先", "config.providerGlobalLocationHint": "{provider} はデフォルトでグローバル範囲のディレクトリを使用しますが、カスタム場所も指定できます。", "config.providerGlobalLocationWorkspaceHint": "現在はワークスペースのデフォルトが使用されています。カスタム場所を指定するにはグローバルに切り替えてください。", "config.providerDefaultLocation": "デフォルト(範囲に従う)", "config.providerSaveFailed": "設定を保存できませんでした:{error}", "config.providerServiceTitle": "サービス設定", "config.providerServiceHint": "このプロバイダーの全メモリスペースで共有されます。有効化や保存を行うとディレクトリマッピングとメタ情報が更新されます。", "config.providerEnableHint": "サービス設定を入力して保存すると、プロバイダーが有効になり可視な全ネームスペースが同期されます。", "config.providerEnabled": "有効", "config.providerDisabled": "無効", "config.providerDisabledConfigured": "オフ · 設定保持中", "config.providerNeedsConfiguration": "設定が必要", "config.providerToggleAria": "{provider} を有効にする", "config.providerToggleFailed": "プロバイダー状態を変更できませんでした:{error}", "config.enableProvider": "保存して有効化", "config.providerServiceSaved": "サービス設定を保存し、メモリスペースを同期しました", "config.saveProviderService": "保存", "config.providerUnavailable": "この DSH ホストはプロバイダーサービス設定に対応していません。", "config.saveScopeBeforeProviders": "保存範囲に未保存の変更があります。対象ディレクトリのプロバイダーを設定する前に保存範囲を保存してください。", "config.providerTargetWorkspace": "現在のワークスペース:{workspace}。「ワークスペース」と付いたプロバイダーの設定とメモリスペースはこの範囲を使用します。", "config.loadingProviders": "プロバイダー設定を読み込み中…", "config.providerLoadFailed": "プロバイダー設定を読み込めませんでした:{error}", "config.retryProviders": "再試行", "config.saving": "保存中…", "config.embeddingApiKeyEnv": "API キーの環境変数名(任意)", "config.embeddingEnvInvalid": "MY_EMBEDDING_API_KEY のような有効なホスト環境変数名を入力してください。", "config.embeddingAuthChoice": "API キーか環境変数名のどちらか一方のみを指定してください。", "config.embeddingKeyPlaceholder": "既存のキーを保持する場合は空欄のまま", "config.embeddingCredentialSaved": "DSH 認証情報参照が保存されています。キー自体はこのページに返送されません。", "config.embeddingClearKey": "この接続のキーと環境変数参照を削除", "config.embeddingMigrateKey": "既存の平文キーを DSH 認証情報ストアへ移行", "config.embeddingUpgradeHost": "認証情報を管理するには dsh-brain-mnemon Starter をアップグレードしてください。既存の接続は引き続き動作しますが、ここでは新しいキーを入力できません。", "overview.openProvidersSettings": "プロバイダーを設定", "config.policyTitle": "スペースポリシー", "config.policyDescription": "タスクエージェントが新しいメモリスペースを作成する際のデフォルトプロバイダー配置ルール。手動作成時は常に明示的に指定します。", "config.policyConnectionIncomplete": "選択したプロバイダーの必須接続項目を入力してください。", "config.policyCandidatesEmpty": "少なくとも 1 つの候補プロバイダーを選択してください。", "config.policyBoundaryMismatch": "データ境界が「ローカルのみ」のときはリモート候補プロバイダーを選択できません。", "config.policyPromptInvalid": "戦略プロンプトは 4000 文字以内にしてください。", "config.recallTitle": "検索とタイムアウト", "config.recallDescription": "1 回の検索で返す件数上限、品質フィルタポリシー、プロバイダー呼び出しタイムアウトを設定します。", "config.providersBadge": "{enabled}/{total} 有効", "config.recallBadge": "{limit} 件 · {policy}", "config.recallPolicyShort.strict-v1": "厳格", "config.recallPolicyShort.balanced-v1": "バランス", "config.recallPolicyShort.exhaustive-v1": "網羅", "config.defaultRecallLimit": "デフォルト検索件数上限", "config.defaultRecallLimitHint": "1 回の検索で返す最大メモリ件数(1〜50、デフォルト 10)。", "config.defaultRecallLimitInvalid": "デフォルト検索件数上限は 1〜50 の整数で指定してください。", "config.recallQualityPolicy": "検索品質ポリシー", "config.recallPolicy.strict-v1": "厳格(strict-v1)", "config.recallPolicy.strict-v1.detail": "デフォルトポリシー。低スコアの候補を除外し、中程度または未校正の結果件数を制限します。", "config.recallPolicy.balanced-v1": "バランス(balanced-v1)", "config.recallPolicy.balanced-v1.detail": "高関連・中関連の候補を優先し、枠に余裕があれば低スコアの正の一致も保持します。", "config.recallPolicy.exhaustive-v1": "網羅(exhaustive-v1)", "config.recallPolicy.exhaustive-v1.detail": "上限に達するまで有効な候補をすべて保持します。", "config.timeoutMs": "操作タイムアウト(ms)", "config.timeoutMsHint": "1 回のプロバイダーまたは CLI 呼び出しの最大待機時間(100〜120000 ms、デフォルト 10000)。", "config.timeoutMsInvalid": "操作タイムアウトは 100〜120000 ms の整数で指定してください。" }, es: { "term.space": "Espacio de memoria", "term.spaces": "Espacios de memoria", "category.decision": "Decisión", "category.preference": "Preferencia", "category.fact": "Hecho", "category.insight": "Hallazgo", "category.context": "Contexto", "category.general": "General", "nav.memory.aria": "Páginas de Espacios de memoria", "nav.overview": "Resumen", "nav.search": "Recuperación", "nav.entities": "Entidades", "nav.rememberAction": "Guardar en memoria", "nav.content": "Contenido", "overview.description": "Memoria a largo plazo gestionada por Mnemon Native o Proveedores de terceros; los espacios activos participan en la recuperación.", "overview.pageDescription": "Gestiona Espacios de memoria e inspecciona el estado de los proveedores y las instantáneas en vivo.", "overview.fullSyncPending": "Esperando la primera sincronización completa", "overview.fullSyncJustNow": "Última sincronización completa: ahora mismo", "overview.fullSyncSeconds": "Última sincronización completa: hace {count} s", "overview.fullSyncMinutes": "Última sincronización completa: hace {count} min", "overview.fullSyncHours": "Última sincronización completa: hace {count} h", "overview.fullSyncDays": "Última sincronización completa: hace {count} d", "overview.directory": "Directorio de Espacios de memoria", "overview.directory.description": "Haz clic en una tarjeta para comprobar la conexión; activa el interruptor para incluirlo en la recuperación.", "overview.directory.unsynced": "Directorio sin sincronizar", "overview.directory.unsyncedBadge": "Directorio pendiente", "overview.directoryLoading": "Cargando el directorio de Espacios de memoria", "overview.healthLoading": "Comprobando estado de Espacios de memoria", "overview.storageHealthy": "Almacenamiento correcto", "overview.storageUnhealthy": "Almacenamiento no disponible", "overview.storageChecking": "Comprobando", "overview.reconnecting": "Reconectando", "overview.reconnectHint": "Haz clic en la tarjeta para reconectar y sincronizar este Espacio de memoria", "overview.reconnectAria": "Reconectar {name}", "overview.snapshotLoading": "Cargando la instantánea en vivo multiespacio", "overview.metadataAction": "Ordenar", "overview.metadataTitle": "Mantener metadatos de Espacios de memoria con IA", "overview.metadataDescription": "Toma muestras de cada espacio por su ruta nativa más rápida y genera títulos y descripciones.", "overview.metadataUnavailable": "Temporalmente no disponible: ningún Agente activo coincide con el ámbito de memoria actual", "overview.metadataLoading": "Cargando Espacios de memoria mantenibles…", "overview.metadataEmpty": "No hay Espacios de memoria activos cuyos metadatos pueda mantener la IA.", "overview.metadataSelected": "{count} Espacios de memoria seleccionados", "overview.metadataSelectAll": "Seleccionar todo", "overview.metadataClear": "Limpiar", "overview.metadataSafety": "Solo actualiza títulos y descripciones locales; las memorias guardadas permanecen intactas.", "overview.metadataGenerate": "Generar con IA ({count})", "overview.metadataRunningCount": "{count} en curso", "overview.metadataTaskRunning": "Generando…", "overview.metadataTaskSuccess": "Actualizado", "overview.metadataTaskError": "Error: {error}", "overview.metadataTaskUnknown": "Error desconocido", "overview.mnemonDefault": "Mnemon predeterminado", "overview.toggleAria": "Interruptor de lectura de {name}", "overview.toggling": "Cambiando", "overview.noDescription": "Aún sin descripción de enrutamiento.", "overview.unsyncedTitle": "El directorio de Espacios de memoria no está sincronizado", "overview.unsyncedShort": "El cliente Web y el Host de DSH usan contratos diferentes. Reinicia el Host para registrar los Stores existentes.", "overview.unsyncedLong": "El Host sigue usando el contrato de plugin anterior. Reinicia DSH para redescubrir los Stores existentes; no se eliminará ningún archivo .db.", "overview.emptyTitle": "Aún no hay Espacios de memoria", "overview.emptyShort": "Crea el primer espacio y sintetiza en él contexto duradero.", "overview.emptyLong": "Crea un Espacio de memoria de Mnemon o habilita un proveedor de terceros en la página de dsh-brain-mnemon dentro de Plugins para sincronizar sus espacios existentes.", "overview.noActiveTitle": "No hay Espacios de memoria activos", "overview.noActiveText": "Activa el acceso de lectura en al menos un espacio para agregar su grafo en vivo aquí.", "overview.noContentTitle": "Los espacios activos aún no tienen contenido", "overview.noContentText": "Guarda memorias para ver aquí sus nodos y relaciones.", "overview.newAction": "Nuevo", "overview.createTitle": "Crear Espacio de memoria", "overview.createDialogHint": "Define el espacio y elige un Proveedor; las credenciales y rutas siguen los ajustes.", "overview.createIdentityTitle": "Detalles del Espacio de memoria", "overview.createIdentityHint": "El nombre identifica el espacio; la descripción guía cuándo escribe y recupera el agente.", "overview.createPlacementTitle": "Proveedor del Espacio de memoria", "overview.createPlacementHint": "Creación manual explícita vinculada al Proveedor habilitado seleccionado.", "overview.createName": "Nombre del nuevo Espacio de memoria", "overview.createNamePlaceholder": "Nombre", "overview.createDescription": "Descripción del nuevo Espacio de memoria", "overview.createDescriptionPlaceholder": "Describe qué corresponde guardar aquí y cuándo debe recuperarse", "overview.placementMode": "Selección de motor", "overview.placementManual": "Elegir manualmente", "overview.placementAutomatic": "Selección inteligente", "overview.recommended": "Recomendado", "overview.placementPolicy": "Política de selección", "overview.placementPolicyHint": "El Host aplica las reglas obligatorias. El prompt solo orienta el criterio entre candidatos elegibles.", "overview.placementPrompt": "Prompt de estrategia (opcional)", "overview.placementPromptPlaceholder": "Por ejemplo: Esto es conocimiento colaborativo. Prefiere almacenamiento local cuando se requieran escrituras exactas; si no, prefiere compartido.", "overview.dataBoundary": "Límite de datos", "overview.dataBoundaryRemote": "Servicios remotos permitidos", "overview.dataBoundaryLocal": "Solo local", "overview.preference": "Preferencia flexible", "overview.preferenceBalanced": "Equilibrada", "overview.preferenceLocal": "Local primero", "overview.preferenceShared": "Compartido primero", "overview.requiredCapabilities": "Capacidades requeridas (selección múltiple)", "overview.capability.graph": "Grafo de relaciones", "overview.capability.exact-write": "Escrituras exactas", "overview.capability.forget": "Olvido seguro", "overview.candidateNativeReady": "Nativo oficial · sigue el ámbito de memoria activo", "overview.providerServiceRequired": "Desactivado", "overview.nativeCliRequired": "Requiere Mnemon CLI en este equipo; otros proveedores funcionan sin él", "overview.workspaceBinding.automatic": "Sigue el ámbito de memoria activo", "overview.workspaceBinding.optional-override": "Sigue el ámbito activo; la ubicación global se puede personalizar", "overview.workspaceBinding.provider-global": "Usa siempre el ámbito global", "overview.candidateLocal": "Proveedor local · sigue el ámbito de memoria activo", "overview.candidateRemote": "Proveedor remoto · usa la configuración global del servicio", "overview.placementByLlm": "Seleccionado por Agente", "overview.placementByRules": "Seleccionado por reglas", "overview.placementConfidence": "Confianza: {confidence}", "overview.confidence.high": "Alta", "overview.confidence.medium": "Media", "overview.confidence.low": "Baja", "overview.providerLabel": "Motor de memoria", "overview.nativeOfficial": "Nativo oficial", "strategy.action": "Política de espacios", "strategy.title": "Política de espacios", "strategy.description": "Cómo eligen un Proveedor los Agentes de tareas al crear un nuevo Espacio de memoria.", "strategy.loading": "Cargando directorio de Proveedores…", "strategy.modeTitle": "Selección de Proveedor", "strategy.modeHint": "Solo se aplica a espacios creados por Agentes; la creación manual siempre es explícita.", "strategy.manualHint": "Fija un único Proveedor; el Agente no puede cambiarlo", "strategy.automaticHint": "Aplica primero reglas estrictas y luego deja que el Agente de tareas elija un Proveedor elegible", "strategy.manualTitle": "Proveedor fijo", "strategy.manualDescription": "Cuando ningún espacio existente encaje, el nuevo espacio se crea en este Proveedor.", "strategy.automaticTitle": "Reglas de selección inteligente", "strategy.automaticDescription": "Las reglas de límite y capacidades son obligatorias; el prompt orienta los empates.", "strategy.save": "Guardar", "strategy.saving": "Guardando…", "overview.providerSummary.mnemon-native": "Almacenamiento nativo oficial, local primero, con grafo completo y semántica de eliminación lógica", "overview.providerSummary.openviking": "Memoria compartida en formato de sistema de archivos con escrituras exactas verificadas y recuperación semántica", "overview.providerSummary.honcho": "Modelado de usuario entre sesiones, perfiles de Peer, razonamiento dialéctico y conclusiones persistentes", "overview.providerSummary.mem0": "Extracción automática de hechos, recuperación semántica, reordenación y deduplicación", "overview.providerSummary.hindsight": "Memoria de grafo de conocimiento con resolución de entidades, recuperación multiestrategia y reflexión", "overview.providerSummary.holographic": "Memoria local de hechos estructurados con puntuación de confianza, resolución de entidades y recuperación composicional", "overview.providerSummary.retaindb": "Recuperación híbrida vectorial/BM25 en la nube, perfiles de usuario y hechos duraderos tipados", "overview.providerSummary.byterover": "Árbol de conocimiento jerárquico local primero accesible mediante el brv CLI", "overview.providerSummary.supermemory": "Memoria semántica, perfiles persistentes, ingesta de conversaciones y recuperación multicontenedor", "overview.providerEndpoint": "Endpoint del servicio", "overview.providerTargetUri": "URI del ámbito de memoria", "overview.providerApiKey": "Clave de API", "overview.providerApiKeyOptional": "Déjalo en blanco si la autenticación está desactivada", "overview.providerApiKeyKeep": "Guardada; déjalo en blanco para mantenerla sin cambios", "overview.providerAccount": "Cuenta", "overview.providerDiscoveryUser": "Propietario de clave de usuario (omitir admin)", "overview.providerUser": "Usuario", "overview.providerActorPeer": "Actor Peer", "overview.providerField.workspace": "Espacio de trabajo", "overview.providerField.userId": "ID de usuario", "overview.providerField.agentId": "ID de Agente", "overview.providerField.mode": "Modo", "overview.providerField.rerank": "Reordenar resultados de búsqueda", "overview.providerField.bankId": "Banco de memoria", "overview.providerField.budget": "Presupuesto de recuperación", "overview.providerField.dataPath": "Ruta del almacén de hechos", "overview.providerField.defaultDirectory": "Directorio de conocimiento predeterminado", "overview.providerField.defaultTrust": "Confianza predeterminada", "overview.providerField.minTrust": "Confianza mínima de recuperación", "overview.providerField.project": "Proyecto", "overview.providerField.cliPath": "Ejecutable brv", "overview.providerField.workingDirectory": "Directorio de conocimiento", "overview.providerField.containerTag": "Etiqueta de contenedor", "overview.providerField.searchMode": "Modo de búsqueda", "overview.providerOption.platform": "Mem0 Platform", "overview.providerOption.self-hosted": "Servidor autoalojado", "overview.providerOption.low": "Bajo", "overview.providerOption.mid": "Medio", "overview.providerOption.high": "Alto", "overview.providerOption.hybrid": "Híbrido", "overview.providerOption.memories": "Memorias", "overview.providerOption.documents": "Documentos", "overview.providerKindLocal": "Motor local", "overview.providerKindRemote": "Servicio remoto", "overview.providerSecretClear": "Borrar la credencial guardada", "overview.providerWriteExact": "Escrituras exactas", "overview.providerWriteAsync": "Extracción semántica asíncrona", "overview.providerGraphReady": "Grafo de relaciones disponible", "overview.providerSearchReady": "Búsqueda unificada disponible", "overview.providerRemote": "Memoria remota de terceros", "overview.providerLocal": "Memoria local de terceros", "overview.creating": "Creando…", "overview.createAction": "Crear", "overview.editName": "Nombre", "overview.editDescription": "Descripción de enrutamiento", "overview.deleteTitle": "¿Eliminar «{name}»?", "overview.deleteWarning": "Esto elimina permanentemente el Espacio de memoria y todas las memorias y relaciones que contiene. No se puede deshacer.", "overview.lastStoreDeleteHint": "Mnemon debe conservar al menos un Store nativo. El último Espacio de memoria puede estar inactivo, pero no se puede eliminar.", "overview.deleteAction": "Eliminar permanentemente", "overview.disconnectTitle": "¿Desconectar «{name}»?", "overview.disconnectWarning": "Esto solo quita la conexión de {provider} del directorio de Espacios de memoria de DSH. Las memorias del motor subyacente permanecen intactas.", "overview.disconnectAction": "Desconectar", "overview.snapshot": "Instantánea en vivo multiespacio", "overview.snapshotSources": "Observabilidad de la instantánea", "overview.snapshotSourcesHint": "Los grafos de relaciones, las proyecciones y los espacios de solo consulta permanecen diferenciados.", "overview.noVisualTitle": "Los espacios activos son de solo consulta", "overview.noVisualText": "Estos proveedores no exponen contenido enumerable ni grafo. Abre Recuperación y formula una pregunta concreta.", "overview.waitingSnapshot": "Esperando la primera instantánea", "overview.updatedAt": "Actualizado a las {time}", "overview.edgeScope": "Ámbito del espacio", "overview.edgeTemporal": "Temporal", "overview.edgeSemantic": "Semántica", "overview.edgeCausal": "Causal", "overview.edgeEntity": "Relación de entidad", "overview.graphComposition": "{spaces} espacios · {memories} memorias · {entities} entidades", "overview.graphCount": "Mostrando {visible} / {total} elementos", "overview.graphEdges": "{count} aristas del grafo", "overview.inspector": "Detalles de la memoria", "overview.inspectorSpace": "Detalles del Espacio de memoria", "overview.inspectorEntity": "Detalles de la entidad", "overview.selectNode": "Selecciona un elemento del grafo", "overview.selectNodeText": "Inspecciona el contexto exacto de un Espacio de memoria, una entidad o una memoria.", "overview.closeInspector": "Cerrar detalles del nodo", "overview.memoryId": "ID de memoria", "overview.spaceId": "ID de Espacio de memoria", "overview.containedMemories": "Memorias contenidas", "overview.entityMentions": "Menciones indexadas", "overview.exploreNode": "Recuperar", "overview.previewAria": "Ver contenido completo", "overview.previewTitle": "Contenido completo", "overview.loading": "Sincronizando la instantánea en vivo multiespacio…", "graph.layoutAria": "Disposición del grafo", "graph.quietAction": "Vista limpia", "graph.quietHint": "Oculta la cuadrícula y las etiquetas fijas; selecciona un nodo para destacar sus vecinos y haz clic en el fondo o pulsa Escape para limpiar. Se guarda solo en este navegador.", "graph.layoutNatural": "Disposición natural", "graph.layoutUniform": "Disposición uniforme", "graph.layoutCustom": "Disposición personalizada", "graph.layoutStatus": "Disposición: {layout}", "graph.draggable": "{layout} · arrastrable", "graph.naturalAction": "Distribución natural", "graph.uniformAction": "Restablecer uniforme", "graph.aria": "Grafo de memoria en vivo de Mnemon con {nodes} elementos y {edges} aristas", "graph.aria3d": "Grafo de memoria 3D de Mnemon con {nodes} elementos y {edges} aristas", "graph.viewModeAria": "Vista de dimensión del grafo", "graph.view2d": "2D", "graph.view3d": "3D", "graph.selectNodeAction": "Seleccionar nodo", "graph.noNodeSelected": "Ningún nodo seleccionado", "graph.orbitAria": "Controles de cámara 3D", "graph.orbitHint": "3D · arrastra para orbitar · rueda para hacer zoom", "graph.orbitShort": "3D", "graph.zoomInAction": "Acercar", "graph.zoomOutAction": "Alejar", "graph.resetViewAction": "Restablecer vista", "graph.kindSpace": "Espacio de memoria", "graph.kindEntity": "Entidad", "search.title": "Recuperar memoria", "search.description": "Buscar devuelve entradas almacenadas; Preguntar a la IA responde con citas.", "search.maxResults": "Hasta {count} resultados", "search.placeholder": "¿Por qué elegimos SQLite? ¿Qué convenciones de publicación se aplican?", "search.queryAria": "Consulta de memoria", "search.categoryAria": "Categoría de memoria", "search.strategy": "Estrategia", "search.modeAria": "Modo de recuperación", "search.modeSmart": "Recuperación inteligente", "search.modeKeyword": "Búsqueda por palabras clave", "search.modeBasic": "Coincidencia básica", "search.searching": "Recuperando…", "search.action": "Buscar", "search.agentAction": "Preguntar a la IA", "search.agentSearching": "Agente analizando…", "search.agentAnswer": "Respuesta del Agente", "search.agentAnswerHint": "Basada en la evidencia recuperada abajo", "search.startTitle": "Empieza con una pregunta concreta", "search.startText": "Centrarse en una entidad, decisión o cronología es más fiable que cargar toda la base de datos.", "search.emptyTitle": "Sin coincidencias", "search.emptyText": "Prueba con una palabra clave más específica de entidad, decisión o cronología.", "search.results": "Evidencia recuperada sin procesar", "search.related": "Memorias relacionadas", "search.closeRelated": "Cerrar memorias relacionadas", "search.traversing": "Recorriendo el grafo…", "search.noRelated": "No se encontraron nodos relacionados en dos saltos.", "search.sourcesTitle": "Cobertura de búsqueda", "entities.title": "Explorador de entidades", "entities.description": "Observa cómo conectan las entidades los hechos, las decisiones y el contexto.", "entities.sourcesTitle": "Cobertura de capacidad de entidades", "entities.unsupportedTitle": "Ningún espacio activo expone un índice de entidades", "entities.unsupportedText": "Los proveedores activos siguen admitiendo búsquedas mediante Recuperación, pero aquí no se muestran como un grafo de entidades ficticio.", "entities.count": "{count} entidades activas", "entities.nameAria": "Nombre de la entidad", "entities.placeholder": "Introduce cualquier entidad…", "entities.action": "Explorar", "entities.top": "Entidades frecuentes", "entities.frequency": "Por frecuencia", "entities.filterHint": "Escribe para filtrar la lista localmente (Esc para limpiar).", "entities.emptyRail": "Las entidades aparecen aquí cuando se guardan memorias con metadatos de entidad.", "entities.filterEmpty": "Sin coincidencias locales. Pulsa Explorar para consultar al Host.", "entities.loading": "Leyendo memorias de la entidad…", "entities.selectTitle": "Selecciona o introduce una entidad", "entities.selectText": "Al seleccionar una se listan todas las memorias que la contienen; Memorias relacionadas añade otras vinculadas por recuperación.", "entities.emptyTitle": "Sin memorias relacionadas", "entities.emptyText": "Prueba con el nombre completo u otro alias de la entidad.", "entities.railLoading": "Leyendo entidades…", "entities.memoriesHint": "Memorias que contienen esta entidad", "entities.relatedTitle": "Memorias relacionadas", "entities.relatedHint": "Recuperadas como relacionadas, sin esta entidad", "entities.findRelated": "Memorias relacionadas", "entities.hideRelated": "Ocultar", "entities.noCarrying": "Ninguna memoria contiene esta entidad.", "entities.noRelated": "No hay otras memorias relacionadas.", "entities.retry": "Reintentar", "entities.sourceReady": "{count} entidades", "entities.sourcePartial": "{count} entidades · parcial", "readSources.status.loading": "Leyendo", "remember.title": "Guardar en memoria", "remember.description": "El Agente de tareas decide si guardar, luego sintetiza y escribe en un Espacio de memoria.", "remember.readOnlyTitle": "Modo de solo lectura", "remember.readOnlyText": "Esta implementación desactiva las escrituras de memoria. Cambia y guarda la configuración de Mnemon en DSH para habilitarlas.", "remember.candidate": "Contenido", "remember.placeholder": "Contexto, preferencias, decisiones o conclusiones que vale la pena conservar.", "remember.taskAgentHint": "El Host no puede crear un Agente de tareas aislado en este momento. Actualiza el estado e inténtalo de nuevo.", "remember.processing": "Agente de tareas trabajando…", "remember.action": "Guardar", "remember.advanced": "Opciones avanzadas", "remember.advancedHint": "Elige el espacio de destino, la categoría y la importancia", "remember.expand": "Expandir", "remember.target": "Espacio de memoria de destino", "remember.asyncProviderHint": "Este Espacio de memoria espera a que finalice la extracción remota antes de devolver un recibo de escritura real.", "remember.entities": "Entidades (separadas por comas)", "remember.tags": "Etiquetas (separadas por comas)", "remember.advancedText": "Las restricciones siguen pasando por la comprobación de duplicados y el recibo del Agente de tareas.", "remember.saving": "Agente de tareas trabajando…", "remember.advancedAction": "Guardar con opciones", "content.title": "Contenido de memoria", "content.description": "Explora lo que guarda cada Espacio de memoria.", "content.sourcesTitle": "Modelos de contenido del Proveedor", "content.count": "{count} memorias", "content.filterAria": "Filtrar contenido de memoria", "content.filterPlaceholder": "Filtrar contenido o ID…", "content.categoryAria": "Categoría de memoria", "content.apply": "Filtrar", "content.notice": "Los Proveedores de solo consulta muestran contenido cuando introduces una consulta.", "content.queryRequiredTitle": "Los espacios de solo consulta están esperando", "content.queryRequiredText": "Introduce una consulta concreta para inspeccionar proveedores como ByteRover que no exponen una lista completa.", "content.emptyTitle": "Sin memorias coincidentes", "content.emptyText": "Limpia los filtros o guarda una primera memoria.", "nav.spaces": "Espacios de memoria", "overview.editSpace": "Editar", "overview.editSpaceAria": "Editar {name}", "overview.saveSpace": "Guardar", "overview.savingSpace": "Guardando…", "overview.deleteSpace": "Eliminar", "overview.deleteSpaceAria": "Eliminar {name}", "overview.disconnectSpace": "Desconectar", "overview.disconnectSpaceAria": "Desconectar {name}", "overview.deletingSpace": "Eliminando…", "common.score": "Puntuación {value}", "overview.providerEnableHint": "Activa más Proveedores en la página de Espacios de memoria en Plugins → dsh-brain-mnemon.", "search.citations": "Citas", "overview.rediscoverAction": "Redescubrir", "overview.rediscovering": "Redescubriendo…", "overview.rediscoverHint": "Consulta de nuevo a los Proveedores habilitados; los nuevos espacios se añaden sin unirse a la recuperación", "overview.rediscoveryAdded": "Nuevos espacios encontrados: {count}. Se unirán a la recuperación cuando los actives.", "overview.rediscoveryNone": "No hay espacios nuevos.", "overview.rediscoveryDisconnected": "Los espacios que desconectaste siguen desconectados: {count}. Guarda de nuevo los ajustes del Proveedor para recuperarlos.", "overview.rediscoveryFailed": "{provider} no pudo completar el descubrimiento: {error}", "overview.rediscoveryTimedOut": "{provider} no respondió a tiempo; vuelve a probar Redescubrir más tarde.", "overview.rediscoveryDismiss": "Descartar", "overview.newSpace": "Nuevo", "common.copyId": "Copiar ID", "common.readOnly": "Solo lectura", "common.activationOnly": "Solo control de activación", "common.active": "Activo", "common.category": "Categoría", "common.importanceLabel": "Importancia", "common.importance": "Importancia {value}", "common.hops": "{count} saltos", "common.allCategories": "Todas las categorías", "common.memories": "{count} memorias", "common.edges": "{count} aristas", "card.confirmText": "¿Eliminar lógicamente esta memoria?", "card.processing": "Procesando…", "card.confirmForget": "Confirmar olvido", "card.related": "Relacionadas", "card.clone": "Crear a partir de esto", "card.forget": "Olvidar", "readSources.all": "Todos los proveedores", "readSources.mode.search": "Búsqueda nativa", "readSources.mode.graph": "Grafo de relaciones real", "readSources.mode.projection": "Proyección de contenido", "readSources.mode.enumerable": "Contenido enumerable", "readSources.mode.query-only": "Solo consulta", "readSources.mode.entities": "Índice de entidades", "readSources.mode.unsupported": "No compatible", "readSources.status.ready": "{count} observables", "readSources.status.empty": "Conectado · sin contenido", "readSources.status.query-required": "Leer tras una consulta", "readSources.status.unsupported": "No disponible en esta superficie", "readSources.status.unavailable": "Conexión no disponible", "readSources.edges": "{count} relaciones reales", "readSources.model.mnemon-native": "Hechos, entidades y relaciones tipadas", "readSources.model.openviking": "Jerarquía y contenido por niveles", "readSources.model.honcho": "Conclusiones y perfiles de Peer", "readSources.model.mem0": "Memorias semánticas extraídas", "readSources.model.hindsight": "Unidades de memoria y grafo de conocimiento", "readSources.model.holographic": "Hechos confiables y entidades", "readSources.model.retaindb": "Perfiles y hechos tipados", "readSources.model.byterover": "Consultas de árbol de conocimiento", "readSources.model.supermemory": "Memorias y documentos ingeridos", "common.inactive": "Inactivo", "config.providerSecretShow": "Mostrar credencial", "config.providerSecretHide": "Ocultar credencial", "config.providerSecretStoredValue": "Credencial guardada", "config.providersSpacesOffTitle": "Espacios de memoria está desactivado", "config.providersSpacesOffDetail": "Se conservan las conexiones guardadas", "config.providersSpacesOn": "Activar «Espacios de memoria»", "config.providersReadOnlyTitle": "dsh-brain-mnemon está en solo lectura", "config.providersReadOnlyDetail": "Con writeEnabled en false, no se pueden activar ni desactivar Proveedores.", "spaces.offNote": "Actívalo para configurar Proveedores y embeddings", "config.providersTitle": "Proveedores de memoria", "config.providersDescription": "Los Proveedores almacenan espacios de memoria. Habilitar o guardar uno sincroniza sus espacios existentes; desactivarlo solo elimina el mapeo local, nunca datos de terceros.", "config.nativeSummary": "Memoria nativa oficial a largo plazo con grafo de relaciones completo", "config.officialNative": "Nativo oficial", "config.nativeCliMissing": "CLI no instalado (opcional)", "config.embeddingTitle": "Embeddings vectoriales locales", "config.embeddingDescription": "Inyecta el endpoint y el modelo de embeddings en Mnemon CLI (/v1 usa protocolo compatible con OpenAI; el resto usa Ollama).", "config.embeddingManaged": "Gestionar ajustes de embeddings en DSH", "config.embeddingManagedHint": "Al activarlo, los valores guardados sustituyen el entorno del proceso hijo de Mnemon. Al desactivarlo, Mnemon conserva el entorno del Host y sus valores predeterminados.", "config.embeddingEndpoint": "Endpoint de embeddings", "config.embeddingModel": "Modelo de embeddings", "config.embeddingApiKey": "Clave de API (opcional, servidores compatibles con OpenAI)", "config.embeddingApiKeyInvalid": "La clave de API no puede contener caracteres de control ni superar los 2048 caracteres.", "config.embeddingProtocol": "Protocolo", "config.embeddingProtocolAuto": "Automático (detectar por /v1)", "config.embeddingProtocolOllama": "Ollama", "config.embeddingProtocolOpenai": "Compatible con OpenAI", "config.embeddingProtocolInvalid": "El protocolo debe ser Automático / Ollama / Compatible con OpenAI.", "config.embeddingEndpointInvalid": "El endpoint de embeddings debe ser una URL HTTP(S) absoluta sin credenciales, consulta ni fragmento.", "config.embeddingModelInvalid": "El modelo de embeddings debe tener entre 1 y 200 caracteres y ningún carácter de control.", "config.embeddingSecurity": "El texto de memorias y consultas se envía a este endpoint; las claves se guardan en las credenciales de DSH (usa HTTPS en remoto).", "config.embeddingTest": "Probar estado", "config.embeddingNotTested": "No se han comprobado la conexión de embeddings ni la cobertura de cada espacio de Mnemon Native.", "config.embeddingTesting": "Comprobando servidor de embeddings y cobertura mediante Mnemon…", "config.embeddingSaveBeforeTest": "Guarda la configuración de embeddings antes de probar sus valores reales en ejecución.", "config.embeddingTestUnavailable": "Este Host de DSH no ofrece comprobación de estado de embeddings.", "config.embeddingCliMissing": "Las pruebas requieren Mnemon CLI; estos ajustes de embeddings solo se aplican a Mnemon Native.", "config.embeddingStatusAvailable": "Modelo de embeddings disponible · {model} · {embedded}/{total} con embedding ({coverage})", "config.embeddingStatusAvailableWithProtocol": "Modelo de embeddings disponible · {model} · protocolo {protocol} · {embedded}/{total} con embedding ({coverage})", "config.embeddingStatusUnavailable": "Modelo de embeddings no disponible · {model} · {embedded}/{total} con embedding ({coverage})", "config.embeddingStatusUnavailableWithProtocol": "Modelo de embeddings no disponible · {model} · protocolo {protocol} · {embedded}/{total} con embedding ({coverage})", "config.embeddingStatusFailed": "Error al comprobar el estado de embeddings: {error}", "config.embeddingSpaces": "Cada espacio de Mnemon Native", "config.embeddingSpaceCounts": "{embedded}/{total} con embedding ({coverage})", "config.embeddingSpaceFailed": "No se pudo leer: {error}", "config.embeddingMissing": "Las memorias sin vector quedan fuera de la coincidencia semántica.", "config.embeddingMissingFill": "Las memorias sin vector quedan fuera de la coincidencia semántica; pulsa «Completar» junto a un espacio para generar sus vectores faltantes.", "config.embeddingMissingOffline": "Las memorias sin vector quedan fuera de la coincidencia semántica; cuando el servicio de embeddings responda, podrás completar sus vectores aquí.", "config.embeddingSpacesUnread": "Los espacios que no se pudieron leer quedan excluidos del total.", "config.embeddingFill": "Completar", "config.embeddingFilling": "Completando…", "config.embeddingFillLabel": "Completar los vectores de {name}", "config.embeddingFillingLabel": "Completando los vectores de {name}", "config.embeddingFillDone": "Se completaron {filled} vectores para {name}.", "config.embeddingFillMore": "Se completaron {filled} vectores para {name}; aún faltan {remaining}. Pulsa «Completar» para continuar.", "config.embeddingFillPartly": "Se completaron {filled} vectores para {name}; el servicio de embeddings no devolvió ninguno para los otros {remaining}. Pulsa «Completar» más tarde para reintentar.", "config.embeddingFillRefused": "El servicio de embeddings no devolvió vectores para {name}. Comprueba que esté en ejecución y sirva el modelo {model}.", "config.embeddingFillFailed": "No se completaron los vectores de {name}: {error}", "config.providerGlobalLocation": "Ubicación de datos global", "config.providerGlobalLocationHint": "{provider} usa el directorio de ámbito global por defecto, o puedes elegir una ubicación personalizada.", "config.providerGlobalLocationWorkspaceHint": "Está activa la ubicación predeterminada del espacio de trabajo. Cambia a Global para elegir una ubicación personalizada.", "config.providerDefaultLocation": "Predeterminada (sigue el ámbito)", "config.providerSaveFailed": "No se pudo guardar la configuración: {error}", "config.providerServiceTitle": "Configuración del servicio", "config.providerServiceHint": "Compartida por los Espacios de memoria de este proveedor; habilitar o guardar actualiza sus mapeos y metadatos del directorio.", "config.providerEnableHint": "Completa y guarda la configuración del servicio para habilitar el proveedor y sincronizar todos los espacios visibles.", "config.providerEnabled": "Habilitado", "config.providerDisabled": "No habilitado", "config.providerDisabledConfigured": "Desactivado · configuración conservada", "config.providerNeedsConfiguration": "Configuración requerida", "config.providerToggleAria": "Habilitar {provider}", "config.providerToggleFailed": "No se pudo cambiar el estado del proveedor: {error}", "config.enableProvider": "Guardar y habilitar", "config.providerServiceSaved": "Configuración del servicio guardada y Espacios de memoria sincronizados", "config.saveProviderService": "Guardar", "config.providerUnavailable": "Este Host de DSH no admite la configuración de servicios de proveedores.", "config.saveScopeBeforeProviders": "El ámbito de almacenamiento tiene cambios sin guardar. Guarda el ámbito antes de configurar proveedores en ese directorio.", "config.providerTargetWorkspace": "Espacio de trabajo actual: {workspace}. Los Proveedores etiquetados como Espacio de trabajo usan este ámbito para su configuración y sus Espacios de memoria.", "config.loadingProviders": "Cargando configuraciones de proveedores…", "config.providerLoadFailed": "No se pudieron cargar las configuraciones de proveedores: {error}", "config.retryProviders": "Reintentar", "config.saving": "Guardando…", "config.embeddingApiKeyEnv": "Variable de entorno de clave de API (opcional)", "config.embeddingEnvInvalid": "Introduce un nombre válido de variable de entorno del Host, como MY_EMBEDDING_API_KEY.", "config.embeddingAuthChoice": "Proporciona una clave de API o un nombre de variable de entorno, no ambos.", "config.embeddingKeyPlaceholder": "Déjalo en blanco para conservar la clave actual", "config.embeddingCredentialSaved": "Hay una referencia de credencial de DSH guardada; la clave nunca se devuelve a esta página.", "config.embeddingClearKey": "Quitar la clave y las referencias de variable de entorno de esta conexión", "config.embeddingMigrateKey": "Mover la clave en texto plano existente a las credenciales de DSH", "config.embeddingUpgradeHost": "Actualiza dsh-brain-mnemon Starter para gestionar credenciales. La conexión existente sigue funcionando; aún no se pueden introducir nuevas claves aquí.", "overview.openProvidersSettings": "Configurar Proveedores", "config.policyTitle": "Política de espacios", "config.policyDescription": "Reglas predeterminadas de asignación de Proveedor cuando un Agente de tareas crea un nuevo Espacio de memoria; la creación manual sigue siendo explícita.", "config.policyConnectionIncomplete": "Completa los campos de conexión obligatorios para el Proveedor seleccionado.", "config.policyCandidatesEmpty": "Selecciona al menos un Proveedor candidato.", "config.policyBoundaryMismatch": "No se pueden seleccionar Proveedores candidatos remotos cuando el límite de datos es solo local.", "config.policyPromptInvalid": "El prompt de estrategia puede tener como máximo 4000 caracteres.", "config.recallTitle": "Recuperación y tiempos de espera", "config.recallDescription": "Configura el límite de resultados por recuperación, la política de filtrado de calidad y el tiempo de espera de llamadas a Proveedores.", "config.providersBadge": "{enabled}/{total} habilitados", "config.recallBadge": "{limit} · {policy}", "config.recallPolicyShort.strict-v1": "Estricto", "config.recallPolicyShort.balanced-v1": "Equilibrado", "config.recallPolicyShort.exhaustive-v1": "Exhaustivo", "config.defaultRecallLimit": "Límite de recuperación predeterminado", "config.defaultRecallLimitHint": "Máximo de memorias devueltas por recuperación (1–50, predeterminado 10).", "config.defaultRecallLimitInvalid": "El límite de recuperación predeterminado debe ser un entero entre 1 y 50.", "config.recallQualityPolicy": "Política de calidad de recuperación", "config.recallPolicy.strict-v1": "Estricto (strict-v1)", "config.recallPolicy.strict-v1.detail": "Política predeterminada; descarta coincidencias de baja puntuación y limita resultados medios o sin calibrar.", "config.recallPolicy.balanced-v1": "Equilibrado (balanced-v1)", "config.recallPolicy.balanced-v1.detail": "Ordena primero coincidencias altas y medias, conservando coincidencias positivas de baja puntuación.", "config.recallPolicy.exhaustive-v1": "Exhaustivo (exhaustive-v1)", "config.recallPolicy.exhaustive-v1.detail": "Conserva todos los candidatos finitos hasta alcanzar el límite de recuperación.", "config.timeoutMs": "Tiempo de espera de operación (ms)", "config.timeoutMsHint": "Espera máxima por llamada de Proveedor o CLI (100–120000 ms, predeterminado 10000).", "config.timeoutMsInvalid": "El tiempo de espera de operación debe ser un entero entre 100 y 120000 ms." }, fr: { "term.space": "Espace de mémoire", "term.spaces": "Espaces de mémoire", "category.decision": "Décision", "category.preference": "Préférence", "category.fact": "Fait", "category.insight": "Analyse", "category.context": "Contexte", "category.general": "Général", "nav.memory.aria": "Pages Espaces de mémoire", "nav.overview": "Vue d'ensemble", "nav.search": "Rappel", "nav.entities": "Entités", "nav.rememberAction": "Enregistrer en mémoire", "nav.content": "Contenu", "overview.description": "Mémoire à long terme gérée par Mnemon Native ou des Fournisseurs tiers ; les espaces actifs participent au rappel.", "overview.pageDescription": "Gérez les Espaces de mémoire et consultez la santé des Fournisseurs ainsi que les instantanés en direct.", "overview.fullSyncPending": "En attente de la première synchronisation complète", "overview.fullSyncJustNow": "Dernière synchronisation complète : à l'instant", "overview.fullSyncSeconds": "Dernière synchronisation complète : il y a {count} s", "overview.fullSyncMinutes": "Dernière synchronisation complète : il y a {count} min", "overview.fullSyncHours": "Dernière synchronisation complète : il y a {count} h", "overview.fullSyncDays": "Dernière synchronisation complète : il y a {count} j", "overview.directory": "Répertoire des Espaces de mémoire", "overview.directory.description": "Cliquez sur une carte pour vérifier la connexion ; activez l'interrupteur pour l'inclure dans le rappel.", "overview.directory.unsynced": "Répertoire non synchronisé", "overview.directory.unsyncedBadge": "Répertoire en attente", "overview.directoryLoading": "Chargement du répertoire des Espaces de mémoire", "overview.healthLoading": "Vérification de la santé des Espaces de mémoire", "overview.storageHealthy": "Stockage sain", "overview.storageUnhealthy": "Stockage indisponible", "overview.storageChecking": "Vérification", "overview.reconnecting": "Reconnexion", "overview.reconnectHint": "Cliquez sur la carte pour reconnecter et synchroniser cet Espace de mémoire", "overview.reconnectAria": "Reconnecter {name}", "overview.snapshotLoading": "Chargement de l'instantané multi-espaces en direct", "overview.metadataAction": "Organiser", "overview.metadataTitle": "Maintenir les métadonnées des Espaces de mémoire avec l'IA", "overview.metadataDescription": "Échantillonne chaque espace via sa voie native la plus rapide et génère titres et descriptions.", "overview.metadataUnavailable": "Temporairement indisponible : aucun Agent actif ne correspond à la portée mémoire actuelle", "overview.metadataLoading": "Chargement des Espaces de mémoire gérables…", "overview.metadataEmpty": "Aucun Espace de mémoire actif ne permet la maintenance de ses métadonnées par l'IA.", "overview.metadataSelected": "{count} Espace(s) de mémoire sélectionné(s)", "overview.metadataSelectAll": "Tout sélectionner", "overview.metadataClear": "Effacer", "overview.metadataSafety": "Met uniquement à jour les titres et descriptions locaux ; les mémoires stockées restent intactes.", "overview.metadataGenerate": "Générer avec l'IA ({count})", "overview.metadataRunningCount": "{count} en cours", "overview.metadataTaskRunning": "Génération…", "overview.metadataTaskSuccess": "Mis à jour", "overview.metadataTaskError": "Échec : {error}", "overview.metadataTaskUnknown": "Erreur inconnue", "overview.mnemonDefault": "Par défaut Mnemon", "overview.toggleAria": "Interrupteur de lecture pour {name}", "overview.toggling": "Basculement", "overview.noDescription": "Aucune description de routage pour le moment.", "overview.unsyncedTitle": "Le répertoire des Espaces de mémoire n'est pas synchronisé", "overview.unsyncedShort": "Le client Web et l'Hôte DSH utilisent des contrats différents. Redémarrez l'Hôte pour enregistrer les Stores existants.", "overview.unsyncedLong": "L'Hôte utilise encore l'ancien contrat de plugin. Redémarrez DSH pour redécouvrir les Stores existants ; aucun fichier .db ne sera supprimé.", "overview.emptyTitle": "Aucun Espace de mémoire pour le moment", "overview.emptyShort": "Créez un premier espace et distillez-y du contexte durable.", "overview.emptyLong": "Créez un Espace de mémoire Mnemon ou activez un Fournisseur tiers sur la page dsh-brain-mnemon dans Plugins pour synchroniser ses espaces existants.", "overview.noActiveTitle": "Aucun Espace de mémoire actif", "overview.noActiveText": "Activez la lecture d'au moins un espace pour agréger son graphe en direct ici.", "overview.noContentTitle": "Les espaces actifs n'ont pas encore de contenu", "overview.noContentText": "Enregistrez des mémoires pour afficher leurs nœuds et relations ici.", "overview.newAction": "Nouveau", "overview.createTitle": "Créer un Espace de mémoire", "overview.createDialogHint": "Définissez l'espace et choisissez un Fournisseur ; les identifiants et chemins suivent les paramètres.", "overview.createIdentityTitle": "Détails de l'Espace de mémoire", "overview.createIdentityHint": "Le nom identifie l'espace ; la description guide l'agent sur ce qu'il doit y écrire et y rappeler.", "overview.createPlacementTitle": "Fournisseur de l'Espace de mémoire", "overview.createPlacementHint": "Création manuelle explicite liée au Fournisseur activé choisi.", "overview.createName": "Nom du nouvel Espace de mémoire", "overview.createNamePlaceholder": "Nom", "overview.createDescription": "Description du nouvel Espace de mémoire", "overview.createDescriptionPlaceholder": "Décrivez ce qui y appartient et quand le rappeler", "overview.placementMode": "Sélection du moteur", "overview.placementManual": "Choisir manuellement", "overview.placementAutomatic": "Sélection intelligente", "overview.recommended": "Recommandé", "overview.placementPolicy": "Politique de sélection", "overview.placementPolicyHint": "L'Hôte applique les règles. Le prompt guide uniquement le choix parmi les candidats éligibles.", "overview.placementPrompt": "Prompt de Stratégie (facultatif)", "overview.placementPromptPlaceholder": "Par exemple : Ceci est une base de connaissances collaborative. Privilégiez le stockage local quand une écriture exacte est requise ; sinon privilégiez le partage.", "overview.dataBoundary": "Frontière des données", "overview.dataBoundaryRemote": "Services distants autorisés", "overview.dataBoundaryLocal": "Local uniquement", "overview.preference": "Préférence souple", "overview.preferenceBalanced": "Équilibrée", "overview.preferenceLocal": "Local d'abord", "overview.preferenceShared": "Partagé d'abord", "overview.requiredCapabilities": "Capacités requises (sélection multiple)", "overview.capability.graph": "Graphe de relations", "overview.capability.exact-write": "Écritures exactes", "overview.capability.forget": "Oubli sécurisé", "overview.candidateNativeReady": "Natif officiel · suit la portée mémoire active", "overview.providerServiceRequired": "Désactivé", "overview.nativeCliRequired": "Nécessite Mnemon CLI sur cette machine ; les autres Fournisseurs fonctionnent sans", "overview.workspaceBinding.automatic": "Suit la portée mémoire active", "overview.workspaceBinding.optional-override": "Suit la portée active ; l'emplacement global peut être personnalisé", "overview.workspaceBinding.provider-global": "Utilise toujours la portée globale", "overview.candidateLocal": "Fournisseur local · suit la portée mémoire active", "overview.candidateRemote": "Fournisseur distant · utilise la configuration de service globale", "overview.placementByLlm": "Sélectionné par l'Agent", "overview.placementByRules": "Sélectionné par règles", "overview.placementConfidence": "Confiance : {confidence}", "overview.confidence.high": "Élevée", "overview.confidence.medium": "Moyenne", "overview.confidence.low": "Faible", "overview.providerLabel": "Moteur mémoire", "overview.nativeOfficial": "Natif officiel", "strategy.action": "Politique d'espaces", "strategy.title": "Politique d'espaces", "strategy.description": "Manière dont les Agents de tâches choisissent un Fournisseur lors de la création d'un nouvel Espace de mémoire.", "strategy.loading": "Chargement du répertoire des Fournisseurs…", "strategy.modeTitle": "Sélection du Fournisseur", "strategy.modeHint": "S'applique uniquement aux espaces créés par l'Agent ; la création manuelle reste explicite.", "strategy.manualHint": "Fixe un seul Fournisseur ; l'Agent ne peut pas le modifier", "strategy.automaticHint": "Applique d'abord les règles strictes, puis laisse l'Agent de tâches choisir un Fournisseur éligible", "strategy.manualTitle": "Fournisseur fixe", "strategy.manualDescription": "Lorsqu'aucun espace existant ne convient, crée le nouvel espace sur ce Fournisseur.", "strategy.automaticTitle": "Règles de sélection intelligente", "strategy.automaticDescription": "Les règles de frontière et de capacités sont imposées ; le prompt départage les candidats.", "strategy.save": "Enregistrer", "strategy.saving": "Enregistrement…", "overview.providerSummary.mnemon-native": "Stockage natif officiel, local d'abord, avec graphe complet et suppression logique", "overview.providerSummary.openviking": "Mémoire partagée en arborescence de fichiers avec écritures exactes vérifiées et rappel sémantique", "overview.providerSummary.honcho": "Modélisation utilisateur inter-sessions, profils Peer, raisonnement dialectique et conclusions persistantes", "overview.providerSummary.mem0": "Extraction automatique de faits, rappel sémantique, reclassement et déduplication", "overview.providerSummary.hindsight": "Mémoire en graphe de connaissances avec résolution d'entités, rappel multi-stratégies et réflexion", "overview.providerSummary.holographic": "Mémoire locale de faits structurés avec score de confiance, résolution d'entités et rappel compositionnel", "overview.providerSummary.retaindb": "Rappel hybride cloud vecteur/BM25, profils utilisateur et faits durables typés", "overview.providerSummary.byterover": "Arbre de connaissances hiérarchique local d'abord, accessible via le CLI brv", "overview.providerSummary.supermemory": "Mémoire sémantique, profils persistants, ingestion de conversations et rappel multi-conteneurs", "overview.providerEndpoint": "Point de terminaison du service", "overview.providerTargetUri": "URI de portée mémoire", "overview.providerApiKey": "Clé API", "overview.providerApiKeyOptional": "Laisser vide lorsque l'authentification est désactivée", "overview.providerApiKeyKeep": "Enregistrée ; laisser vide pour ne pas la modifier", "overview.providerAccount": "Compte", "overview.providerDiscoveryUser": "Propriétaire de la clé utilisateur (ignorer admin)", "overview.providerUser": "Utilisateur", "overview.providerActorPeer": "Actor Peer", "overview.providerField.workspace": "Espace de travail", "overview.providerField.userId": "ID utilisateur", "overview.providerField.agentId": "ID d'Agent", "overview.providerField.mode": "Mode", "overview.providerField.rerank": "Reclasser les résultats de recherche", "overview.providerField.bankId": "Banque mémoire", "overview.providerField.budget": "Budget de rappel", "overview.providerField.dataPath": "Chemin du magasin de faits", "overview.providerField.defaultDirectory": "Répertoire de connaissances par défaut", "overview.providerField.defaultTrust": "Confiance par défaut", "overview.providerField.minTrust": "Confiance minimale de rappel", "overview.providerField.project": "Projet", "overview.providerField.cliPath": "Exécutable brv", "overview.providerField.workingDirectory": "Répertoire de connaissances", "overview.providerField.containerTag": "Étiquette de conteneur", "overview.providerField.searchMode": "Mode de recherche", "overview.providerOption.platform": "Mem0 Platform", "overview.providerOption.self-hosted": "Serveur auto-hébergé", "overview.providerOption.low": "Faible", "overview.providerOption.mid": "Moyen", "overview.providerOption.high": "Élevé", "overview.providerOption.hybrid": "Hybride", "overview.providerOption.memories": "Mémoires", "overview.providerOption.documents": "Documents", "overview.providerKindLocal": "Moteur local", "overview.providerKindRemote": "Service distant", "overview.providerSecretClear": "Effacer l'identifiant enregistré", "overview.providerWriteExact": "Écritures exactes", "overview.providerWriteAsync": "Extraction sémantique asynchrone", "overview.providerGraphReady": "Graphe de relations disponible", "overview.providerSearchReady": "Recherche unifiée disponible", "overview.providerRemote": "Mémoire distante tierce", "overview.providerLocal": "Mémoire locale tierce", "overview.creating": "Création…", "overview.createAction": "Créer", "overview.editName": "Nom", "overview.editDescription": "Description de routage", "overview.deleteTitle": "Supprimer « {name} » ?", "overview.deleteWarning": "Supprime définitivement l'Espace de mémoire ainsi que toutes ses mémoires et relations. Cette action est irréversible.", "overview.lastStoreDeleteHint": "Mnemon doit conserver au moins un Store natif. Le dernier Espace de mémoire peut être désactivé, mais pas supprimé.", "overview.deleteAction": "Supprimer définitivement", "overview.disconnectTitle": "Déconnecter « {name} » ?", "overview.disconnectWarning": "Retire uniquement la connexion {provider} du répertoire des Espaces de mémoire DSH. Les mémoires dans le moteur sous-jacent restent intactes.", "overview.disconnectAction": "Déconnecter", "overview.snapshot": "Instantané multi-espaces en direct", "overview.snapshotSources": "Observabilité de l'instantané", "overview.snapshotSourcesHint": "Les graphes de relations, projections et espaces en requête seule restent distincts.", "overview.noVisualTitle": "Les espaces actifs sont en requête seule", "overview.noVisualText": "Ces Fournisseurs n'exposent ni contenu énumérable ni graphe. Ouvrez Rappel et posez une question précise.", "overview.waitingSnapshot": "En attente du premier instantané", "overview.updatedAt": "Mis à jour à {time}", "overview.edgeScope": "Portée d'espace", "overview.edgeTemporal": "Temporel", "overview.edgeSemantic": "Sémantique", "overview.edgeCausal": "Causal", "overview.edgeEntity": "Relation d'entité", "overview.graphComposition": "{spaces} espace(s) · {memories} mémoire(s) · {entities} entité(s)", "overview.graphCount": "Affichage de {visible} / {total} éléments", "overview.graphEdges": "{count} arête(s) du graphe", "overview.inspector": "Détails de la mémoire", "overview.inspectorSpace": "Détails de l'Espace de mémoire", "overview.inspectorEntity": "Détails de l'entité", "overview.selectNode": "Sélectionner un élément du graphe", "overview.selectNodeText": "Inspectez le contexte exact d'un Espace de mémoire, d'une entité ou d'une mémoire.", "overview.closeInspector": "Fermer les détails du nœud", "overview.memoryId": "ID de mémoire", "overview.spaceId": "ID d'Espace de mémoire", "overview.containedMemories": "Mémoires contenues", "overview.entityMentions": "Mentions indexées", "overview.exploreNode": "Rappel", "overview.previewAria": "Afficher le contenu complet", "overview.previewTitle": "Contenu complet", "overview.loading": "Synchronisation de l'instantané multi-espaces en direct…", "graph.layoutAria": "Disposition du graphe", "graph.quietAction": "Affichage épuré", "graph.quietHint": "Masque la grille et les étiquettes persistantes ; sélectionnez un nœud pour isoler ses voisins, puis cliquez sur l'arrière-plan ou appuyez sur Échap pour effacer. Enregistré uniquement dans ce navigateur.", "graph.layoutNatural": "Disposition naturelle", "graph.layoutUniform": "Disposition uniforme", "graph.layoutCustom": "Disposition personnalisée", "graph.layoutStatus": "Disposition : {layout}", "graph.draggable": "{layout} · déplaçable", "graph.naturalAction": "Répartition naturelle", "graph.uniformAction": "Réinitialisation uniforme", "graph.aria": "Graphe mémoire Mnemon en direct avec {nodes} éléments et {edges} arêtes", "graph.aria3d": "Graphe mémoire Mnemon 3D avec {nodes} éléments et {edges} arêtes", "graph.viewModeAria": "Dimension de la Vue du graphe", "graph.view2d": "2D", "graph.view3d": "3D", "graph.selectNodeAction": "Sélectionner un nœud", "graph.noNodeSelected": "Aucun nœud sélectionné", "graph.orbitAria": "Contrôles de caméra 3D", "graph.orbitHint": "3D · glisser pour pivoter · molette pour zoomer", "graph.orbitShort": "3D", "graph.zoomInAction": "Zoom avant", "graph.zoomOutAction": "Zoom arrière", "graph.resetViewAction": "Réinitialiser la Vue", "graph.kindSpace": "Espace de mémoire", "graph.kindEntity": "Entité", "search.title": "Rappel mémoire", "search.description": "Rechercher renvoie les entrées stockées ; Demander à l'IA répond avec citations.", "search.maxResults": "Jusqu'à {count} résultats", "search.placeholder": "Pourquoi avons-nous choisi SQLite ? Quelles conventions de publication s'appliquent ?", "search.queryAria": "Requête mémoire", "search.categoryAria": "Catégorie mémoire", "search.strategy": "Stratégie", "search.modeAria": "Mode de rappel", "search.modeSmart": "Rappel intelligent", "search.modeKeyword": "Recherche par mots-clés", "search.modeBasic": "Correspondance simple", "search.searching": "Rappel…", "search.action": "Rechercher", "search.agentAction": "Demander à l'IA", "search.agentSearching": "Analyse par l'Agent…", "search.agentAnswer": "Réponse de l'Agent", "search.agentAnswerHint": "Fondée sur les preuves rappelées ci-dessous", "search.startTitle": "Commencez par une question précise", "search.startText": "Une entité, une décision ou une chronologie ciblée est plus fiable que de charger toute la base.", "search.emptyTitle": "Aucun résultat", "search.emptyText": "Essayez un mot-clé d'entité, de décision ou de chronologie plus précis.", "search.results": "Preuves brutes rappelées", "search.related": "Mémoires associées", "search.closeRelated": "Fermer les mémoires associées", "search.traversing": "Parcours du graphe…", "search.noRelated": "Aucun nœud associé trouvé à deux sauts.", "search.sourcesTitle": "Couverture de recherche", "entities.title": "Explorateur d'entités", "entities.description": "Visualisez comment les entités relient faits, décisions et contexte.", "entities.sourcesTitle": "Couverture de la capacité d'entités", "entities.unsupportedTitle": "Aucun espace actif n'expose d'index d'entités", "entities.unsupportedText": "Les Fournisseurs actifs restent interrogeables via Rappel, mais ne sont pas présentés ici comme un graphe d'entités artificiel.", "entities.count": "{count} entité(s) active(s)", "entities.nameAria": "Nom de l'entité", "entities.placeholder": "Saisissez une entité…", "entities.action": "Explorer", "entities.top": "Entités principales", "entities.frequency": "Par fréquence", "entities.filterHint": "Saisissez pour filtrer la liste localement (Échap pour effacer).", "entities.emptyRail": "Les entités apparaissent ici une fois des mémoires dotées de métadonnées d'entités enregistrées.", "entities.filterEmpty": "Aucune correspondance locale. Cliquez sur Explorer pour interroger l'Hôte.", "entities.loading": "Lecture des mémoires de l'entité…", "entities.selectTitle": "Sélectionner ou saisir une entité", "entities.selectText": "En sélectionner une liste chaque mémoire qui la porte ; Mémoires associées ajoute ensuite d'autres mémoires rapprochées par le rappel.", "entities.emptyTitle": "Aucune mémoire associée", "entities.emptyText": "Essayez le nom complet ou un autre alias d'entité.", "entities.railLoading": "Lecture des entités…", "entities.memoriesHint": "Mémoires portant cette entité", "entities.relatedTitle": "Mémoires associées", "entities.relatedHint": "Rappelées comme associées, sans cette entité", "entities.findRelated": "Mémoires associées", "entities.hideRelated": "Masquer", "entities.noCarrying": "Aucune mémoire ne porte cette entité.", "entities.noRelated": "Aucune autre mémoire associée.", "entities.retry": "Réessayer", "entities.sourceReady": "{count} entité(s)", "entities.sourcePartial": "{count} entité(s) · partiel", "readSources.status.loading": "Lecture", "remember.title": "Enregistrer en mémoire", "remember.description": "L'Agent de tâches décide s'il faut enregistrer, puis synthétise et écrit dans un Espace de mémoire.", "remember.readOnlyTitle": "Mode lecture seule", "remember.readOnlyText": "Ce déploiement désactive les écritures mémoire. Modifiez et enregistrez la configuration Mnemon de DSH pour les activer.", "remember.candidate": "Contenu", "remember.placeholder": "Contexte, préférences, décisions ou conclusions à conserver.", "remember.taskAgentHint": "L'Hôte ne peut actuellement pas créer d'Agent de tâches isolé. Actualisez l'état et réessayez.", "remember.processing": "Traitement par l'Agent de tâches…", "remember.action": "Enregistrer", "remember.advanced": "Options avancées", "remember.advancedHint": "Choisissez l'espace cible, la catégorie et l'importance", "remember.expand": "Développer", "remember.target": "Espace de mémoire cible", "remember.asyncProviderHint": "Cet Espace de mémoire attend la fin de l'extraction distante avant de renvoyer un reçu d'écriture fiable.", "remember.entities": "Entités (séparées par des virgules)", "remember.tags": "Étiquettes (séparées par des virgules)", "remember.advancedText": "Les contraintes passent toujours par la déduplication et le reçu de l'Agent de tâches.", "remember.saving": "Traitement par l'Agent de tâches…", "remember.advancedAction": "Enregistrer avec options", "content.title": "Contenu mémoire", "content.description": "Parcourez le contenu conservé dans chaque Espace de mémoire.", "content.sourcesTitle": "Modèles de contenu des Fournisseurs", "content.count": "{count} mémoire(s)", "content.filterAria": "Filtrer le contenu mémoire", "content.filterPlaceholder": "Filtrer par contenu ou ID…", "content.categoryAria": "Catégorie mémoire", "content.apply": "Filtrer", "content.notice": "Les Fournisseurs en requête seule affichent du contenu une fois une requête saisie.", "content.queryRequiredTitle": "Les espaces en requête seule attendent une requête", "content.queryRequiredText": "Saisissez une requête précise pour inspecter les Fournisseurs tels que ByteRover qui n'exposent pas de liste complète.", "content.emptyTitle": "Aucune mémoire correspondante", "content.emptyText": "Effacez les filtres ou enregistrez une première mémoire.", "nav.spaces": "Espaces de mémoire", "overview.editSpace": "Modifier", "overview.editSpaceAria": "Modifier {name}", "overview.saveSpace": "Enregistrer", "overview.savingSpace": "Enregistrement…", "overview.deleteSpace": "Supprimer", "overview.deleteSpaceAria": "Supprimer {name}", "overview.disconnectSpace": "Déconnecter", "overview.disconnectSpaceAria": "Déconnecter {name}", "overview.deletingSpace": "Suppression…", "common.score": "Score {value}", "overview.providerEnableHint": "Activez d'autres Fournisseurs sur la page Espaces de mémoire sous Plugins → dsh-brain-mnemon.", "search.citations": "Citations", "overview.rediscoverAction": "Redécouvrir", "overview.rediscovering": "Redécouverte…", "overview.rediscoverHint": "Interroge de nouveau les Fournisseurs activés ; les nouveaux espaces sont ajoutés sans participer au rappel", "overview.rediscoveryAdded": "Nouveaux espaces trouvés : {count}. Ils participeront au rappel dès que vous les activerez.", "overview.rediscoveryNone": "Aucun nouvel espace.", "overview.rediscoveryDisconnected": "Les espaces que vous avez déconnectés restent déconnectés : {count}. Enregistrez de nouveau les paramètres du Fournisseur pour les rétablir.", "overview.rediscoveryFailed": "{provider} n'a pas pu terminer la découverte : {error}", "overview.rediscoveryTimedOut": "{provider} n'a pas répondu à temps ; réessayez Redécouvrir plus tard.", "overview.rediscoveryDismiss": "Ignorer", "overview.newSpace": "Nouveau", "common.copyId": "Copier l'ID", "common.readOnly": "Lecture seule", "common.activationOnly": "Contrôle d'activation uniquement", "common.active": "Actif", "common.category": "Catégorie", "common.importanceLabel": "Importance", "common.importance": "Importance {value}", "common.hops": "{count} saut(s)", "common.allCategories": "Toutes les catégories", "common.memories": "{count} mémoire(s)", "common.edges": "{count} arête(s)", "card.confirmText": "Supprimer logiquement cette mémoire ?", "card.processing": "Traitement…", "card.confirmForget": "Confirmer l'oubli", "card.related": "Associées", "card.clone": "Créer à partir de ceci", "card.forget": "Oublier", "readSources.all": "Tous les Fournisseurs", "readSources.mode.search": "Recherche native", "readSources.mode.graph": "Graphe de relations réel", "readSources.mode.projection": "Projection de contenu", "readSources.mode.enumerable": "Contenu énumérable", "readSources.mode.query-only": "Requête seule", "readSources.mode.entities": "Index d'entités", "readSources.mode.unsupported": "Non pris en charge", "readSources.status.ready": "{count} observable(s)", "readSources.status.empty": "Connecté · aucun contenu", "readSources.status.query-required": "Lecture après requête", "readSources.status.unsupported": "Indisponible sur cette surface", "readSources.status.unavailable": "Connexion indisponible", "readSources.edges": "{count} relation(s) réelle(s)", "readSources.model.mnemon-native": "Faits, entités et relations typées", "readSources.model.openviking": "Hiérarchie et contenu en couches", "readSources.model.honcho": "Conclusions et profils Peer", "readSources.model.mem0": "Mémoires sémantiques extraites", "readSources.model.hindsight": "Unités mémoire et graphe de connaissances", "readSources.model.holographic": "Faits fiables et entités", "readSources.model.retaindb": "Profils et faits typés", "readSources.model.byterover": "Requêtes d'arbre de connaissances", "readSources.model.supermemory": "Mémoires et documents ingérés", "common.inactive": "Inactif", "config.providerSecretShow": "Afficher l'identifiant", "config.providerSecretHide": "Masquer l'identifiant", "config.providerSecretStoredValue": "Identifiant enregistré", "config.providersSpacesOffTitle": "Espaces de mémoire est désactivé", "config.providersSpacesOffDetail": "Les connexions enregistrées sont conservées", "config.providersSpacesOn": "Activer « Espaces de mémoire »", "config.providersReadOnlyTitle": "dsh-brain-mnemon est en lecture seule", "config.providersReadOnlyDetail": "Avec writeEnabled à false, les Fournisseurs ne peuvent pas être activés ou désactivés.", "spaces.offNote": "Activez-le pour configurer les Fournisseurs et l'embedding", "config.providersTitle": "Fournisseurs mémoire", "config.providersDescription": "Les Fournisseurs hébergent les Espaces de mémoire. En activer ou en enregistrer un synchronise ses espaces existants ; le désactiver supprime uniquement le mappage local, jamais les données tierces.", "config.nativeSummary": "Mémoire à long terme native officielle avec graphe de relations complet", "config.officialNative": "Natif officiel", "config.nativeCliMissing": "CLI non installé (facultatif)", "config.embeddingTitle": "Embeddings vectoriels locaux", "config.embeddingDescription": "Injecte le point de terminaison et le modèle d'embedding dans Mnemon CLI (/v1 utilise le protocole compatible OpenAI, sinon Ollama).", "config.embeddingManaged": "Gérer les paramètres d'embedding dans DSH", "config.embeddingManagedHint": "Une fois activé, les valeurs enregistrées remplacent l'environnement du sous-processus Mnemon. Désactivé, Mnemon conserve l'environnement Hôte et ses valeurs par défaut.", "config.embeddingEndpoint": "Point de terminaison d'embedding", "config.embeddingModel": "Modèle d'embedding", "config.embeddingApiKey": "Clé API (facultative, serveurs compatibles OpenAI)", "config.embeddingApiKeyInvalid": "La clé API ne doit contenir aucun caractère de contrôle et au maximum 2048 caractères.", "config.embeddingProtocol": "Protocole", "config.embeddingProtocolAuto": "Automatique (détection via /v1)", "config.embeddingProtocolOllama": "Ollama", "config.embeddingProtocolOpenai": "Compatible OpenAI", "config.embeddingProtocolInvalid": "Le protocole doit être Automatique, Ollama ou Compatible OpenAI.", "config.embeddingEndpointInvalid": "Le point de terminaison d'embedding doit être une URL HTTP(S) absolue sans identifiants, paramètre de requête ni fragment.", "config.embeddingModelInvalid": "Le modèle d'embedding doit contenir entre 1 et 200 caractères et aucun caractère de contrôle.", "config.embeddingSecurity": "Le texte des mémoires et requêtes est envoyé à ce point de terminaison ; les clés restent dans les identifiants DSH (utilisez HTTPS à distance).", "config.embeddingTest": "Tester l'état", "config.embeddingNotTested": "La connexion d'embedding et la couverture de chaque espace Mnemon Native n'ont pas été vérifiées.", "config.embeddingTesting": "Vérification du serveur d'embedding et de la couverture via Mnemon…", "config.embeddingSaveBeforeTest": "Enregistrez les paramètres d'embedding avant de tester leurs valeurs effectives d'exécution.", "config.embeddingTestUnavailable": "Cet Hôte DSH ne fournit pas de vérification d'état d'embedding.", "config.embeddingCliMissing": "Le test nécessite Mnemon CLI ; ces paramètres d'embedding ne s'appliquent qu'à Mnemon Native.", "config.embeddingStatusAvailable": "Modèle d'embedding disponible · {model} · {embedded}/{total} vectorisées ({coverage})", "config.embeddingStatusAvailableWithProtocol": "Modèle d'embedding disponible · {model} · protocole {protocol} · {embedded}/{total} vectorisées ({coverage})", "config.embeddingStatusUnavailable": "Modèle d'embedding indisponible · {model} · {embedded}/{total} vectorisées ({coverage})", "config.embeddingStatusUnavailableWithProtocol": "Modèle d'embedding indisponible · {model} · protocole {protocol} · {embedded}/{total} vectorisées ({coverage})", "config.embeddingStatusFailed": "Échec de vérification de l'état d'embedding : {error}", "config.embeddingSpaces": "Chaque espace Mnemon Native", "config.embeddingSpaceCounts": "{embedded}/{total} vectorisées ({coverage})", "config.embeddingSpaceFailed": "Impossible de lire : {error}", "config.embeddingMissing": "Les mémoires sans vecteur sont exclues de la correspondance sémantique.", "config.embeddingMissingFill": "Les mémoires sans vecteur sont exclues de la correspondance sémantique ; « Compléter » à côté d'un espace crée ses vecteurs manquants.", "config.embeddingMissingOffline": "Les mémoires sans vecteur sont exclues de la correspondance sémantique ; dès que le service d'embedding répond, leurs vecteurs peuvent être complétés ici.", "config.embeddingSpacesUnread": "Les espaces illisibles sont exclus du total.", "config.embeddingFill": "Compléter", "config.embeddingFilling": "Complétion…", "config.embeddingFillLabel": "Compléter les vecteurs de {name}", "config.embeddingFillingLabel": "Complétion des vecteurs de {name}", "config.embeddingFillDone": "{filled} vecteur(s) complété(s) pour {name}.", "config.embeddingFillMore": "{filled} vecteur(s) complété(s) pour {name} ; il en manque encore {remaining}. Cliquez sur Compléter pour continuer.", "config.embeddingFillPartly": "{filled} vecteur(s) complété(s) pour {name} ; le service d'embedding n'en a renvoyé aucun pour les {remaining} autres. Cliquez sur Compléter plus tard pour réessayer.", "config.embeddingFillRefused": "Le service d'embedding n'a renvoyé aucun vecteur pour {name}. Vérifiez qu'il fonctionne et sert le modèle {model}.", "config.embeddingFillFailed": "Les vecteurs de {name} n'ont pas été complétés : {error}", "config.providerGlobalLocation": "Emplacement global des données", "config.providerGlobalLocationHint": "{provider} utilise par défaut le répertoire de portée globale, ou vous pouvez choisir un emplacement personnalisé.", "config.providerGlobalLocationWorkspaceHint": "L'emplacement par défaut de l'espace de travail est actif. Passez en Global pour choisir un emplacement personnalisé.", "config.providerDefaultLocation": "Par défaut (suit la portée)", "config.providerSaveFailed": "Impossible d'enregistrer la configuration : {error}", "config.providerServiceTitle": "Configuration du service", "config.providerServiceHint": "Partagée par tous les Espaces de mémoire de ce Fournisseur ; l'activation ou l'enregistrement actualise leurs mappages de répertoire et métadonnées.", "config.providerEnableHint": "Complétez et enregistrez la configuration du service pour activer le Fournisseur et synchroniser chaque espace visible.", "config.providerEnabled": "Activé", "config.providerDisabled": "Non activé", "config.providerDisabledConfigured": "Désactivé · configuration conservée", "config.providerNeedsConfiguration": "Configuration requise", "config.providerToggleAria": "Activer {provider}", "config.providerToggleFailed": "Impossible de changer l'état du Fournisseur : {error}", "config.enableProvider": "Enregistrer et activer", "config.providerServiceSaved": "Configuration du service enregistrée et Espaces de mémoire synchronisés", "config.saveProviderService": "Enregistrer", "config.providerUnavailable": "Cet Hôte DSH ne prend pas en charge la configuration de service de Fournisseur.", "config.saveScopeBeforeProviders": "La portée du stockage comporte des modifications non enregistrées. Enregistrez la portée avant de configurer les Fournisseurs dans ce répertoire.", "config.providerTargetWorkspace": "Espace de travail actuel : {workspace}. Les Fournisseurs marqués Espace de travail utilisent cette portée pour la configuration et les Espaces de mémoire.", "config.loadingProviders": "Chargement des configurations des Fournisseurs…", "config.providerLoadFailed": "Impossible de charger les configurations des Fournisseurs : {error}", "config.retryProviders": "Réessayer", "config.saving": "Enregistrement…", "config.embeddingApiKeyEnv": "Variable d'environnement de clé API (facultative)", "config.embeddingEnvInvalid": "Saisissez un nom de variable d'environnement Hôte valide, par exemple MY_EMBEDDING_API_KEY.", "config.embeddingAuthChoice": "Fournissez une clé API ou un nom de variable d'environnement, pas les deux.", "config.embeddingKeyPlaceholder": "Laisser vide pour conserver la clé existante", "config.embeddingCredentialSaved": "Une référence d'identifiant DSH est enregistrée ; la clé n'est jamais renvoyée sur cette page.", "config.embeddingClearKey": "Supprimer la clé et les références de variable d'environnement de cette connexion", "config.embeddingMigrateKey": "Déplacer la clé en clair existante vers les identifiants DSH", "config.embeddingUpgradeHost": "Mettez à niveau dsh-brain-mnemon Starter pour gérer les identifiants. La connexion existante fonctionne toujours ; de nouvelles clés ne peuvent pas encore être saisies ici.", "overview.openProvidersSettings": "Configurer les Fournisseurs", "config.policyTitle": "Politique d'espaces", "config.policyDescription": "Règles de placement de Fournisseur par défaut lorsqu'un Agent de tâches crée un nouvel Espace de mémoire ; la création manuelle reste explicite.", "config.policyConnectionIncomplete": "Complétez les champs de connexion requis pour le Fournisseur sélectionné.", "config.policyCandidatesEmpty": "Sélectionnez au moins un Fournisseur candidat.", "config.policyBoundaryMismatch": "Impossible de sélectionner des Fournisseurs candidats distants lorsque la frontière des données est Local uniquement.", "config.policyPromptInvalid": "Le prompt de Stratégie ne peut pas dépasser 4000 caractères.", "config.recallTitle": "Rappel et délais", "config.recallDescription": "Configurez la limite de résultats par rappel, la politique de filtrage qualité et le délai d'expiration des appels Fournisseur.", "config.providersBadge": "{enabled}/{total} activé(s)", "config.recallBadge": "{limit} · {policy}", "config.recallPolicyShort.strict-v1": "Strict", "config.recallPolicyShort.balanced-v1": "Équilibré", "config.recallPolicyShort.exhaustive-v1": "Exhaustif", "config.defaultRecallLimit": "Limite de rappel par défaut", "config.defaultRecallLimitHint": "Nombre maximal de mémoires renvoyées par rappel (1–50, par défaut 10).", "config.defaultRecallLimitInvalid": "La limite de rappel par défaut doit être un entier compris entre 1 et 50.", "config.recallQualityPolicy": "Politique de qualité de rappel", "config.recallPolicy.strict-v1": "Strict (strict-v1)", "config.recallPolicy.strict-v1.detail": "Politique par défaut ; écarte les correspondances faibles et borne les résultats moyens ou non calibrés.", "config.recallPolicy.balanced-v1": "Équilibré (balanced-v1)", "config.recallPolicy.balanced-v1.detail": "Classe d'abord les correspondances fortes et moyennes tout en conservant les faibles correspondances positives.", "config.recallPolicy.exhaustive-v1": "Exhaustif (exhaustive-v1)", "config.recallPolicy.exhaustive-v1.detail": "Conserve chaque candidat fini jusqu'à la limite de rappel.", "config.timeoutMs": "Délai d'expiration d'opération (ms)", "config.timeoutMsHint": "Attente maximale par appel Fournisseur ou CLI (100–120000 ms, par défaut 10000).", "config.timeoutMsInvalid": "Le délai d'expiration d'opération doit être un entier compris entre 100 et 120000 ms." }, de: { "term.space": "Speicherbereich", "term.spaces": "Speicherbereiche", "category.decision": "Entscheidung", "category.preference": "Präferenz", "category.fact": "Fakt", "category.insight": "Erkenntnis", "category.context": "Kontext", "category.general": "Allgemein", "nav.memory.aria": "Speicherbereich-Seiten", "nav.overview": "Übersicht", "nav.search": "Abruf", "nav.entities": "Entitäten", "nav.rememberAction": "Im Speicher sichern", "nav.content": "Inhalt", "overview.description": "Langzeitspeicher, verwaltet von Mnemon Native oder Drittanbietern; aktive Bereiche nehmen am Abruf teil.", "overview.pageDescription": "Verwalten Sie Speicherbereiche und prüfen Sie Anbieterstatus sowie Live-Snapshots.", "overview.fullSyncPending": "Wartet auf erste vollständige Synchronisierung", "overview.fullSyncJustNow": "Letzte vollständige Synchronisierung: gerade eben", "overview.fullSyncSeconds": "Letzte vollständige Synchronisierung: vor {count} Sek.", "overview.fullSyncMinutes": "Letzte vollständige Synchronisierung: vor {count} Min.", "overview.fullSyncHours": "Letzte vollständige Synchronisierung: vor {count} Std.", "overview.fullSyncDays": "Letzte vollständige Synchronisierung: vor {count} T.", "overview.directory": "Verzeichnis der Speicherbereiche", "overview.directory.description": "Klicken Sie auf eine Karte, um die Verbindung zu prüfen; schalten Sie um, um sie in den Abruf einzubeziehen.", "overview.directory.unsynced": "Verzeichnis nicht synchronisiert", "overview.directory.unsyncedBadge": "Verzeichnis ausstehend", "overview.directoryLoading": "Verzeichnis der Speicherbereiche wird geladen", "overview.healthLoading": "Status der Speicherbereiche wird geprüft", "overview.storageHealthy": "Speicher intakt", "overview.storageUnhealthy": "Speicher nicht verfügbar", "overview.storageChecking": "Wird geprüft", "overview.reconnecting": "Verbindung wird wiederhergestellt", "overview.reconnectHint": "Klicken Sie auf die Karte, um diesen Speicherbereich neu zu verbinden und zu synchronisieren", "overview.reconnectAria": "{name} neu verbinden", "overview.snapshotLoading": "Bereichsübergreifender Live-Snapshot wird geladen", "overview.metadataAction": "Bereinigen", "overview.metadataTitle": "Metadaten von Speicherbereichen per KI pflegen", "overview.metadataDescription": "Liest Stichproben jedes Bereichs über den schnellsten nativen Pfad und erzeugt Titel und Beschreibungen.", "overview.metadataUnavailable": "Vorübergehend nicht verfügbar: Kein aktiver Agent entspricht dem aktuellen Speicherumfang", "overview.metadataLoading": "Pflegbare Speicherbereiche werden geladen…", "overview.metadataEmpty": "Es gibt keine aktiven Speicherbereiche, deren Metadaten per KI gepflegt werden können.", "overview.metadataSelected": "{count} Speicherbereiche ausgewählt", "overview.metadataSelectAll": "Alle auswählen", "overview.metadataClear": "Leeren", "overview.metadataSafety": "Aktualisiert nur lokale Titel und Beschreibungen; gespeicherte Einträge bleiben unberührt.", "overview.metadataGenerate": "Mit KI generieren ({count})", "overview.metadataRunningCount": "{count} aktiv", "overview.metadataTaskRunning": "Wird generiert…", "overview.metadataTaskSuccess": "Aktualisiert", "overview.metadataTaskError": "Fehlgeschlagen: {error}", "overview.metadataTaskUnknown": "Unbekannter Fehler", "overview.mnemonDefault": "Mnemon-Standard", "overview.toggleAria": "Lesezugriff für {name} umschalten", "overview.toggling": "Wird umgeschaltet", "overview.noDescription": "Noch keine Routing-Beschreibung.", "overview.unsyncedTitle": "Verzeichnis der Speicherbereiche ist nicht synchronisiert", "overview.unsyncedShort": "Web-Client und DSH Host verwenden unterschiedliche Schnittstellenverträge. Starten Sie den Host neu, um bestehende Stores zu registrieren.", "overview.unsyncedLong": "Der Host verwendet noch den vorherigen Plugin-Vertrag. Starten Sie DSH neu, um bestehende Stores neu zu erkennen; keine .db-Datei wird gelöscht.", "overview.emptyTitle": "Noch keine Speicherbereiche", "overview.emptyShort": "Erstellen Sie den ersten Bereich und speichern Sie dauerhaften Kontext darin.", "overview.emptyLong": "Erstellen Sie einen Mnemon-Speicherbereich oder aktivieren Sie auf der dsh-brain-mnemon-Seite unter Plugins einen Drittanbieter, um dessen vorhandene Namespaces zu synchronisieren.", "overview.noActiveTitle": "Keine aktiven Speicherbereiche", "overview.noActiveText": "Aktivieren Sie den Lesezugriff für mindestens einen Bereich, um dessen Live-Graph hier zusammenzuführen.", "overview.noContentTitle": "Aktive Bereiche enthalten noch keine Inhalte", "overview.noContentText": "Speichern Sie Einträge, um deren Knoten und Beziehungen hier zu sehen.", "overview.newAction": "Neu", "overview.createTitle": "Speicherbereich erstellen", "overview.createDialogHint": "Definieren Sie den Bereich und wählen Sie einen Anbieter; Zugangsdaten und Pfade folgen den Einstellungen.", "overview.createIdentityTitle": "Details des Speicherbereichs", "overview.createIdentityHint": "Der Name identifiziert den Bereich; die Beschreibung steuert, wann der Agent darin schreibt und daraus abruft.", "overview.createPlacementTitle": "Anbieter des Speicherbereichs", "overview.createPlacementHint": "Explizite manuelle Erstellung, gebunden an den gewählten aktivierten Anbieter.", "overview.createName": "Name des neuen Speicherbereichs", "overview.createNamePlaceholder": "Name", "overview.createDescription": "Beschreibung des neuen Speicherbereichs", "overview.createDescriptionPlaceholder": "Beschreiben Sie, was hierher gehört und wann es abgerufen werden soll", "overview.placementMode": "Engine-Auswahl", "overview.placementManual": "Manuell wählen", "overview.placementAutomatic": "Intelligente Auswahl", "overview.recommended": "Empfohlen", "overview.placementPolicy": "Auswahlrichtlinie", "overview.placementPolicyHint": "Der Host erzwingt die Regeln. Der Prompt lenkt nur die Entscheidung zwischen geeigneten Kandidaten.", "overview.placementPrompt": "Strategie-Prompt (optional)", "overview.placementPromptPlaceholder": "Zum Beispiel: Dies ist gemeinsames Teamwissen. Lokalen Speicher bevorzugen, wenn exaktes Schreiben erforderlich ist; ansonsten Teilen bevorzugen.", "overview.dataBoundary": "Datengrenze", "overview.dataBoundaryRemote": "Remote-Dienste erlaubt", "overview.dataBoundaryLocal": "Nur lokal", "overview.preference": "Weiche Präferenz", "overview.preferenceBalanced": "Ausgewogen", "overview.preferenceLocal": "Lokal zuerst", "overview.preferenceShared": "Geteilt zuerst", "overview.requiredCapabilities": "Erforderliche Fähigkeiten (Mehrfachauswahl)", "overview.capability.graph": "Beziehungsgraph", "overview.capability.exact-write": "Exaktes Schreiben", "overview.capability.forget": "Sicheres Vergessen", "overview.candidateNativeReady": "Offiziell nativ · folgt dem aktiven Speicherumfang", "overview.providerServiceRequired": "Aus", "overview.nativeCliRequired": "Erfordert die Mnemon CLI auf diesem Rechner; andere Anbieter funktionieren ohne sie", "overview.workspaceBinding.automatic": "Folgt dem aktiven Speicherumfang", "overview.workspaceBinding.optional-override": "Folgt dem aktiven Umfang; globaler Speicherort anpassbar", "overview.workspaceBinding.provider-global": "Verwendet immer den globalen Umfang", "overview.candidateLocal": "Lokaler Anbieter · folgt dem aktiven Speicherumfang", "overview.candidateRemote": "Remote-Anbieter · verwendet die globale Dienstkonfiguration", "overview.placementByLlm": "Vom Agent gewählt", "overview.placementByRules": "Per Regel gewählt", "overview.placementConfidence": "Konfidenz: {confidence}", "overview.confidence.high": "Hoch", "overview.confidence.medium": "Mittel", "overview.confidence.low": "Niedrig", "overview.providerLabel": "Speicher-Engine", "overview.nativeOfficial": "Offiziell nativ", "strategy.action": "Bereichsrichtlinie", "strategy.title": "Bereichsrichtlinie", "strategy.description": "Wie Task-Agents beim Erstellen eines neuen Speicherbereichs einen Anbieter auswählen.", "strategy.loading": "Anbieterverzeichnis wird geladen…", "strategy.modeTitle": "Anbieterauswahl", "strategy.modeHint": "Gilt nur für automatisch vom Agent erstellte Bereiche; manuelle Erstellung bleibt explizit.", "strategy.manualHint": "Einen festen Anbieter festlegen; der Agent kann ihn nicht überschreiben", "strategy.automaticHint": "Zuerst verbindliche Regeln anwenden, dann den Task-Agent einen geeigneten Anbieter wählen lassen", "strategy.manualTitle": "Fester Anbieter", "strategy.manualDescription": "Wenn kein vorhandener Bereich passt, wird der neue Bereich bei diesem Anbieter erstellt.", "strategy.automaticTitle": "Regeln für intelligente Auswahl", "strategy.automaticDescription": "Daten- und Fähigkeitsgrenzen werden erzwungen; der Prompt hilft bei Gleichstand.", "strategy.save": "Speichern", "strategy.saving": "Wird gespeichert…", "overview.providerSummary.mnemon-native": "Offiziell nativer, lokal orientierter Speicher mit vollständigem Graph und Soft-Delete-Semantik", "overview.providerSummary.openviking": "Dateisystemähnlicher geteilter Speicher mit verifiziertem exaktem Schreiben und semantischem Abruf", "overview.providerSummary.honcho": "Sitzungsübergreifende Benutzermodellierung, Peer-Profile, dialektisches Schließen und dauerhafte Schlussfolgerungen", "overview.providerSummary.mem0": "Automatische Faktenextraktion, semantischer Abruf, Reranking und Deduplizierung", "overview.providerSummary.hindsight": "Wissensgraph-Speicher mit Entitätsauflösung, Multi-Strategie-Abruf und Reflexion", "overview.providerSummary.holographic": "Lokaler strukturierter Faktenspeicher mit Vertrauensbewertung, Entitätsauflösung und kompositionalem Abruf", "overview.providerSummary.retaindb": "Hybrider Cloud-Vektor-/BM25-Abruf, Benutzerprofile und typisierte dauerhafte Fakten", "overview.providerSummary.byterover": "Lokal orientierter hierarchischer Wissensbaum mit Zugriff über die brv CLI", "overview.providerSummary.supermemory": "Semantischer Speicher, persistente Profile, Unterhaltungserfassung und Multi-Container-Abruf", "overview.providerEndpoint": "Dienst-Endpunkt", "overview.providerTargetUri": "Speicherbereichs-URI", "overview.providerApiKey": "API-Schlüssel", "overview.providerApiKeyOptional": "Leer lassen, wenn Authentifizierung deaktiviert ist", "overview.providerApiKeyKeep": "Gespeichert; leer lassen, um unverändert zu belassen", "overview.providerAccount": "Account", "overview.providerDiscoveryUser": "Inhaber des User Key (Admin überspringen)", "overview.providerUser": "Benutzer", "overview.providerActorPeer": "Actor Peer", "overview.providerField.workspace": "Arbeitsbereich", "overview.providerField.userId": "Benutzer-ID", "overview.providerField.agentId": "Agent-ID", "overview.providerField.mode": "Modus", "overview.providerField.rerank": "Suchergebnisse neu ranken", "overview.providerField.bankId": "Speicherbank", "overview.providerField.budget": "Abrufbudget", "overview.providerField.dataPath": "Pfad des Faktenspeichers", "overview.providerField.defaultDirectory": "Standard-Wissensverzeichnis", "overview.providerField.defaultTrust": "Standardvertrauen", "overview.providerField.minTrust": "Mindestvertrauen für Abruf", "overview.providerField.project": "Projekt", "overview.providerField.cliPath": "brv-Programmdatei", "overview.providerField.workingDirectory": "Wissensverzeichnis", "overview.providerField.containerTag": "Container-Tag", "overview.providerField.searchMode": "Suchmodus", "overview.providerOption.platform": "Mem0 Platform", "overview.providerOption.self-hosted": "Selbst gehosteter Server", "overview.providerOption.low": "Niedrig", "overview.providerOption.mid": "Mittel", "overview.providerOption.high": "Hoch", "overview.providerOption.hybrid": "Hybrid", "overview.providerOption.memories": "Einträge", "overview.providerOption.documents": "Dokumente", "overview.providerKindLocal": "Lokale Engine", "overview.providerKindRemote": "Remote-Dienst", "overview.providerSecretClear": "Gespeicherte Zugangsdaten löschen", "overview.providerWriteExact": "Exaktes Schreiben", "overview.providerWriteAsync": "Asynchrone semantische Extraktion", "overview.providerGraphReady": "Beziehungsgraph verfügbar", "overview.providerSearchReady": "Einheitliche Suche verfügbar", "overview.providerRemote": "Externer Remote-Speicher", "overview.providerLocal": "Externer lokaler Speicher", "overview.creating": "Wird erstellt…", "overview.createAction": "Erstellen", "overview.editName": "Name", "overview.editDescription": "Routing-Beschreibung", "overview.deleteTitle": "„{name}“ löschen?", "overview.deleteWarning": "Dadurch werden der Speicherbereich sowie alle enthaltenen Erinnerungen und Beziehungen dauerhaft gelöscht. Dies kann nicht rückgängig gemacht werden.", "overview.lastStoreDeleteHint": "Mnemon muss mindestens einen nativen Store behalten. Der letzte Speicherbereich kann deaktiviert, aber nicht gelöscht werden.", "overview.deleteAction": "Dauerhaft löschen", "overview.disconnectTitle": "„{name}“ trennen?", "overview.disconnectWarning": "Dies entfernt nur die {provider}-Verbindung aus dem DSH-Speicherbereichsverzeichnis. Die Daten in der zugrunde liegenden Engine bleiben unberührt.", "overview.disconnectAction": "Trennen", "overview.snapshot": "Bereichsübergreifender Live-Snapshot", "overview.snapshotSources": "Beobachtbarkeit des Snapshots", "overview.snapshotSourcesHint": "Beziehungsgraphen, Projektionen und reine Abfragebereiche bleiben klar getrennt.", "overview.noVisualTitle": "Aktive Bereiche erlauben nur Abfragen", "overview.noVisualText": "Diese Anbieter stellen weder auflistbare Inhalte noch einen Graph bereit. Öffnen Sie „Abruf“ und stellen Sie eine gezielte Frage.", "overview.waitingSnapshot": "Wartet auf den ersten Snapshot", "overview.updatedAt": "Aktualisiert um {time}", "overview.edgeScope": "Bereichszugehörigkeit", "overview.edgeTemporal": "Zeitlich", "overview.edgeSemantic": "Semantisch", "overview.edgeCausal": "Kausal", "overview.edgeEntity": "Entitätsbeziehung", "overview.graphComposition": "{spaces} Bereiche · {memories} Einträge · {entities} Entitäten", "overview.graphCount": "{visible} / {total} Elemente angezeigt", "overview.graphEdges": "{count} Graph-Kanten", "overview.inspector": "Speicherdetails", "overview.inspectorSpace": "Speicherbereich-Details", "overview.inspectorEntity": "Entitätsdetails", "overview.selectNode": "Graph-Element auswählen", "overview.selectNodeText": "Prüfen Sie den genauen Kontext eines Speicherbereichs, einer Entität oder eines Eintrags.", "overview.closeInspector": "Knotendetails schließen", "overview.memoryId": "Speicher-ID", "overview.spaceId": "Speicherbereich-ID", "overview.containedMemories": "Enthaltene Einträge", "overview.entityMentions": "Indizierte Erwähnungen", "overview.exploreNode": "Abrufen", "overview.previewAria": "Vollständigen Inhalt anzeigen", "overview.previewTitle": "Vollständiger Inhalt", "overview.loading": "Bereichsübergreifender Live-Snapshot wird synchronisiert…", "graph.layoutAria": "Graph-Layout", "graph.quietAction": "Ruhige Ansicht", "graph.quietHint": "Blendet Gitter und dauerhafte Beschriftungen aus; wählen Sie einen Knoten, um Nachbarn hervorzuheben, und klicken Sie auf den Hintergrund oder drücken Sie Esc zum Zurücksetzen. Wird nur in diesem Browser gespeichert.", "graph.layoutNatural": "Natürliches Layout", "graph.layoutUniform": "Gleichmäßiges Layout", "graph.layoutCustom": "Benutzerdefiniertes Layout", "graph.layoutStatus": "Layout: {layout}", "graph.draggable": "{layout} · ziehbar", "graph.naturalAction": "Natürlich anordnen", "graph.uniformAction": "Gleichmäßig zurücksetzen", "graph.aria": "Mnemon Live-Speichergraph mit {nodes} Elementen und {edges} Kanten", "graph.aria3d": "Mnemon 3D-Speichergraph mit {nodes} Elementen und {edges} Kanten", "graph.viewModeAria": "Graph-Dimensionsansicht", "graph.view2d": "2D", "graph.view3d": "3D", "graph.selectNodeAction": "Knoten auswählen", "graph.noNodeSelected": "Kein Knoten ausgewählt", "graph.orbitAria": "3D-Kamerasteuerung", "graph.orbitHint": "3D · Ziehen zum Drehen · Scrollen zum Zoomen", "graph.orbitShort": "3D", "graph.zoomInAction": "Vergrößern", "graph.zoomOutAction": "Verkleinern", "graph.resetViewAction": "Ansicht zurücksetzen", "graph.kindSpace": "Speicherbereich", "graph.kindEntity": "Entität", "search.title": "Speicher abrufen", "search.description": "Suchen liefert gespeicherte Einträge; KI fragen antwortet mit Quellenangaben.", "search.maxResults": "Bis zu {count} Ergebnisse", "search.placeholder": "Warum haben wir uns für SQLite entschieden? Welche Release-Konventionen gelten?", "search.queryAria": "Speicherabfrage", "search.categoryAria": "Speicherkategorie", "search.strategy": "Strategie", "search.modeAria": "Abrufmodus", "search.modeSmart": "Intelligenter Abruf", "search.modeKeyword": "Schlüsselwortsuche", "search.modeBasic": "Einfacher Abgleich", "search.searching": "Wird abgerufen…", "search.action": "Suchen", "search.agentAction": "KI fragen", "search.agentSearching": "Agent analysiert…", "search.agentAnswer": "Agent-Antwort", "search.agentAnswerHint": "Gestützt auf die unten abgerufenen Belege", "search.startTitle": "Mit einer gezielten Frage beginnen", "search.startText": "Eine gezielte Entität, Entscheidung oder Zeitlinie ist zuverlässiger als das Laden der gesamten Datenbank.", "search.emptyTitle": "Keine Treffer", "search.emptyText": "Versuchen Sie ein spezifischeres Stichwort zu einer Entität, Entscheidung oder Zeitlinie.", "search.results": "Abgerufene Rohbelege", "search.related": "Verwandte Einträge", "search.closeRelated": "Verwandte Einträge schließen", "search.traversing": "Graph wird durchlaufen…", "search.noRelated": "Keine verwandten Knoten innerhalb von zwei Sprüngen gefunden.", "search.sourcesTitle": "Suchabdeckung", "entities.title": "Entitäts-Explorer", "entities.description": "Sehen Sie, wie Entitäten Fakten, Entscheidungen und Kontext verbinden.", "entities.sourcesTitle": "Abdeckung der Entitätsfunktionen", "entities.unsupportedTitle": "Kein aktiver Bereich stellt einen Entitätsindex bereit", "entities.unsupportedText": "Die aktiven Anbieter bleiben über „Abruf“ durchsuchbar, werden hier jedoch nicht als künstlicher Entitätsgraph dargestellt.", "entities.count": "{count} aktive Entitäten", "entities.nameAria": "Entitätsname", "entities.placeholder": "Beliebige Entität eingeben…", "entities.action": "Erkunden", "entities.top": "Häufige Entitäten", "entities.frequency": "Nach Häufigkeit", "entities.filterHint": "Tippen zum lokalen Filtern der Liste (Esc zum Leeren).", "entities.emptyRail": "Entitäten erscheinen hier, sobald Einträge mit Entitäts-Metadaten gespeichert wurden.", "entities.filterEmpty": "Kein lokaler Treffer. Klicken Sie auf „Erkunden“, um den Host abzufragen.", "entities.loading": "Einträge der Entität werden gelesen…", "entities.selectTitle": "Entität auswählen oder eingeben", "entities.selectText": "Die Auswahl zeigt alle Einträge mit dieser Entität; „Verwandte Einträge“ ergänzt weitere vom Abruf zugeordnete Einträge.", "entities.emptyTitle": "Keine verwandten Einträge", "entities.emptyText": "Versuchen Sie den vollständigen Namen oder einen anderen Entitäts-Alias.", "entities.railLoading": "Entitäten werden gelesen…", "entities.memoriesHint": "Einträge, die diese Entität enthalten", "entities.relatedTitle": "Verwandte Einträge", "entities.relatedHint": "Als verwandt abgerufen, ohne diese Entität", "entities.findRelated": "Verwandte Einträge", "entities.hideRelated": "Ausblenden", "entities.noCarrying": "Kein Eintrag enthält diese Entität.", "entities.noRelated": "Keine weiteren verwandten Einträge.", "entities.retry": "Erneut versuchen", "entities.sourceReady": "{count} Entitäten", "entities.sourcePartial": "{count} Entitäten · teilweise", "readSources.status.loading": "Wird gelesen", "remember.title": "Im Speicher sichern", "remember.description": "Der Task-Agent entscheidet über die Speicherung, verdichtet den Inhalt und schreibt ihn in einen Speicherbereich.", "remember.readOnlyTitle": "Schreibgeschützter Modus", "remember.readOnlyText": "Diese Bereitstellung deaktiviert Schreibzugriffe auf den Speicher. Ändern und speichern Sie die Mnemon-Konfiguration in DSH, um sie zu aktivieren.", "remember.candidate": "Inhalt", "remember.placeholder": "Hintergrund, Präferenzen, Entscheidungen oder Schlussfolgerungen, die dauerhaft erhalten bleiben sollen.", "remember.taskAgentHint": "Der Host kann derzeit keinen isolierten Task-Agent erstellen. Aktualisieren Sie den Status und versuchen Sie es erneut.", "remember.processing": "Task-Agent arbeitet…", "remember.action": "Speichern", "remember.advanced": "Erweiterte Optionen", "remember.advancedHint": "Ziel-Speicherbereich, Kategorie und Wichtigkeit festlegen", "remember.expand": "Aufklappen", "remember.target": "Ziel-Speicherbereich", "remember.asyncProviderHint": "Dieser Speicherbereich wartet auf den Abschluss der Remote-Extraktion, bevor eine zuverlässige Schreibquittung zurückgegeben wird.", "remember.entities": "Entitäten (kommagetrennt)", "remember.tags": "Tags (kommagetrennt)", "remember.advancedText": "Vorgaben durchlaufen dennoch die Duplikatprüfung und Quittung des Task-Agent.", "remember.saving": "Task-Agent arbeitet…", "remember.advancedAction": "Mit Optionen speichern", "content.title": "Speicherinhalt", "content.description": "Durchsuchen Sie die Inhalte der einzelnen Speicherbereiche.", "content.sourcesTitle": "Inhaltsmodelle der Anbieter", "content.count": "{count} Einträge", "content.filterAria": "Speicherinhalt filtern", "content.filterPlaceholder": "Inhalt oder ID filtern…", "content.categoryAria": "Speicherkategorie", "content.apply": "Filtern", "content.notice": "Reine Abfrage-Anbieter zeigen Inhalte erst nach Eingabe einer Suchanfrage an.", "content.queryRequiredTitle": "Reine Abfragebereiche warten auf eine Anfrage", "content.queryRequiredText": "Geben Sie eine gezielte Abfrage ein, um Anbieter wie ByteRover einzusehen, die keine vollständige Liste bereitstellen.", "content.emptyTitle": "Keine passenden Einträge", "content.emptyText": "Setzen Sie die Filter zurück oder speichern Sie einen ersten Eintrag.", "nav.spaces": "Speicherbereiche", "overview.editSpace": "Bearbeiten", "overview.editSpaceAria": "{name} bearbeiten", "overview.saveSpace": "Speichern", "overview.savingSpace": "Wird gespeichert…", "overview.deleteSpace": "Löschen", "overview.deleteSpaceAria": "{name} löschen", "overview.disconnectSpace": "Trennen", "overview.disconnectSpaceAria": "{name} trennen", "overview.deletingSpace": "Wird gelöscht…", "common.score": "Relevanz {value}", "overview.providerEnableHint": "Aktivieren Sie weitere Anbieter auf der Seite „Speicherbereiche“ unter Plugins → dsh-brain-mnemon.", "search.citations": "Quellen", "overview.rediscoverAction": "Neu erkennen", "overview.rediscovering": "Wird erkannt…", "overview.rediscoverHint": "Aktivierte Anbieter erneut abfragen; neue Bereiche werden hinzugefügt, aber noch nicht für den Abruf aktiviert", "overview.rediscoveryAdded": "Neue Bereiche gefunden: {count}. Sie nehmen am Abruf teil, sobald Sie sie einschalten.", "overview.rediscoveryNone": "Keine neuen Bereiche.", "overview.rediscoveryDisconnected": "Getrennte Bereiche bleiben getrennt: {count}. Speichern Sie die Einstellungen des Anbieters erneut, um sie wiederherzustellen.", "overview.rediscoveryFailed": "{provider} konnte die Erkennung nicht abschließen: {error}", "overview.rediscoveryTimedOut": "{provider} hat nicht rechtzeitig geantwortet; versuchen Sie „Neu erkennen“ später erneut.", "overview.rediscoveryDismiss": "Schließen", "overview.newSpace": "Neu", "common.copyId": "ID kopieren", "common.readOnly": "Schreibgeschützt", "common.activationOnly": "Nur Aktivierungssteuerung", "common.active": "Aktiv", "common.category": "Kategorie", "common.importanceLabel": "Wichtigkeit", "common.importance": "Wichtigkeit {value}", "common.hops": "{count} Sprünge", "common.allCategories": "Alle Kategorien", "common.memories": "{count} Einträge", "common.edges": "{count} Kanten", "card.confirmText": "Diesen Eintrag vorläufig löschen?", "card.processing": "Wird verarbeitet…", "card.confirmForget": "Vergessen bestätigen", "card.related": "Verwandt", "card.clone": "Als Vorlage nutzen", "card.forget": "Vergessen", "readSources.all": "Alle Anbieter", "readSources.mode.search": "Native Suche", "readSources.mode.graph": "Echter Beziehungsgraph", "readSources.mode.projection": "Inhaltsprojektion", "readSources.mode.enumerable": "Auflistbarer Inhalt", "readSources.mode.query-only": "Nur Abfrage", "readSources.mode.entities": "Entitätsindex", "readSources.mode.unsupported": "Nicht unterstützt", "readSources.status.ready": "{count} beobachtbar", "readSources.status.empty": "Verbunden · kein Inhalt", "readSources.status.query-required": "Erst nach Abfrage lesbar", "readSources.status.unsupported": "In dieser Ansicht nicht verfügbar", "readSources.status.unavailable": "Verbindung nicht verfügbar", "readSources.edges": "{count} echte Beziehungen", "readSources.model.mnemon-native": "Fakten, Entitäten und typisierte Beziehungen", "readSources.model.openviking": "Hierarchie und mehrstufige Inhalte", "readSources.model.honcho": "Peer-Schlussfolgerungen und Profile", "readSources.model.mem0": "Extrahierte semantische Erinnerungen", "readSources.model.hindsight": "Speichereinheiten und Wissensgraph", "readSources.model.holographic": "Vertrauenswürdige Fakten und Entitäten", "readSources.model.retaindb": "Profile und typisierte Fakten", "readSources.model.byterover": "Wissensbaum-Abfragen", "readSources.model.supermemory": "Erinnerungen und erfasste Dokumente", "common.inactive": "Inaktiv", "config.providerSecretShow": "Zugangsdaten anzeigen", "config.providerSecretHide": "Zugangsdaten ausblenden", "config.providerSecretStoredValue": "Gespeicherte Zugangsdaten", "config.providersSpacesOffTitle": "Speicherbereiche sind deaktiviert", "config.providersSpacesOffDetail": "Gespeicherte Verbindungen bleiben erhalten", "config.providersSpacesOn": "„Speicherbereiche“ einschalten", "config.providersReadOnlyTitle": "dsh-brain-mnemon ist schreibgeschützt", "config.providersReadOnlyDetail": "Wenn writeEnabled auf false steht, können Anbieter nicht ein- oder ausgeschaltet werden.", "spaces.offNote": "Aktivieren, um Anbieter und Embeddings zu konfigurieren", "config.providersTitle": "Speicheranbieter", "config.providersDescription": "Anbieter speichern Speicherbereiche. Aktivieren oder Speichern synchronisiert bestehende Bereiche; Deaktivieren entfernt nur die lokale Zuordnung, niemals Daten von Drittanbietern.", "config.nativeSummary": "Offiziell nativer Langzeitspeicher mit vollständigem Beziehungsgraph", "config.officialNative": "Offiziell nativ", "config.nativeCliMissing": "CLI nicht installiert (optional)", "config.embeddingTitle": "Lokale Vektor-Embeddings", "config.embeddingDescription": "Übergibt Embedding-Endpunkt und Modell an die Mnemon CLI (/v1 nutzt OpenAI-kompatibles Protokoll, sonst Ollama).", "config.embeddingManaged": "Embedding-Einstellungen in DSH verwalten", "config.embeddingManagedHint": "Wenn aktiviert, überschreiben die gespeicherten Werte die Umgebung des Mnemon-Unterprozesses. Wenn deaktiviert, nutzt Mnemon die Host-Umgebung und seine integrierten Standardwerte.", "config.embeddingEndpoint": "Embedding-Endpunkt", "config.embeddingModel": "Embedding-Modell", "config.embeddingApiKey": "API-Schlüssel (optional, OpenAI-kompatible Server)", "config.embeddingApiKeyInvalid": "Der API-Schlüssel darf keine Steuerzeichen enthalten und höchstens 2048 Zeichen lang sein.", "config.embeddingProtocol": "Protokoll", "config.embeddingProtocolAuto": "Automatisch (anhand /v1 erkennen)", "config.embeddingProtocolOllama": "Ollama", "config.embeddingProtocolOpenai": "OpenAI-kompatibel", "config.embeddingProtocolInvalid": "Das Protokoll muss Automatisch, Ollama oder OpenAI-kompatibel sein.", "config.embeddingEndpointInvalid": "Der Embedding-Endpunkt muss eine absolute HTTP(S)-URL ohne Zugangsdaten, Query oder Fragment sein.", "config.embeddingModelInvalid": "Das Embedding-Modell muss 1–200 Zeichen enthalten und darf keine Steuerzeichen enthalten.", "config.embeddingSecurity": "Speicher- und Abfragetexte werden an diesen Endpunkt gesendet; Schlüssel bleiben in den DSH-Zugangsdaten (für Remote-Dienste HTTPS verwenden).", "config.embeddingTest": "Status testen", "config.embeddingNotTested": "Die Embedding-Verbindung und die Abdeckung der einzelnen Mnemon Native-Bereiche wurden noch nicht geprüft.", "config.embeddingTesting": "Embedding-Server und Abdeckung werden über Mnemon geprüft…", "config.embeddingSaveBeforeTest": "Speichern Sie die Embedding-Einstellungen, bevor Sie die wirksamen Laufzeitwerte testen.", "config.embeddingTestUnavailable": "Dieser DSH Host unterstützt keine Embedding-Statusprüfungen.", "config.embeddingCliMissing": "Für den Test ist die Mnemon CLI erforderlich; diese Embedding-Einstellungen gelten nur für Mnemon Native.", "config.embeddingStatusAvailable": "Embedding-Modell verfügbar · {model} · {embedded}/{total} eingebettet ({coverage})", "config.embeddingStatusAvailableWithProtocol": "Embedding-Modell verfügbar · {model} · Protokoll {protocol} · {embedded}/{total} eingebettet ({coverage})", "config.embeddingStatusUnavailable": "Embedding-Modell nicht verfügbar · {model} · {embedded}/{total} eingebettet ({coverage})", "config.embeddingStatusUnavailableWithProtocol": "Embedding-Modell nicht verfügbar · {model} · Protokoll {protocol} · {embedded}/{total} eingebettet ({coverage})", "config.embeddingStatusFailed": "Embedding-Statusprüfung fehlgeschlagen: {error}", "config.embeddingSpaces": "Einzelne Mnemon Native-Bereiche", "config.embeddingSpaceCounts": "{embedded}/{total} eingebettet ({coverage})", "config.embeddingSpaceFailed": "Konnte nicht gelesen werden: {error}", "config.embeddingMissing": "Einträge ohne Vektor werden beim semantischen Abgleich ausgelassen.", "config.embeddingMissingFill": "Einträge ohne Vektor werden beim semantischen Abgleich ausgelassen; „Ergänzen“ neben einem Bereich erzeugt fehlende Vektoren.", "config.embeddingMissingOffline": "Einträge ohne Vektor werden beim semantischen Abgleich ausgelassen; sobald der Embedding-Dienst antwortet, können sie hier ergänzt werden.", "config.embeddingSpacesUnread": "Nicht lesbare Bereiche sind in der Gesamtzahl nicht enthalten.", "config.embeddingFill": "Ergänzen", "config.embeddingFilling": "Wird ergänzt…", "config.embeddingFillLabel": "Vektoren für {name} ergänzen", "config.embeddingFillingLabel": "Vektoren für {name} werden ergänzt", "config.embeddingFillDone": "{filled} Vektoren für {name} ergänzt.", "config.embeddingFillMore": "{filled} Vektoren für {name} ergänzt; {remaining} fehlen noch. Klicken Sie erneut auf „Ergänzen“, um fortzufahren.", "config.embeddingFillPartly": "{filled} Vektoren für {name} ergänzt; für die übrigen {remaining} gab der Embedding-Dienst keine Vektoren zurück. Versuchen Sie es später erneut mit „Ergänzen“.", "config.embeddingFillRefused": "Der Embedding-Dienst hat keine Vektoren für {name} zurückgegeben. Prüfen Sie, ob er läuft und das Modell {model} bereitstellt.", "config.embeddingFillFailed": "Die Vektoren für {name} wurden nicht ergänzt: {error}", "config.providerGlobalLocation": "Globaler Speicherort", "config.providerGlobalLocationHint": "{provider} verwendet standardmäßig das globale Verzeichnis, oder Sie wählen einen benutzerdefinierten Ort.", "config.providerGlobalLocationWorkspaceHint": "Der Arbeitsbereich-Standard ist aktiv. Wechseln Sie zu Global, um einen benutzerdefinierten Ort festzulegen.", "config.providerDefaultLocation": "Standard (folgt dem Umfang)", "config.providerSaveFailed": "Konfiguration konnte nicht gespeichert werden: {error}", "config.providerServiceTitle": "Dienstkonfiguration", "config.providerServiceHint": "Wird von allen Speicherbereichen dieses Anbieters gemeinsam genutzt; Aktivieren oder Speichern aktualisiert deren Verzeichniszuordnungen und Metadaten.", "config.providerEnableHint": "Vervollständigen und speichern Sie die Dienstkonfiguration, um den Anbieter zu aktivieren und alle sichtbaren Namespaces zu synchronisieren.", "config.providerEnabled": "Aktiviert", "config.providerDisabled": "Nicht aktiviert", "config.providerDisabledConfigured": "Aus · Konfiguration erhalten", "config.providerNeedsConfiguration": "Konfiguration erforderlich", "config.providerToggleAria": "{provider} aktivieren", "config.providerToggleFailed": "Anbieterstatus konnte nicht geändert werden: {error}", "config.enableProvider": "Speichern und aktivieren", "config.providerServiceSaved": "Dienstkonfiguration gespeichert und Speicherbereiche synchronisiert", "config.saveProviderService": "Speichern", "config.providerUnavailable": "Dieser DSH Host unterstützt keine Anbieter-Dienstkonfiguration.", "config.saveScopeBeforeProviders": "Der Speicherumfang enthält ungespeicherte Änderungen. Speichern Sie zuerst den Umfang, bevor Sie Anbieter in diesem Verzeichnis konfigurieren.", "config.providerTargetWorkspace": "Aktueller Arbeitsbereich: {workspace}. Anbieter mit der Markierung „Arbeitsbereich“ verwenden diesen Umfang für Konfiguration und Speicherbereiche.", "config.loadingProviders": "Anbieterkonfigurationen werden geladen…", "config.providerLoadFailed": "Anbieterkonfigurationen konnten nicht geladen werden: {error}", "config.retryProviders": "Erneut versuchen", "config.saving": "Wird gespeichert…", "config.embeddingApiKeyEnv": "Umgebungsvariable für API-Schlüssel (optional)", "config.embeddingEnvInvalid": "Geben Sie einen gültigen Host-Umgebungsvariablennamen ein, z. B. MY_EMBEDDING_API_KEY.", "config.embeddingAuthChoice": "Geben Sie entweder einen API-Schlüssel oder einen Umgebungsvariablennamen an, nicht beides.", "config.embeddingKeyPlaceholder": "Leer lassen, um den bestehenden Schlüssel zu behalten", "config.embeddingCredentialSaved": "Eine DSH-Zugangsdatenreferenz ist gespeichert; der Schlüssel wird niemals an diese Seite zurückgegeben.", "config.embeddingClearKey": "Schlüssel- und Umgebungsvariablenreferenzen dieser Verbindung entfernen", "config.embeddingMigrateKey": "Vorhandenen Klartextschlüssel in DSH-Zugangsdaten verschieben", "config.embeddingUpgradeHost": "Aktualisieren Sie den dsh-brain-mnemon Starter, um Zugangsdaten zu verwalten. Die bestehende Verbindung funktioniert weiterhin; neue Schlüssel können hier noch nicht eingegeben werden.", "overview.openProvidersSettings": "Anbieter konfigurieren", "config.policyTitle": "Bereichsrichtlinie", "config.policyDescription": "Standardregeln für die Anbieterwahl, wenn ein Task-Agent einen neuen Speicherbereich erstellt; manuelle Erstellung bleibt explizit.", "config.policyConnectionIncomplete": "Füllen Sie die erforderlichen Verbindungsfelder für den ausgewählten Anbieter aus.", "config.policyCandidatesEmpty": "Wählen Sie mindestens einen Kandidaten-Anbieter aus.", "config.policyBoundaryMismatch": "Remote-Kandidaten können nicht ausgewählt werden, wenn die Datengrenze auf „Nur lokal“ gesetzt ist.", "config.policyPromptInvalid": "Der Strategie-Prompt darf höchstens 4000 Zeichen enthalten.", "config.recallTitle": "Abruf & Zeitlimits", "config.recallDescription": "Konfigurieren Sie das Ergebnislimit pro Abruf, die Qualitätsfilterrichtlinie und das Zeitlimit für Anbieteraufrufe.", "config.providersBadge": "{enabled}/{total} aktiviert", "config.recallBadge": "{limit} · {policy}", "config.recallPolicyShort.strict-v1": "Strikt", "config.recallPolicyShort.balanced-v1": "Ausgewogen", "config.recallPolicyShort.exhaustive-v1": "Vollständig", "config.defaultRecallLimit": "Standard-Abruflimit", "config.defaultRecallLimitHint": "Maximale Anzahl zurückgegebener Einträge pro Abruf (1–50, Standard 10).", "config.defaultRecallLimitInvalid": "Das Standard-Abruflimit muss eine ganze Zahl zwischen 1 und 50 sein.", "config.recallQualityPolicy": "Qualitätsrichtlinie für den Abruf", "config.recallPolicy.strict-v1": "Strikt (strict-v1)", "config.recallPolicy.strict-v1.detail": "Standardrichtlinie; verwirft Treffer mit niedriger Relevanz und begrenzt mittlere oder unkalibrierte Ergebnisse.", "config.recallPolicy.balanced-v1": "Ausgewogen (balanced-v1)", "config.recallPolicy.balanced-v1.detail": "Reiht hohe und mittlere Treffer zuerst ein und behält positive Treffer mit niedrigerer Relevanz bei.", "config.recallPolicy.exhaustive-v1": "Vollständig (exhaustive-v1)", "config.recallPolicy.exhaustive-v1.detail": "Behält jeden gültigen Kandidaten bis zum Abruflimit bei.", "config.timeoutMs": "Vorgangs-Zeitlimit (ms)", "config.timeoutMsHint": "Maximale Wartezeit pro Anbieter- oder CLI-Aufruf (100–120000 ms, Standard 10000).", "config.timeoutMsInvalid": "Das Vorgangs-Zeitlimit muss eine ganze Zahl zwischen 100 und 120000 ms sein." }, ru: { "term.space": "Пространство памяти", "term.spaces": "Пространства памяти", "category.decision": "Решение", "category.preference": "Предпочтение", "category.fact": "Факт", "category.insight": "Наблюдение", "category.context": "Контекст", "category.general": "Общее", "nav.memory.aria": "Страницы Пространств памяти", "nav.overview": "Обзор", "nav.search": "Извлечение", "nav.entities": "Сущности", "nav.rememberAction": "Сохранить в память", "nav.content": "Содержимое", "overview.description": "Долгосрочная память в Mnemon Native или у сторонних Провайдеров; активные пространства участвуют в извлечении.", "overview.pageDescription": "Управление Пространствами памяти, проверка состояния провайдеров и живых снимков.", "overview.fullSyncPending": "Ожидание первой полной синхронизации", "overview.fullSyncJustNow": "Последняя полная синхронизация: только что", "overview.fullSyncSeconds": "Последняя полная синхронизация: {count} с назад", "overview.fullSyncMinutes": "Последняя полная синхронизация: {count} мин назад", "overview.fullSyncHours": "Последняя полная синхронизация: {count} ч назад", "overview.fullSyncDays": "Последняя полная синхронизация: {count} дн назад", "overview.directory": "Каталог Пространств памяти", "overview.directory.description": "Нажмите на карточку, чтобы проверить подключение; переключатель включает пространство в извлечение.", "overview.directory.unsynced": "Каталог не синхронизирован", "overview.directory.unsyncedBadge": "Каталог ожидает синхронизации", "overview.directoryLoading": "Загрузка каталога Пространств памяти", "overview.healthLoading": "Проверка состояния Пространств памяти", "overview.storageHealthy": "Хранилище исправно", "overview.storageUnhealthy": "Хранилище недоступно", "overview.storageChecking": "Проверка", "overview.reconnecting": "Переподключение", "overview.reconnectHint": "Нажмите на карточку, чтобы переподключить и синхронизировать это Пространство памяти", "overview.reconnectAria": "Переподключить {name}", "overview.snapshotLoading": "Загрузка живого снимка всех пространств", "overview.metadataAction": "Упорядочить", "overview.metadataTitle": "Обновление метаданных Пространств памяти с помощью AI", "overview.metadataDescription": "Берёт выборку из каждого пространства по самому быстрому нативному пути и генерирует названия и описания.", "overview.metadataUnavailable": "Временно недоступно: не найден активный Агент для текущей области памяти", "overview.metadataLoading": "Загрузка доступных Пространств памяти…", "overview.metadataEmpty": "Нет активных Пространств памяти, метаданные которых может обновить AI.", "overview.metadataSelected": "Выбрано Пространств памяти: {count}", "overview.metadataSelectAll": "Выбрать все", "overview.metadataClear": "Очистить", "overview.metadataSafety": "Обновляются только локальные названия и описания; сохранённые записи памяти не затрагиваются.", "overview.metadataGenerate": "Сгенерировать с AI ({count})", "overview.metadataRunningCount": "Выполняется: {count}", "overview.metadataTaskRunning": "Генерация…", "overview.metadataTaskSuccess": "Обновлено", "overview.metadataTaskError": "Ошибка: {error}", "overview.metadataTaskUnknown": "Неизвестная ошибка", "overview.mnemonDefault": "Mnemon по умолчанию", "overview.toggleAria": "Переключатель чтения для {name}", "overview.toggling": "Переключение", "overview.noDescription": "Описание для маршрутизации пока не задано.", "overview.unsyncedTitle": "Каталог Пространств памяти не синхронизирован", "overview.unsyncedShort": "Web-клиент и Хост DSH используют разные контракты. Перезапустите Хост, чтобы зарегистрировать существующие хранилища Store.", "overview.unsyncedLong": "Хост всё ещё использует прежний контракт плагина. Перезапустите DSH, чтобы заново обнаружить существующие хранилища Store; файлы .db не будут удалены.", "overview.emptyTitle": "Пространств памяти пока нет", "overview.emptyShort": "Создайте первое пространство и сохраните в него устойчивый контекст.", "overview.emptyLong": "Создайте Пространство памяти Mnemon или включите стороннего провайдера на странице dsh-brain-mnemon в разделе «Плагины», чтобы синхронизировать его существующие пространства имён.", "overview.noActiveTitle": "Нет активных Пространств памяти", "overview.noActiveText": "Включите доступ на чтение хотя бы для одного пространства, чтобы здесь отобразился его живой граф.", "overview.noContentTitle": "В активных пространствах пока нет содержимого", "overview.noContentText": "Сохраните записи памяти, чтобы увидеть здесь их узлы и связи.", "overview.newAction": "Создать", "overview.createTitle": "Создать Пространство памяти", "overview.createDialogHint": "Опишите пространство и выберите Провайдера; учётные данные и пути берутся из настроек.", "overview.createIdentityTitle": "Сведения о Пространстве памяти", "overview.createIdentityHint": "Название идентифицирует пространство; описание подсказывает агенту, когда записывать в него и извлекать данные.", "overview.createPlacementTitle": "Провайдер Пространства памяти", "overview.createPlacementHint": "Явное ручное создание с привязкой к выбранному включённому Провайдеру.", "overview.createName": "Название нового Пространства памяти", "overview.createNamePlaceholder": "Название", "overview.createDescription": "Описание нового Пространства памяти", "overview.createDescriptionPlaceholder": "Опишите, что здесь должно храниться и когда это нужно извлекать", "overview.placementMode": "Выбор движка", "overview.placementManual": "Выбрать вручную", "overview.placementAutomatic": "Умный выбор", "overview.recommended": "Рекомендуется", "overview.placementPolicy": "Политика выбора", "overview.placementPolicyHint": "Правила принудительно соблюдаются хостом. Промпт лишь направляет выбор среди подходящих кандидатов.", "overview.placementPrompt": "Промпт стратегии (необязательно)", "overview.placementPromptPlaceholder": "Например: это командная база знаний. При необходимости точной записи выбирать локальное хранилище, иначе — общее.", "overview.dataBoundary": "Граница данных", "overview.dataBoundaryRemote": "Удалённые сервисы разрешены", "overview.dataBoundaryLocal": "Только локально", "overview.preference": "Мягкое предпочтение", "overview.preferenceBalanced": "Сбалансированно", "overview.preferenceLocal": "Сначала локальные", "overview.preferenceShared": "Сначала общие", "overview.requiredCapabilities": "Обязательные возможности (любые)", "overview.capability.graph": "Граф связей", "overview.capability.exact-write": "Точная запись", "overview.capability.forget": "Безопасное забывание", "overview.candidateNativeReady": "Официальный нативный · следует текущей области памяти", "overview.providerServiceRequired": "Выкл.", "overview.nativeCliRequired": "Требуется Mnemon CLI на этой машине; другие провайдеры работают без него", "overview.workspaceBinding.automatic": "Следует текущей области памяти", "overview.workspaceBinding.optional-override": "Следует текущей области; глобальное расположение можно переопределить", "overview.workspaceBinding.provider-global": "Всегда использует глобальную область", "overview.candidateLocal": "Локальный провайдер · следует текущей области памяти", "overview.candidateRemote": "Удалённый провайдер · использует глобальную конфигурацию сервиса", "overview.placementByLlm": "Выбрано Агентом", "overview.placementByRules": "Выбрано по правилам", "overview.placementConfidence": "Уверенность: {confidence}", "overview.confidence.high": "Высокая", "overview.confidence.medium": "Средняя", "overview.confidence.low": "Низкая", "overview.providerLabel": "Движок памяти", "overview.nativeOfficial": "Официальный нативный", "strategy.action": "Политика пространств", "strategy.title": "Политика пространств", "strategy.description": "Как агенты задач выбирают Провайдера при создании нового Пространства памяти.", "strategy.loading": "Загрузка каталога Провайдеров…", "strategy.modeTitle": "Выбор Провайдера", "strategy.modeHint": "Применяется только к пространствам, создаваемым Агентом; при ручном создании выбор всегда явный.", "strategy.manualHint": "Закрепить одного Провайдера; Агент не сможет его изменить", "strategy.automaticHint": "Сначала применить жёсткие правила, затем позволить агенту задач выбрать подходящего Провайдера", "strategy.manualTitle": "Фиксированный Провайдер", "strategy.manualDescription": "Если ни одно существующее пространство не подходит, создавать новое у этого Провайдера.", "strategy.automaticTitle": "Правила умного выбора", "strategy.automaticDescription": "Правила границ данных и возможностей соблюдаются строго; промпт разрешает спорные случаи.", "strategy.save": "Сохранить", "strategy.saving": "Сохранение…", "overview.providerSummary.mnemon-native": "Официальное нативное локальное хранилище с полным графом связей и мягким удалением", "overview.providerSummary.openviking": "Общая память в формате файловой системы с проверяемой точной записью и семантическим извлечением", "overview.providerSummary.honcho": "Кросс-сессионное моделирование пользователя, профили Peer, диалектические рассуждения и устойчивые выводы", "overview.providerSummary.mem0": "Автоматическое извлечение фактов, семантический поиск, переранжирование и дедупликация", "overview.providerSummary.hindsight": "Память на базе графа знаний с разрешением сущностей, многостратегическим извлечением и рефлексией", "overview.providerSummary.holographic": "Локальная структурированная память фактов с оценкой доверия, разрешением сущностей и композиционным извлечением", "overview.providerSummary.retaindb": "Облачный гибридный поиск (векторный/BM25), профили пользователей и типизированные устойчивые факты", "overview.providerSummary.byterover": "Локальное иерархическое дерево знаний с доступом через brv CLI", "overview.providerSummary.supermemory": "Семантическая память, постоянные профили, импорт диалогов и извлечение из нескольких контейнеров", "overview.providerEndpoint": "Адрес сервиса", "overview.providerTargetUri": "URI области памяти", "overview.providerApiKey": "Ключ API", "overview.providerApiKeyOptional": "Оставьте пустым, если аутентификация отключена", "overview.providerApiKeyKeep": "Сохранён; оставьте пустым, чтобы не менять", "overview.providerAccount": "Аккаунт", "overview.providerDiscoveryUser": "Владелец User Key (пропустить Admin)", "overview.providerUser": "Пользователь", "overview.providerActorPeer": "Actor Peer", "overview.providerField.workspace": "Рабочая область", "overview.providerField.userId": "ID пользователя", "overview.providerField.agentId": "ID агента", "overview.providerField.mode": "Режим", "overview.providerField.rerank": "Переранжировать результаты поиска", "overview.providerField.bankId": "Банк памяти", "overview.providerField.budget": "Бюджет извлечения", "overview.providerField.dataPath": "Путь к хранилищу фактов", "overview.providerField.defaultDirectory": "Каталог знаний по умолчанию", "overview.providerField.defaultTrust": "Доверие по умолчанию", "overview.providerField.minTrust": "Минимальное доверие при извлечении", "overview.providerField.project": "Проект", "overview.providerField.cliPath": "Исполняемый файл brv", "overview.providerField.workingDirectory": "Каталог знаний", "overview.providerField.containerTag": "Тег контейнера", "overview.providerField.searchMode": "Режим поиска", "overview.providerOption.platform": "Mem0 Platform", "overview.providerOption.self-hosted": "Собственный сервер", "overview.providerOption.low": "Низкий", "overview.providerOption.mid": "Средний", "overview.providerOption.high": "Высокий", "overview.providerOption.hybrid": "Гибридный", "overview.providerOption.memories": "Только память", "overview.providerOption.documents": "Только документы", "overview.providerKindLocal": "Локальный движок", "overview.providerKindRemote": "Удалённый сервис", "overview.providerSecretClear": "Очистить сохранённые учётные данные", "overview.providerWriteExact": "Точная запись", "overview.providerWriteAsync": "Асинхронное семантическое извлечение", "overview.providerGraphReady": "Доступен граф связей", "overview.providerSearchReady": "Доступен единый поиск", "overview.providerRemote": "Сторонняя удалённая память", "overview.providerLocal": "Сторонняя локальная память", "overview.creating": "Создание…", "overview.createAction": "Создать", "overview.editName": "Название", "overview.editDescription": "Описание для маршрутизации", "overview.deleteTitle": "Удалить «{name}»?", "overview.deleteWarning": "Пространство памяти, все его записи и связи будут удалены навсегда. Это действие нельзя отменить.", "overview.lastStoreDeleteHint": "Mnemon должен сохранять хотя бы одно нативное хранилище Store. Последнее Пространство памяти можно деактивировать, но нельзя удалить.", "overview.deleteAction": "Удалить навсегда", "overview.disconnectTitle": "Отключить «{name}»?", "overview.disconnectWarning": "Будет удалена только связь с {provider} из каталога Пространств памяти DSH. Записи в базовом движке останутся нетронутыми.", "overview.disconnectAction": "Отключить", "overview.snapshot": "Живой снимок всех пространств", "overview.snapshotSources": "Наблюдаемость снимка", "overview.snapshotSourcesHint": "Графы связей, проекции и пространства только для запросов отображаются раздельно.", "overview.noVisualTitle": "Активные пространства доступны только для запросов", "overview.noVisualText": "Эти провайдеры не предоставляют ни перечисляемого содержимого, ни графа. Откройте «Извлечение» и задайте конкретный вопрос.", "overview.waitingSnapshot": "Ожидание первого снимка", "overview.updatedAt": "Обновлено в {time}", "overview.edgeScope": "Принадлежность пространству", "overview.edgeTemporal": "Временная", "overview.edgeSemantic": "Семантическая", "overview.edgeCausal": "Причинно-следственная", "overview.edgeEntity": "Связь сущности", "overview.graphComposition": "Пространств: {spaces} · записей: {memories} · сущностей: {entities}", "overview.graphCount": "Показано {visible} / {total} элементов", "overview.graphEdges": "Рёбер графа: {count}", "overview.inspector": "Сведения о записи", "overview.inspectorSpace": "Сведения о Пространстве памяти", "overview.inspectorEntity": "Сведения о сущности", "overview.selectNode": "Выберите элемент графа", "overview.selectNodeText": "Просмотрите точный контекст Пространства памяти, сущности или записи памяти.", "overview.closeInspector": "Закрыть сведения об узле", "overview.memoryId": "ID записи памяти", "overview.spaceId": "ID Пространства памяти", "overview.containedMemories": "Содержит записей", "overview.entityMentions": "Упоминаний в индексе", "overview.exploreNode": "Извлечение", "overview.previewAria": "Просмотреть полностью", "overview.previewTitle": "Полное содержимое", "overview.loading": "Синхронизация живого снимка всех пространств…", "graph.layoutAria": "Раскладка графа", "graph.quietAction": "Спокойный вид", "graph.quietHint": "Скрывает сетку и постоянные подписи; выберите узел, чтобы сфокусироваться на соседях, затем нажмите на фон или Escape для сброса. Сохраняется только в этом браузере.", "graph.layoutNatural": "Естественная раскладка", "graph.layoutUniform": "Равномерная раскладка", "graph.layoutCustom": "Пользовательская раскладка", "graph.layoutStatus": "Раскладка: {layout}", "graph.draggable": "{layout} · можно перетаскивать", "graph.naturalAction": "Естественное распределение", "graph.uniformAction": "Равномерный сброс", "graph.aria": "Живой граф памяти Mnemon: элементов {nodes}, рёбер {edges}", "graph.aria3d": "3D-граф памяти Mnemon: элементов {nodes}, рёбер {edges}", "graph.viewModeAria": "Режим измерения графа", "graph.view2d": "2D", "graph.view3d": "3D", "graph.selectNodeAction": "Выбрать узел", "graph.noNodeSelected": "Узел не выбран", "graph.orbitAria": "Управление 3D-камерой", "graph.orbitHint": "3D · перетаскивание — вращение · колёсико — масштаб", "graph.orbitShort": "3D", "graph.zoomInAction": "Приблизить", "graph.zoomOutAction": "Отдалить", "graph.resetViewAction": "Сбросить вид", "graph.kindSpace": "Пространство памяти", "graph.kindEntity": "Сущность", "search.title": "Извлечение памяти", "search.description": "Поиск возвращает сохранённые записи; «Спросить AI» отвечает со ссылками.", "search.maxResults": "До {count} результатов", "search.placeholder": "Почему мы выбрали SQLite? Какие правила релиза действуют?", "search.queryAria": "Запрос к памяти", "search.categoryAria": "Категория памяти", "search.strategy": "Стратегия", "search.modeAria": "Режим извлечения", "search.modeSmart": "Умное извлечение", "search.modeKeyword": "Поиск по ключевым словам", "search.modeBasic": "Базовое совпадение", "search.searching": "Извлечение…", "search.action": "Поиск", "search.agentAction": "Спросить AI", "search.agentSearching": "Агент анализирует…", "search.agentAnswer": "Ответ Агента", "search.agentAnswerHint": "Основано на извлечённых ниже данных", "search.startTitle": "Начните с конкретного вопроса", "search.startText": "Точечный запрос по сущности, решению или хронологии надёжнее, чем загрузка всей базы целиком.", "search.emptyTitle": "Совпадений нет", "search.emptyText": "Попробуйте более конкретную сущность, решение или ключевое слово.", "search.results": "Исходные извлечённые записи", "search.related": "Связанные записи памяти", "search.closeRelated": "Закрыть связанные записи", "search.traversing": "Обход графа…", "search.noRelated": "В пределах двух переходов связанных узлов не найдено.", "search.sourcesTitle": "Охват поиска", "entities.title": "Обозреватель сущностей", "entities.description": "Просмотрите, как сущности связывают факты, решения и контекст.", "entities.sourcesTitle": "Охват поддержки сущностей", "entities.unsupportedTitle": "Ни одно активное пространство не предоставляет индекс сущностей", "entities.unsupportedText": "Активные провайдеры остаются доступны для поиска через «Извлечение», но не отображаются здесь как искусственный граф сущностей.", "entities.count": "Активных сущностей: {count}", "entities.nameAria": "Имя сущности", "entities.placeholder": "Введите любую сущность…", "entities.action": "Открыть", "entities.top": "Частые сущности", "entities.frequency": "По частоте", "entities.filterHint": "Введите текст для локальной фильтрации списка (Esc — очистить).", "entities.emptyRail": "Сущности появятся здесь после сохранения записей памяти с метаданными сущностей.", "entities.filterEmpty": "Локальных совпадений нет. Нажмите «Открыть», чтобы запросить хост.", "entities.loading": "Чтение записей сущности…", "entities.selectTitle": "Выберите или введите сущность", "entities.selectText": "При выборе отображаются все записи с этой сущностью; затем «Связанные записи» добавит другие, связанные по извлечению.", "entities.emptyTitle": "Нет связанных записей памяти", "entities.emptyText": "Попробуйте полное имя или другой псевдоним сущности.", "entities.railLoading": "Чтение сущностей…", "entities.memoriesHint": "Записи памяти, содержащие эту сущность", "entities.relatedTitle": "Связанные записи памяти", "entities.relatedHint": "Извлечены как связанные, но без упоминания этой сущности", "entities.findRelated": "Связанные записи", "entities.hideRelated": "Скрыть", "entities.noCarrying": "Ни одна запись памяти не содержит эту сущность.", "entities.noRelated": "Других связанных записей памяти нет.", "entities.retry": "Повторить", "entities.sourceReady": "Сущностей: {count}", "entities.sourcePartial": "Сущностей: {count} · частично", "readSources.status.loading": "Чтение", "remember.title": "Сохранить в память", "remember.description": "Агент задач решает, стоит ли сохранять запись, затем очищает её от дубликатов и записывает в Пространство памяти.", "remember.readOnlyTitle": "Режим только для чтения", "remember.readOnlyText": "В этом развёртывании запись в память отключена. Измените и сохраните конфигурацию Mnemon в DSH, чтобы включить её.", "remember.candidate": "Содержимое", "remember.placeholder": "Контекст, предпочтения, решения или выводы, которые стоит сохранить.", "remember.taskAgentHint": "Хост сейчас не может создать изолированного агента задач. Обновите статус и повторите попытку.", "remember.processing": "Агент задач работает…", "remember.action": "Сохранить", "remember.advanced": "Дополнительные параметры", "remember.advancedHint": "Выберите целевое пространство, категорию и важность", "remember.expand": "Развернуть", "remember.target": "Целевое Пространство памяти", "remember.asyncProviderHint": "Это Пространство памяти дожидается завершения удалённого извлечения, прежде чем вернуть достоверный отчёт о записи.", "remember.entities": "Сущности (через запятую)", "remember.tags": "Теги (через запятую)", "remember.advancedText": "Заданные ограничения также проходят проверку на дубликаты и отчётность агента задач.", "remember.saving": "Агент задач работает…", "remember.advancedAction": "Сохранить с параметрами", "content.title": "Содержимое памяти", "content.description": "Просмотр содержимого каждого Пространства памяти.", "content.sourcesTitle": "Модели содержимого Провайдеров", "content.count": "Записей памяти: {count}", "content.filterAria": "Фильтр содержимого памяти", "content.filterPlaceholder": "Фильтр по тексту или ID…", "content.categoryAria": "Категория памяти", "content.apply": "Фильтровать", "content.notice": "Провайдеры только для запросов показывают содержимое после ввода запроса.", "content.queryRequiredTitle": "Пространства только для запросов ждут вопрос", "content.queryRequiredText": "Введите конкретный запрос, чтобы просмотреть провайдеров вроде ByteRover, которые не отдают полный список.", "content.emptyTitle": "Нет подходящих записей памяти", "content.emptyText": "Сбросьте фильтры или сохраните первую запись памяти.", "nav.spaces": "Пространства памяти", "overview.editSpace": "Редактировать", "overview.editSpaceAria": "Редактировать {name}", "overview.saveSpace": "Сохранить", "overview.savingSpace": "Сохранение…", "overview.deleteSpace": "Удалить", "overview.deleteSpaceAria": "Удалить {name}", "overview.disconnectSpace": "Отключить", "overview.disconnectSpaceAria": "Отключить {name}", "overview.deletingSpace": "Удаление…", "common.score": "Оценка {value}", "overview.providerEnableHint": "Включите дополнительные Провайдеры на странице «Пространства памяти» в разделе «Плагины → dsh-brain-mnemon».", "search.citations": "Ссылки", "overview.rediscoverAction": "Обнаружить заново", "overview.rediscovering": "Поиск пространств…", "overview.rediscoverHint": "Повторно опросить включённых Провайдеров; новые пространства добавятся без включения в извлечение", "overview.rediscoveryAdded": "Найдено новых пространств: {count}. Они начнут участвовать в извлечении после включения.", "overview.rediscoveryNone": "Новых пространств не найдено.", "overview.rediscoveryDisconnected": "Отключённые вами пространства остались отключёнными ({count}). Сохраните настройки соответствующего Провайдера повторно, чтобы вернуть их.", "overview.rediscoveryFailed": "{provider}: не удалось завершить обнаружение — {error}", "overview.rediscoveryTimedOut": "{provider} не ответил вовремя; попробуйте «Обнаружить заново» позже.", "overview.rediscoveryDismiss": "Закрыть", "overview.newSpace": "Новое", "common.copyId": "Копировать ID", "common.readOnly": "Только чтение", "common.activationOnly": "Только управление активацией", "common.active": "Активно", "common.category": "Категория", "common.importanceLabel": "Важность", "common.importance": "Важность {value}", "common.hops": "Переходов: {count}", "common.allCategories": "Все категории", "common.memories": "Записей: {count}", "common.edges": "Рёбер: {count}", "card.confirmText": "Мягко удалить эту запись памяти?", "card.processing": "Обработка…", "card.confirmForget": "Подтвердить забывание", "card.related": "Связанные", "card.clone": "Создать на основе", "card.forget": "Забыть", "readSources.all": "Все провайдеры", "readSources.mode.search": "Нативный поиск", "readSources.mode.graph": "Истинный граф связей", "readSources.mode.projection": "Проекция содержимого", "readSources.mode.enumerable": "Перечисляемое содержимое", "readSources.mode.query-only": "Только запросы", "readSources.mode.entities": "Индекс сущностей", "readSources.mode.unsupported": "Не поддерживается", "readSources.status.ready": "Наблюдаемо: {count}", "readSources.status.empty": "Подключено · пусто", "readSources.status.query-required": "Чтение по запросу", "readSources.status.unsupported": "Недоступно на этой поверхности", "readSources.status.unavailable": "Подключение недоступно", "readSources.edges": "Истинных связей: {count}", "readSources.model.mnemon-native": "Факты, сущности и типизированные связи", "readSources.model.openviking": "Иерархия и многоуровневое содержимое", "readSources.model.honcho": "Выводы и профили Peer", "readSources.model.mem0": "Извлечённые семантические записи памяти", "readSources.model.hindsight": "Единицы памяти и граф знаний", "readSources.model.holographic": "Доверенные факты и сущности", "readSources.model.retaindb": "Профили и типизированные факты", "readSources.model.byterover": "Запросы к дереву знаний", "readSources.model.supermemory": "Записи памяти и загруженные документы", "common.inactive": "Неактивно", "config.providerSecretShow": "Показать учётные данные", "config.providerSecretHide": "Скрыть учётные данные", "config.providerSecretStoredValue": "Сохранённые учётные данные", "config.providersSpacesOffTitle": "Пространства памяти выключены", "config.providersSpacesOffDetail": "Сохранённые подключения сохраняются", "config.providersSpacesOn": "Включить «Пространства памяти»", "config.providersReadOnlyTitle": "dsh-brain-mnemon работает только на чтение", "config.providersReadOnlyDetail": "При writeEnabled = false нельзя включать или отключать Провайдеров.", "spaces.offNote": "Включите, чтобы настроить Провайдеров и эмбеддинги", "config.providersTitle": "Провайдеры памяти", "config.providersDescription": "Провайдеры хранят пространства памяти. Включение или сохранение синхронизирует существующие пространства; отключение удаляет только локальное сопоставление и не затрагивает сторонние данные.", "config.nativeSummary": "Официальная нативная долгосрочная память с полным графом связей", "config.officialNative": "Официальный нативный", "config.nativeCliMissing": "CLI не установлен (необязательно)", "config.embeddingTitle": "Локальные векторные эмбеддинги", "config.embeddingDescription": "Передаёт эндпоинт и модель эмбеддингов в Mnemon CLI (/v1 использует OpenAI-совместимый протокол, иначе Ollama).", "config.embeddingManaged": "Управлять настройками эмбеддингов в DSH", "config.embeddingManagedHint": "Если включено, сохранённые значения переопределяют окружение дочернего процесса Mnemon. Если выключено, Mnemon использует окружение Хоста и встроенные значения по умолчанию.", "config.embeddingEndpoint": "Эндпоинт эмбеддингов", "config.embeddingModel": "Модель эмбеддингов", "config.embeddingApiKey": "Ключ API (необязательно, OpenAI-совместимые серверы)", "config.embeddingApiKeyInvalid": "Ключ API не должен содержать управляющих символов и быть длиннее 2048 символов.", "config.embeddingProtocol": "Протокол", "config.embeddingProtocolAuto": "Авто (определять по /v1)", "config.embeddingProtocolOllama": "Ollama", "config.embeddingProtocolOpenai": "OpenAI-совместимый", "config.embeddingProtocolInvalid": "Протокол должен быть одним из: Авто / Ollama / OpenAI-совместимый.", "config.embeddingEndpointInvalid": "Эндпоинт эмбеддингов должен быть абсолютным HTTP(S) URL без учётных данных, строки запроса и фрагмента.", "config.embeddingModelInvalid": "Модель эмбеддингов должна содержать 1–200 символов без управляющих символов.", "config.embeddingSecurity": "Текст памяти и запросов отправляется на этот эндпоинт; ключи хранятся в учётных данных DSH (для удалённых серверов используйте HTTPS).", "config.embeddingTest": "Проверить статус", "config.embeddingNotTested": "Подключение к эмбеддингам и покрытие каждого пространства Mnemon Native ещё не проверялись.", "config.embeddingTesting": "Проверка сервера эмбеддингов и покрытия через Mnemon…", "config.embeddingSaveBeforeTest": "Сначала сохраните настройки эмбеддингов, чтобы проверить действующие параметры.", "config.embeddingTestUnavailable": "Этот Хост DSH не поддерживает проверку статуса эмбеддингов.", "config.embeddingCliMissing": "Для проверки требуется Mnemon CLI; эти настройки эмбеддингов относятся только к Mnemon Native.", "config.embeddingStatusAvailable": "Модель эмбеддингов доступна · {model} · векторизовано {embedded}/{total} ({coverage})", "config.embeddingStatusAvailableWithProtocol": "Модель эмбеддингов доступна · {model} · протокол {protocol} · векторизовано {embedded}/{total} ({coverage})", "config.embeddingStatusUnavailable": "Модель эмбеддингов недоступна · {model} · векторизовано {embedded}/{total} ({coverage})", "config.embeddingStatusUnavailableWithProtocol": "Модель эмбеддингов недоступна · {model} · протокол {protocol} · векторизовано {embedded}/{total} ({coverage})", "config.embeddingStatusFailed": "Не удалось проверить статус эмбеддингов: {error}", "config.embeddingSpaces": "Каждое пространство Mnemon Native", "config.embeddingSpaceCounts": "Векторизовано {embedded}/{total} ({coverage})", "config.embeddingSpaceFailed": "Не удалось прочитать: {error}", "config.embeddingMissing": "Записи памяти без вектора не участвуют в семантическом поиске.", "config.embeddingMissingFill": "Записи памяти без вектора не участвуют в семантическом поиске; нажмите «Заполнить» рядом с пространством, чтобы создать недостающие векторы.", "config.embeddingMissingOffline": "Записи памяти без вектора не участвуют в семантическом поиске; когда сервис эмбеддингов ответит, их векторы можно будет заполнить здесь.", "config.embeddingSpacesUnread": "Пространства, которые не удалось прочитать, исключены из итога.", "config.embeddingFill": "Заполнить", "config.embeddingFilling": "Заполнение…", "config.embeddingFillLabel": "Заполнить векторы для «{name}»", "config.embeddingFillingLabel": "Заполнение векторов для «{name}»", "config.embeddingFillDone": "Для «{name}» заполнено векторов: {filled}.", "config.embeddingFillMore": "Для «{name}» заполнено векторов: {filled}; осталось: {remaining}. Нажмите «Заполнить» для продолжения.", "config.embeddingFillPartly": "Для «{name}» заполнено векторов: {filled}; для остальных ({remaining}) сервис эмбеддингов ничего не вернул. Нажмите «Заполнить» позже, чтобы повторить.", "config.embeddingFillRefused": "Сервис эмбеддингов не вернул векторы для «{name}». Убедитесь, что он запущен и обслуживает модель {model}.", "config.embeddingFillFailed": "Не удалось заполнить векторы для «{name}»: {error}", "config.providerGlobalLocation": "Глобальное расположение данных", "config.providerGlobalLocationHint": "{provider} по умолчанию использует каталог глобальной области, либо вы можете выбрать свой путь.", "config.providerGlobalLocationWorkspaceHint": "Используется расположение рабочей области по умолчанию. Переключитесь на глобальную область, чтобы указать свой путь.", "config.providerDefaultLocation": "По умолчанию (как область хранения)", "config.providerSaveFailed": "Не удалось сохранить конфигурацию: {error}", "config.providerServiceTitle": "Конфигурация сервиса", "config.providerServiceHint": "Общая для всех Пространств памяти этого провайдера; включение или сохранение обновляет их сопоставления и метаданные в каталоге.", "config.providerEnableHint": "Заполните и сохраните конфигурацию сервиса, чтобы включить провайдера и синхронизировать все видимые пространства имён.", "config.providerEnabled": "Включён", "config.providerDisabled": "Не включён", "config.providerDisabledConfigured": "Выкл. · конфигурация сохранена", "config.providerNeedsConfiguration": "Требуется настройка", "config.providerToggleAria": "Включить {provider}", "config.providerToggleFailed": "Не удалось изменить состояние провайдера: {error}", "config.enableProvider": "Сохранить и включить", "config.providerServiceSaved": "Конфигурация сервиса сохранена, Пространства памяти синхронизированы", "config.saveProviderService": "Сохранить", "config.providerUnavailable": "Этот хост DSH не поддерживает настройку сервисов провайдеров.", "config.saveScopeBeforeProviders": "В области хранения есть несохранённые изменения. Сначала сохраните область, прежде чем настраивать провайдеров в этом каталоге.", "config.providerTargetWorkspace": "Текущая рабочая область: {workspace}. Провайдеры с меткой «Рабочая область» используют эту область для настроек и Пространств памяти.", "config.loadingProviders": "Загрузка конфигураций провайдеров…", "config.providerLoadFailed": "Не удалось загрузить конфигурации провайдеров: {error}", "config.retryProviders": "Повторить", "config.saving": "Сохранение…", "config.embeddingApiKeyEnv": "Переменная окружения для ключа API (необязательно)", "config.embeddingEnvInvalid": "Введите корректное имя переменной окружения Хоста, например MY_EMBEDDING_API_KEY.", "config.embeddingAuthChoice": "Укажите ключ API или имя переменной окружения, но не оба сразу.", "config.embeddingKeyPlaceholder": "Оставьте пустым, чтобы сохранить текущий ключ", "config.embeddingCredentialSaved": "Ссылка на учётные данные DSH сохранена; сам ключ никогда не передаётся обратно на эту страницу.", "config.embeddingClearKey": "Удалить ключ этого подключения и ссылки на переменные окружения", "config.embeddingMigrateKey": "Перенести существующий открытый ключ в учётные данные DSH", "config.embeddingUpgradeHost": "Обновите dsh-brain-mnemon Starter для управления учётными данными. Существующее подключение продолжает работать; ввод новых ключей здесь пока недоступен.", "overview.openProvidersSettings": "Настроить Провайдеров", "config.policyTitle": "Политика пространств", "config.policyDescription": "Правила выбора Провайдера по умолчанию, когда агент задач создаёт новое Пространство памяти; при ручном создании выбор всегда явный.", "config.policyConnectionIncomplete": "Заполните обязательные поля подключения для выбранного Провайдера.", "config.policyCandidatesEmpty": "Выберите хотя бы одного Провайдера-кандидата.", "config.policyBoundaryMismatch": "При границе данных «Только локально» нельзя выбирать удалённых Провайдеров-кандидатов.", "config.policyPromptInvalid": "Промпт стратегии должен содержать не более 4000 символов.", "config.recallTitle": "Извлечение и таймауты", "config.recallDescription": "Настройка лимита результатов за одно извлечение, политики фильтрации качества и таймаута вызова Провайдера.", "config.providersBadge": "Вкл. {enabled}/{total}", "config.recallBadge": "{limit} · {policy}", "config.recallPolicyShort.strict-v1": "Строгая", "config.recallPolicyShort.balanced-v1": "Сбалансированная", "config.recallPolicyShort.exhaustive-v1": "Исчерпывающая", "config.defaultRecallLimit": "Лимит извлечения по умолчанию", "config.defaultRecallLimitHint": "Максимум записей памяти за одно извлечение (1–50, по умолчанию 10).", "config.defaultRecallLimitInvalid": "Лимит извлечения по умолчанию должен быть целым числом от 1 до 50.", "config.recallQualityPolicy": "Политика качества извлечения", "config.recallPolicy.strict-v1": "Строгая (strict-v1)", "config.recallPolicy.strict-v1.detail": "Политика по умолчанию; отбрасывает совпадения с низкой оценкой и ограничивает средние или некалиброванные результаты.", "config.recallPolicy.balanced-v1": "Сбалансированная (balanced-v1)", "config.recallPolicy.balanced-v1.detail": "Сначала выводит высокие и средние совпадения, сохраняя положительные результаты с низкой оценкой.", "config.recallPolicy.exhaustive-v1": "Исчерпывающая (exhaustive-v1)", "config.recallPolicy.exhaustive-v1.detail": "Сохраняет всех допустимых кандидатов до достижения лимита извлечения.", "config.timeoutMs": "Таймаут операции (мс)", "config.timeoutMsHint": "Максимальное ожидание одного вызова Провайдера или CLI (100–120000 мс, по умолчанию 10000).", "config.timeoutMsInvalid": "Таймаут операции должен быть целым числом от 100 до 120000 мс." }, pt: { "term.space": "Espaço de memória", "term.spaces": "Espaços de memória", "category.decision": "Decisão", "category.preference": "Preferência", "category.fact": "Fato", "category.insight": "Insight", "category.context": "Contexto", "category.general": "Geral", "nav.memory.aria": "Páginas de Espaços de memória", "nav.overview": "Visão geral", "nav.search": "Recuperação", "nav.entities": "Entidades", "nav.rememberAction": "Salvar na memória", "nav.content": "Conteúdo", "overview.description": "Memória de longo prazo mantida pelo Mnemon Native ou por Provedores de terceiros; espaços ativos participam da recuperação.", "overview.pageDescription": "Gerencie Espaços de memória e inspecione a integridade dos provedores e os snapshots em tempo real.", "overview.fullSyncPending": "Aguardando a primeira sincronização completa", "overview.fullSyncJustNow": "Última sincronização completa: agora mesmo", "overview.fullSyncSeconds": "Última sincronização completa: há {count} s", "overview.fullSyncMinutes": "Última sincronização completa: há {count} min", "overview.fullSyncHours": "Última sincronização completa: há {count} h", "overview.fullSyncDays": "Última sincronização completa: há {count} d", "overview.directory": "Diretório de Espaços de memória", "overview.directory.description": "Clique em um cartão para verificar a conexão; ative o interruptor para incluí-lo na recuperação.", "overview.directory.unsynced": "Diretório não sincronizado", "overview.directory.unsyncedBadge": "Diretório pendente", "overview.directoryLoading": "Carregando diretório de Espaços de memória", "overview.healthLoading": "Verificando integridade dos Espaços de memória", "overview.storageHealthy": "Armazenamento saudável", "overview.storageUnhealthy": "Armazenamento indisponível", "overview.storageChecking": "Verificando", "overview.reconnecting": "Reconectando", "overview.reconnectHint": "Clique no cartão para reconectar e sincronizar este Espaço de memória", "overview.reconnectAria": "Reconectar {name}", "overview.snapshotLoading": "Carregando snapshot ao vivo multiespaço", "overview.metadataAction": "Organizar", "overview.metadataTitle": "Manter metadados de Espaços de memória com IA", "overview.metadataDescription": "Coleta amostras de cada espaço pelo caminho nativo mais rápido e gera títulos e descrições.", "overview.metadataUnavailable": "Temporariamente indisponível: nenhum Agente ativo corresponde ao escopo de memória atual", "overview.metadataLoading": "Carregando Espaços de memória gerenciáveis…", "overview.metadataEmpty": "Não há Espaços de memória ativos cujos metadados possam ser mantidos por IA.", "overview.metadataSelected": "{count} Espaços de memória selecionados", "overview.metadataSelectAll": "Selecionar todos", "overview.metadataClear": "Limpar", "overview.metadataSafety": "Atualiza apenas títulos e descrições locais; as memórias armazenadas permanecem intactas.", "overview.metadataGenerate": "Gerar com IA ({count})", "overview.metadataRunningCount": "{count} em execução", "overview.metadataTaskRunning": "Gerando…", "overview.metadataTaskSuccess": "Atualizado", "overview.metadataTaskError": "Falhou: {error}", "overview.metadataTaskUnknown": "Erro desconhecido", "overview.mnemonDefault": "Padrão do Mnemon", "overview.toggleAria": "Alternar leitura de {name}", "overview.toggling": "Alternando", "overview.noDescription": "Ainda sem descrição de roteamento.", "overview.unsyncedTitle": "O diretório de Espaços de memória não está sincronizado", "overview.unsyncedShort": "O cliente Web e o Host DSH estão usando contratos diferentes. Reinicie o Host para registrar os Stores existentes.", "overview.unsyncedLong": "O Host ainda está usando o contrato anterior do plugin. Reinicie o DSH para redescobrir os Stores existentes; nenhum arquivo .db será excluído.", "overview.emptyTitle": "Ainda não há Espaços de memória", "overview.emptyShort": "Crie o primeiro espaço e sintetize contexto durável nele.", "overview.emptyLong": "Crie um Espaço de memória Mnemon ou ative um provedor de terceiros na página dsh-brain-mnemon em Plugins para sincronizar seus namespaces existentes.", "overview.noActiveTitle": "Nenhum Espaço de memória ativo", "overview.noActiveText": "Ative o acesso de leitura em pelo menos um espaço para agregar seu grafo em tempo real aqui.", "overview.noContentTitle": "Os espaços ativos ainda não têm conteúdo", "overview.noContentText": "Salve memórias para visualizar seus nós e relações aqui.", "overview.newAction": "Novo", "overview.createTitle": "Criar Espaço de memória", "overview.createDialogHint": "Defina o espaço e escolha um Provedor; credenciais e caminhos seguem as configurações.", "overview.createIdentityTitle": "Detalhes do Espaço de memória", "overview.createIdentityHint": "O nome identifica o espaço; a descrição orienta quando o agente grava e recupera dele.", "overview.createPlacementTitle": "Provedor do Espaço de memória", "overview.createPlacementHint": "Criação manual explícita vinculada ao Provedor ativado escolhido.", "overview.createName": "Nome do novo Espaço de memória", "overview.createNamePlaceholder": "Nome", "overview.createDescription": "Descrição do novo Espaço de memória", "overview.createDescriptionPlaceholder": "Descreva o que pertence a este espaço e quando deve ser recuperado", "overview.placementMode": "Seleção de motor", "overview.placementManual": "Escolher manualmente", "overview.placementAutomatic": "Seleção inteligente", "overview.recommended": "Recomendado", "overview.placementPolicy": "Política de seleção", "overview.placementPolicyHint": "O Host aplica as regras. O prompt apenas orienta o julgamento entre candidatos elegíveis.", "overview.placementPrompt": "Prompt de estratégia (opcional)", "overview.placementPromptPlaceholder": "Por exemplo: Este é conhecimento colaborativo. Prefira armazenamento local quando gravações exatas forem necessárias; caso contrário, prefira compartilhamento.", "overview.dataBoundary": "Limite de dados", "overview.dataBoundaryRemote": "Serviços remotos permitidos", "overview.dataBoundaryLocal": "Somente local", "overview.preference": "Preferência flexível", "overview.preferenceBalanced": "Equilibrada", "overview.preferenceLocal": "Local primeiro", "overview.preferenceShared": "Compartilhado primeiro", "overview.requiredCapabilities": "Capacidades obrigatórias (selecione as desejadas)", "overview.capability.graph": "Grafo de relações", "overview.capability.exact-write": "Gravações exatas", "overview.capability.forget": "Esquecimento seguro", "overview.candidateNativeReady": "Nativo oficial · segue o escopo de memória ativo", "overview.providerServiceRequired": "Desativado", "overview.nativeCliRequired": "Requer o Mnemon CLI nesta máquina; outros provedores funcionam sem ele", "overview.workspaceBinding.automatic": "Segue o escopo de memória ativo", "overview.workspaceBinding.optional-override": "Segue o escopo ativo; o local global pode ser personalizado", "overview.workspaceBinding.provider-global": "Sempre usa o escopo global", "overview.candidateLocal": "Provedor local · segue o escopo de memória ativo", "overview.candidateRemote": "Provedor remoto · usa a configuração global de serviço", "overview.placementByLlm": "Selecionado pelo Agente", "overview.placementByRules": "Selecionado por regras", "overview.placementConfidence": "Confiança: {confidence}", "overview.confidence.high": "Alta", "overview.confidence.medium": "Média", "overview.confidence.low": "Baixa", "overview.providerLabel": "Motor de memória", "overview.nativeOfficial": "Nativo oficial", "strategy.action": "Política de espaços", "strategy.title": "Política de espaços", "strategy.description": "Como os Agentes de tarefas escolhem um Provedor ao criar um novo Espaço de memória.", "strategy.loading": "Carregando diretório de Provedores…", "strategy.modeTitle": "Seleção de Provedor", "strategy.modeHint": "Aplica-se apenas a espaços criados por Agentes; a criação manual continua explícita.", "strategy.manualHint": "Fixa um Provedor; o Agente não pode substituí-lo", "strategy.automaticHint": "Aplica regras rígidas primeiro e depois deixa o Agente de tarefas escolher um Provedor elegível", "strategy.manualTitle": "Provedor fixo", "strategy.manualDescription": "Quando nenhum espaço existente servir, cria o novo espaço neste Provedor.", "strategy.automaticTitle": "Regras de seleção inteligente", "strategy.automaticDescription": "Regras de limite e capacidade são obrigatórias; o prompt orienta empates.", "strategy.save": "Salvar", "strategy.saving": "Salvando…", "overview.providerSummary.mnemon-native": "Armazenamento nativo oficial, local primeiro, com grafo completo e semântica de exclusão lógica", "overview.providerSummary.openviking": "Memória compartilhada em estrutura de sistema de arquivos com gravações exatas verificadas e recuperação semântica", "overview.providerSummary.honcho": "Modelagem de usuário entre sessões, perfis de pares, raciocínio dialético e conclusões persistentes", "overview.providerSummary.mem0": "Extração automática de fatos, recuperação semântica, reclassificação e desduplicação", "overview.providerSummary.hindsight": "Memória em grafo de conhecimento com resolução de entidades, recuperação multiestratégia e reflexão", "overview.providerSummary.holographic": "Memória local de fatos estruturados com pontuação de confiança, resolução de entidades e recuperação composicional", "overview.providerSummary.retaindb": "Recuperação híbrida em nuvem vetor/BM25, perfis de usuário e fatos duráveis tipados", "overview.providerSummary.byterover": "Árvore de conhecimento hierárquica local primeiro acessada via brv CLI", "overview.providerSummary.supermemory": "Memória semântica, perfis persistentes, ingestão de conversas e recuperação multicontêiner", "overview.providerEndpoint": "Endpoint do serviço", "overview.providerTargetUri": "URI de escopo de memória", "overview.providerApiKey": "API Key", "overview.providerApiKeyOptional": "Deixe em branco quando a autenticação estiver desativada", "overview.providerApiKeyKeep": "Salva; deixe em branco para manter inalterada", "overview.providerAccount": "Conta", "overview.providerDiscoveryUser": "Proprietário da User Key (pular admin)", "overview.providerUser": "Usuário", "overview.providerActorPeer": "Actor Peer", "overview.providerField.workspace": "Espaço de trabalho", "overview.providerField.userId": "ID do usuário", "overview.providerField.agentId": "ID do Agente", "overview.providerField.mode": "Modo", "overview.providerField.rerank": "Reclassificar resultados da pesquisa", "overview.providerField.bankId": "Banco de memória", "overview.providerField.budget": "Orçamento de recuperação", "overview.providerField.dataPath": "Caminho do repositório de fatos", "overview.providerField.defaultDirectory": "Diretório padrão de conhecimento", "overview.providerField.defaultTrust": "Confiança padrão", "overview.providerField.minTrust": "Confiança mínima de recuperação", "overview.providerField.project": "Projeto", "overview.providerField.cliPath": "Executável brv", "overview.providerField.workingDirectory": "Diretório de conhecimento", "overview.providerField.containerTag": "Tag do contêiner", "overview.providerField.searchMode": "Modo de pesquisa", "overview.providerOption.platform": "Mem0 Platform", "overview.providerOption.self-hosted": "Servidor auto-hospedado", "overview.providerOption.low": "Baixo", "overview.providerOption.mid": "Médio", "overview.providerOption.high": "Alto", "overview.providerOption.hybrid": "Híbrido", "overview.providerOption.memories": "Memórias", "overview.providerOption.documents": "Documentos", "overview.providerKindLocal": "Motor local", "overview.providerKindRemote": "Serviço remoto", "overview.providerSecretClear": "Limpar credencial salva", "overview.providerWriteExact": "Gravações exatas", "overview.providerWriteAsync": "Extração semântica assíncrona", "overview.providerGraphReady": "Grafo de relações disponível", "overview.providerSearchReady": "Pesquisa unificada disponível", "overview.providerRemote": "Memória remota de terceiros", "overview.providerLocal": "Memória local de terceiros", "overview.creating": "Criando…", "overview.createAction": "Criar", "overview.editName": "Nome", "overview.editDescription": "Descrição de roteamento", "overview.deleteTitle": "Excluir “{name}”?", "overview.deleteWarning": "Isto exclui permanentemente o Espaço de memória e todas as memórias e relações contidas nele. Esta ação não pode ser desfeita.", "overview.lastStoreDeleteHint": "O Mnemon precisa manter pelo menos um Store nativo. O último Espaço de memória pode ficar inativo, mas não pode ser excluído.", "overview.deleteAction": "Excluir permanentemente", "overview.disconnectTitle": "Desconectar “{name}”?", "overview.disconnectWarning": "Isto remove apenas a conexão com {provider} do diretório de Espaços de memória do DSH. As memórias no motor subjacente permanecem intactas.", "overview.disconnectAction": "Desconectar", "overview.snapshot": "Snapshot ao vivo multiespaço", "overview.snapshotSources": "Observabilidade do snapshot", "overview.snapshotSourcesHint": "Grafos de relações, projeções e espaços somente consulta permanecem distintos.", "overview.noVisualTitle": "Os espaços ativos são somente consulta", "overview.noVisualText": "Estes provedores não expõem conteúdo enumerável nem grafo. Abra Recuperação e faça uma pergunta específica.", "overview.waitingSnapshot": "Aguardando o primeiro snapshot", "overview.updatedAt": "Atualizado às {time}", "overview.edgeScope": "Escopo do espaço", "overview.edgeTemporal": "Temporal", "overview.edgeSemantic": "Semântica", "overview.edgeCausal": "Causal", "overview.edgeEntity": "Relação de entidade", "overview.graphComposition": "{spaces} espaços · {memories} memórias · {entities} entidades", "overview.graphCount": "Exibindo {visible} / {total} elementos", "overview.graphEdges": "{count} arestas no grafo", "overview.inspector": "Detalhes da memória", "overview.inspectorSpace": "Detalhes do Espaço de memória", "overview.inspectorEntity": "Detalhes da entidade", "overview.selectNode": "Selecione um elemento do grafo", "overview.selectNodeText": "Inspecione o contexto exato de um Espaço de memória, entidade ou memória.", "overview.closeInspector": "Fechar detalhes do nó", "overview.memoryId": "ID da memória", "overview.spaceId": "ID do Espaço de memória", "overview.containedMemories": "Memórias contidas", "overview.entityMentions": "Menções indexadas", "overview.exploreNode": "Recuperar", "overview.previewAria": "Ver conteúdo completo", "overview.previewTitle": "Conteúdo completo", "overview.loading": "Sincronizando snapshot ao vivo multiespaço…", "graph.layoutAria": "Layout do grafo", "graph.quietAction": "Exibição limpa", "graph.quietHint": "Oculta a grade e os rótulos fixos; selecione um nó para destacar seus vizinhos e clique no fundo ou pressione Esc para limpar. Salvo apenas neste navegador.", "graph.layoutNatural": "Layout natural", "graph.layoutUniform": "Layout uniforme", "graph.layoutCustom": "Layout personalizado", "graph.layoutStatus": "Layout: {layout}", "graph.draggable": "{layout} · arrastável", "graph.naturalAction": "Distribuição natural", "graph.uniformAction": "Redefinição uniforme", "graph.aria": "Grafo de memória ao vivo do Mnemon com {nodes} elementos e {edges} arestas", "graph.aria3d": "Grafo de memória 3D do Mnemon com {nodes} elementos e {edges} arestas", "graph.viewModeAria": "Modo de dimensão do grafo", "graph.view2d": "2D", "graph.view3d": "3D", "graph.selectNodeAction": "Selecionar nó", "graph.noNodeSelected": "Nenhum nó selecionado", "graph.orbitAria": "Controles de câmera 3D", "graph.orbitHint": "3D · arraste para orbitar · role para dar zoom", "graph.orbitShort": "3D", "graph.zoomInAction": "Aproximar", "graph.zoomOutAction": "Afastar", "graph.resetViewAction": "Redefinir visualização", "graph.kindSpace": "Espaço de memória", "graph.kindEntity": "Entidade", "search.title": "Recuperar memória", "search.description": "Pesquisar retorna entradas armazenadas; Perguntar à IA responde com citações.", "search.maxResults": "Até {count} resultados", "search.placeholder": "Por que escolhemos SQLite? Quais convenções de release se aplicam?", "search.queryAria": "Consulta de memória", "search.categoryAria": "Categoria de memória", "search.strategy": "Estratégia", "search.modeAria": "Modo de recuperação", "search.modeSmart": "Recuperação inteligente", "search.modeKeyword": "Pesquisa por palavras-chave", "search.modeBasic": "Correspondência básica", "search.searching": "Recuperando…", "search.action": "Pesquisar", "search.agentAction": "Perguntar à IA", "search.agentSearching": "Agente analisando…", "search.agentAnswer": "Resposta do Agente", "search.agentAnswerHint": "Baseada nas evidências recuperadas abaixo", "search.startTitle": "Comece com uma pergunta específica", "search.startText": "Uma entidade, decisão ou linha do tempo específica é mais confiável do que carregar todo o banco de dados.", "search.emptyTitle": "Nenhuma correspondência", "search.emptyText": "Tente uma palavra-chave mais específica de entidade, decisão ou linha do tempo.", "search.results": "Evidências recuperadas brutas", "search.related": "Memórias relacionadas", "search.closeRelated": "Fechar memórias relacionadas", "search.traversing": "Percorrendo o grafo…", "search.noRelated": "Nenhum nó relacionado encontrado em até dois saltos.", "search.sourcesTitle": "Cobertura da pesquisa", "entities.title": "Explorador de entidades", "entities.description": "Veja como as entidades conectam fatos, decisões e contexto.", "entities.sourcesTitle": "Cobertura da capacidade de entidades", "entities.unsupportedTitle": "Nenhum espaço ativo expõe um índice de entidades", "entities.unsupportedText": "Os provedores ativos continuam pesquisáveis pela Recuperação, mas não são exibidos aqui como um grafo de entidades fictício.", "entities.count": "{count} entidades ativas", "entities.nameAria": "Nome da entidade", "entities.placeholder": "Digite qualquer entidade…", "entities.action": "Explorar", "entities.top": "Principais entidades", "entities.frequency": "Por frequência", "entities.filterHint": "Digite para filtrar a lista localmente (Esc para limpar).", "entities.emptyRail": "As entidades aparecem aqui após armazenar memórias com metadados de entidade.", "entities.filterEmpty": "Nenhuma correspondência local. Clique em Explorar para consultar o Host.", "entities.loading": "Lendo as memórias da entidade…", "entities.selectTitle": "Selecione ou digite uma entidade", "entities.selectText": "Selecionar uma entidade lista todas as memórias que a contêm; Memórias relacionadas adiciona outras que a recuperação associa a ela.", "entities.emptyTitle": "Nenhuma memória relacionada", "entities.emptyText": "Tente o nome completo ou outro alias da entidade.", "entities.railLoading": "Lendo entidades…", "entities.memoriesHint": "Memórias que contêm esta entidade", "entities.relatedTitle": "Memórias relacionadas", "entities.relatedHint": "Recuperadas como relacionadas, sem esta entidade", "entities.findRelated": "Memórias relacionadas", "entities.hideRelated": "Ocultar", "entities.noCarrying": "Nenhuma memória contém esta entidade.", "entities.noRelated": "Nenhuma outra memória relacionada.", "entities.retry": "Tentar novamente", "entities.sourceReady": "{count} entidades", "entities.sourcePartial": "{count} entidades · parcial", "readSources.status.loading": "Lendo", "remember.title": "Salvar na memória", "remember.description": "O Agente de tarefas decide se deve salvar, sintetiza e grava em um Espaço de memória.", "remember.readOnlyTitle": "Modo somente leitura", "remember.readOnlyText": "Esta implantação desativa gravações na memória. Altere e salve a configuração do Mnemon no DSH para ativá-las.", "remember.candidate": "Conteúdo", "remember.placeholder": "Contexto, preferências, decisões ou conclusões que valem ser mantidas.", "remember.taskAgentHint": "O Host não pode criar um Agente de tarefas isolado no momento. Atualize o status e tente novamente.", "remember.processing": "Agente de tarefas trabalhando…", "remember.action": "Salvar", "remember.advanced": "Opções avançadas", "remember.advancedHint": "Escolha o espaço de destino, a categoria e a importância", "remember.expand": "Expandir", "remember.target": "Espaço de memória de destino", "remember.asyncProviderHint": "Este Espaço de memória aguarda a extração remota ser concluída antes de retornar um recibo real de gravação.", "remember.entities": "Entidades (separadas por vírgula)", "remember.tags": "Tags (separadas por vírgula)", "remember.advancedText": "As restrições ainda passam pela verificação de duplicidade e recibo do Agente de tarefas.", "remember.saving": "Agente de tarefas trabalhando…", "remember.advancedAction": "Salvar com opções", "content.title": "Conteúdo da memória", "content.description": "Navegue pelo que cada Espaço de memória guarda.", "content.sourcesTitle": "Modelos de conteúdo dos Provedores", "content.count": "{count} memórias", "content.filterAria": "Filtrar conteúdo da memória", "content.filterPlaceholder": "Filtrar conteúdo ou ID…", "content.categoryAria": "Categoria de memória", "content.apply": "Filtrar", "content.notice": "Provedores somente consulta exibem conteúdo após você informar uma consulta.", "content.queryRequiredTitle": "Espaços somente consulta estão aguardando", "content.queryRequiredText": "Informe uma consulta específica para inspecionar provedores como ByteRover que não expõem uma lista completa.", "content.emptyTitle": "Nenhuma memória correspondente", "content.emptyText": "Limpe os filtros ou salve uma primeira memória.", "nav.spaces": "Espaços de memória", "overview.editSpace": "Editar", "overview.editSpaceAria": "Editar {name}", "overview.saveSpace": "Salvar", "overview.savingSpace": "Salvando…", "overview.deleteSpace": "Excluir", "overview.deleteSpaceAria": "Excluir {name}", "overview.disconnectSpace": "Desconectar", "overview.disconnectSpaceAria": "Desconectar {name}", "overview.deletingSpace": "Excluindo…", "common.score": "Pontuação {value}", "overview.providerEnableHint": "Ative mais Provedores na página Espaços de memória em Plugins → dsh-brain-mnemon.", "search.citations": "Citações", "overview.rediscoverAction": "Redescobrir", "overview.rediscovering": "Redescobrindo…", "overview.rediscoverHint": "Consulta novamente os Provedores ativados; novos espaços são adicionados sem entrar na recuperação", "overview.rediscoveryAdded": "Novos espaços encontrados: {count}. Eles entram na recuperação assim que você ativá-los.", "overview.rediscoveryNone": "Nenhum novo espaço.", "overview.rediscoveryDisconnected": "Espaços que você desconectou permanecem desconectados: {count}. Salve as configurações do Provedor novamente para restaurá-los.", "overview.rediscoveryFailed": "{provider} não conseguiu concluir a descoberta: {error}", "overview.rediscoveryTimedOut": "{provider} não respondeu a tempo; tente Redescobrir mais tarde.", "overview.rediscoveryDismiss": "Dispensar", "overview.newSpace": "Novo", "common.copyId": "Copiar ID", "common.readOnly": "Somente leitura", "common.activationOnly": "Apenas controle de ativação", "common.active": "Ativo", "common.category": "Categoria", "common.importanceLabel": "Importância", "common.importance": "Importância {value}", "common.hops": "{count} saltos", "common.allCategories": "Todas as categorias", "common.memories": "{count} memórias", "common.edges": "{count} arestas", "card.confirmText": "Excluir logicamente esta memória?", "card.processing": "Processando…", "card.confirmForget": "Confirmar esquecimento", "card.related": "Relacionadas", "card.clone": "Criar a partir desta", "card.forget": "Esquecer", "readSources.all": "Todos os provedores", "readSources.mode.search": "Pesquisa nativa", "readSources.mode.graph": "Grafo de relações real", "readSources.mode.projection": "Projeção de conteúdo", "readSources.mode.enumerable": "Conteúdo enumerável", "readSources.mode.query-only": "Somente consulta", "readSources.mode.entities": "Índice de entidades", "readSources.mode.unsupported": "Não suportado", "readSources.status.ready": "{count} observáveis", "readSources.status.empty": "Conectado · sem conteúdo", "readSources.status.query-required": "Ler após uma consulta", "readSources.status.unsupported": "Indisponível nesta superfície", "readSources.status.unavailable": "Conexão indisponível", "readSources.edges": "{count} relações reais", "readSources.model.mnemon-native": "Fatos, entidades e relações tipadas", "readSources.model.openviking": "Hierarquia e conteúdo em camadas", "readSources.model.honcho": "Conclusões de pares e perfis", "readSources.model.mem0": "Memórias semânticas extraídas", "readSources.model.hindsight": "Unidades de memória e grafo de conhecimento", "readSources.model.holographic": "Fatos confiáveis e entidades", "readSources.model.retaindb": "Perfis e fatos tipados", "readSources.model.byterover": "Consultas na árvore de conhecimento", "readSources.model.supermemory": "Memórias e documentos ingeridos", "common.inactive": "Inativo", "config.providerSecretShow": "Mostrar credencial", "config.providerSecretHide": "Ocultar credencial", "config.providerSecretStoredValue": "Credencial salva", "config.providersSpacesOffTitle": "Espaços de memória está desativado", "config.providersSpacesOffDetail": "As conexões salvas são mantidas", "config.providersSpacesOn": "Ativar “Espaços de memória”", "config.providersReadOnlyTitle": "dsh-brain-mnemon está somente leitura", "config.providersReadOnlyDetail": "Com writeEnabled definido como false, os Provedores não podem ser ativados ou desativados.", "spaces.offNote": "Ative para configurar Provedores e embedding", "config.providersTitle": "Provedores de memória", "config.providersDescription": "Os Provedores armazenam espaços de memória. Ativar ou salvar um Provedor sincroniza seus espaços existentes; desativá-lo remove apenas o mapeamento local, nunca dados de terceiros.", "config.nativeSummary": "Memória nativa oficial de longo prazo com grafo completo de relações", "config.officialNative": "Nativo oficial", "config.nativeCliMissing": "CLI não instalado (opcional)", "config.embeddingTitle": "Embeddings vetoriais locais", "config.embeddingDescription": "Injeta o endpoint e o modelo de embedding no Mnemon CLI (/v1 usa protocolo compatível com OpenAI; caso contrário, Ollama).", "config.embeddingManaged": "Gerenciar configurações de embedding no DSH", "config.embeddingManagedHint": "Quando ativado, os valores salvos sobrescrevem o ambiente do processo filho do Mnemon. Quando desativado, o Mnemon mantém o ambiente do Host e seus padrões integrados.", "config.embeddingEndpoint": "Endpoint de embedding", "config.embeddingModel": "Modelo de embedding", "config.embeddingApiKey": "API Key (opcional, servidores compatíveis com OpenAI)", "config.embeddingApiKeyInvalid": "A API Key não pode conter caracteres de controle e deve ter no máximo 2048 caracteres.", "config.embeddingProtocol": "Protocolo", "config.embeddingProtocolAuto": "Automático (detectar via /v1)", "config.embeddingProtocolOllama": "Ollama", "config.embeddingProtocolOpenai": "Compatível com OpenAI", "config.embeddingProtocolInvalid": "O protocolo deve ser Automático / Ollama / Compatível com OpenAI.", "config.embeddingEndpointInvalid": "O endpoint de embedding deve ser uma URL HTTP(S) absoluta sem credenciais, parâmetros de consulta ou fragmento.", "config.embeddingModelInvalid": "O modelo de embedding deve conter de 1 a 200 caracteres e nenhum caractere de controle.", "config.embeddingSecurity": "O texto de memórias e consultas é enviado a este endpoint; as chaves ficam nas credenciais do DSH (use HTTPS remotamente).", "config.embeddingTest": "Testar status", "config.embeddingNotTested": "A conexão de embedding e a cobertura de cada espaço do Mnemon Native ainda não foram verificadas.", "config.embeddingTesting": "Verificando o servidor de embedding e a cobertura via Mnemon…", "config.embeddingSaveBeforeTest": "Salve as configurações de embedding antes de testar seus valores efetivos em execução.", "config.embeddingTestUnavailable": "Este Host DSH não oferece verificação de status de embedding.", "config.embeddingCliMissing": "O teste requer o Mnemon CLI; estas configurações de embedding aplicam-se apenas ao Mnemon Native.", "config.embeddingStatusAvailable": "Modelo de embedding disponível · {model} · {embedded}/{total} vetorizados ({coverage})", "config.embeddingStatusAvailableWithProtocol": "Modelo de embedding disponível · {model} · protocolo {protocol} · {embedded}/{total} vetorizados ({coverage})", "config.embeddingStatusUnavailable": "Modelo de embedding indisponível · {model} · {embedded}/{total} vetorizados ({coverage})", "config.embeddingStatusUnavailableWithProtocol": "Modelo de embedding indisponível · {model} · protocolo {protocol} · {embedded}/{total} vetorizados ({coverage})", "config.embeddingStatusFailed": "Falha ao verificar status de embedding: {error}", "config.embeddingSpaces": "Cada espaço do Mnemon Native", "config.embeddingSpaceCounts": "{embedded}/{total} vetorizados ({coverage})", "config.embeddingSpaceFailed": "Não foi possível ler: {error}", "config.embeddingMissing": "Memórias sem vetor ficam fora da correspondência semântica.", "config.embeddingMissingFill": "Memórias sem vetor ficam fora da correspondência semântica; Preencher ao lado de um espaço cria os vetores ausentes.", "config.embeddingMissingOffline": "Memórias sem vetor ficam fora da correspondência semântica; assim que o serviço de embedding responder, seus vetores poderão ser preenchidos aqui.", "config.embeddingSpacesUnread": "Espaços que não puderam ser lidos ficam fora do total.", "config.embeddingFill": "Preencher", "config.embeddingFilling": "Preenchendo…", "config.embeddingFillLabel": "Preencher os vetores de {name}", "config.embeddingFillingLabel": "Preenchendo os vetores de {name}", "config.embeddingFillDone": "{filled} vetores preenchidos para {name}.", "config.embeddingFillMore": "{filled} vetores preenchidos para {name}; ainda faltam {remaining}. Clique em Preencher para continuar.", "config.embeddingFillPartly": "{filled} vetores preenchidos para {name}; o serviço de embedding não retornou vetores para os outros {remaining}. Clique em Preencher depois para tentar novamente.", "config.embeddingFillRefused": "O serviço de embedding não retornou vetores para {name}. Verifique se ele está em execução e serve o modelo {model}.", "config.embeddingFillFailed": "Os vetores de {name} não foram preenchidos: {error}", "config.providerGlobalLocation": "Local global de dados", "config.providerGlobalLocationHint": "{provider} usa o diretório de escopo global por padrão, ou você pode escolher um local personalizado.", "config.providerGlobalLocationWorkspaceHint": "O padrão do espaço de trabalho está ativo. Mude para Global para escolher um local personalizado.", "config.providerDefaultLocation": "Padrão (segue o escopo)", "config.providerSaveFailed": "Não foi possível salvar a configuração: {error}", "config.providerServiceTitle": "Configuração de serviço", "config.providerServiceHint": "Compartilhada pelos Espaços de memória deste provedor; ativar ou salvar atualiza seus mapeamentos de diretório e metadados.", "config.providerEnableHint": "Preencha e salve a configuração de serviço para ativar o provedor e sincronizar todos os namespaces visíveis.", "config.providerEnabled": "Ativado", "config.providerDisabled": "Não ativado", "config.providerDisabledConfigured": "Desativado · configuração mantida", "config.providerNeedsConfiguration": "Configuração necessária", "config.providerToggleAria": "Ativar {provider}", "config.providerToggleFailed": "Não foi possível alterar o estado do provedor: {error}", "config.enableProvider": "Salvar e ativar", "config.providerServiceSaved": "Configuração de serviço salva e Espaços de memória sincronizados", "config.saveProviderService": "Salvar", "config.providerUnavailable": "Este Host DSH não suporta configuração de serviço de provedor.", "config.saveScopeBeforeProviders": "O escopo de armazenamento tem alterações não salvas. Salve o escopo antes de configurar provedores nesse diretório.", "config.providerTargetWorkspace": "Espaço de trabalho atual: {workspace}. Provedores marcados como Espaço de trabalho usam este escopo para configuração e Espaços de memória.", "config.loadingProviders": "Carregando configurações dos provedores…", "config.providerLoadFailed": "Não foi possível carregar as configurações dos provedores: {error}", "config.retryProviders": "Tentar novamente", "config.saving": "Salvando…", "config.embeddingApiKeyEnv": "Variável de ambiente da API Key (opcional)", "config.embeddingEnvInvalid": "Informe um nome válido de variável de ambiente do Host, como MY_EMBEDDING_API_KEY.", "config.embeddingAuthChoice": "Informe uma API Key ou um nome de variável de ambiente, não ambos.", "config.embeddingKeyPlaceholder": "Deixe em branco para manter a chave existente", "config.embeddingCredentialSaved": "Uma referência de credencial do DSH está salva; a chave nunca é retornada para esta página.", "config.embeddingClearKey": "Remover referências de chave e variável de ambiente desta conexão", "config.embeddingMigrateKey": "Mover a chave em texto simples existente para as credenciais do DSH", "config.embeddingUpgradeHost": "Atualize o dsh-brain-mnemon Starter para gerenciar credenciais. A conexão existente continua funcionando; novas chaves ainda não podem ser inseridas aqui.", "overview.openProvidersSettings": "Configurar Provedores", "config.policyTitle": "Política de espaços", "config.policyDescription": "Regras padrão de alocação de Provedor quando um Agente de tarefas cria um novo Espaço de memória; a criação manual continua explícita.", "config.policyConnectionIncomplete": "Preencha os campos de conexão obrigatórios para o Provedor selecionado.", "config.policyCandidatesEmpty": "Selecione pelo menos um Provedor candidato.", "config.policyBoundaryMismatch": "Provedores candidatos remotos não podem ser selecionados quando o limite de dados é somente local.", "config.policyPromptInvalid": "O prompt de estratégia deve conter no máximo 4000 caracteres.", "config.recallTitle": "Recuperação e tempos limite", "config.recallDescription": "Configure o limite de resultados por recuperação, a política de filtragem de qualidade e o tempo limite de chamada do Provedor.", "config.providersBadge": "{enabled}/{total} ativados", "config.recallBadge": "{limit} · {policy}", "config.recallPolicyShort.strict-v1": "Estrita", "config.recallPolicyShort.balanced-v1": "Equilibrada", "config.recallPolicyShort.exhaustive-v1": "Exaustiva", "config.defaultRecallLimit": "Limite padrão de recuperação", "config.defaultRecallLimitHint": "Máximo de memórias retornadas por recuperação (1–50, padrão 10).", "config.defaultRecallLimitInvalid": "O limite padrão de recuperação deve ser um número inteiro de 1 a 50.", "config.recallQualityPolicy": "Política de qualidade de recuperação", "config.recallPolicy.strict-v1": "Estrita (strict-v1)", "config.recallPolicy.strict-v1.detail": "Política padrão; descarta resultados de baixa pontuação e limita resultados médios ou não calibrados.", "config.recallPolicy.balanced-v1": "Equilibrada (balanced-v1)", "config.recallPolicy.balanced-v1.detail": "Ordena primeiro resultados altos e médios, mantendo correspondências positivas de baixa pontuação.", "config.recallPolicy.exhaustive-v1": "Exaustiva (exhaustive-v1)", "config.recallPolicy.exhaustive-v1.detail": "Mantém todos os candidatos finitos até atingir o limite de recuperação.", "config.timeoutMs": "Tempo limite da operação (ms)", "config.timeoutMsHint": "Espera máxima por chamada de Provedor ou CLI (100–120000 ms, padrão 10000).", "config.timeoutMsInvalid": "O tempo limite da operação deve ser um número inteiro de 100 a 120000 ms." } }; // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/presentation.ts const css$8 = { ...memoryPageStyles, ...page_module_css_default$1 }; const sidebarCss$3 = { ...memorySidebarStyles, ...sidebar_module_css_default }; function supportsSettingsSection$1(section) { const supports = supportsMemoryComponentSettingsSection; return typeof supports === "function" && supports("dsh-brain-mnemon-source-memory-spaces", section); } function SafeReveal(props) { const Impl = Reveal; if (Impl !== void 0) return (0, react.createElement)(Impl, props); if (props.children === null || props.children === void 0 || props.children === false) return null; return props.className === void 0 ? (0, react.createElement)("div", null, props.children) : (0, react.createElement)("div", { className: props.className }, props.children); } const TranslationOverride = (0, react.createContext)(void 0); const SourceTranslation = TranslationOverride.Provider; function interpolate(text, params) { return params === void 0 ? text : text.replace(/\{(\w+)\}/g, (match, name) => name in params ? String(params[name]) : match); } const SHIPPED_LOCALE_SET$3 = /* @__PURE__ */ new Set([ "en", "zh", "ja", "es", "fr", "de", "ru", "pt" ]); const useLocalePreference$3 = useLocalePreference$4; function shippedLocale$3(preference) { return (typeof preference === "string" ? [preference.trim().replaceAll("_", "-").split("-")[0]] : preference).map((id) => id.toLowerCase()).find((id) => SHIPPED_LOCALE_SET$3.has(id)) ?? "en"; } function sourceTranslate(bound, preference) { const dictionary = locales_default$3[shippedLocale$3(preference)]; const packFirst = typeof preference === "string" ? !/^(en|zh)([-_]|$)/i.test(preference) : preference[0] !== "en" && preference[0] !== "zh"; return (key, params) => { if (packFirst) { const text = bound(key, params); if (text !== key) return text; } return Object.hasOwn(dictionary, key) ? interpolate(dictionary[key], params) : bound(key, params); }; } function useT$3() { const override = (0, react.useContext)(TranslationOverride); const fallback = useT$4(); const preference = useLocalePreference$3(useLocale()); return (0, react.useMemo)(() => override ?? sourceTranslate(fallback, preference), [ override, preference, fallback ]); } function languageChain(snapshot) { const fallbacks = new Map(snapshot.locales.map((locale) => [locale.id, locale.fallback])); const chain = []; for (let id = snapshot.active; id !== void 0; id = fallbacks.get(id)) { if (chain.includes(id) || chain.length > 0 && !fallbacks.has(id)) break; chain.push(id); } if (!chain.includes("en")) chain.push("en"); return chain; } function settingsTranslate(locale, chain, language) { return sourceTranslate(locale.bind("mnemon"), chain ?? language); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/contracts.ts const NATIVE_PROVIDER_ID = "mnemon-native"; const DEFAULT_RECALL_QUALITY_POLICY = "strict-v1"; const CATEGORIES = [ "preference", "decision", "fact", "insight", "context", "general" ]; function normalizeEntityKey(entity) { return entity.normalize("NFKC").trim().toLocaleLowerCase(); } const MNEMON_EMBEDDING_PROTOCOLS = [ "auto", "ollama", "openai" ]; const EMBEDDING_ENVIRONMENT_NAME = /^[A-Za-z_][A-Za-z0-9_]{0,127}$/u; const MEMORY_SPACE_DESCRIPTION_MAX_LENGTH = 1e3; // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/ProviderIcon.tsx function GenericProviderMark() { return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", { viewBox: "0 0 36 36", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", { width: "36", height: "36", rx: "9", fill: "var(--dsw-alias-bg-module-platform, var(--mn-fill, #f1f3f7))" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ellipse", { cx: "18", cy: "11", rx: "8", ry: "3.5", fill: "var(--dsw-alias-label-secondary, var(--mn-muted, #68738a))" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M10 11v7c0 1.93 3.58 3.5 8 3.5s8-1.57 8-3.5v-7M10 18v7c0 1.93 3.58 3.5 8 3.5s8-1.57 8-3.5v-7", stroke: "var(--dsw-alias-label-secondary, var(--mn-muted, #68738a))", strokeWidth: "1.6" }) ] }); } function ProviderIcon({ providerId, icon, className, title }) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className, "data-provider-icon": providerId, ...title === void 0 ? { "aria-hidden": true } : { role: "img", "aria-label": title }, children: icon?.kind === "brand" && icon.value === "mnemon" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonLogo, {}) : icon?.kind === "glyph" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "aria-hidden": "true", children: icon.value }) : icon?.kind === "data-url" && /^data:image\/(?:png|jpeg|webp|svg\+xml);/u.test(icon.value) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("img", { src: icon.value, alt: "" }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GenericProviderMark, {}) }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/provider-presentation.ts function providerSummary(t, provider) { if (provider.summaryI18nKey === void 0) return provider.summary; const localized = t(provider.summaryI18nKey); return typeof localized !== "string" || localized.length === 0 || localized === provider.summaryI18nKey ? provider.summary : localized; } function providerFieldLabel(t, field) { if (field.i18nKey === void 0) return field.label; const localized = t(field.i18nKey); return typeof localized !== "string" || localized.length === 0 || localized === field.i18nKey ? field.label : localized; } function providerOptionLabel(t, option) { if (option.i18nKey === void 0) return option.label; const localized = t(option.i18nKey); return typeof localized !== "string" || localized.length === 0 || localized === option.i18nKey ? option.label : localized; } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/provider-field.tsx const SAVED_SECRET_MASK = "••••••••••••"; function inputType(field, secretVisible) { return field.input === "secret" ? secretVisible ? "text" : "password" : field.input === "number" ? "number" : field.input === "url" ? "url" : "text"; } function SecretVisibilityIcon({ visible }) { return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", { viewBox: "0 0 20 20", fill: "none", "aria-hidden": "true", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M2.3 10s2.8-4.5 7.7-4.5 7.7 4.5 7.7 4.5-2.8 4.5-7.7 4.5S2.3 10 2.3 10Z", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round", strokeLinejoin: "round" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", { cx: "10", cy: "10", r: "2.1", stroke: "currentColor", strokeWidth: "1.4" }), visible && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "m3.5 3.5 13 13", stroke: "currentColor", strokeWidth: "1.4", strokeLinecap: "round" }) ] }); } function ProviderField(props) { return props.layout === "settings" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsField, { ...props }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DialogField, { ...props }); } function SettingsField(props) { const t = useT$3(); const settings = memorySettingsStyles; const [secretVisible, setSecretVisible] = (0, react.useState)(false); const { field } = props; const label = providerFieldLabel(t, field); const disabled = props.disabled === true; const required = field.required && !props.saved; const secret = field.input === "secret"; const fieldValue = String(props.value ?? ""); const showingSavedMask = secret && props.saved && fieldValue === ""; const displayValue = showingSavedMask ? secretVisible ? t("config.providerSecretStoredValue") : SAVED_SECRET_MASK : fieldValue; const input = field.input === "boolean" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { className: settings.providerBoolean, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { "aria-label": label, type: "checkbox", checked: Boolean(props.value), disabled, onChange: (event) => props.onChange(event.target.checked) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label })] }) : field.input === "select" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { label, value: String(props.value ?? ""), disabled, options: (field.options ?? []).map((option) => ({ value: option.value, label: providerOptionLabel(t, option) })), onChange: (next) => props.onChange(next) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [label, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: secret ? settings.providerSecretInput : void 0, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { "aria-label": label, type: inputType(field, secretVisible), value: displayValue, required, disabled, autoComplete: secret ? "new-password" : void 0, placeholder: field.placeholder ?? (secret ? t("overview.providerApiKeyOptional") : void 0), maxLength: field.maxLength ?? (secret ? 8e3 : 2e3), min: field.min, max: field.max, pattern: field.pattern, step: field.input === "number" ? "any" : void 0, onFocus: (event) => { if (showingSavedMask) event.currentTarget.select(); }, onClick: (event) => { if (showingSavedMask) event.currentTarget.select(); }, onChange: (event) => { const value = showingSavedMask ? event.target.value.replace(SAVED_SECRET_MASK, "").replace(t("config.providerSecretStoredValue"), "") : event.target.value; props.onChange(value); } }), secret && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: settings.providerSecretVisibility, "aria-label": t(secretVisible ? "config.providerSecretHide" : "config.providerSecretShow"), title: t(secretVisible ? "config.providerSecretHide" : "config.providerSecretShow"), "aria-pressed": secretVisible, disabled, onClick: () => setSecretVisible((value) => !value), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SecretVisibilityIcon, { visible: secretVisible }) })] })] }); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: settings.providerFieldControl, "data-input": field.input, children: input }); } function DialogField(props) { const t = useT$3(); const { field } = props; const label = providerFieldLabel(t, field); const value = props.value ?? ""; const clearing = props.clearing === true; const required = field.required && (!props.saved || clearing); const input = field.input === "boolean" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { "aria-label": label, type: "checkbox", checked: Boolean(value), onChange: (event) => props.onChange(event.target.checked) }) : field.input === "select" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { hideLabel: true, label, value: String(value), options: (field.options ?? []).map((option) => ({ value: option.value, label: providerOptionLabel(t, option) })), onChange: (next) => props.onChange(next) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { "aria-label": label, type: inputType(field, false), value: String(value), required, autoComplete: field.input === "secret" ? "new-password" : void 0, placeholder: props.saved ? t("overview.providerApiKeyKeep") : field.placeholder ?? (field.input === "secret" ? t("overview.providerApiKeyOptional") : void 0), maxLength: field.maxLength ?? (field.input === "secret" ? 8e3 : 2e3), min: field.min, max: field.max, pattern: field.pattern, step: field.input === "number" ? "any" : void 0, onChange: (event) => props.onChange(event.target.value) }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.providerFieldControl, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [label, input] }), field.input === "secret" && props.saved && props.onClearChange !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { className: css$8.providerSecretClear, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "checkbox", checked: clearing, onChange: (event) => props.onClearChange(event.target.checked) }), t("overview.providerSecretClear")] })] }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/widgets.tsx function memoryProviderFields(provider) { return provider.fields.filter((field) => field.scope !== "service"); } function providerDefaults(provider) { return Object.fromEntries(memoryProviderFields(provider).flatMap((field) => field.defaultValue === void 0 ? [] : [[field.key, field.defaultValue]])); } function mergeProviderDefaults(providers, current) { return Object.fromEntries(providers.map((provider) => [provider.id, { ...providerDefaults(provider), ...current[provider.id] ?? {} }])); } function providerDraftComplete(provider, connection) { if (provider === void 0 || provider.serviceConfigured === false) return false; return provider.origin === "native" || memoryProviderFields(provider).every((field) => !field.required || String(connection?.[field.key] ?? "").trim() !== ""); } function readyProviderId(providers, current) { const ready = providers.filter((provider) => provider.serviceConfigured !== false); return ready.find((provider) => provider.id === current)?.id ?? (ready.find((provider) => provider.origin === "native") ?? ready[0])?.id; } function readyFirst(providers) { return [...providers].sort((left, right) => Number(left.serviceConfigured === false) - Number(right.serviceConfigured === false)); } function providerUnavailableKey(provider) { return provider.origin === "native" ? "overview.nativeCliRequired" : "overview.providerServiceRequired"; } function nativeSpaceProvider(provider) { return provider.origin === "native"; } function ProviderMemoryFields(props) { const t = useT$3(); const layout = props.layout ?? "dialog"; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.providerFields, "data-provider": props.provider.id, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.providerFieldHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.providerFieldIdentity, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderIcon, { providerId: props.provider.id, icon: props.provider.icon, className: css$8.providerFieldIcon }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: props.provider.label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: providerSummary(t, props.provider) })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [ props.provider.kind === "local" ? t("overview.providerKindLocal") : t("overview.providerKindRemote"), " · ", t(`overview.workspaceBinding.${props.provider.workspaceBinding}`) ] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.providerAdvancedGrid, children: memoryProviderFields(props.provider).map((field) => { const saved = props.body?.provider.configuredSecrets.includes(field.key) === true; const clearSecrets = props.clearSecrets ?? []; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderField, { field, value: props.connection[field.key], layout, saved, clearing: clearSecrets.includes(field.key), ...props.disabled === void 0 ? {} : { disabled: props.disabled }, onChange: (value) => props.onChange(field.key, value), ...props.body === void 0 || props.onClearSecretsChange === void 0 ? {} : { onClearChange: (clearing) => props.onClearSecretsChange(clearing ? [.../* @__PURE__ */ new Set([...clearSecrets, field.key])] : clearSecrets.filter((key) => key !== field.key)) } }, field.key); }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("small", { className: css$8.providerWriteHint, children: [ props.provider.capabilities.writeMode === "exact" ? t("overview.providerWriteExact") : t("overview.providerWriteAsync"), " · ", props.provider.capabilities.graph ? t("overview.providerGraphReady") : t("overview.providerSearchReady") ] }) ] }); } const CATEGORY_KEYS = { decision: "category.decision", preference: "category.preference", fact: "category.fact", insight: "category.insight", context: "category.context", general: "category.general" }; function categoryLabel(t, category) { return CATEGORY_KEYS[category] === void 0 ? category : t(CATEGORY_KEYS[category]); } function insightKey(insight) { return `${insight.memoryBodyId ?? "memory"}:${insight.id}`; } function MemoryProviderBadge(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.providerBadge, "data-provider": props.providerId, title: props.label, children: props.label }); } function ReadSourcePanel(props) { const t = useT$3(); if (props.sources.length === 0) return null; if (props.compact === true && props.onSelect === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$8.readSourcesCompact, "aria-label": props.title, title: props.hint, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.readSourcesCompactTitle, children: props.title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.readSourcesCompactList, children: props.sources.map((source) => { const modeLabel = t(`readSources.mode.${source.mode}`); const statusLabel = t(`readSources.status.${source.status}`, { count: source.itemCount }); const edgeSuffix = source.edgeCount === void 0 || source.edgeCount === 0 ? "" : ` · ${t("readSources.edges", { count: source.edgeCount })}`; const tooltip = [ source.providerLabel, modeLabel, `${statusLabel}${edgeSuffix}`, source.hint ].filter(Boolean).join(" · "); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { className: css$8.readSourcePill, "data-provider": source.providerId, "data-mode": source.mode, "data-status": source.status, title: tooltip, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.readSourceSignal, "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: source.memoryBodyName }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryProviderBadge, { providerId: source.providerId, label: source.providerLabel }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: modeLabel }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("em", { children: [statusLabel, edgeSuffix] }) ] }, source.memoryBodyId); }) })] }); const content = (source) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.readSourceSignal, "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css$8.readSourceIdentity, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: source.memoryBodyName }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css$8.readSourceMeta, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryProviderBadge, { providerId: source.providerId, label: source.providerLabel }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t(`readSources.model.${source.providerId}`) })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css$8.readSourceState, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { children: t(`readSources.mode.${source.mode}`) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("small", { children: [source.mode === "entities" && source.status === "ready" ? t(source.complete === false ? "entities.sourcePartial" : "entities.sourceReady", { count: source.itemCount }) : t(`readSources.status.${source.status}`, { count: source.itemCount }), source.edgeCount === void 0 || source.edgeCount === 0 ? "" : ` · ${t("readSources.edges", { count: source.edgeCount })}`] })] }) ] }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$8.readSources, "aria-label": props.title, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: props.title }), props.hint !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: props.hint })] }), props.onSelect !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "aria-pressed": props.selectedBodyId === void 0, "data-selected": props.selectedBodyId === void 0 ? "" : void 0, onClick: () => props.onSelect?.(void 0), children: t("readSources.all") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: props.sources.map((source) => props.onSelect === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("article", { className: css$8.readSourceCard, "data-provider": source.providerId, "data-mode": source.mode, "data-status": source.status, title: source.hint, children: content(source) }, source.memoryBodyId) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.readSourceCard, "data-provider": source.providerId, "data-mode": source.mode, "data-status": source.status, "aria-pressed": props.selectedBodyId === source.memoryBodyId, "data-selected": props.selectedBodyId === source.memoryBodyId || void 0, title: source.hint, onClick: () => props.onSelect?.(props.selectedBodyId === source.memoryBodyId ? void 0 : source.memoryBodyId), children: content(source) }, source.memoryBodyId)) })] }); } function InsightCard(props) { const t = useT$3(); const [confirming, setConfirming] = (0, react.useState)(false); const [forgetting, setForgetting] = (0, react.useState)(false); const { insight } = props; const neutralActionClass = appearanceClass(css$8.ghostButton, appearanceClass(sidebarCss$3.itemActionButton, sidebarCss$3.itemEditAction)); const forgetActionClass = appearanceClass(css$8.dangerButton, appearanceClass(sidebarCss$3.itemActionButton, sidebarCss$3.itemDangerAction)); const providerLabel = insight.memoryProviderLabel ?? insight.memoryProviderId; const supportsRelated = insight.memoryCapabilities?.related === true; const supportsForget = insight.memoryCapabilities?.forget === true; const meta = [ insight.memoryBodyName, providerLabel, insight.category !== void 0 ? categoryLabel(t, insight.category) : void 0, insight.importance !== void 0 ? t("common.importance", { value: insight.importance }) : void 0, insight.score !== void 0 ? t("common.score", { value: insight.score.toFixed(2) }) : void 0, insight.depth !== void 0 ? t("common.hops", { count: insight.depth }) : void 0 ].filter((entry) => entry !== void 0); const forget = async () => { setForgetting(true); try { await props.onForget(insight); } finally { setForgetting(false); setConfirming(false); } }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { className: css$8.insightCard, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.cardTop, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.badges, children: meta.map((entry) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.badge, children: entry }, entry)) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css$8.content, children: insight.content }), (insight.tags?.length ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.tags, children: insight.tags.map((tag) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: ["#", tag] }, tag)) }), (insight.entities?.length ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.entities, children: insight.entities.map((entity) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: entity }, entity)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.cardActions, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ props.onRelated !== void 0 && supportsRelated && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: neutralActionClass, onClick: () => props.onRelated?.(insight), children: t("card.related") }), props.onClone !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: neutralActionClass, onClick: () => props.onClone?.(insight), children: t("card.clone") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: neutralActionClass, onClick: () => void (0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(insight.id), children: t("common.copyId") }), props.writeEnabled && supportsForget && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: forgetActionClass, onClick: () => setConfirming(true), children: t("card.forget") }) ] }) }) ] }), confirming && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("card.confirmText"), description: `${insight.memoryBodyName ?? insight.memoryBodyId ?? ""}${insight.memoryBodyName === void 0 && insight.memoryBodyId === void 0 ? "" : " · "}${insight.id}`, busy: forgetting, onClose: () => setConfirming(false), footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, "data-autofocus": true, className: css$8.secondaryButton, disabled: forgetting, onClick: () => setConfirming(false), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.dangerSolidButton, disabled: forgetting, onClick: () => void forget(), children: forgetting ? t("card.processing") : t("card.confirmForget") })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.bodyDeleteConfirm, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.bodyDeleteSummary, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css$8.bodyDeleteContent, children: insight.content }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: meta.join(" · ") })] }) }) })] }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/memory-graph.tsx const GRAPH_WIDTH = 930; const GRAPH_HEIGHT = 520; const GRAPH_MARGIN_LEFT = 62; const GRAPH_MARGIN_TOP = 72; const GRAPH_TOOLBAR_SAFE_X = 300; const GRAPH_TOOLBAR_SAFE_Y = 104; const CATEGORY_ORDER$1 = [ "space", "entity", "preference", "decision", "fact", "insight", "context", "general" ]; function hash(value) { let result = 2166136261; for (const char of value) result = Math.imul(result ^ char.charCodeAt(0), 16777619); return result >>> 0; } function graphNodeKey(node) { return node.graphId ?? node.id; } function graphNodeKind(node) { return node.kind ?? "memory"; } function spaceGraphId(id) { return `space:${id}`; } function entityGraphId(entity) { return `entity:${encodeURIComponent(normalizeEntity(entity))}`; } const normalizeEntity = normalizeEntityKey; function enrichMultiSpaceGraph(graph, bodies) { if (graph.nodes.length === 0) return graph; const memories = graph.nodes.map((node) => ({ ...node, kind: "memory" })); const memoriesBySpace = /* @__PURE__ */ new Map(); for (const node of memories) { if (node.memoryBodyId === void 0) continue; memoriesBySpace.set(node.memoryBodyId, [...memoriesBySpace.get(node.memoryBodyId) ?? [], node]); } const activeSpaces = bodies.filter((body) => body.active && ((memoriesBySpace.get(body.id)?.length ?? 0) > 0 || (body.stats?.topEntities.length ?? 0) > 0)); const spaceNodes = activeSpaces.map((body) => ({ id: body.id, graphId: spaceGraphId(body.id), kind: "space", category: "space", content: body.name, color: "#22a879", memoryBodyId: body.id, memoryBodyName: body.name, memoryProviderId: body.provider.id, occurrenceCount: body.stats?.totalInsights ?? memoriesBySpace.get(body.id)?.length ?? 0 })); const edges = graph.edges.filter((edge) => edge.type !== "entity"); for (const body of activeSpaces) for (const memory of memoriesBySpace.get(body.id) ?? []) edges.push({ sourceId: spaceGraphId(body.id), targetId: graphNodeKey(memory), label: "scope", color: "#708199", type: "scope" }); const spacesById = new Map(activeSpaces.map((body) => [body.id, body])); const indexedEntities = /* @__PURE__ */ new Map(); for (const memory of memories) { const body = memory.memoryBodyId === void 0 ? void 0 : spacesById.get(memory.memoryBodyId); if (body === void 0) continue; const seen = /* @__PURE__ */ new Set(); for (const rawEntity of memory.entities ?? []) { const entity = rawEntity.trim(); const key = normalizeEntity(entity); if (key === "" || seen.has(key)) continue; seen.add(key); const current = indexedEntities.get(key); if (current === void 0) indexedEntities.set(key, { entity, memories: [memory], bodies: [body] }); else { current.memories.push(memory); if (!current.bodies.some((candidate) => candidate.id === body.id)) current.bodies.push(body); } } } const entities = [...indexedEntities.values()].sort((left, right) => right.memories.length - left.memories.length || left.entity.localeCompare(right.entity)).slice(0, 24); const entityNodes = entities.map((item) => ({ id: item.entity, graphId: entityGraphId(item.entity), kind: "entity", category: "entity", content: item.entity, color: "#2b9db9", occurrenceCount: item.memories.length, memoryBodyIds: item.bodies.map((body) => body.id), memoryBodyNames: item.bodies.map((body) => body.name) })); for (const item of entities) { const key = entityGraphId(item.entity); for (const memory of item.memories) edges.push({ sourceId: key, targetId: graphNodeKey(memory), label: item.entity, color: "#22a879", type: "entity" }); } return { ...graph, nodes: [ ...spaceNodes, ...entityNodes, ...memories ], edges }; } function graphKindLabel(t, node) { const kind = graphNodeKind(node); return kind === "space" ? t("graph.kindSpace") : kind === "entity" ? t("graph.kindEntity") : categoryLabel(t, node.category ?? "general"); } function activeCategoryAnchors(grouped) { const categories = [...grouped.keys()].sort((left, right) => { const leftIndex = CATEGORY_ORDER$1.indexOf(left); const rightIndex = CATEGORY_ORDER$1.indexOf(right); return (leftIndex < 0 ? CATEGORY_ORDER$1.length : leftIndex) - (rightIndex < 0 ? CATEGORY_ORDER$1.length : rightIndex); }); const centerX = 444; const centerY = 285; const anchors = /* @__PURE__ */ new Map(); if (categories.length === 1) { anchors.set(categories[0], clampGraphPosition({ x: centerX, y: centerY })); return anchors; } categories.forEach((category, index) => { const angle = -Math.PI / 2 + index / categories.length * Math.PI * 2; anchors.set(category, clampGraphPosition({ x: centerX + Math.cos(angle) * Math.min(235, 108 + categories.length * 21), y: centerY + Math.sin(angle) * Math.min(144, 68 + categories.length * 13) })); }); return anchors; } function clampGraphPosition(position) { const x = Math.min(826, Math.max(GRAPH_MARGIN_LEFT, position.x)); return { x, y: Math.min(466, Math.max(x > GRAPH_TOOLBAR_SAFE_X ? GRAPH_TOOLBAR_SAFE_Y : GRAPH_MARGIN_TOP, position.y)) }; } function naturalGraphPositions(nodes, edges) { const positions = /* @__PURE__ */ new Map(); const grouped = /* @__PURE__ */ new Map(); for (const node of nodes) { const category = node.category ?? "general"; grouped.set(category, [...grouped.get(category) ?? [], node]); } const anchors = activeCategoryAnchors(grouped); for (const [category, items] of grouped) { const anchor = anchors.get(category) ?? { x: GRAPH_WIDTH / 2, y: GRAPH_HEIGHT / 2 }; items.forEach((node, index) => { const seed = hash(graphNodeKey(node)); const angle = index * 2.399963 + seed % 37 / 37 * .4; const radius = items.length === 1 ? 0 : 24 + Math.sqrt(index + 1) * 35; positions.set(graphNodeKey(node), clampGraphPosition({ x: anchor.x + Math.cos(angle) * radius, y: anchor.y + Math.sin(angle) * radius })); }); } const velocities = new Map(nodes.map((node) => [graphNodeKey(node), { x: 0, y: 0 }])); const visibleIds = new Set(nodes.map(graphNodeKey)); const visibleEdges = edges.filter((edge) => visibleIds.has(edge.sourceId) && visibleIds.has(edge.targetId)); for (let iteration = 0; iteration < 150; iteration += 1) { const cooling = 1 - iteration / 180; for (let leftIndex = 0; leftIndex < nodes.length; leftIndex += 1) { const left = nodes[leftIndex]; const leftPosition = positions.get(graphNodeKey(left)); const leftVelocity = velocities.get(graphNodeKey(left)); for (let rightIndex = leftIndex + 1; rightIndex < nodes.length; rightIndex += 1) { const right = nodes[rightIndex]; const rightPosition = positions.get(graphNodeKey(right)); const rightVelocity = velocities.get(graphNodeKey(right)); let dx = leftPosition.x - rightPosition.x; let dy = leftPosition.y - rightPosition.y; if (dx === 0 && dy === 0) { dx = hash(graphNodeKey(left)) % 13 - 6 || 1; dy = hash(graphNodeKey(right)) % 11 - 5 || -1; } const distanceSquared = Math.max(100, dx * dx + dy * dy); const distance = Math.sqrt(distanceSquared); const force = Math.min(9, 18e3 / distanceSquared) * cooling + (distance < 66 ? (66 - distance) * .08 : 0); const forceX = dx / distance * force; const forceY = dy / distance * force; leftVelocity.x += forceX; leftVelocity.y += forceY; rightVelocity.x -= forceX; rightVelocity.y -= forceY; } } for (const edge of visibleEdges) { const source = positions.get(edge.sourceId); const target = positions.get(edge.targetId); const sourceVelocity = velocities.get(edge.sourceId); const targetVelocity = velocities.get(edge.targetId); const dx = target.x - source.x; const dy = target.y - source.y; const distance = Math.max(1, Math.hypot(dx, dy)); const sparseScale = nodes.length <= 3 ? 2 : nodes.length <= 8 ? 1.45 : 1; const spring = (distance - (edge.type === "scope" ? 138 : edge.type === "entity" ? 94 : edge.type === "semantic" ? 118 : 106) * sparseScale) * .018 * cooling; const forceX = dx / distance * spring; const forceY = dy / distance * spring; sourceVelocity.x += forceX; sourceVelocity.y += forceY; targetVelocity.x -= forceX; targetVelocity.y -= forceY; } for (const node of nodes) { const key = graphNodeKey(node); const position = positions.get(key); const velocity = velocities.get(key); const anchor = anchors.get(node.category ?? "general") ?? { x: GRAPH_WIDTH / 2, y: GRAPH_HEIGHT / 2 }; velocity.x += (anchor.x - position.x) * .0035 * cooling + (GRAPH_WIDTH / 2 - position.x) * 8e-4; velocity.y += (anchor.y - position.y) * .0035 * cooling + (GRAPH_HEIGHT / 2 - position.y) * 8e-4; velocity.x = Math.max(-12, Math.min(12, velocity.x * .76)); velocity.y = Math.max(-12, Math.min(12, velocity.y * .76)); positions.set(key, clampGraphPosition({ x: position.x + velocity.x, y: position.y + velocity.y })); } } return positions; } function uniformGraphPositions(nodes) { const positions = /* @__PURE__ */ new Map(); const ordered = [...nodes].sort((left, right) => { const categoryDifference = CATEGORY_ORDER$1.indexOf(left.category ?? "general") - CATEGORY_ORDER$1.indexOf(right.category ?? "general"); return categoryDifference === 0 ? left.id.localeCompare(right.id) : categoryDifference; }); const columns = Math.max(1, Math.ceil(Math.sqrt(ordered.length * 1.65))); const rows = Math.max(1, Math.ceil(ordered.length / columns)); const cellWidth = 764 / columns; const cellHeight = 362 / rows; ordered.forEach((node, index) => { const row = Math.floor(index / columns); const column = index % columns; const rowLength = Math.min(columns, ordered.length - row * columns); const rowOffset = (columns - rowLength) * cellWidth / 2; positions.set(graphNodeKey(node), clampGraphPosition({ x: GRAPH_MARGIN_LEFT + rowOffset + cellWidth * (column + .5), y: GRAPH_TOOLBAR_SAFE_Y + cellHeight * (row + .5) })); }); return positions; } function graphPoint(svg, clientX, clientY) { const matrix = svg.getScreenCTM?.(); if (matrix !== null && matrix !== void 0 && typeof svg.createSVGPoint === "function") { const point = svg.createSVGPoint(); point.x = clientX; point.y = clientY; return clampGraphPosition(point.matrixTransform(matrix.inverse())); } const bounds = svg.getBoundingClientRect(); const width = bounds.width || GRAPH_WIDTH; const height = bounds.height || GRAPH_HEIGHT; return clampGraphPosition({ x: (clientX - bounds.left) * GRAPH_WIDTH / width, y: (clientY - bounds.top) * GRAPH_HEIGHT / height }); } function positionsMatch(current, target) { if (current === target) return true; if (current.size !== target.size) return false; for (const [id, destination] of target) { const origin = current.get(id); if (origin === void 0) return false; if (Math.abs(origin.x - destination.x) > .01 || Math.abs(origin.y - destination.y) > .01) return false; } return true; } const MemoryGraph = (0, react.memo)(function MemoryGraph(props) { const t = useT$3(); const visibleNodes = (0, react.useMemo)(() => { const spaces = props.graph.nodes.filter((node) => graphNodeKind(node) === "space"); const entities = props.graph.nodes.filter((node) => graphNodeKind(node) === "entity").slice(0, 20); const memories = props.graph.nodes.filter((node) => graphNodeKind(node) === "memory").slice(0, Math.max(0, 60 - spaces.length - entities.length)); return [ ...spaces, ...entities, ...memories ].slice(0, 60); }, [props.graph.nodes]); const visibleIds = (0, react.useMemo)(() => new Set(visibleNodes.map(graphNodeKey)), [visibleNodes]); const neighbors = (0, react.useMemo)(() => { if (!props.quiet || props.selectedId === void 0 || !visibleIds.has(props.selectedId)) return void 0; const result = /* @__PURE__ */ new Set([props.selectedId]); for (const edge of props.graph.edges) { if (edge.sourceId === props.selectedId) result.add(edge.targetId); if (edge.targetId === props.selectedId) result.add(edge.sourceId); } return result; }, [ props.quiet, props.selectedId, props.graph.edges, visibleIds ]); const visibleKinds = (0, react.useMemo)(() => new Map(visibleNodes.map((node) => [graphNodeKey(node), graphNodeKind(node)])), [visibleNodes]); const nodeDisplay = (0, react.useMemo)(() => { const sparse = visibleNodes.length <= 12; const map = /* @__PURE__ */ new Map(); for (const node of visibleNodes) { const normalized = node.content.replace(/\s+/gu, " "); map.set(graphNodeKey(node), { label: short(normalized, sparse ? 26 : 19), selectedLabel: short(normalized, 34), ...node.memoryBodyName === void 0 ? {} : { bodyLabel: short(node.memoryBodyName, 12) } }); } return map; }, [visibleNodes]); const edges = (0, react.useMemo)(() => { const priority = /* @__PURE__ */ new Map([ ["entity", 0], ["scope", 1], ["causal", 2], ["semantic", 3], ["temporal", 4] ]); return props.graph.edges.filter((edge) => visibleIds.has(edge.sourceId) && visibleIds.has(edge.targetId)).map((edge, index) => ({ edge, index })).sort((left, right) => (priority.get(left.edge.type ?? "temporal") ?? 5) - (priority.get(right.edge.type ?? "temporal") ?? 5) || left.index - right.index).slice(0, 180).map(({ edge }) => edge); }, [props.graph.edges, visibleIds]); const curvedEdges = (0, react.useMemo)(() => { const groups = /* @__PURE__ */ new Map(); edges.forEach((edge, index) => { const key = [edge.sourceId, edge.targetId].sort().join("::"); groups.set(key, [...groups.get(key) ?? [], index]); }); return edges.map((edge, index) => { const key = [edge.sourceId, edge.targetId].sort().join("::"); const group = groups.get(key) ?? [index]; return { edge, offset: (group.indexOf(index) - (group.length - 1) / 2) * 12 }; }); }, [edges]); const layoutKey = (0, react.useMemo)(() => `${visibleNodes.map((node) => `${graphNodeKey(node)}:${graphNodeKind(node)}:${node.category ?? "general"}`).join("|")}::${edges.map((edge) => `${edge.sourceId}>${edge.targetId}:${edge.type ?? "temporal"}`).join("|")}`, [visibleNodes, edges]); const naturalLayout = (0, react.useMemo)(() => naturalGraphPositions(visibleNodes, edges), [layoutKey]); const uniformLayout = (0, react.useMemo)(() => uniformGraphPositions(visibleNodes), [visibleNodes]); const [positions, setPositions] = (0, react.useState)(() => naturalLayout); const [layoutMode, setLayoutMode] = (0, react.useState)("natural"); const layoutModeRef = (0, react.useRef)("natural"); layoutModeRef.current = layoutMode; const positionsRef = (0, react.useRef)(positions); const appliedLayoutKeyRef = (0, react.useRef)(layoutKey); const animationRef = (0, react.useRef)(null); const dragRef = (0, react.useRef)(null); const commitPositions = (0, react.useCallback)((next) => { positionsRef.current = next; setPositions(next); }, []); const cancelAnimation = (0, react.useCallback)(() => { if (animationRef.current !== null && typeof window.cancelAnimationFrame === "function") window.cancelAnimationFrame(animationRef.current); animationRef.current = null; }, []); const animateTo = (0, react.useCallback)((target, mode) => { cancelAnimation(); setLayoutMode(mode); if (typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)")?.matches === true || positionsMatch(positionsRef.current, target) || typeof window.requestAnimationFrame !== "function") { if (positionsRef.current !== target) commitPositions(target); return; } const start = new Map(positionsRef.current); const startedAt = performance.now(); const tick = (time) => { const progress = Math.min(1, (time - startedAt) / 620); const eased = 1 - Math.pow(1 - progress, 3); const next = /* @__PURE__ */ new Map(); for (const [id, destination] of target) { const origin = start.get(id) ?? { x: GRAPH_WIDTH / 2, y: GRAPH_HEIGHT / 2 }; next.set(id, { x: origin.x + (destination.x - origin.x) * eased, y: origin.y + (destination.y - origin.y) * eased }); } commitPositions(next); if (progress < 1) animationRef.current = window.requestAnimationFrame(tick); else animationRef.current = null; }; animationRef.current = window.requestAnimationFrame(tick); }, [cancelAnimation, commitPositions]); (0, react.useEffect)(() => { if (appliedLayoutKeyRef.current === layoutKey && positionsMatch(positionsRef.current, naturalLayout)) return; appliedLayoutKeyRef.current = layoutKey; animateTo(naturalLayout, "natural"); }, [ animateTo, layoutKey, naturalLayout ]); (0, react.useEffect)(() => () => cancelAnimation(), [cancelAnimation]); const beginDrag = (event, nodeId) => { cancelAnimation(); dragRef.current = { nodeId, pointerId: event.pointerId, startX: event.clientX, startY: event.clientY, moved: false }; event.currentTarget.setPointerCapture?.(event.pointerId); }; const moveDrag = (event) => { const drag = dragRef.current; const svg = event.currentTarget.ownerSVGElement; if (drag === null || svg === null || drag.pointerId !== event.pointerId) return; if (!drag.moved && Math.hypot(event.clientX - drag.startX, event.clientY - drag.startY) < 4) return; drag.moved = true; const point = graphPoint(svg, event.clientX, event.clientY); const next = new Map(positionsRef.current); next.set(drag.nodeId, point); commitPositions(next); if (layoutModeRef.current !== "custom") setLayoutMode("custom"); }; const endDrag = (event) => { const drag = dragRef.current; if (drag === null || drag.pointerId !== event.pointerId) return; const svg = event.currentTarget.ownerSVGElement; if (drag.moved && svg !== null) { const next = new Map(positionsRef.current); next.set(drag.nodeId, graphPoint(svg, event.clientX, event.clientY)); commitPositions(next); } dragRef.current = null; event.currentTarget.releasePointerCapture?.(event.pointerId); if (!drag.moved) { const node = visibleNodes.find((candidate) => graphNodeKey(candidate) === drag.nodeId); if (node !== void 0) props.onSelect(node); } }; const cancelDrag = (event) => { if (dragRef.current?.pointerId === event.pointerId) dragRef.current = null; }; const nudge = (nodeId, dx, dy) => { cancelAnimation(); const current = positionsRef.current.get(nodeId); if (current === void 0) return; const next = new Map(positionsRef.current); next.set(nodeId, clampGraphPosition({ x: current.x + dx, y: current.y + dy })); commitPositions(next); setLayoutMode("custom"); }; const layoutLabel = t(layoutMode === "natural" ? "graph.layoutNatural" : layoutMode === "uniform" ? "graph.layoutUniform" : "graph.layoutCustom"); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.graphCanvasControls, role: "toolbar", "aria-label": t("graph.layoutAria"), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { role: "status", "aria-label": t("graph.layoutStatus", { layout: layoutLabel }), title: t("graph.draggable", { layout: layoutLabel }), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {}), layoutLabel] }), props.onQuietChange !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "aria-pressed": props.quiet === true, "data-active": props.quiet || void 0, title: t("graph.quietHint"), onClick: () => props.onQuietChange?.(!props.quiet), children: t("graph.quietAction") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-active": layoutMode === "natural" || void 0, onClick: () => animateTo(naturalLayout, "natural"), children: t("graph.naturalAction") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-active": layoutMode === "uniform" || void 0, onClick: () => animateTo(uniformLayout, "uniform"), children: t("graph.uniformAction") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", { className: css$8.graphSvg, viewBox: `0 0 ${GRAPH_WIDTH} ${GRAPH_HEIGHT}`, role: "img", "data-quiet": props.quiet || void 0, "data-layout": layoutMode, "data-density": visibleNodes.length <= 12 ? "sparse" : "dense", "aria-label": t("graph.aria", { nodes: props.graph.nodes.length, edges: props.graph.edges.length }), onClick: () => { if (props.quiet) props.onClearSelection?.(); }, onKeyDown: (event) => { if (props.quiet && props.selectedId !== void 0 && event.key === "Escape") { event.preventDefault(); event.stopPropagation(); props.onClearSelection?.(); } }, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("defs", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("pattern", { id: "mnemon-grid", width: "26", height: "26", patternUnits: "userSpaceOnUse", children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M 26 0 L 0 0 0 26", className: css$8.graphGridLine, fill: "none" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("filter", { id: "mnemon-glow", x: "-100%", y: "-100%", width: "300%", height: "300%", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("feGaussianBlur", { stdDeviation: "4", result: "blur" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("feMerge", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("feMergeNode", { in: "blur" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("feMergeNode", { in: "SourceGraphic" })] })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", { width: GRAPH_WIDTH, height: GRAPH_HEIGHT, className: css$8.graphBackdrop }), !props.quiet && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", { width: GRAPH_WIDTH, height: GRAPH_HEIGHT, fill: "url(#mnemon-grid)" }), curvedEdges.map(({ edge, offset }, index) => { const source = positions.get(edge.sourceId) ?? naturalLayout.get(edge.sourceId) ?? { x: GRAPH_WIDTH / 2, y: GRAPH_HEIGHT / 2 }; const target = positions.get(edge.targetId) ?? naturalLayout.get(edge.targetId) ?? { x: GRAPH_WIDTH / 2, y: GRAPH_HEIGHT / 2 }; const dx = target.x - source.x; const dy = target.y - source.y; const distance = Math.max(1, Math.hypot(dx, dy)); const direction = edge.sourceId.localeCompare(edge.targetId) <= 0 ? 1 : -1; const controlX = (source.x + target.x) / 2 - dy / distance * offset * direction; const controlY = (source.y + target.y) / 2 + dx / distance * offset * direction; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: `M ${source.x} ${source.y} Q ${controlX} ${controlY} ${target.x} ${target.y}`, className: css$8.graphEdge, "data-edge": edge.type ?? "temporal", "data-dimmed": neighbors !== void 0 && !(neighbors.has(edge.sourceId) && neighbors.has(edge.targetId)) || void 0, "data-source-id": edge.sourceId, "data-target-id": edge.targetId, "data-source-kind": visibleKinds.get(edge.sourceId), "data-target-kind": visibleKinds.get(edge.targetId) }, `${edge.sourceId}-${edge.targetId}-${index}`); }), visibleNodes.map((node, index) => { const nodeKey = graphNodeKey(node); const position = positions.get(nodeKey) ?? naturalLayout.get(nodeKey) ?? { x: GRAPH_WIDTH / 2, y: GRAPH_HEIGHT / 2 }; const selected = props.selectedId === nodeKey; const showLabel = selected || visibleNodes.length < 22 || index % 3 === 0; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", { className: css$8.graphNode, "data-node-id": nodeKey, "data-provider": node.memoryProviderId, "data-category": node.category ?? "general", "data-kind": graphNodeKind(node), "data-selected": selected || void 0, "data-dimmed": neighbors !== void 0 && !neighbors.has(nodeKey) || void 0, transform: `translate(${position.x} ${position.y})`, role: "button", tabIndex: 0, "aria-label": `${graphKindLabel(t, node)}: ${short(node.content, 80)}`, "data-dragging": dragRef.current?.nodeId === nodeKey || void 0, onPointerDown: (event) => beginDrag(event, nodeKey), onPointerMove: moveDrag, onPointerUp: endDrag, onPointerCancel: cancelDrag, onLostPointerCapture: cancelDrag, onClick: (event) => { if (props.quiet) event.stopPropagation(); props.onSelect(node); }, onKeyDown: (event) => { if (event.key === "Enter" || event.key === " ") props.onSelect(node); else if (event.key === "ArrowLeft") { event.preventDefault(); nudge(nodeKey, -12, 0); } else if (event.key === "ArrowRight") { event.preventDefault(); nudge(nodeKey, 12, 0); } else if (event.key === "ArrowUp") { event.preventDefault(); nudge(nodeKey, 0, -12); } else if (event.key === "ArrowDown") { event.preventDefault(); nudge(nodeKey, 0, 12); } }, children: [ graphNodeKind(node) === "space" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("rect", { x: selected ? -20 : -17, y: selected ? -15 : -13, width: selected ? 40 : 34, height: selected ? 30 : 26, rx: "9", className: css$8.nodeHalo, filter: selected ? "url(#mnemon-glow)" : void 0 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", { r: selected ? 6 : 5, className: css$8.nodeCore })] }) : graphNodeKind(node) === "entity" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: selected ? "M 0 -18 L 18 0 L 0 18 L -18 0 Z" : "M 0 -14 L 14 0 L 0 14 L -14 0 Z", className: css$8.nodeHalo, filter: selected ? "url(#mnemon-glow)" : void 0 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", { r: selected ? 5 : 4, className: css$8.nodeCore })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", { r: selected ? 17 : visibleNodes.length <= 12 ? 14 : 11, className: css$8.nodeHalo, filter: selected ? "url(#mnemon-glow)" : void 0 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", { r: selected ? 7 : visibleNodes.length <= 12 ? 6 : 4.5, className: css$8.nodeCore })] }), (props.quiet || selected || visibleNodes.length <= 12) && graphNodeKind(node) === "memory" && nodeDisplay.get(nodeKey)?.bodyLabel !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", { x: "0", y: "-18", textAnchor: "middle", className: css$8.nodeBodyLabel, children: nodeDisplay.get(nodeKey).bodyLabel }), (props.quiet || showLabel) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("text", { x: visibleNodes.length <= 12 ? 19 : 15, y: "4", className: css$8.nodeLabel, children: selected ? nodeDisplay.get(nodeKey).selectedLabel : nodeDisplay.get(nodeKey).label }) ] }, nodeKey); }) ] })] }); }); // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/memory-graph-3d.tsx const DEFAULT_CAMERA = { yaw: .42, pitch: .24, distance: 960 }; const MAX_VISIBLE_NODES = 60; const MAX_VISIBLE_EDGES = 240; const FOCAL_LENGTH = 820; const SPHERE_RADIUS = 310; const CATEGORY_ORDER = [ "space", "entity", "preference", "decision", "fact", "insight", "context", "general" ]; const PROVIDER_COLORS = { "mnemon-native": "#64748b", openviking: "#3b82d0", honcho: "#c44fcf", mem0: "#8b5cf6", hindsight: "#0891b2", holographic: "#6366d9", retaindb: "#d08a28", byterover: "#0f9a83", supermemory: "#df4d72" }; const CATEGORY_COLORS = { decision: "#ef8354", preference: "#a879e1", fact: "#4d7cfe", insight: "#19a77d", context: "#d8a624", entity: "#2b9db9", general: "#8290a8" }; const EDGE_COLORS = { scope: "#708199", temporal: "#87909f", semantic: "#4d7cfe", causal: "#f07667", entity: "#25b383" }; const EDGE_PRIORITY = { entity: 0, causal: 1, semantic: 2, temporal: 3, scope: 4 }; function hashString(value) { let h = 2166136261; for (let i = 0; i < value.length; i++) { h ^= value.charCodeAt(i); h = Math.imul(h, 16777619); } return h >>> 0; } function clamp(value, min, max) { return Math.max(min, Math.min(max, value)); } function resolveColor(node) { const kind = graphNodeKind(node); if (kind === "space") return PROVIDER_COLORS[node.memoryProviderId ?? ""] ?? "#64748b"; if (kind === "entity") return "#2b9db9"; return CATEGORY_COLORS[(node.category ?? "general").toLowerCase()] ?? (node.color || "#8290a8"); } function sliceVisibleGraph(graph, selectedId) { const degree = /* @__PURE__ */ new Map(); for (const edge of graph.edges) { degree.set(edge.sourceId, (degree.get(edge.sourceId) ?? 0) + 1); degree.set(edge.targetId, (degree.get(edge.targetId) ?? 0) + 1); } const directNeighbors = /* @__PURE__ */ new Set(); if (selectedId !== void 0) { for (const edge of graph.edges) if (edge.sourceId === selectedId) directNeighbors.add(edge.targetId); else if (edge.targetId === selectedId) directNeighbors.add(edge.sourceId); } const score = (node) => { const id = graphNodeKey(node); const kind = graphNodeKind(node); if (id === selectedId) return 1e4; if (kind === "space") return 5e3 + (degree.get(id) ?? 0); if (directNeighbors.has(id)) return 2e3 + (degree.get(id) ?? 0); return (kind === "entity" ? 100 : 0) + (degree.get(id) ?? 0) * 10 + (node.importance ?? 3); }; const nodes = [...graph.nodes].sort((a, b) => score(b) - score(a) || graphNodeKey(a).localeCompare(graphNodeKey(b))).slice(0, MAX_VISIBLE_NODES); const visibleSet = new Set(nodes.map(graphNodeKey)); return { nodes, edges: graph.edges.filter((edge) => edge.sourceId !== edge.targetId && visibleSet.has(edge.sourceId) && visibleSet.has(edge.targetId)).sort((a, b) => (EDGE_PRIORITY[a.type ?? ""] ?? 9) - (EDGE_PRIORITY[b.type ?? ""] ?? 9)).slice(0, MAX_VISIBLE_EDGES), neighborIds: directNeighbors }; } function compute3DLayout(nodes, edges) { const positions = /* @__PURE__ */ new Map(); if (nodes.length === 0) return positions; const ids = nodes.map(graphNodeKey); const indexById = new Map(ids.map((id, idx) => [id, idx])); const categoryAnchors = /* @__PURE__ */ new Map(); CATEGORY_ORDER.forEach((cat, idx) => { const phi = Math.acos(1 - 2 * (idx + .5) / CATEGORY_ORDER.length); const theta = Math.PI * (1 + Math.sqrt(5)) * idx; const r = cat === "space" ? 0 : 175; categoryAnchors.set(cat, { x: r * Math.sin(phi) * Math.cos(theta), y: r * Math.sin(phi) * Math.sin(theta) * .78, z: r * Math.cos(phi) }); }); const spaces = nodes.filter((node) => graphNodeKind(node) === "space"); const coords = nodes.map((node, i) => { const id = ids[i]; const kind = graphNodeKind(node); if (kind === "space") { if (spaces.length === 1) return { x: 0, y: 0, z: 0 }; const sIdx = spaces.indexOf(node); const angle = sIdx / spaces.length * Math.PI * 2; return { x: Math.cos(angle) * 95, y: (sIdx % 2 * 2 - 1) * 28, z: Math.sin(angle) * 95 }; } const catKey = kind === "entity" ? "entity" : (node.category ?? "general").toLowerCase(); const anchor = categoryAnchors.get(catKey) ?? categoryAnchors.get("general"); const h = hashString(id); const u = (h & 255) / 255 * 2 - 1; const v = (h >>> 8 & 255) / 255 * 2 - 1; const w = (h >>> 16 & 255) / 255 * 2 - 1; return { x: anchor.x + u * 86, y: anchor.y + v * 72, z: anchor.z + w * 86 }; }); const velocities = coords.map(() => ({ x: 0, y: 0, z: 0 })); const linkPairs = edges.flatMap((edge) => { const s = indexById.get(edge.sourceId); const t = indexById.get(edge.targetId); if (s === void 0 || t === void 0) return []; return [{ s, t, rest: edge.type === "scope" ? 145 : edge.type === "entity" ? 105 : 120 }]; }); const iterations = Math.min(64, Math.max(24, Math.round(90 - nodes.length * .6))); const singleSpaceHub = spaces.length === 1 ? indexById.get(graphNodeKey(spaces[0])) : void 0; for (let step = 0; step < iterations; step++) { const cooling = 1 - step / (iterations + 6); const forces = coords.map((p) => ({ x: -p.x * .018, y: -p.y * .018, z: -p.z * .018 })); for (let i = 0; i < coords.length; i++) { const a = coords[i]; for (let j = i + 1; j < coords.length; j++) { const b = coords[j]; const dx = a.x - b.x; const dy = a.y - b.y; const dz = a.z - b.z; const distSq = dx * dx + dy * dy + dz * dz + 16; const dist = Math.sqrt(distSq); const repulse = Math.min(28, 3600 / distSq) / dist; const fx = dx * repulse; const fy = dy * repulse; const fz = dz * repulse; forces[i].x += fx; forces[i].y += fy; forces[i].z += fz; forces[j].x -= fx; forces[j].y -= fy; forces[j].z -= fz; } } for (const link of linkPairs) { const a = coords[link.s]; const b = coords[link.t]; const dx = b.x - a.x; const dy = b.y - a.y; const dz = b.z - a.z; const dist = Math.hypot(dx, dy, dz) || 1; const stretch = (dist - link.rest) * .065; const fx = dx / dist * stretch; const fy = dy / dist * stretch; const fz = dz / dist * stretch; forces[link.s].x += fx; forces[link.s].y += fy; forces[link.s].z += fz; forces[link.t].x -= fx; forces[link.t].y -= fy; forces[link.t].z -= fz; } for (let i = 0; i < coords.length; i++) { if (i === singleSpaceHub) continue; const vel = velocities[i]; const f = forces[i]; vel.x = (vel.x + f.x) * .72 * cooling; vel.y = (vel.y + f.y) * .72 * cooling; vel.z = (vel.z + f.z) * .72 * cooling; const pos = coords[i]; pos.x += clamp(vel.x, -26, 26); pos.y += clamp(vel.y, -26, 26); pos.z += clamp(vel.z, -26, 26); const mag = Math.hypot(pos.x, pos.y, pos.z); if (mag > SPHERE_RADIUS) { const pull = SPHERE_RADIUS / mag; pos.x *= pull; pos.y *= pull; pos.z *= pull; } } } for (let i = 0; i < ids.length; i++) positions.set(ids[i], coords[i]); return positions; } function project3DPoint(point, camera, width, height) { const cosY = Math.cos(camera.yaw); const sinY = Math.sin(camera.yaw); const cosP = Math.cos(camera.pitch); const sinP = Math.sin(camera.pitch); const yawX = point.x * cosY - point.z * sinY; const yawZ = point.x * sinY + point.z * cosY; const pitchY = point.y * cosP - yawZ * sinP; const pitchZ = point.y * sinP + yawZ * cosP; const depth = camera.distance + pitchZ; if (depth <= 48) return void 0; const scale = FOCAL_LENGTH / depth * (Math.min(width, height) / 520); return { sx: width / 2 + yawX * scale, sy: height / 2 + pitchY * scale, rz: pitchZ, scale }; } function pickProjectedNode(projected, x, y) { for (let i = projected.length - 1; i >= 0; i--) { const item = projected[i]; const hitRadius = Math.max(12, item.radius + 6); if (Math.hypot(x - item.sx, y - item.sy) <= hitRadius) return item.node; } } function readThemePalette(canvas) { const style = typeof window.getComputedStyle === "function" ? window.getComputedStyle(canvas) : void 0; const pick = (names, fallback) => { if (style === void 0) return fallback; for (const name of names) { const value = style.getPropertyValue(name).trim(); if (value !== "") return value; } return fallback; }; return { bg: pick(["--dsw-alias-bg-layer-1", "--mn-layer-1"], "#ffffff"), surface: pick(["--dsw-alias-bg-module-platform", "--mn-fill"], "rgba(128,128,128,0.12)"), text: pick(["--dsw-alias-label-primary", "--mn-text"], "#111827"), muted: pick(["--dsw-alias-label-secondary", "--mn-muted"], "#4b5563"), faint: pick(["--dsw-alias-label-tertiary", "--mn-faint"], "#9ca3af"), accent: pick(["--dsw-alias-state-business-primary", "--mn-accent"], "#4d7cfe") }; } const MemoryGraph3D = (0, react.memo)(function MemoryGraph3D(props) { const t = useT$3(); const canvasRef = (0, react.useRef)(null); const paletteRef = (0, react.useRef)(null); const cameraRef = (0, react.useRef)({ ...DEFAULT_CAMERA }); const projectedRef = (0, react.useRef)([]); const dragRef = (0, react.useRef)(null); const skipNextClickRef = (0, react.useRef)(false); const drawRef = (0, react.useRef)(() => void 0); const hoveredIdRef = (0, react.useRef)(void 0); const [hoveredId, setHoveredId] = (0, react.useState)(void 0); hoveredIdRef.current = hoveredId; const [dragging, setDragging] = (0, react.useState)(false); const { nodes: visibleNodes, edges: visibleEdges, neighborIds } = (0, react.useMemo)(() => sliceVisibleGraph(props.graph, props.selectedId), [props.graph, props.selectedId]); const layout = (0, react.useMemo)(() => compute3DLayout(visibleNodes, visibleEdges), [visibleNodes, visibleEdges]); const nodeVisuals = (0, react.useMemo)(() => { const map = /* @__PURE__ */ new Map(); for (const node of visibleNodes) { const id = graphNodeKey(node); const kind = graphNodeKind(node); const baseRadius = kind === "space" ? 11.5 : kind === "entity" ? 8.2 : 5.2 + Math.min(3.5, (node.importance ?? 3) * .65); map.set(id, { kind, color: resolveColor(node), baseRadius, label: short(node.content.replace(/\s+/gu, " "), kind === "space" ? 24 : 20) }); } return map; }, [visibleNodes]); const pickerNodes = (0, react.useMemo)(() => [...visibleNodes].sort((a, b) => graphNodeKey(a).localeCompare(graphNodeKey(b))).map((node) => ({ key: graphNodeKey(node), label: short(node.content, 80) })), [visibleNodes]); const draw = (0, react.useCallback)(() => { const canvas = canvasRef.current; if (canvas === null) return; let ctx = null; try { ctx = canvas.getContext("2d"); } catch { ctx = null; } if (ctx === null) return; const width = canvas.clientWidth > 0 ? canvas.clientWidth : 930; const height = canvas.clientHeight > 0 ? canvas.clientHeight : 520; const dpr = clamp(window.devicePixelRatio || 1, 1, 2); if (canvas.width !== Math.round(width * dpr) || canvas.height !== Math.round(height * dpr)) { canvas.width = Math.round(width * dpr); canvas.height = Math.round(height * dpr); } ctx.setTransform(dpr, 0, 0, dpr, 0, 0); const palette = paletteRef.current ?? (paletteRef.current = readThemePalette(canvas)); const cam = cameraRef.current; const quiet = props.quiet === true; const focusId = props.selectedId ?? hoveredId; ctx.clearRect(0, 0, width, height); ctx.fillStyle = palette.bg; ctx.fillRect(0, 0, width, height); const projectedById = /* @__PURE__ */ new Map(); const projectedList = []; for (const node of visibleNodes) { const id = graphNodeKey(node); const pt = layout.get(id); const visual = nodeVisuals.get(id); if (pt === void 0 || visual === void 0) continue; const p = project3DPoint(pt, cam, width, height); if (p === void 0) continue; const item = { id, node, sx: p.sx, sy: p.sy, rz: p.rz, scale: p.scale, radius: clamp(visual.baseRadius * p.scale, 3.5, 22) }; projectedById.set(id, item); projectedList.push(item); } const drawableEdges = visibleEdges.flatMap((edge) => { const s = projectedById.get(edge.sourceId); const tgt = projectedById.get(edge.targetId); return s === void 0 || tgt === void 0 ? [] : [{ edge, s, tgt, depth: (s.rz + tgt.rz) / 2 }]; }).sort((a, b) => b.depth - a.depth); ctx.save(); let dashed = false; for (const { edge, s, tgt, depth } of drawableEdges) { const connected = focusId !== void 0 && (edge.sourceId === focusId || edge.targetId === focusId); const depthAlpha = clamp(.75 - depth / 1100, .25, .95); const wantDashed = !quiet && edge.type === "scope"; if (wantDashed !== dashed) { ctx.setLineDash(wantDashed ? [4, 5] : []); dashed = wantDashed; } ctx.beginPath(); ctx.strokeStyle = quiet ? connected ? palette.accent : palette.faint : EDGE_COLORS[edge.type ?? ""] ?? palette.faint; ctx.lineWidth = (edge.type === "entity" ? 1.4 : 1) * (connected ? 1.45 : 1); ctx.globalAlpha = quiet ? connected ? .85 : focusId !== void 0 ? .16 : .36 : connected ? .9 : .48 * depthAlpha; ctx.moveTo(s.sx, s.sy); ctx.lineTo(tgt.sx, tgt.sy); ctx.stroke(); } ctx.restore(); projectedList.sort((a, b) => b.rz - a.rz); projectedRef.current = projectedList; const sparse = visibleNodes.length <= 16; const canMeasure = typeof ctx.measureText === "function"; for (const item of projectedList) { const { id, sx, sy, rz, radius } = item; const visual = nodeVisuals.get(id); if (visual === void 0) continue; const { kind, label } = visual; const isSelected = props.selectedId === id; const isHovered = hoveredId === id; const isNeighbor = neighborIds.has(id); const dimmed = quiet && focusId !== void 0 && !isSelected && !isHovered && !isNeighbor; const depthAlpha = clamp(.85 - rz / 950, .38, 1); const color = quiet ? isSelected || isHovered ? palette.accent : palette.muted : visual.color; ctx.save(); ctx.globalAlpha = dimmed ? .32 : depthAlpha; if (isSelected || isHovered || kind !== "memory") { ctx.beginPath(); const halo = radius + (isSelected ? 5 : 3.5); if (kind === "space") ctx.roundRect(sx - halo, sy - halo * .8, halo * 2, halo * 1.6, 5); else if (kind === "entity") { ctx.moveTo(sx, sy - halo); ctx.lineTo(sx + halo, sy); ctx.lineTo(sx, sy + halo); ctx.lineTo(sx - halo, sy); ctx.closePath(); } else ctx.arc(sx, sy, halo, 0, Math.PI * 2); ctx.fillStyle = color; ctx.globalAlpha = dimmed ? .06 : isSelected ? .16 : .1; ctx.fill(); ctx.strokeStyle = color; ctx.lineWidth = isSelected ? 2 : 1.25; ctx.globalAlpha = dimmed ? .25 : isSelected ? .95 : .52; ctx.stroke(); } ctx.globalAlpha = dimmed ? .35 : depthAlpha; ctx.beginPath(); ctx.arc(sx, sy, kind === "memory" ? radius : radius * .5, 0, Math.PI * 2); ctx.fillStyle = color; ctx.fill(); if (isSelected || isHovered || !quiet && (sparse || kind === "space")) { ctx.font = `${isSelected || kind === "space" ? 500 : 400} 11px system-ui, -apple-system, sans-serif`; ctx.textAlign = "center"; ctx.textBaseline = "top"; const labelY = sy + radius + 5; if ((isSelected || isHovered) && canMeasure) { const textWidth = ctx.measureText(label).width; ctx.fillStyle = palette.bg; ctx.globalAlpha = .88; ctx.beginPath(); ctx.roundRect(sx - textWidth / 2 - 5, labelY - 2, textWidth + 10, 16, 4); ctx.fill(); } ctx.fillStyle = isSelected || isHovered ? palette.text : palette.muted; ctx.globalAlpha = dimmed ? .4 : .95; ctx.fillText(label, sx, labelY); } ctx.restore(); } }, [ hoveredId, layout, neighborIds, nodeVisuals, props.quiet, props.selectedId, visibleEdges, visibleNodes ]); drawRef.current = draw; (0, react.useEffect)(() => { draw(); }, [draw]); (0, react.useEffect)(() => { const canvas = canvasRef.current; if (canvas === null || typeof ResizeObserver !== "function") return; const observer = new ResizeObserver(() => drawRef.current()); observer.observe(canvas); return () => observer.disconnect(); }, []); (0, react.useEffect)(() => { const observer = new MutationObserver(() => { paletteRef.current = null; drawRef.current(); }); observer.observe(document.body, { attributes: true, attributeFilter: ["data-ds-dark-theme", "style"] }); return () => observer.disconnect(); }, []); (0, react.useEffect)(() => { const canvas = canvasRef.current; if (canvas === null) return; const onWheel = (event) => { event.preventDefault(); cameraRef.current = { ...cameraRef.current, distance: clamp(cameraRef.current.distance + event.deltaY * .75, 340, 1650) }; drawRef.current(); }; canvas.addEventListener("wheel", onWheel, { passive: false }); return () => canvas.removeEventListener("wheel", onWheel); }, []); const setCamera = (camera) => { cameraRef.current = camera; drawRef.current(); }; const canvasCoordinates = (clientX, clientY, element) => { const rect = element.getBoundingClientRect(); return { x: clientX - rect.left, y: clientY - rect.top }; }; const pickAt = (clientX, clientY, element) => { if (!Number.isFinite(clientX) || !Number.isFinite(clientY)) return; const point = canvasCoordinates(clientX, clientY, element); const hit = pickProjectedNode(projectedRef.current, point.x, point.y); if (hit !== void 0) props.onSelect(hit); else props.onClearSelection?.(); }; const onPointerDown = (event) => { if (event.button !== 0 || !Number.isFinite(event.clientX) || !Number.isFinite(event.clientY)) return; skipNextClickRef.current = false; dragRef.current = { pointerId: event.pointerId ?? 0, startX: event.clientX, startY: event.clientY, lastX: event.clientX, lastY: event.clientY, moved: false }; event.currentTarget.setPointerCapture?.(event.pointerId); setDragging(true); }; const onPointerMove = (event) => { const drag = dragRef.current; const pointerId = event.pointerId ?? 0; if (drag !== null && drag.pointerId === pointerId && Number.isFinite(event.clientX) && Number.isFinite(event.clientY)) { const dx = event.clientX - drag.lastX; const dy = event.clientY - drag.lastY; drag.lastX = event.clientX; drag.lastY = event.clientY; if (!drag.moved && Math.hypot(event.clientX - drag.startX, event.clientY - drag.startY) >= 5) drag.moved = true; cameraRef.current = { ...cameraRef.current, yaw: cameraRef.current.yaw + dx * .0065, pitch: clamp(cameraRef.current.pitch + dy * .0055, -1.35, 1.35) }; drawRef.current(); return; } if (!Number.isFinite(event.clientX) || !Number.isFinite(event.clientY)) return; const point = canvasCoordinates(event.clientX, event.clientY, event.currentTarget); const hit = pickProjectedNode(projectedRef.current, point.x, point.y); const nextHovered = hit === void 0 ? void 0 : graphNodeKey(hit); if (hoveredIdRef.current !== nextHovered) setHoveredId(nextHovered); }; const onPointerUp = (event) => { const drag = dragRef.current; if (drag === null || drag.pointerId !== (event.pointerId ?? 0)) return; dragRef.current = null; setDragging(false); event.currentTarget.releasePointerCapture?.(event.pointerId); skipNextClickRef.current = drag.moved; }; const onClick = (event) => { if (skipNextClickRef.current) { skipNextClickRef.current = false; return; } pickAt(event.clientX, event.clientY, event.currentTarget); }; const onKeyDown = (event) => { if (event.key === "Escape") { event.preventDefault(); event.stopPropagation(); props.onClearSelection?.(); return; } if (event.key === "0" || event.key === "r" || event.key === "R") { event.preventDefault(); setCamera(DEFAULT_CAMERA); return; } const yawStep = event.key === "ArrowLeft" ? -.18 : event.key === "ArrowRight" ? .18 : 0; const pitchStep = event.key === "ArrowUp" ? -.14 : event.key === "ArrowDown" ? .14 : 0; const zoomStep = event.key === "+" || event.key === "=" ? -120 : event.key === "-" || event.key === "_" ? 120 : 0; if (yawStep === 0 && pitchStep === 0 && zoomStep === 0) return; event.preventDefault(); cameraRef.current = { yaw: cameraRef.current.yaw + yawStep, pitch: clamp(cameraRef.current.pitch + pitchStep, -1.35, 1.35), distance: clamp(cameraRef.current.distance + zoomStep, 340, 1650) }; drawRef.current(); }; const adjustZoom = (delta) => { setCamera({ ...cameraRef.current, distance: clamp(cameraRef.current.distance + delta, 340, 1650) }); }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.graphCanvasControls, role: "toolbar", "aria-label": t("graph.orbitAria"), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { title: t("graph.orbitHint"), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", {}), t("graph.orbitShort")] }), props.onQuietChange !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "aria-pressed": props.quiet === true, "data-active": props.quiet || void 0, title: t("graph.quietHint"), onClick: () => props.onQuietChange?.(!props.quiet), children: t("graph.quietAction") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "aria-label": t("graph.zoomInAction"), title: t("graph.zoomInAction"), onClick: () => adjustZoom(-160), children: "+" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "aria-label": t("graph.zoomOutAction"), title: t("graph.zoomOutAction"), onClick: () => adjustZoom(160), children: "−" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", onClick: () => setCamera(DEFAULT_CAMERA), children: t("graph.resetViewAction") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("canvas", { ref: canvasRef, className: css$8.graphCanvas, role: "img", tabIndex: 0, "data-view": "3d", "data-quiet": props.quiet || void 0, "data-dragging": dragging || void 0, "data-hover": hoveredId !== void 0 || void 0, "aria-label": t("graph.aria3d", { nodes: props.graph.nodes.length, edges: props.graph.edges.length }), onPointerDown, onPointerMove, onPointerUp, onClick, onPointerCancel: (event) => { if (dragRef.current?.pointerId === event.pointerId) { dragRef.current = null; setDragging(false); } }, onPointerLeave: () => { if (dragRef.current === null && hoveredIdRef.current !== void 0) setHoveredId(void 0); }, onKeyDown }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { className: css$8.graphNodePicker, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("graph.selectNodeAction") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", { "aria-label": t("graph.selectNodeAction"), value: props.selectedId ?? "", disabled: visibleNodes.length === 0, onChange: (event) => { if (event.target.value === "") { props.onClearSelection?.(); return; } const selected = visibleNodes.find((node) => graphNodeKey(node) === event.target.value); if (selected !== void 0) props.onSelect(selected); }, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", { value: "", children: t("graph.noNodeSelected") }), pickerNodes.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", { value: item.key, children: item.label }, item.key))] })] }) ] }); }); // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/overview-page.tsx const canRenderSwitch = typeof _deepseek_ai_dsh_client_ui_primitives.Switch === "function" || typeof _deepseek_ai_dsh_client_ui_primitives.Switch === "object" && _deepseek_ai_dsh_client_ui_primitives.Switch !== null; const canRenderPathLabel$2 = typeof _deepseek_ai_dsh_client_ui_primitives.PathLabel === "function" || typeof _deepseek_ai_dsh_client_ui_primitives.PathLabel === "object" && _deepseek_ai_dsh_client_ui_primitives.PathLabel !== null; function isFilesystemLocation(value) { return (value.includes("/") || value.includes("\\")) && !/^[a-z][a-z0-9+.-]*:\/\//iu.test(value); } function ContentPreview(props) { const t = useT$3(); const meta = [ props.kind, props.node.id, props.node.memoryBodyName ].filter((entry) => entry !== void 0).join(" · "); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("overview.previewTitle"), description: meta, onClose: props.onClose, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css$8.previewContent, children: props.node.content }) }); } function useSyncFreshnessText(lastFullSyncAt, active) { const t = useT$3(); const [now, setNow] = (0, react.useState)(() => Date.now()); (0, react.useEffect)(() => { if (lastFullSyncAt !== null) setNow(Date.now()); }, [lastFullSyncAt]); (0, react.useEffect)(() => { if (!active || lastFullSyncAt === null) return; const intervalMs = Math.max(0, now - lastFullSyncAt) < 6e4 ? 1e3 : 6e4; const timer = window.setTimeout(() => setNow(Date.now()), intervalMs); return () => window.clearTimeout(timer); }, [ active, lastFullSyncAt, now ]); if (lastFullSyncAt === null) return t("overview.fullSyncPending"); const seconds = Math.max(0, Math.floor((now - lastFullSyncAt) / 1e3)); if (seconds < 5) return t("overview.fullSyncJustNow"); if (seconds < 60) return t("overview.fullSyncSeconds", { count: seconds }); const minutes = Math.floor(seconds / 60); if (minutes < 60) return t("overview.fullSyncMinutes", { count: minutes }); const hours = Math.floor(minutes / 60); if (hours < 24) return t("overview.fullSyncHours", { count: hours }); return t("overview.fullSyncDays", { count: Math.floor(hours / 24) }); } function OverviewSyncPill(props) { const t = useT$3(); const fullSyncAge = useSyncFreshnessText(props.lastFullSyncAt, props.active); const label = props.loading ? props.catalogLoading ? t("overview.directoryLoading") : props.graphLoading ? t("overview.snapshotLoading") : t("overview.healthLoading") : fullSyncAge; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css$8.syncFreshnessPill, role: props.loading ? "status" : void 0, "aria-label": props.loading ? label : void 0, "data-loading": props.loading || void 0, title: label, children: [props.loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.syncFreshnessSpinner, "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: label })] }); } function OverviewPage(props) { const t = useT$3(); const locale = useLocale(); const spaceCreateFormId = (0, react.useId)(); const spaceEditFormId = (0, react.useId)(); const [graph, setGraph] = (0, react.useState)(null); const [catalog, setCatalog] = (0, react.useState)(null); const [selected, setSelected] = (0, react.useState)(null); const [quietGraph, setQuietGraph] = (0, react.useState)(() => { try { return localStorage.getItem("dsh-brain-mnemon:graph-appearance") === "quiet"; } catch { return false; } }); const changeGraphAppearance = (0, react.useCallback)((quiet) => { setQuietGraph(quiet); try { localStorage.setItem("dsh-brain-mnemon:graph-appearance", quiet ? "quiet" : "standard"); } catch {} }, []); const [graphView, setGraphView] = (0, react.useState)(() => { try { return localStorage.getItem("dsh-brain-mnemon:graph-view") === "3d" ? "3d" : "2d"; } catch { return "2d"; } }); const changeGraphView = (0, react.useCallback)((view) => { setGraphView(view); try { localStorage.setItem("dsh-brain-mnemon:graph-view", view); } catch {} }, []); const clearGraphSelection = (0, react.useCallback)(() => setSelected(null), []); const [catalogLoading, setCatalogLoading] = (0, react.useState)(true); const [healthLoading, setHealthLoading] = (0, react.useState)(true); const [graphLoading, setGraphLoading] = (0, react.useState)(true); const [error, setError] = (0, react.useState)(null); const [changing, setChanging] = (0, react.useState)(null); const [reconnectingSpace, setReconnectingSpace] = (0, react.useState)(null); const [creating, setCreating] = (0, react.useState)(false); const [creatingSpaceOpen, setCreatingSpaceOpen] = (0, react.useState)(false); const [spaceName, setSpaceName] = (0, react.useState)(""); const [spaceDescription, setSpaceDescription] = (0, react.useState)(""); const [spaceProviderId, setSpaceProviderId] = (0, react.useState)(NATIVE_PROVIDER_ID); const [providerDrafts, setProviderDrafts] = (0, react.useState)({}); const [catalogUnavailable, setCatalogUnavailable] = (0, react.useState)(false); const [editingSpace, setEditingSpace] = (0, react.useState)(null); const [editName, setEditName] = (0, react.useState)(""); const [editDescription, setEditDescription] = (0, react.useState)(""); const [editConnection, setEditConnection] = (0, react.useState)({}); const [editClearSecrets, setEditClearSecrets] = (0, react.useState)([]); const [savingSpace, setSavingSpace] = (0, react.useState)(null); const [confirmingDeleteSpace, setConfirmingDeleteSpace] = (0, react.useState)(null); const [deletingSpace, setDeletingSpace] = (0, react.useState)(null); const [preview, setPreview] = (0, react.useState)(null); const [metadataOpen, setMetadataOpen] = (0, react.useState)(false); const [metadataSelection, setMetadataSelection] = (0, react.useState)([]); const [metadataTasks, setMetadataTasks] = (0, react.useState)({}); const [lastFullSyncAt, setLastFullSyncAt] = (0, react.useState)(null); const [rediscovering, setRediscovering] = (0, react.useState)(false); const [pageRediscovery, setPageRediscovery] = (0, react.useState)(null); const [seenRediscovery, setSeenRediscovery] = (0, react.useState)(readSeenRediscovery); const loadRequest = (0, react.useRef)(0); const catalogRef = (0, react.useRef)(null); catalogRef.current = catalog; const healthLoadingRef = (0, react.useRef)(healthLoading); healthLoadingRef.current = healthLoading; const initialSyncStarted = (0, react.useRef)(false); const directoryRetryStarted = (0, react.useRef)(false); const fullSyncObserved = (0, react.useRef)(true); const load = (0, react.useCallback)(async (quiet = false, preserveHealth = false) => { const request = ++loadRequest.current; const previousCatalog = preserveHealth && !healthLoadingRef.current ? catalogRef.current : null; setCatalogLoading(true); setHealthLoading(true); setGraphLoading(true); setError(null); let directoryUnavailable = false; try { const nextCatalog = await props.client.bodyDirectory().then((next) => { setCatalogUnavailable(false); return next; }).catch(() => { directoryUnavailable = true; setCatalogUnavailable(!props.catalogKnown); return { items: props.fallbackBodies, providers: [], total: props.fallbackBodies.length, activeCount: props.fallbackBodies.filter((body) => body.active).length, directory: props.fallbackDirectory ?? "", generatedAt: (/* @__PURE__ */ new Date()).toISOString() }; }); if (request !== loadRequest.current) return; const previousById = previousCatalog === null ? null : new Map(previousCatalog.items.map((item) => [item.id, item])); const mergedItems = previousById === null ? nextCatalog.items : nextCatalog.items.map((item) => { const existing = previousById.get(item.id); if (existing === void 0 || existing.statusLoading === true) return item; return { ...item, healthy: existing.healthy, statusLoading: false, ...existing.error === void 0 ? {} : { error: existing.error }, ...existing.stats === void 0 ? {} : { stats: existing.stats } }; }); const hydratedCatalog = previousById === null ? nextCatalog : { ...nextCatalog, items: mergedItems }; const needsHealthProbe = directoryUnavailable || previousById === null || hydratedCatalog.items.some((item) => item.statusLoading === true); setProviderDrafts((current) => mergeProviderDefaults(hydratedCatalog.providers, current)); setCatalog(hydratedCatalog); setCatalogLoading(false); if (!needsHealthProbe) setHealthLoading(false); else props.client.bodies().then((next) => { if (request !== loadRequest.current) return; setCatalog(next); }).catch((reason) => { if (request === loadRequest.current && !quiet && !directoryUnavailable) setError(message(reason)); }).finally(() => { if (request === loadRequest.current) setHealthLoading(false); }); props.client.graph().then((next) => { if (request !== loadRequest.current) return; const enriched = enrichMultiSpaceGraph(next, hydratedCatalog.items); setGraph(enriched); setSelected((current) => current === null ? null : enriched.nodes.find((node) => graphNodeKey(node) === graphNodeKey(current)) ?? null); }).catch((reason) => { if (request === loadRequest.current && !directoryUnavailable) setError(message(reason)); }).finally(() => { if (request === loadRequest.current) setGraphLoading(false); }); } catch (reason) { if (request === loadRequest.current) { setError(message(reason)); setCatalogLoading(false); setHealthLoading(false); setGraphLoading(false); } } }, [ props.catalogKnown, props.client, props.fallbackBodies, props.fallbackDirectory ]); (0, react.useEffect)(() => { if (initialSyncStarted.current) return; initialSyncStarted.current = true; load(); }, [load]); const seenReload = (0, react.useRef)(props.reloadKey); (0, react.useEffect)(() => { if (seenReload.current === props.reloadKey) return; seenReload.current = props.reloadKey; load(true); }, [load, props.reloadKey]); (0, react.useEffect)(() => { if (!catalogUnavailable || !props.catalogKnown || directoryRetryStarted.current) return; directoryRetryStarted.current = true; load(true); }, [ catalogUnavailable, load, props.catalogKnown ]); (0, react.useEffect)(() => { setSpaceProviderId((current) => readyProviderId(catalog?.providers ?? [], current) ?? current); }, [catalog]); const hostRediscovering = catalog?.rediscovery?.running === true && !rediscovering; (0, react.useEffect)(() => { if (!hostRediscovering || props.active === false) return; let active = true; const timer = window.setInterval(() => { props.client.bodyDirectory().then((next) => { if (!active || next.rediscovery?.running === true) return; active = false; window.clearInterval(timer); load(true); if (next.rediscovery?.last?.results.some((result) => result.added.length > 0)) props.onMutate(); }).catch(() => {}); }, REDISCOVERY_POLL_MS); return () => { active = false; window.clearInterval(timer); }; }, [ hostRediscovering, load, props.active, props.client, props.onMutate ]); const toggle = async (body) => { setChanging(body.id); setError(null); try { await props.client.updateBody(body.id, { active: !body.active }); await load(true, true); props.onMutate(); } catch (reason) { setError(message(reason)); } finally { setChanging(null); } }; const reconnect = async (body) => { if (reconnectingSpace !== null || editingSpace !== null || deletingSpace !== null) return; setReconnectingSpace(body.id); setError(null); setCatalog((current) => current === null ? current : { ...current, items: current.items.map((item) => item.id === body.id ? { ...item, statusLoading: true } : item) }); try { const next = await props.client.reconnectBody(body.id); setCatalog((current) => current === null ? current : { ...current, items: current.items.map((item) => item.id === next.id ? next : item) }); props.onBodyReconnect(next); } catch (reason) { const failure = message(reason); setCatalog((current) => current === null ? current : { ...current, items: current.items.map((item) => item.id === body.id ? { ...item, healthy: false, statusLoading: false, error: failure } : item) }); setError(failure); } finally { setReconnectingSpace(null); } }; const beginEdit = (body) => { setEditingSpace(body.id); setEditName(body.name); setEditDescription(body.description ?? ""); setError(null); setEditConnection(nativeSpaceProvider(body.provider) ? {} : { ...body.provider.settings }); setEditClearSecrets([]); }; const saveEdit = async (event, body) => { event.preventDefault(); if (editName.trim() === "") return; setSavingSpace(body.id); setError(null); try { const descriptor = catalog?.providers.find((provider) => provider.id === body.provider.id); const connection = descriptor === void 0 ? {} : Object.fromEntries(Object.entries(editConnection).filter(([key, value]) => { return descriptor.fields.find((candidate) => candidate.key === key)?.input !== "secret" || String(value) !== ""; })); await props.client.updateBody(body.id, { name: editName, description: editDescription, ...nativeSpaceProvider(body.provider) ? {} : { connection, ...editClearSecrets.length === 0 ? {} : { clearSecrets: editClearSecrets } } }); setEditingSpace(null); await load(true); props.onMutate(); } catch (reason) { setError(message(reason)); } finally { setSavingSpace(null); } }; const create = async (event) => { event.preventDefault(); const providers = catalog?.providers ?? []; const manualProvider = providers.find((provider) => provider.id === spaceProviderId); if (spaceName.trim() === "" || spaceDescription.trim() === "" || !providerDraftComplete(manualProvider, providerDrafts[spaceProviderId])) return; setCreating(true); setError(null); try { await props.client.createBody({ name: spaceName, description: spaceDescription, providerId: spaceProviderId, ...manualProvider?.origin === "native" ? {} : { connection: providerDrafts[spaceProviderId] ?? {} } }); setSpaceName(""); setSpaceDescription(""); setSpaceProviderId((current) => readyProviderId(providers) ?? current); setProviderDrafts((current) => Object.fromEntries(providers.map((provider) => [provider.id, Object.fromEntries(Object.entries(current[provider.id] ?? {}).map(([key, value]) => [key, provider.fields.some((field) => field.key === key && field.input === "secret") ? "" : value]))]))); setCreatingSpaceOpen(false); await load(true); props.onMutate(); } catch (reason) { setError(message(reason)); } finally { setCreating(false); } }; const rediscover = async () => { if (props.client.rediscoverBodies === void 0 || rediscovering) return; setRediscovering(true); setError(null); try { const outcome = await props.client.rediscoverBodies(); setPageRediscovery(outcome); await load(true); if (outcome.results.some((result) => result.added.length > 0)) props.onMutate(); } catch (reason) { setError(message(reason)); } finally { setRediscovering(false); } }; const dismissRediscovery = (at) => { setSeenRediscovery(at); writeSeenRediscovery(at); }; const deleteBody = async (body) => { setDeletingSpace(body.id); setError(null); try { await props.client.deleteBody(body.id); setConfirmingDeleteSpace(null); await load(true); props.onMutate(); } catch (reason) { setError(message(reason)); } finally { setDeletingSpace(null); } }; const maintainMetadata = () => { if (metadataSelection.length === 0) return; const selectedIds = metadataSelection.filter((id) => metadataTasks[id]?.status !== "running"); if (selectedIds.length === 0) return; setError(null); setMetadataSelection([]); setMetadataTasks((current) => ({ ...current, ...Object.fromEntries(selectedIds.map((id) => [id, { status: "running" }])) })); for (const id of selectedIds) props.metadataClient.maintainBodyMetadata([id]).then((result) => { const update = result.updates.find((candidate) => candidate.memoryBodyId === id); if (update === void 0) throw new Error(`metadata task Agent omitted Memory Space ${id}`); setCatalog((current) => current === null ? current : { ...current, items: current.items.map((body) => body.id === id ? { ...body, name: update.title, description: update.description } : body) }); props.onBodyMetadata([update]); setMetadataTasks((current) => ({ ...current, [id]: { status: "success" } })); }).catch((reason) => { setMetadataTasks((current) => ({ ...current, [id]: { status: "error", error: message(reason) } })); }); }; const generated = graph === null ? t("overview.waitingSnapshot") : t("overview.updatedAt", { time: new Date(graph.generatedAt).toLocaleTimeString(locale, { hour: "2-digit", minute: "2-digit", second: "2-digit" }) }); const graphSpaces = graph?.nodes.filter((node) => graphNodeKind(node) === "space").length ?? 0; const graphEntities = graph?.nodes.filter((node) => graphNodeKind(node) === "entity").length ?? 0; const graphMemories = graph?.nodes.filter((node) => graphNodeKind(node) === "memory").length ?? 0; const graphSources = graph?.sources ?? []; const onlyQueryOrUnsupported = graphSources.length > 0 && graphSources.every((source) => source.mode === "query-only" || source.mode === "unsupported" || source.status === "unavailable"); const selectedKind = selected === null ? null : graphNodeKind(selected); const editingSpaceView = editingSpace === null ? void 0 : catalog?.items.find((body) => body.id === editingSpace); const deletingSpaceView = confirmingDeleteSpace === null ? void 0 : catalog?.items.find((body) => body.id === confirmingDeleteSpace); const providers = catalog?.providers ?? []; const metadataCandidates = (catalog?.items ?? props.fallbackBodies).filter((body) => body.active && body.providerEnabled !== false); const metadataRunningCount = Object.values(metadataTasks).filter((task) => task.status === "running").length; const metadataBusy = metadataRunningCount > 0; const metadataSelectable = metadataCandidates.filter((body) => metadataTasks[body.id]?.status !== "running"); const metadataAllSelected = metadataSelectable.length > 0 && metadataSelectable.every((body) => metadataSelection.includes(body.id)); const loading = catalogLoading || healthLoading || graphLoading; (0, react.useEffect)(() => { if (loading) { fullSyncObserved.current = true; return; } if (!fullSyncObserved.current) return; fullSyncObserved.current = false; if (error !== null) return; setLastFullSyncAt(Date.now()); }, [error, loading]); const selectedProvider = providers.find((provider) => provider.id === spaceProviderId); const directoryRediscovery = catalog?.rediscovery?.last ?? null; const rediscovery = pageRediscovery !== null && (directoryRediscovery === null || pageRediscovery.at >= directoryRediscovery.at) ? pageRediscovery : directoryRediscovery; const rediscoveryAdded = rediscovery?.results.flatMap((result) => result.added) ?? []; const rediscoveryDisconnected = rediscovery?.results.reduce((sum, result) => sum + result.disconnected, 0) ?? 0; const rediscoveryFailures = rediscovery?.results.filter((result) => result.error !== void 0) ?? []; const rediscoveryShown = rediscovery !== null && rediscovery.at !== seenRediscovery && (rediscovery === pageRediscovery || rediscoveryAdded.length > 0 || rediscoveryFailures.length > 0); const newSpaceIds = new Set(rediscoveryShown ? rediscoveryAdded.map((body) => body.id) : []); const canRediscover = props.writeEnabled && !catalogUnavailable && props.client.rediscoverBodies !== void 0 && providers.some((provider) => provider.origin !== "native" && provider.serviceConfigured === true); const rediscoveryRunning = rediscovering || catalog?.rediscovery?.running === true; const nativeSpaceCount = catalog?.items.filter((body) => nativeSpaceProvider(body.provider)).length ?? 0; const canDeleteSpace = (body) => !nativeSpaceProvider(body.provider) || nativeSpaceCount > 1; const updateProviderDraft = (providerId, key, value) => setProviderDrafts((current) => ({ ...current, [providerId]: { ...current[providerId] ?? {}, [key]: value } })); const placementReceipt = (body) => body.placement === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.placementReceipt, title: body.placement.reason, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "aria-hidden": "true", children: "✦" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t(body.placement.decidedBy === "llm" ? "overview.placementByLlm" : "overview.placementByRules") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("overview.placementConfidence", { confidence: t(`overview.confidence.${body.placement.confidence}`) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: body.placement.reason }) ] })] }); const spaceEditForm = (body) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { id: spaceEditFormId, className: css$8.bodyEdit, onSubmit: (event) => void saveEdit(event, body), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("overview.editName"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { "aria-label": t("overview.editName"), value: editName, onChange: (event) => setEditName(event.target.value), maxLength: 100, required: true })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("overview.editDescription"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { "aria-label": t("overview.editDescription"), value: editDescription, onChange: (event) => setEditDescription(event.target.value), rows: 4, maxLength: MEMORY_SPACE_DESCRIPTION_MAX_LENGTH })] }), !nativeSpaceProvider(body.provider) && (() => { const descriptor = providers.find((provider) => provider.id === body.provider.id); return descriptor === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderMemoryFields, { provider: descriptor, connection: editConnection, onChange: (key, value) => setEditConnection((current) => ({ ...current, [key]: value })), body, clearSecrets: editClearSecrets, onClearSecretsChange: setEditClearSecrets }); })() ] }); const spaceCreateForm = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { id: spaceCreateFormId, className: appearanceClass(css$8.bodyEdit, css$8.bodyCreateForm), onSubmit: (event) => void create(event), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$8.createSection, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.createSectionHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "01" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("overview.createIdentityTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("overview.createIdentityHint") })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.createIdentityGrid, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("overview.createName"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { "data-autofocus": true, "aria-label": t("overview.createName"), value: spaceName, onChange: (event) => setSpaceName(event.target.value), placeholder: t("overview.createNamePlaceholder"), maxLength: 100, required: true })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("overview.createDescription"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { "aria-label": t("overview.createDescription"), value: spaceDescription, onChange: (event) => setSpaceDescription(event.target.value), placeholder: t("overview.createDescriptionPlaceholder"), rows: 3, maxLength: MEMORY_SPACE_DESCRIPTION_MAX_LENGTH, required: true })] })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$8.createSection, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.createSectionHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "02" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("overview.createPlacementTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("overview.createPlacementHint") })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", { className: css$8.providerChoice, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("legend", { children: t("overview.providerLabel") }), readyFirst(providers).map((provider) => { const serviceMissing = provider.serviceConfigured === false; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { "data-selected": spaceProviderId === provider.id || void 0, "data-native": provider.origin === "native" || void 0, "data-disabled": serviceMissing || void 0, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "radio", name: "memory-provider", value: provider.id, checked: spaceProviderId === provider.id, disabled: serviceMissing, onChange: () => setSpaceProviderId(provider.id) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderIcon, { providerId: provider.id, icon: provider.icon, className: css$8.providerChoiceIcon }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", { children: [provider.label, provider.origin === "native" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { children: t("overview.nativeOfficial") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: serviceMissing ? t(providerUnavailableKey(provider)) : `${t(`overview.workspaceBinding.${provider.workspaceBinding}`)} · ${providerSummary(t, provider)}` })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: css$8.choiceControl, "data-kind": "radio", "aria-hidden": "true" }) ] }, provider.id); })] }), providers.some((provider) => provider.serviceConfigured === false) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.providerEnableRow, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: css$8.providerEnableHint, children: t("overview.providerEnableHint") }), props.onOpenSettings !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.providerEnableLink, onClick: () => { setCreatingSpaceOpen(false); props.onOpenSettings?.("providers"); }, children: t("overview.openProvidersSettings") })] }), selectedProvider !== void 0 && selectedProvider.origin !== "native" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderMemoryFields, { provider: selectedProvider, connection: providerDrafts[selectedProvider.id] ?? {}, onChange: (key, value) => updateProviderDraft(selectedProvider.id, key, value) }) ] })] }); const spaceToggle = (body) => { const statusTitle = changing === body.id ? t("overview.toggling") : body.active ? t("common.active") : t("common.inactive"); const disabled = !props.activationEnabled || changing === body.id || deletingSpace === body.id; return canRenderSwitch ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, { checked: body.active, label: t("overview.toggleAria", { name: body.name }), title: statusTitle, disabled, onChange: () => void toggle(body) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", role: "switch", "aria-checked": body.active, "aria-label": t("overview.toggleAria", { name: body.name }), title: statusTitle, disabled, onClick: () => void toggle(body), children: statusTitle }); }; const renderLocation = (body) => { const location = body.provider.location; if (canRenderPathLabel$2 && location !== "" && isFilesystemLocation(location)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.PathLabel, { path: location }); return location || body.provider.label; }; const spaceEditActionClass = appearanceClass(css$8.ghostButton, appearanceClass(sidebarCss$3.itemActionButton, sidebarCss$3.itemEditAction)); const spaceDeleteActionClass = appearanceClass(css$8.dangerButton, appearanceClass(sidebarCss$3.itemActionButton, sidebarCss$3.itemDangerAction)); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.page, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { className: css$8.srOnlyHeading, children: t("nav.overview") }), error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.inlineError, role: "alert", children: error }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$8.bodyDirectory, "aria-label": t("overview.directory"), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.bodyDirectoryHeader, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("overview.directory") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("overview.directory.description") }), catalogUnavailable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { className: css$8.bodyDirectoryPath, children: t("overview.directory.unsynced") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: appearanceClass(css$8.bodyDirectoryControls, sidebarCss$3.bodyDirectoryActions), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverviewSyncPill, { lastFullSyncAt, active: props.active !== false, loading, catalogLoading, graphLoading }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: catalogUnavailable ? t("overview.directory.unsyncedBadge") : `${catalog?.activeCount ?? "—"} / ${catalog?.total ?? "—"} ${t("common.active")}` }), canRediscover && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: spaceEditActionClass, title: t("overview.rediscoverHint"), "aria-busy": rediscoveryRunning || void 0, onClick: () => void rediscover(), children: rediscoveryRunning ? t("overview.rediscovering") : t("overview.rediscoverAction") }), props.writeEnabled && !catalogUnavailable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: spaceEditActionClass, title: !props.agentAvailable ? t("overview.metadataUnavailable") : void 0, onClick: () => { setMetadataSelection([]); setMetadataTasks({}); setMetadataOpen(true); if (!props.agentAvailable) props.onAgentRefresh(); }, children: t("overview.metadataAction") }), props.writeEnabled && !catalogUnavailable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: spaceEditActionClass, onClick: () => setCreatingSpaceOpen(true), children: t("overview.newAction") }) ] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { role: "status", children: rediscoveryShown && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.rediscoveryNotice, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: rediscoveryAdded.length > 0 ? t("overview.rediscoveryAdded", { count: rediscoveryAdded.length }) : t("overview.rediscoveryNone") }), rediscoveryDisconnected > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("overview.rediscoveryDisconnected", { count: rediscoveryDisconnected }) }), rediscoveryFailures.map((result) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { "data-failed": "", children: result.timedOut === true ? t("overview.rediscoveryTimedOut", { provider: result.label }) : t("overview.rediscoveryFailed", { provider: result.label, error: result.error ?? "" }) }, result.providerId)) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: spaceEditActionClass, onClick: () => dismissRediscovery(rediscovery.at), children: t("overview.rediscoveryDismiss") })] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.bodyGrid, children: [catalog?.items.map((body) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("article", { className: css$8.bodyCard, "data-provider": body.provider.id, "data-active": body.active || void 0, "data-healthy": !body.statusLoading && body.healthy || void 0, "data-status-loading": body.statusLoading || void 0, "data-reconnectable": "", "data-reconnecting": reconnectingSpace === body.id || void 0, "data-mnemon-default": body.mnemonDefault || void 0, "data-editing": void 0, tabIndex: 0, "aria-label": t("overview.reconnectAria", { name: body.name }), title: reconnectingSpace === body.id ? t("overview.reconnecting") : body.error ?? t("overview.reconnectHint"), onClick: (event) => { if (event.target instanceof Element && event.target.closest("button, input, textarea, select, label, a, [role=\"switch\"]") !== null) return; reconnect(body); }, onKeyDown: (event) => { if (event.target !== event.currentTarget || event.key !== "Enter" && event.key !== " ") return; event.preventDefault(); reconnect(body); }, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: sidebarCss$3.bodyCardHeader, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: sidebarCss$3.bodyCardIdentity, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.bodySignal }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { title: body.id, children: body.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: sidebarCss$3.bodyCardMeta, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryProviderBadge, { providerId: body.provider.id, label: body.provider.label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: css$8.bodyHealth, children: reconnectingSpace === body.id ? t("overview.reconnecting") : body.statusLoading ? t("overview.storageChecking") : body.healthy ? t("overview.storageHealthy") : t("overview.storageUnhealthy") }), body.mnemonDefault && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: css$8.mnemonDefaultBadge, children: t("overview.mnemonDefault") }), newSpaceIds.has(body.id) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: css$8.newSpaceBadge, children: t("overview.newSpace") }) ] })] })] }), spaceToggle(body)] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { title: body.description || t("overview.noDescription"), children: body.description || t("overview.noDescription") }), placementReceipt(body), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", { className: sidebarCss$3.bodyCardFooter, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: sidebarCss$3.bodyCardStats, children: !nativeSpaceProvider(body.provider) ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.bodyFooterBlock, title: t(body.provider.kind === "remote" ? "overview.providerRemote" : "overview.providerLocal"), children: t(body.provider.kind === "remote" ? "overview.providerRemote" : "overview.providerLocal") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: `${css$8.bodyFooterBlock} ${css$8.bodyFooterGrow}`, title: body.provider.location || body.provider.label, children: renderLocation(body) })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.bodyFooterBlock, title: t("common.memories", { count: body.stats?.totalInsights ?? 0 }), children: t("common.memories", { count: body.stats?.totalInsights ?? 0 }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.bodyFooterBlock, title: t("common.edges", { count: body.stats?.edgeCount ?? 0 }), children: t("common.edges", { count: body.stats?.edgeCount ?? 0 }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.bodyFooterBlock, title: humanBytes(body.stats?.dbSizeBytes ?? 0), children: humanBytes(body.stats?.dbSizeBytes ?? 0) }) ] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.bodyCardActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: spaceEditActionClass, "aria-label": t("overview.editSpaceAria", { name: body.name }), disabled: !props.writeEnabled || deletingSpace === body.id, onClick: () => beginEdit(body), children: t("overview.editSpace") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: spaceDeleteActionClass, "aria-label": t(!nativeSpaceProvider(body.provider) ? "overview.disconnectSpaceAria" : "overview.deleteSpaceAria", { name: body.name }), title: canDeleteSpace(body) ? void 0 : t("overview.lastStoreDeleteHint"), disabled: !props.writeEnabled || deletingSpace === body.id || !canDeleteSpace(body), onClick: () => setConfirmingDeleteSpace(body.id), children: !nativeSpaceProvider(body.provider) ? t("overview.disconnectSpace") : t("overview.deleteSpace") })] })] }) ] }) }, body.id)), catalog?.total === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.bodyDirectoryEmpty, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "◇" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: catalogUnavailable ? t("overview.unsyncedTitle") : t("overview.emptyTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: catalogUnavailable ? t("overview.unsyncedShort") : t("overview.emptyShort") })] })] })] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.asyncRegion, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReadSourcePanel, { compact: true, title: t("overview.snapshotSources"), hint: t("overview.snapshotSourcesHint"), sources: graphSources }) }), creatingSpaceOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("overview.createTitle"), description: t("overview.createDialogHint"), busy: creating, wide: true, onClose: () => setCreatingSpaceOpen(false), footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, className: css$8.secondaryButton, disabled: creating, onClick: () => setCreatingSpaceOpen(false), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", form: spaceCreateFormId, className: css$8.primaryButton, disabled: creating || spaceName.trim() === "" || spaceDescription.trim() === "" || !providerDraftComplete(selectedProvider, providerDrafts[spaceProviderId]), children: creating ? t("overview.creating") : t("overview.createAction") })] }), children: spaceCreateForm }), metadataOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("overview.metadataTitle"), description: t("overview.metadataDescription"), busy: metadataBusy, wide: true, onClose: () => setMetadataOpen(false), footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css$8.modalFooterNote, children: t("overview.metadataSafety") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, className: css$8.secondaryButton, disabled: metadataBusy, onClick: () => setMetadataOpen(false), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.primaryButton, disabled: !props.agentAvailable || metadataSelection.length === 0, title: !props.agentAvailable ? t("overview.metadataUnavailable") : void 0, onClick: maintainMetadata, children: t("overview.metadataGenerate", { count: metadataSelection.length }) })] })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.metadataDialog, children: [ !props.agentAvailable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.inlineError, role: "status", children: t("overview.metadataUnavailable") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.metadataToolbar, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [t("overview.metadataSelected", { count: metadataSelection.length }), metadataRunningCount > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { children: t("overview.metadataRunningCount", { count: metadataRunningCount }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.ghostButton, disabled: metadataSelectable.length === 0, onClick: () => setMetadataSelection(metadataAllSelected ? [] : metadataSelectable.map((body) => body.id)), children: metadataAllSelected ? t("overview.metadataClear") : t("overview.metadataSelectAll") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.metadataList, "aria-live": "polite", children: [metadataCandidates.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.metadataEmpty, children: catalogLoading ? t("overview.metadataLoading") : t("overview.metadataEmpty") }), metadataCandidates.map((body) => { const selected = metadataSelection.includes(body.id); const task = metadataTasks[body.id]; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { "data-provider": body.provider.id, "data-selected": selected || void 0, "data-refreshing": task?.status === "running" || void 0, "data-refreshed": task?.status === "success" || void 0, "data-failed": task?.status === "error" || void 0, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "checkbox", checked: selected, disabled: task?.status === "running", onChange: (event) => setMetadataSelection((current) => event.target.checked ? [.../* @__PURE__ */ new Set([...current, body.id])] : current.filter((id) => id !== body.id)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: css$8.choiceControl, "data-kind": "check", "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: body.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: body.description || t("overview.noDescription") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryProviderBadge, { providerId: body.provider.id, label: body.provider.label }), task === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: body.id }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: css$8.metadataTaskStatus, "data-status": task.status, title: task.error, children: task.status === "running" ? t("overview.metadataTaskRunning") : task.status === "success" ? t("overview.metadataTaskSuccess") : t("overview.metadataTaskError", { error: task.error ?? t("overview.metadataTaskUnknown") }) })] }) ] }) ] }, body.id); })] }) ] }) }), editingSpaceView !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("overview.editSpaceAria", { name: editingSpaceView.name }), description: editingSpaceView.id, busy: savingSpace === editingSpaceView.id, onClose: () => setEditingSpace(null), footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, className: css$8.secondaryButton, disabled: savingSpace === editingSpaceView.id, onClick: () => setEditingSpace(null), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", form: spaceEditFormId, className: css$8.primaryButton, disabled: savingSpace === editingSpaceView.id || editName.trim() === "", children: savingSpace === editingSpaceView.id ? t("overview.savingSpace") : t("overview.saveSpace") })] }), children: spaceEditForm(editingSpaceView) }), deletingSpaceView !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t(!nativeSpaceProvider(deletingSpaceView.provider) ? "overview.disconnectTitle" : "overview.deleteTitle", { name: deletingSpaceView.name }), description: deletingSpaceView.id, busy: deletingSpace === deletingSpaceView.id, onClose: () => setConfirmingDeleteSpace(null), footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, "data-autofocus": true, className: css$8.secondaryButton, disabled: deletingSpace === deletingSpaceView.id, onClick: () => setConfirmingDeleteSpace(null), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.dangerSolidButton, title: canDeleteSpace(deletingSpaceView) ? void 0 : t("overview.lastStoreDeleteHint"), disabled: deletingSpace === deletingSpaceView.id || !canDeleteSpace(deletingSpaceView), onClick: () => void deleteBody(deletingSpaceView), children: deletingSpace === deletingSpaceView.id ? t("overview.deletingSpace") : t(!nativeSpaceProvider(deletingSpaceView.provider) ? "overview.disconnectAction" : "overview.deleteAction") })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.bodyDeleteConfirm, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t(!nativeSpaceProvider(deletingSpaceView.provider) ? "overview.disconnectWarning" : "overview.deleteWarning", { provider: deletingSpaceView.provider.label }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.bodyDeleteSummary, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: deletingSpaceView.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [ deletingSpaceView.provider.label, " · ", deletingSpaceView.provider.location || t("common.memories", { count: deletingSpaceView.stats?.totalInsights ?? 0 }) ] })] })] }) }), !catalogUnavailable && graph !== null && graph.nodes.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.graphLayout, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$8.graphPanel, "data-quiet": quietGraph || void 0, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.graphToolbar, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.liveDot }), t("overview.snapshot"), " ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: generated }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.graphToolbarRight, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.graphLegend, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "data-edge": "scope", children: t("overview.edgeScope") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "data-edge": "temporal", children: t("overview.edgeTemporal") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "data-edge": "semantic", children: t("overview.edgeSemantic") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "data-edge": "causal", children: t("overview.edgeCausal") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "data-edge": "entity", children: t("overview.edgeEntity") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.graphModeToggle, "data-view": graphView, role: "group", "aria-label": t("graph.viewModeAria"), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "aria-pressed": graphView === "2d", "data-active": graphView === "2d" || void 0, onClick: () => changeGraphView("2d"), children: t("graph.view2d") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "aria-pressed": graphView === "3d", "data-active": graphView === "3d" || void 0, onClick: () => changeGraphView("3d"), children: t("graph.view3d") })] })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.graphViewport, children: graphView === "3d" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryGraph3D, { graph, selectedId: selected === null ? void 0 : graphNodeKey(selected), onSelect: setSelected, onClearSelection: clearGraphSelection, quiet: quietGraph, onQuietChange: changeGraphAppearance }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryGraph, { graph, selectedId: selected === null ? void 0 : graphNodeKey(selected), onSelect: setSelected, onClearSelection: clearGraphSelection, quiet: quietGraph, onQuietChange: changeGraphAppearance }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.graphFooter, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("overview.graphComposition", { spaces: graphSpaces, memories: graphMemories, entities: graphEntities }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [ t("overview.graphCount", { visible: Math.min(graph.nodes.length, 60), total: graph.nodes.length }), " · ", t("overview.graphEdges", { count: graph.edges.length }) ] })] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("aside", { className: css$8.graphInspector, "data-empty": selected === null || void 0, children: selected === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.inspectorEmpty, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: appearanceClass(css$8.inspectorLogo, sidebarCss$3.inspectorGlyph), "aria-hidden": "true", children: "◇" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("overview.selectNode") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("overview.selectNodeText") }) ] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.inspectorHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(selectedKind === "space" ? "overview.inspectorSpace" : selectedKind === "entity" ? "overview.inspectorEntity" : "overview.inspector") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", onClick: () => setSelected(null), "aria-label": t("overview.closeInspector"), children: "×" })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.inspectorChips, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.categoryChip, children: graphKindLabel(t, selected) }), selected.memoryProviderId !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryProviderBadge, { providerId: selected.memoryProviderId, label: selected.memoryProviderLabel ?? selected.memoryProviderId })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.inspectorTitleRow, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { className: css$8.inspectorTitle, children: selected.content }), selectedKind === "memory" && selected.content.length > 140 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.inspectorEye, onClick: () => setPreview(selected), "aria-label": t("overview.previewAria"), title: t("overview.previewAria"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", { viewBox: "0 0 16 16", width: "13", height: "13", "aria-hidden": "true", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "M1 8s2.6-4.4 7-4.4S15 8 15 8s-2.6 4.4-7 4.4S1 8 1 8z", fill: "none", stroke: "currentColor", strokeWidth: "1.5" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", { cx: "8", cy: "8", r: "2.1", fill: "currentColor" })] }) })] }), selectedKind === "space" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dl", { className: css$8.inspectorMeta, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("overview.spaceId") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: selected.memoryBodyId ?? selected.id }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("overview.containedMemories") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: selected.occurrenceCount ?? 0 })] })] }) : selectedKind === "entity" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dl", { className: css$8.inspectorMeta, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("overview.entityMentions") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: selected.occurrenceCount ?? 0 })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("term.spaces") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: selected.memoryBodyNames?.join(" · ") || "—" })] })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dl", { className: css$8.inspectorMeta, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("term.space") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dd", { children: [ selected.memoryBodyName ?? "—", " ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: selected.memoryBodyId ?? "" }) ] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("overview.memoryId") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: selected.id }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("common.category") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: categoryLabel(t, selected.category ?? "general") })] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.inspectorActions, children: [selectedKind !== "space" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.primaryButton, onClick: () => props.onExplore(selected.content), children: t("overview.exploreNode") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.secondaryButton, onClick: () => void (0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(selected.id), children: t("common.copyId") })] }) ] }) })] }) : !graphLoading && error === null ? catalogUnavailable ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "◇", title: t("overview.unsyncedTitle"), children: t("overview.unsyncedLong") }) : catalog?.total === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "◇", title: t("overview.emptyTitle"), children: t("overview.emptyLong") }) : catalog?.activeCount === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "◇", title: t("overview.noActiveTitle"), children: t("overview.noActiveText") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "◇", title: t(onlyQueryOrUnsupported ? "overview.noVisualTitle" : "overview.noContentTitle"), children: t(onlyQueryOrUnsupported ? "overview.noVisualText" : "overview.noContentText") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.asyncPlaceholder, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("overview.loading") }) }), preview !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ContentPreview, { node: preview, kind: graphKindLabel(t, preview), onClose: () => setPreview(null) }) ] }); } const REDISCOVERY_SEEN_KEY = "dsh-brain-mnemon.memory-spaces.rediscovery-seen"; const REDISCOVERY_POLL_MS = 2e3; function readSeenRediscovery() { try { return globalThis.localStorage?.getItem(REDISCOVERY_SEEN_KEY) ?? null; } catch { return null; } } function writeSeenRediscovery(at) { try { globalThis.localStorage?.setItem(REDISCOVERY_SEEN_KEY, at); } catch {} } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/explore-page.tsx function ExplorePage(props) { const t = useT$3(); const pageSize = 6; const [query, setQuery] = (0, react.useState)(props.seed); const [mode, setMode] = (0, react.useState)("smart"); const [category, setCategory] = (0, react.useState)(""); const [results, setResults] = (0, react.useState)([]); const [sources, setSources] = (0, react.useState)([]); const [searchKind, setSearchKind] = (0, react.useState)(null); const [agentAnswer, setAgentAnswer] = (0, react.useState)(null); const citationLabel = (citation) => { const cited = results.find((result) => `${result.memoryBodyId}/${result.id}` === citation || result.id === citation); return cited === void 0 ? short(citation.split("/").at(-1) ?? citation, 12) : short(cited.content, 40); }; const [searched, setSearched] = (0, react.useState)(false); const [error, setError] = (0, react.useState)(null); const [relatedTo, setRelatedTo] = (0, react.useState)(null); const relatedPaneRef = (0, react.useRef)(null); const [related, setRelated] = (0, react.useState)([]); const [relatedLoading, setRelatedLoading] = (0, react.useState)(false); const [visibleResultLimit, setVisibleResultLimit] = (0, react.useState)(pageSize); const [visibleRelatedLimit, setVisibleRelatedLimit] = (0, react.useState)(pageSize); const relatedRequests = useRequestVersion(); (0, react.useEffect)(() => { if (props.seed !== "") setQuery(props.seed); }, [props.seed]); const ranSeed = (0, react.useRef)(""); (0, react.useEffect)(() => { if (props.seed === "" || props.status === null || ranSeed.current === props.seed) return; ranSeed.current = props.seed; runSearch(false, props.seed); }, [props.seed, props.status]); (0, react.useEffect)(() => { if (relatedTo === null || props.onRevealElement === void 0) return; const reveal = () => { if (relatedPaneRef.current !== null && relatedRequests.isCurrent(relatedTo.request)) props.onRevealElement?.(relatedPaneRef.current); }; if (typeof window.requestAnimationFrame !== "function") { reveal(); return; } const frame = window.requestAnimationFrame(reveal); return () => { if (typeof window.cancelAnimationFrame === "function") window.cancelAnimationFrame(frame); }; }, [ relatedTo, relatedRequests, props.onRevealElement ]); const runSearch = async (withAgent, text = query) => { if (text.trim() === "") return; relatedRequests.begin(); setSearchKind(withAgent ? "agent" : "direct"); setSearched(true); setError(null); setRelatedTo(null); setAgentAnswer(null); setVisibleResultLimit(pageSize); setVisibleRelatedLimit(pageSize); try { const request = { query: text, mode, ...category === "" ? {} : { category }, limit: props.status?.defaultRecallLimit ?? 10 }; if (withAgent) { const response = await props.agentClient.agentSearch(request); setResults(response.results); setSources(response.sources ?? []); setAgentAnswer({ answer: response.answer, citations: response.citations, runId: response.delegation.runId }); } else { const response = await props.client.search(request); setResults(response.results); setSources(response.sources ?? []); } } catch (reason) { setError(message(reason)); setResults([]); setSources([]); setAgentAnswer(null); } finally { setSearchKind(null); } }; const search = (event) => { event.preventDefault(); runSearch(false); }; const searching = searchKind !== null; const showRelated = async (insight) => { const request = relatedRequests.begin(); setRelatedTo({ insight, request }); setRelated([]); setRelatedLoading(true); setError(null); setVisibleRelatedLimit(pageSize); try { const response = await props.client.related(insight.id, insight.memoryBodyId); if (relatedRequests.isCurrent(request)) setRelated(response); } catch (reason) { if (relatedRequests.isCurrent(request)) setError(message(reason)); } finally { if (relatedRequests.isCurrent(request)) setRelatedLoading(false); } }; const forget = async (insight) => { await props.onForget(insight); setResults((items) => items.filter((item) => insightKey(item) !== insightKey(insight))); setRelated((items) => items.filter((item) => insightKey(item) !== insightKey(insight))); if (relatedTo !== null && insightKey(relatedTo.insight) === insightKey(insight)) setRelatedTo(null); }; const visibleResults = results.slice(0, visibleResultLimit); const visibleRelated = related.slice(0, visibleRelatedLimit); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.page, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageHeader, { title: t("search.title"), description: t("search.description"), meta: t("search.maxResults", { count: props.status?.defaultRecallLimit ?? "—" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { className: css$8.searchBar, onSubmit: (event) => void search(event), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchField, { className: css$8.queryField, label: t("search.queryAria"), value: query, onChange: (event) => setQuery(event.target.value), placeholder: t("search.placeholder") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.searchControls, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.searchFilters, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { inline: true, className: css$8.searchChoice, label: t("common.category"), ariaLabel: t("search.categoryAria"), value: category, options: [{ value: "", label: t("common.allCategories") }, ...CATEGORIES.map((value) => ({ value, label: categoryLabel(t, value) }))], onChange: setCategory }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { inline: true, className: css$8.searchChoice, label: t("search.strategy"), ariaLabel: t("search.modeAria"), value: mode, options: [ { value: "smart", label: t("search.modeSmart") }, { value: "keyword", label: t("search.modeKeyword") }, { value: "basic", label: t("search.modeBasic") } ], onChange: setMode })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.searchActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", className: css$8.secondaryButton, disabled: searching || query.trim() === "", children: searchKind === "direct" ? t("search.searching") : t("search.action") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.primaryButton, disabled: searching || query.trim() === "" || !props.agentAvailable, onClick: () => void runSearch(true), children: searchKind === "agent" ? t("search.agentSearching") : t("search.agentAction") })] })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReadSourcePanel, { title: t("search.sourcesTitle"), sources }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.asyncResults, children: [ searching && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SectionSpinner, { label: searchKind === "agent" ? t("search.agentSearching") : t("search.searching") }), agentAnswer !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$8.agentAnswer, "aria-label": t("search.agentAnswer"), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.agentAnswerHeading, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("search.agentAnswerHint") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("search.agentAnswer") })] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: agentAnswer.answer }), agentAnswer.citations.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.agentCitations, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("search.citations") }), agentAnswer.citations.map((citation, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { title: citation, children: [ index + 1, ". ", citationLabel(citation) ] }, citation))] }) ] }), error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.inlineError, role: "alert", children: error }), !searched && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "⌕", title: t("search.startTitle"), children: t("search.startText") }), searched && !searching && results.length === 0 && error === null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "0", title: t("search.emptyTitle"), children: t("search.emptyText") }), results.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: relatedTo === null ? css$8.singleColumn : css$8.resultLayout, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$8.results, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.sectionHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("search.results") }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: results.length })] }), visibleResults.map((insight) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InsightCard, { insight, writeEnabled: props.writeEnabled, onForget: forget, onRelated: (item) => void showRelated(item) }, insightKey(insight))), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressiveFooter, { visible: visibleResults.length, total: results.length, pageSize, onMore: () => setVisibleResultLimit((value) => value + pageSize) }) ] }), relatedTo !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", { ref: relatedPaneRef, className: css$8.relatedPane, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.sectionHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("search.related") }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", onClick: () => { relatedRequests.begin(); setRelatedTo(null); setRelatedLoading(false); }, "aria-label": t("search.closeRelated"), children: "×" })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css$8.relatedSource, children: relatedTo.insight.content }), relatedLoading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.loading, children: t("search.traversing") }), !relatedLoading && related.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.muted, children: t("search.noRelated") }), visibleRelated.map((insight) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InsightCard, { insight, writeEnabled: props.writeEnabled, onForget: forget, onRelated: (item) => void showRelated(item) }, insightKey(insight))), !relatedLoading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressiveFooter, { visible: visibleRelated.length, total: related.length, pageSize, onMore: () => setVisibleRelatedLimit((value) => value + pageSize) }) ] })] }) ] }) ] }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/entities-page.tsx const ENTITY_PLACEHOLDER_DELAY_MS = 160; const ENTITY_RAIL_PAGE = 10; const ENTITY_CARD_PAGE = 6; const ENTITY_MEMORY_BATCH = 48; const ENTITY_RELATED_LIMIT = 20; const RELATED_PREFERENCE_KEY = "dsh-brain-mnemon.memory-spaces.entities.related"; function readRelatedPreference() { try { return globalThis.sessionStorage?.getItem(RELATED_PREFERENCE_KEY) === "open"; } catch { return false; } } function writeRelatedPreference(open) { try { if (open) globalThis.sessionStorage?.setItem(RELATED_PREFERENCE_KEY, "open"); else globalThis.sessionStorage?.removeItem(RELATED_PREFERENCE_KEY); } catch {} } function useDelayedFlag(active, delayMs = ENTITY_PLACEHOLDER_DELAY_MS) { const [shown, setShown] = (0, react.useState)(false); (0, react.useEffect)(() => { if (!active) { setShown(false); return; } const timer = setTimeout(() => setShown(true), delayMs); return () => clearTimeout(timer); }, [active, delayMs]); return active && shown; } function InsightSkeletons(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { "aria-hidden": "true", "data-placeholder": "", children: Array.from({ length: props.count }, (_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.insightSkeleton, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {}) ] }, index)) }); } function EntityFooter(props) { const t = useT$3(); if (props.total === 0) return null; const remaining = Math.max(0, props.total - props.visible); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.listProgress, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("common.showing", { visible: props.visible, total: props.total }) }), remaining > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.secondaryButton, disabled: props.busy, "aria-busy": props.busy || void 0, onClick: props.onMore, children: t("common.showMore", { count: Math.min(props.pageSize, remaining) }) })] }); } function pendingEntitySources(catalog) { return catalog.items.filter((body) => body.active && body.providerEnabled !== false).map((body) => ({ memoryBodyId: body.id, memoryBodyName: body.name, providerId: body.provider.id, providerLabel: body.provider.label, mode: body.provider.capabilities.entities ? "entities" : "unsupported", status: body.provider.capabilities.entities ? "loading" : "unsupported", itemCount: 0 })); } function EntitiesPage(props) { const t = useT$3(); const { client } = props; const [rail, setRail] = (0, react.useState)(null); const [railLoading, setRailLoading] = (0, react.useState)(true); const [railError, setRailError] = (0, react.useState)(null); const [pendingSources, setPendingSources] = (0, react.useState)([]); const [entity, setEntity] = (0, react.useState)(""); const [entityFilter, setEntityFilter] = (0, react.useState)(""); const [visibleEntityLimit, setVisibleEntityLimit] = (0, react.useState)(ENTITY_RAIL_PAGE); const [selected, setSelected] = (0, react.useState)(void 0); const [memories, setMemories] = (0, react.useState)(null); const [memoriesLoading, setMemoriesLoading] = (0, react.useState)(false); const [memoriesError, setMemoriesError] = (0, react.useState)(null); const [moreLoading, setMoreLoading] = (0, react.useState)(false); const [visibleMemoryLimit, setVisibleMemoryLimit] = (0, react.useState)(ENTITY_CARD_PAGE); const [related, setRelated] = (0, react.useState)(null); const [relatedLoading, setRelatedLoading] = (0, react.useState)(false); const [relatedError, setRelatedError] = (0, react.useState)(null); const [visibleRelatedLimit, setVisibleRelatedLimit] = (0, react.useState)(ENTITY_CARD_PAGE); const [relatedOpen, setRelatedOpen] = (0, react.useState)(readRelatedPreference); const relatedOpenRef = (0, react.useRef)(relatedOpen); const relatedAutoRef = (0, react.useRef)(false); const relatedId = (0, react.useId)(); const railRequests = useRequestVersion(); const directoryRequests = useRequestVersion(); const memoryRequests = useRequestVersion(); const moreRequests = useRequestVersion(); const relatedRequests = useRequestVersion(); const selectedRef = (0, react.useRef)(void 0); const revisionRef = (0, react.useRef)(props.revision); const [view] = (0, react.useState)(() => globalThis.crypto?.randomUUID?.() ?? `${Date.now()}-${Math.random().toString(36).slice(2)}`); const split = client.entityMemories !== void 0 && client.entityRelated !== void 0; const loadRail = (0, react.useCallback)(async () => { const request = railRequests.begin(); setRailLoading(true); setRailError(null); try { const view = await client.entities(); if (railRequests.isCurrent(request)) setRail(view); } catch (reason) { if (railRequests.isCurrent(request)) setRailError(message(reason)); } finally { if (railRequests.isCurrent(request)) setRailLoading(false); } }, [client, railRequests]); const loadRelated = (0, react.useCallback)((name) => { if (client.entityRelated === void 0) return; const request = relatedRequests.begin(); setRelatedLoading(true); setRelatedError(null); client.entityRelated(name, ENTITY_RELATED_LIMIT, view).then((next) => { if (relatedRequests.isCurrent(request)) setRelated(next); }, (reason) => { if (relatedRequests.isCurrent(request)) setRelatedError(message(reason)); }).finally(() => { if (relatedRequests.isCurrent(request)) setRelatedLoading(false); }); }, [ client, relatedRequests, view ]); const loadSelection = (0, react.useCallback)((name, refresh) => { const memoryRequest = memoryRequests.begin(); relatedRequests.begin(); moreRequests.begin(); setMoreLoading(false); setRelatedLoading(false); setRelatedError(null); if (!refresh) { setMemories(null); setVisibleMemoryLimit(ENTITY_CARD_PAGE); setVisibleRelatedLimit(ENTITY_CARD_PAGE); relatedAutoRef.current = false; } if (!refresh || !(relatedOpenRef.current || relatedAutoRef.current)) setRelated(null); setMemoriesLoading(true); setMemoriesError(null); (split ? client.entityMemories(name, 0, ENTITY_MEMORY_BATCH) : client.entities(name, 20).then((view) => ({ entity: view.selected ?? name, total: view.insights.length, offset: 0, items: view.insights, complete: view.complete ?? true, sources: view.sources ?? [] }))).then((next) => { if (!memoryRequests.isCurrent(memoryRequest)) return; setMemories(next); const auto = split && next.total === 0; if (auto && !relatedOpenRef.current) loadRelated(name); else if (relatedAutoRef.current && !relatedOpenRef.current) setRelated(null); relatedAutoRef.current = auto; }, (reason) => { if (memoryRequests.isCurrent(memoryRequest)) setMemoriesError(message(reason)); }).finally(() => { if (memoryRequests.isCurrent(memoryRequest)) setMemoriesLoading(false); }); if (split && relatedOpenRef.current) loadRelated(name); }, [ client, loadRelated, memoryRequests, moreRequests, relatedRequests, split ]); const select = (name) => { const trimmed = name.trim(); if (trimmed === "") return; selectedRef.current = trimmed; setSelected(trimmed); setEntity(trimmed); loadSelection(trimmed, false); }; (0, react.useEffect)(() => { const request = directoryRequests.begin(); client.bodyDirectory().then((catalog) => { if (directoryRequests.isCurrent(request)) setPendingSources(pendingEntitySources(catalog)); }, () => void 0); }, [client, directoryRequests]); (0, react.useEffect)(() => { loadRail(); }, [loadRail, props.revision]); (0, react.useEffect)(() => { if (revisionRef.current === props.revision) return; revisionRef.current = props.revision; if (selectedRef.current !== void 0) loadSelection(selectedRef.current, true); }, [loadSelection, props.revision]); const showMoreMemories = () => { const current = memories; if (current === null || moreLoading) return; const nextVisible = visibleMemoryLimit + ENTITY_CARD_PAGE; if (nextVisible <= current.items.length || current.items.length >= current.total || client.entityMemories === void 0) { setVisibleMemoryLimit(nextVisible); return; } const request = moreRequests.begin(); setMoreLoading(true); client.entityMemories(current.entity, current.items.length, ENTITY_MEMORY_BATCH).then((page) => { if (!moreRequests.isCurrent(request)) return; setMemories((previous) => { if (previous === null) return previous; const seen = new Set(previous.items.map(insightKey)); return { ...page, offset: 0, items: [...previous.items, ...page.items.filter((item) => !seen.has(insightKey(item)))] }; }); setVisibleMemoryLimit(nextVisible); }, (reason) => { if (moreRequests.isCurrent(request)) setMemoriesError(message(reason)); }).finally(() => { if (moreRequests.isCurrent(request)) setMoreLoading(false); }); }; const findRelated = () => { relatedOpenRef.current = true; setRelatedOpen(true); writeRelatedPreference(true); if (selected !== void 0 && related === null && !relatedLoading) loadRelated(selected); }; const hideRelated = () => { relatedOpenRef.current = false; setRelatedOpen(false); writeRelatedPreference(false); }; const forget = async (insight) => { await props.onForget(insight); const key = insightKey(insight); setMemories((current) => { const items = current?.items.filter((item) => insightKey(item) !== key); return current === null || items === void 0 || items.length === current.items.length ? current : { ...current, total: Math.max(0, current.total - 1), items }; }); setRelated((current) => current === null ? current : { ...current, items: current.items.filter((item) => insightKey(item) !== key) }); }; const submit = (event) => { event.preventDefault(); select(entity); }; const items = rail?.items ?? []; const filterKey = entityFilter.trim().toLocaleLowerCase(); const filteredItems = (0, react.useMemo)(() => filterKey === "" ? items : items.filter((item) => item.entity.toLocaleLowerCase().includes(filterKey)), [items, filterKey]); const visibleEntities = filteredItems.slice(0, visibleEntityLimit); const selectedKey = selected === void 0 ? void 0 : normalizeEntityKey(selected); const railCount = selectedKey === void 0 ? void 0 : items.find((item) => normalizeEntityKey(item.entity) === selectedKey)?.count; const sources = rail?.sources ?? pendingSources; const hasEntityProvider = sources.length === 0 || sources.some((source) => source.mode === "entities" && source.status !== "unavailable"); const railPlaceholder = useDelayedFlag(rail === null && railLoading); const memoryPlaceholder = useDelayedFlag(memories === null && memoriesLoading); const relatedAuto = memories !== null && memories.total === 0; const relatedShown = split && (relatedOpen || relatedAuto); const relatedPlaceholder = useDelayedFlag(relatedShown && related === null && relatedLoading); const railBusy = useDelayedFlag(railLoading); const detailBusy = useDelayedFlag(memoriesLoading || relatedShown && relatedLoading); const memoryTotal = memories?.total ?? railCount; const visibleMemories = memories?.items.slice(0, visibleMemoryLimit) ?? []; const visibleRelated = related?.items.slice(0, visibleRelatedLimit) ?? []; const nothingFound = memories !== null && memories.total === 0 && (!split || related !== null && related.items.length === 0); const card = (insight) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InsightCard, { insight, writeEnabled: props.writeEnabled, onForget: forget, onRelated: () => props.onExplore(insight.content) }, insightKey(insight)); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.page, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageHeader, { title: t("entities.title"), description: t("entities.description"), ...rail === null ? {} : { meta: t("entities.count", { count: rail.total ?? rail.items.length }) }, ...railBusy ? { loadingLabel: t("entities.railLoading") } : {} }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReadSourcePanel, { title: t("entities.sourcesTitle"), sources }), rail !== null && !hasEntityProvider ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "◎", title: t("entities.unsupportedTitle"), children: t("entities.unsupportedText") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.entityLayout, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", { className: css$8.entityRail, "aria-busy": rail === null && railLoading ? true : void 0, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { className: css$8.entitySearch, onSubmit: submit, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchField, { label: t("entities.nameAria"), value: entity, onChange: (event) => { setEntity(event.target.value); setEntityFilter(event.target.value); setVisibleEntityLimit(ENTITY_RAIL_PAGE); }, onKeyDown: (event) => { if (event.key === "Escape" && entityFilter !== "") { event.preventDefault(); setEntityFilter(""); } }, placeholder: t("entities.placeholder") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", className: css$8.secondaryButton, disabled: entity.trim() === "", children: t("entities.action") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.entityHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("entities.top") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: entityFilter === "" ? t("entities.frequency") : t("entities.filterHint") })] }), railPlaceholder && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.entityList, "aria-hidden": "true", "data-placeholder": "", children: Array.from({ length: 8 }, (_, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.entityRailSkeleton }, index)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.entityList, children: visibleEntities.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", "aria-pressed": selectedKey === normalizeEntityKey(item.entity), onClick: () => select(item.entity), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: item.entity }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: item.count })] }, item.entity)) }), visibleEntities.length > 0 && filteredItems.length > visibleEntityLimit && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressiveFooter, { compact: true, visible: visibleEntities.length, total: filteredItems.length, pageSize: ENTITY_RAIL_PAGE, onMore: () => setVisibleEntityLimit((value) => value + ENTITY_RAIL_PAGE) }), rail === null && railError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: appearanceClass(css$8.inlineError, css$8.entityRetry), role: "alert", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: railError }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.secondaryButton, onClick: () => void loadRail(), children: t("entities.retry") })] }), rail !== null && items.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css$8.muted, children: t("entities.emptyRail") }), rail !== null && items.length > 0 && visibleEntities.length === 0 && entityFilter !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css$8.muted, children: t("entities.filterEmpty") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: appearanceClass(css$8.entityResults, css$8.asyncResults), "aria-busy": memoriesLoading || relatedShown && relatedLoading ? true : void 0, children: [ detailBusy && selected !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SectionSpinner, { label: t("entities.loading") }), selected === void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "◎", title: t("entities.selectTitle"), children: t("entities.selectText") }), selected !== void 0 && nothingFound && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "0", title: t("entities.emptyTitle"), children: t("entities.emptyText") }), selected !== void 0 && !nothingFound && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.entitySection, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.sectionHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: memories?.entity ?? selected }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("entities.memoriesHint") })] }), memoryTotal !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: memoryTotal })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.entitySectionBody, children: [ memoriesError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: appearanceClass(css$8.inlineError, css$8.entityRetry), role: "alert", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: memoriesError }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.secondaryButton, onClick: () => loadSelection(selected, memories !== null), children: t("entities.retry") })] }), memoryPlaceholder && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InsightSkeletons, { count: Math.min(3, Math.max(1, railCount ?? 3)) }), memories !== null && memories.total === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css$8.entityQuiet, children: t("entities.noCarrying") }), visibleMemories.map(card), memories !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EntityFooter, { visible: visibleMemories.length, total: memories.total, pageSize: ENTITY_CARD_PAGE, busy: moreLoading, onMore: showMoreMemories }) ] })] }), split && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.entitySection, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.entityRelatedHead, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.sectionHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { id: `${relatedId}-title`, children: t("entities.relatedTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("entities.relatedHint") })] }), relatedShown && related !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: related.items.length })] }), !relatedAuto && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.secondaryButton, "aria-expanded": relatedShown, "aria-controls": `${relatedId}-list`, onClick: relatedShown ? hideRelated : findRelated, children: t(relatedShown ? "entities.hideRelated" : "entities.findRelated") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { id: `${relatedId}-list`, role: "region", "aria-labelledby": `${relatedId}-title`, className: css$8.entitySectionBody, hidden: !relatedShown, children: relatedShown && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ relatedError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: appearanceClass(css$8.inlineError, css$8.entityRetry), role: "alert", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: relatedError }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.secondaryButton, onClick: () => loadRelated(selected), children: t("entities.retry") })] }), relatedPlaceholder && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InsightSkeletons, { count: 2 }), related !== null && related.items.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css$8.entityQuiet, children: t("entities.noRelated") }), visibleRelated.map(card), related !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressiveFooter, { visible: visibleRelated.length, total: related.items.length, pageSize: ENTITY_CARD_PAGE, onMore: () => setVisibleRelatedLimit((value) => value + ENTITY_CARD_PAGE) }) ] }) })] })] }) ] })] }) ] }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/placement-policy.tsx function cleanJson(value) { if (value === null || typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value; if (Array.isArray(value)) return value.map((item) => item === void 0 ? null : cleanJson(item)); if (typeof value === "object" && value !== null) { const out = {}; for (const [key, entry] of Object.entries(value)) if (entry !== void 0) out[key] = cleanJson(entry); return out; } return null; } function nativeFallbackProvider(t, serviceConfigured = true) { return { id: NATIVE_PROVIDER_ID, label: t("config.nativeName"), icon: { kind: "brand", value: "mnemon" }, kind: "local", workspaceBinding: "automatic", summary: t("config.nativeSummary"), summaryI18nKey: "overview.providerSummary.mnemon-native", origin: "native", capabilities: { search: true, browse: true, graph: true, entities: true, related: true, remember: true, link: true, forget: true, writeMode: "exact", deletionMode: "soft" }, fields: [], serviceConfigured }; } function createPlacementPolicyDraft(configured, providers) { const mode = configured?.mode === "automatic" ? "automatic" : "manual"; const configuredProviderId = configured?.providerId ?? "mnemon-native"; const providerId = providers.length > 0 ? readyProviderId(providers, configuredProviderId) ?? configuredProviderId : configuredProviderId; let allowedProviderIds; if (configured?.rules?.allowedProviderIds !== void 0) allowedProviderIds = [...configured.rules.allowedProviderIds]; else if (providers.length > 0) { const ready = [NATIVE_PROVIDER_ID].filter((id) => providers.some((provider) => provider.id === id && provider.serviceConfigured !== false)); const first = readyProviderId(providers); allowedProviderIds = ready.length > 0 || first === void 0 ? ready : [first]; } else allowedProviderIds = [NATIVE_PROVIDER_ID]; return { mode, providerId, prompt: configured?.prompt ?? "", dataBoundary: configured?.rules?.dataBoundary === "local-only" ? "local-only" : "allow-remote", preference: configured?.rules?.preference === "local-first" || configured?.rules?.preference === "shared-first" ? configured.rules.preference : "balanced", requiredCapabilities: [...configured?.rules?.requiredCapabilities ?? []], allowedProviderIds, providerConnections: mergeProviderDefaults(providers, configured?.providerConnections ?? {}) }; } function placementPolicyProblem(draft, providers, t) { if (draft.mode === "manual") { const selected = providers.find((provider) => provider.id === draft.providerId); if (selected === void 0) return t("config.policyConnectionIncomplete"); if (selected.serviceConfigured === false) return t(providerUnavailableKey(selected)); if (!providerDraftComplete(selected, draft.providerConnections[draft.providerId])) return t("config.policyConnectionIncomplete"); return null; } if (draft.prompt.length > 4e3) return t("config.policyPromptInvalid"); if (draft.allowedProviderIds.length === 0) return t("config.policyCandidatesEmpty"); const selected = draft.allowedProviderIds.map((id) => providers.find((provider) => provider.id === id)).filter((provider) => provider !== void 0); if (selected.length !== draft.allowedProviderIds.length) return t("config.policyConnectionIncomplete"); for (const provider of selected) { if (provider.serviceConfigured === false) return t(providerUnavailableKey(provider)); if (draft.dataBoundary === "local-only" && provider.kind === "remote") return t("config.policyBoundaryMismatch"); if (!providerDraftComplete(provider, draft.providerConnections[provider.id])) return t("config.policyConnectionIncomplete"); } return null; } function serializePlacementPolicy(draft, providers) { const selectedIds = draft.mode === "manual" ? [draft.providerId] : draft.allowedProviderIds; const connections = Object.fromEntries(selectedIds.filter((id) => { const provider = providers.find((candidate) => candidate.id === id); return provider !== void 0 ? provider.origin !== "native" : id !== NATIVE_PROVIDER_ID; }).map((id) => [id, draft.providerConnections[id] ?? {}])); return { mode: draft.mode, providerId: draft.providerId, prompt: draft.prompt, rules: { allowedProviderIds: draft.allowedProviderIds, dataBoundary: draft.dataBoundary, requiredCapabilities: draft.requiredCapabilities, preference: draft.preference }, providerConnections: connections }; } function PlacementModeFieldset(props) { const t = useT$3(); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", { className: css$8.placementMode, disabled: props.disabled, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("legend", { children: t("overview.placementMode") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { "data-selected": props.mode === "manual" || void 0, "data-disabled": props.disabled || void 0, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "radio", name: props.radioGroupName, value: "manual", checked: props.mode === "manual", disabled: props.disabled, "data-autofocus": props.autoFocusSelected && props.mode === "manual" ? true : void 0, onChange: () => props.onChange("manual") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: css$8.choiceControl, "data-kind": "radio", "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("overview.placementManual") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("strategy.manualHint") })] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { "data-selected": props.mode === "automatic" || void 0, "data-disabled": props.disabled || void 0, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "radio", name: props.radioGroupName, value: "automatic", checked: props.mode === "automatic", disabled: props.disabled, "data-autofocus": props.autoFocusSelected && props.mode === "automatic" ? true : void 0, onChange: () => props.onChange("automatic") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: css$8.choiceControl, "data-kind": "radio", "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", { children: [ t("overview.placementAutomatic"), " ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { children: t("overview.recommended") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("strategy.automaticHint") })] }) ] }) ] }); } function PlacementTargetControls(props) { const t = useT$3(); const { draft, providers } = props; const fieldLayout = props.fieldLayout ?? "dialog"; const selectedProvider = providers.find((provider) => provider.id === draft.providerId); const updateConnection = (id, key, value) => { props.onChange({ providerConnections: { ...draft.providerConnections, [id]: { ...draft.providerConnections[id] ?? {}, [key]: value } } }); }; const toggleCapability = (capability) => { props.onChange({ requiredCapabilities: draft.requiredCapabilities.includes(capability) ? draft.requiredCapabilities.filter((value) => value !== capability) : [...draft.requiredCapabilities, capability] }); }; const toggleProvider = (id, selected) => { props.onChange({ allowedProviderIds: selected ? [.../* @__PURE__ */ new Set([...draft.allowedProviderIds, id])] : draft.allowedProviderIds.filter((value) => value !== id) }); }; if (draft.mode === "manual") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", { className: css$8.providerChoice, disabled: props.disabled, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("legend", { children: t("overview.providerLabel") }), readyFirst(providers).map((provider) => { const unavailable = provider.serviceConfigured === false; const itemDisabled = props.disabled === true || unavailable; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { "data-selected": draft.providerId === provider.id || void 0, "data-native": provider.origin === "native" || void 0, "data-disabled": itemDisabled || void 0, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "radio", name: props.providerRadioGroupName, value: provider.id, checked: draft.providerId === provider.id, disabled: itemDisabled, onChange: () => props.onChange({ providerId: provider.id }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderIcon, { providerId: provider.id, icon: provider.icon, className: css$8.providerChoiceIcon }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", { children: [provider.label, provider.origin === "native" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { children: t("overview.nativeOfficial") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: unavailable ? t(providerUnavailableKey(provider)) : `${t(`overview.workspaceBinding.${provider.workspaceBinding}`)} · ${providerSummary(t, provider)}` })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: css$8.choiceControl, "data-kind": "radio", "aria-hidden": "true" }) ] }, provider.id); })] }), selectedProvider !== void 0 && selectedProvider.origin !== "native" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderMemoryFields, { provider: selectedProvider, connection: draft.providerConnections[selectedProvider.id] ?? {}, layout: fieldLayout, ...props.disabled === void 0 ? {} : { disabled: props.disabled }, onChange: (key, value) => updateConnection(selectedProvider.id, key, value) })] }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$8.placementPolicy, "aria-label": t("overview.placementPolicy"), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.placementPolicyHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("overview.placementPolicy") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("overview.placementPolicyHint") })] }), props.agentAvailable !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskAgentTag, { available: props.agentAvailable })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { className: css$8.placementPromptField, children: [t("overview.placementPrompt"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { "aria-label": t("overview.placementPrompt"), value: draft.prompt, disabled: props.disabled, onChange: (event) => props.onChange({ prompt: event.target.value }), placeholder: t("overview.placementPromptPlaceholder"), rows: 3, maxLength: 4e3 })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.placementRuleGrid, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { label: t("overview.dataBoundary"), value: draft.dataBoundary, disabled: props.disabled, options: [{ value: "allow-remote", label: t("overview.dataBoundaryRemote") }, { value: "local-only", label: t("overview.dataBoundaryLocal") }], onChange: (value) => { props.onChange({ dataBoundary: value, ...value === "local-only" ? { allowedProviderIds: draft.allowedProviderIds.filter((id) => providers.find((provider) => provider.id === id)?.kind === "local") } : {} }); } }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { label: t("overview.preference"), value: draft.preference, disabled: props.disabled, options: [ { value: "balanced", label: t("overview.preferenceBalanced") }, { value: "local-first", label: t("overview.preferenceLocal") }, { value: "shared-first", label: t("overview.preferenceShared") } ], onChange: (preference) => props.onChange({ preference }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", { className: css$8.capabilityRules, disabled: props.disabled, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("legend", { children: t("overview.requiredCapabilities") }), [ "graph", "exact-write", "forget" ].map((capability) => { const selected = draft.requiredCapabilities.includes(capability); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { "data-selected": selected || void 0, "data-disabled": props.disabled || void 0, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "checkbox", checked: selected, disabled: props.disabled, onChange: () => toggleCapability(capability) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: css$8.choiceControl, "data-kind": "check", "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(`overview.capability.${capability}`) }) ] }, capability); })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.placementCandidates, children: readyFirst(providers).map((provider) => { const selected = draft.allowedProviderIds.includes(provider.id); const itemDisabled = props.disabled === true || provider.serviceConfigured === false && !selected || draft.dataBoundary === "local-only" && provider.kind === "remote"; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { "data-selected": selected || void 0, "data-disabled": itemDisabled || void 0, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "checkbox", checked: selected, disabled: itemDisabled, onChange: (event) => toggleProvider(provider.id, event.target.checked) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderIcon, { providerId: provider.id, icon: provider.icon, className: css$8.candidateIcon }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: provider.label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: provider.serviceConfigured === false ? t(providerUnavailableKey(provider)) : provider.origin === "native" ? t("overview.candidateNativeReady") : provider.kind === "local" ? t("overview.candidateLocal") : t("overview.candidateRemote") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: css$8.choiceControl, "data-kind": "check", "aria-hidden": "true" }) ] }, provider.id); }) }), draft.allowedProviderIds.map((id) => { const provider = providers.find((candidate) => candidate.id === id); return provider === void 0 || provider.origin === "native" ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderMemoryFields, { provider, connection: draft.providerConnections[id] ?? {}, layout: fieldLayout, ...props.disabled === void 0 ? {} : { disabled: props.disabled }, onChange: (key, value) => updateConnection(id, key, value) }, id); }) ] }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/persistence-strategy-dialog.tsx function PersistenceStrategyDialog(props) { const t = useT$3(); const strategyFormId = (0, react.useId)(); const configured = props.config?.persistenceStrategy; const [draft, setDraft] = (0, react.useState)(() => createPlacementPolicyDraft(configured, [])); const [providers, setProviders] = (0, react.useState)([]); const [loading, setLoading] = (0, react.useState)(true); const [saving, setSaving] = (0, react.useState)(false); const [error, setError] = (0, react.useState)(null); (0, react.useEffect)(() => { let current = true; props.client.bodyDirectory().then((catalog) => { if (!current) return; const next = catalog.providers; setProviders(next); setDraft((previous) => { const nextProviderId = readyProviderId(next, previous.providerId) ?? previous.providerId; let nextAllowed = previous.allowedProviderIds; if (configured?.rules?.allowedProviderIds === void 0) { const ready = previous.allowedProviderIds.filter((id) => next.some((provider) => provider.id === id && provider.serviceConfigured !== false)); const first = readyProviderId(next); nextAllowed = ready.length > 0 || first === void 0 ? ready : [first]; } return { ...previous, providerId: nextProviderId, allowedProviderIds: nextAllowed, providerConnections: mergeProviderDefaults(next, previous.providerConnections) }; }); }).catch((reason) => { if (current) setError(message(reason)); }).finally(() => { if (current) setLoading(false); }); return () => { current = false; }; }, [props.client]); const selectedProvidersValid = placementPolicyProblem(draft, providers, t) === null; const save = async (event) => { event.preventDefault(); if (loading || saving || !props.writable || !selectedProvidersValid) return; setSaving(true); setError(null); try { await props.settingsScope.setPath(["persistenceStrategy"], serializePlacementPolicy(draft, providers)); props.onClose(); } catch (reason) { setError(message(reason)); } finally { setSaving(false); } }; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("strategy.title"), description: t("strategy.description"), busy: saving, contentReady: !loading, wide: true, onClose: props.onClose, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, className: css$8.secondaryButton, disabled: saving, onClick: props.onClose, children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", form: strategyFormId, className: css$8.primaryButton, disabled: loading || saving || !props.writable || !selectedProvidersValid, children: saving ? t("strategy.saving") : t("strategy.save") })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { id: strategyFormId, className: appearanceClass(css$8.bodyEdit, css$8.strategyForm), onSubmit: (event) => void save(event), children: [ loading && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.strategyLoading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SectionSpinner, { label: t("strategy.loading") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("strategy.loading") })] }), error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.inlineError, role: "alert", children: error }), !loading && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$8.createSection, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.createSectionHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "01" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("strategy.modeTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("strategy.modeHint") })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PlacementModeFieldset, { mode: draft.mode, radioGroupName: "persistence-mode", autoFocusSelected: true, onChange: (mode) => setDraft((current) => ({ ...current, mode })) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$8.createSection, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.createSectionHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "02" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t(draft.mode === "manual" ? "strategy.manualTitle" : "strategy.automaticTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t(draft.mode === "manual" ? "strategy.manualDescription" : "strategy.automaticDescription") })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PlacementTargetControls, { draft, providers, providerRadioGroupName: "strategy-provider", fieldLayout: "dialog", agentAvailable: props.agentAvailable, onChange: (patch) => setDraft((current) => ({ ...current, ...patch })) })] })] }) ] }) }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/remember-page.tsx function RememberPage(props) { const t = useT$3(); const rememberFormId = (0, react.useId)(); const candidateId = (0, react.useId)(); const [content, setContent] = (0, react.useState)(props.seed); const [category, setCategory] = (0, react.useState)("general"); const [importance, setImportance] = (0, react.useState)(3); const [tags, setTags] = (0, react.useState)(""); const [entities, setEntities] = (0, react.useState)(""); const [memoryBodyId, setMemoryBodyId] = (0, react.useState)(""); const [supervising, setSupervising] = (0, react.useState)(false); const [saving, setSaving] = (0, react.useState)(false); const [outcome, setOutcome] = (0, react.useState)(null); (0, react.useEffect)(() => { if (props.seed !== "") setContent(props.seed); }, [props.seed]); (0, react.useEffect)(() => { if (memoryBodyId === "" && props.memoryBodies.length > 0) setMemoryBodyId((props.memoryBodies.find((body) => body.active) ?? props.memoryBodies[0]).id); }, [memoryBodyId, props.memoryBodies]); const selectedMemoryBody = props.memoryBodies.find((body) => body.id === memoryBodyId); const candidate = content.trim(); const answered = outcome !== null && outcome.content === candidate; const busy = supervising || saving; const supervise = async (event) => { event.preventDefault(); if (candidate === "" || !props.agentAvailable || answered || busy) return; setSupervising(true); setOutcome(null); try { const response = await props.client.supervise(candidate); setOutcome({ content: candidate, action: response.action, summary: response.summary, unembedded: (response.unembedded ?? []).length > 0, embeddingManaged: props.embeddingManaged }); props.onMutate(); } catch (reason) { setOutcome({ content: candidate, error: message(reason) }); } finally { setSupervising(false); } }; const manualSave = async (event) => { event.preventDefault(); if (candidate === "" || busy) return; setSaving(true); setOutcome(null); try { const response = await props.client.remember({ content: candidate, category, importance, tags: tags.split(",").map((value) => value.trim()).filter(Boolean), entities: entities.split(",").map((value) => value.trim()).filter(Boolean), source: "user", ...memoryBodyId === "" ? {} : { memoryBodyId } }); setOutcome({ content: candidate, action: typeof response.action === "string" ? response.action : "stored", summary: typeof response.summary === "string" ? response.summary : "", unembedded: response.embedded === false, embeddingManaged: props.embeddingManaged }); props.onMutate(); } catch (reason) { setOutcome({ content: candidate, error: message(reason) }); } finally { setSaving(false); } }; const composer = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$8.supervisedComposer, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { id: rememberFormId, className: css$8.supervisedForm, onSubmit: (event) => void supervise(event), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.candidateHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", { htmlFor: candidateId, children: t("remember.candidate") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskAgentTag, { available: props.agentAvailable })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { id: candidateId, value: content, onChange: (event) => setContent(event.target.value), maxLength: 8e3, rows: 8, placeholder: t("remember.placeholder") }), !props.agentAvailable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css$8.sessionHint, children: t("remember.taskAgentHint") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SafeReveal, { children: outcome !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteReceipt, { action: outcome.action, summary: outcome.summary, error: outcome.error, unembedded: outcome.unembedded, embeddingManaged: outcome.embeddingManaged, onView: props.onView }) : null }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", { className: css$8.advancedWrite, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("summary", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("remember.advanced") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("remember.advancedHint") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css$8.advancedWriteIndicator, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.advancedWriteToggleText, children: t("remember.expand") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: css$8.advancedWriteChevron, size: 14 })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { className: css$8.manualForm, onSubmit: (event) => void manualSave(event), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.formGrid, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.fieldWide, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { label: t("remember.target"), value: memoryBodyId, options: props.memoryBodies.map((body) => ({ value: body.id, label: `${body.name} · ${body.provider.label}${body.active ? ` · ${t("common.active")}` : ""}` })), onChange: setMemoryBodyId }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SafeReveal, { children: selectedMemoryBody?.provider.capabilities.writeMode === "async-extracting" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: css$8.providerWriteHint, children: t("remember.asyncProviderHint") }) : null })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { label: t("common.category"), value: category, options: CATEGORIES.map((value) => ({ value, label: categoryLabel(t, value) })), onChange: setCategory }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { label: t("common.importanceLabel"), value: String(importance), options: [ 1, 2, 3, 4, 5 ].map((value) => ({ value: String(value), label: `${value} / 5` })), onChange: (value) => setImportance(Number(value)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { className: css$8.fieldWide, children: [t("remember.entities"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { value: entities, onChange: (event) => setEntities(event.target.value), placeholder: "SQLite, DSH" })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { className: css$8.fieldWide, children: [t("remember.tags"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { value: tags, onChange: (event) => setTags(event.target.value), placeholder: "architecture, local-first" })] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.manualActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("remember.advancedText") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", className: css$8.secondaryButton, disabled: busy || candidate === "" || memoryBodyId === "" || answered, children: saving ? t("remember.saving") : t("remember.advancedAction") })] })] })] })] }); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("remember.title"), description: t("remember.description"), busy, onClose: props.onClose, footer: props.writeEnabled ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, className: css$8.secondaryButton, disabled: busy, onClick: props.onClose, children: t(outcome === null ? "common.cancel" : "common.close") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", form: rememberFormId, className: css$8.primaryButton, disabled: busy || candidate === "" || !props.agentAvailable || answered, children: supervising ? t("remember.processing") : t("remember.action") })] }) : void 0, children: props.writeEnabled ? composer : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "⊘", title: t("remember.readOnlyTitle"), children: t("remember.readOnlyText") }) }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/list-page.tsx function ListPage(props) { const t = useT$3(); const pageSize = 12; const [query, setQuery] = (0, react.useState)(""); const [category, setCategory] = (0, react.useState)(""); const [view, setView] = (0, react.useState)(null); const [loading, setLoading] = (0, react.useState)(true); const [error, setError] = (0, react.useState)(null); const [visibleLimit, setVisibleLimit] = (0, react.useState)(pageSize); const [selectedBodyId, setSelectedBodyId] = (0, react.useState)(); const load = (0, react.useCallback)(async (overrideQuery) => { const effectiveQuery = overrideQuery ?? query; setLoading(true); setError(null); try { setView(await props.client.list({ ...effectiveQuery.trim() === "" ? {} : { query: effectiveQuery }, ...category === "" ? {} : { category }, limit: 1e3 })); } catch (reason) { setError(message(reason)); } finally { setLoading(false); } }, [ category, props.client, query ]); (0, react.useEffect)(() => { setVisibleLimit(pageSize); load(); }, [pageSize, props.revision]); const submit = (event) => { event.preventDefault(); setVisibleLimit(pageSize); load(); }; const forget = async (insight) => { await props.onForget(insight); setView((current) => current === null ? current : { ...current, total: Math.max(0, current.total - 1), items: current.items.filter((item) => insightKey(item) !== insightKey(insight)) }); }; const filteredItems = view?.items.filter((item) => selectedBodyId === void 0 || item.memoryBodyId === selectedBodyId) ?? []; const visibleItems = filteredItems.slice(0, visibleLimit); const sources = view?.sources ?? []; const waitingForQuery = query.trim() === "" && sources.some((source) => source.status === "query-required" && (selectedBodyId === void 0 || source.memoryBodyId === selectedBodyId)); const selectBody = (memoryBodyId) => { setSelectedBodyId(memoryBodyId); setVisibleLimit(pageSize); }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.page, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageHeader, { title: t("content.title"), description: t("content.description"), meta: t("content.count", { count: view === null ? "—" : selectedBodyId === void 0 ? view.total : filteredItems.length }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { className: css$8.listToolbar, onSubmit: submit, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchField, { label: t("content.filterAria"), value: query, onChange: (event) => { const next = event.target.value; const hadQuery = query !== ""; setQuery(next); if (hadQuery && next === "") { setVisibleLimit(pageSize); load(""); } }, placeholder: t("content.filterPlaceholder") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { hideLabel: true, label: t("content.categoryAria"), value: category, options: [{ value: "", label: t("common.allCategories") }, ...CATEGORIES.map((value) => ({ value, label: categoryLabel(t, value) }))], onChange: setCategory }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", className: css$8.secondaryButton, disabled: loading, children: loading ? t("common.loading") : t("content.apply") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.listNotice, children: t("content.notice") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ReadSourcePanel, { title: t("content.sourcesTitle"), sources, selectedBodyId, onSelect: selectBody }), error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.inlineError, role: "alert", children: error }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.asyncResults, children: [ loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SectionSpinner, { label: t("common.loading") }), !loading && filteredItems.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "≡", title: t(waitingForQuery ? "content.queryRequiredTitle" : "content.emptyTitle"), children: t(waitingForQuery ? "content.queryRequiredText" : "content.emptyText") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.memoryList, children: visibleItems.map((insight) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(InsightCard, { insight, writeEnabled: props.writeEnabled, onForget: forget, onClone: props.onClone, onRelated: () => props.onExplore(insight.content) }, insightKey(insight))) }), view !== null && !loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressiveFooter, { visible: visibleItems.length, total: filteredItems.length, pageSize, onMore: () => setVisibleLimit((value) => value + pageSize) }) ] }) ] }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/provider-settings.tsx const EMPTY_PROVIDER_CATALOG = { providers: [], items: [], generatedAt: "" }; const RETAINED_PROVIDERS$1 = "provider-services"; const retainedCatalog = (retained) => retained.get(RETAINED_PROVIDERS$1); function stabilizeProviderCard(element) { const view = element.ownerDocument.defaultView; let scrollContainer; for (let ancestor = element.parentElement; ancestor !== null; ancestor = ancestor.parentElement) { const overflowY = view?.getComputedStyle(ancestor).overflowY ?? ancestor.style.overflowY; if (scrollContainer !== void 0 && overflowY === "hidden" && ancestor.scrollTop !== 0) ancestor.scrollTop = 0; if (scrollContainer === void 0 && (overflowY === "auto" || overflowY === "scroll") && ancestor.scrollHeight > ancestor.clientHeight) scrollContainer = ancestor; if (ancestor.getAttribute("role") === "dialog") break; } if (scrollContainer === void 0) return; const headerRect = (element.firstElementChild instanceof HTMLElement ? element.firstElementChild : element).getBoundingClientRect(); const containerRect = scrollContainer.getBoundingClientRect(); if (headerRect.top < containerRect.top) scrollContainer.scrollTop -= containerRect.top - headerRect.top; else if (headerRect.bottom > containerRect.bottom) scrollContainer.scrollTop += headerRect.bottom - containerRect.bottom; } function serviceFields(provider) { return provider.fields.filter((field) => field.scope === "service"); } function globalLocationFields(provider) { return serviceFields(provider).filter((field) => field.role === "global-location"); } function serviceDefaults(provider) { return Object.fromEntries(serviceFields(provider).flatMap((field) => field.defaultValue === void 0 ? [] : [[field.key, field.defaultValue]])); } function draftFor(provider, service) { return { settings: { ...serviceDefaults(provider), ...service.settings, ...service.secretValues } }; } function configurationComplete(provider, draft, service) { return serviceFields(provider).every((field) => { if (!field.required) return true; if (field.input === "secret" && service.configuredSecrets.includes(field.key)) return true; const value = draft.settings[field.key]; return field.input === "boolean" ? typeof value === "boolean" : String(value ?? "").trim() !== ""; }); } function ProviderServiceForm(props) { const t = useT$3(); const css = memorySettingsStyles; const [draft, setDraft] = (0, react.useState)(() => draftFor(props.provider, props.service)); const [customLocations, setCustomLocations] = (0, react.useState)(() => new Set(globalLocationFields(props.provider).filter((field) => String(props.service.settings[field.key] ?? "").trim() !== "").map((field) => field.key))); const [saving, setSaving] = (0, react.useState)(false); const [failed, setFailed] = (0, react.useState)(null); const [saved, setSaved] = (0, react.useState)(false); const formRef = (0, react.useRef)(null); const stabilizeAfterLocationLayout = (0, react.useRef)(false); (0, react.useEffect)(() => { setDraft(draftFor(props.provider, props.service)); setCustomLocations(new Set(globalLocationFields(props.provider).filter((field) => String(props.service.settings[field.key] ?? "").trim() !== "").map((field) => field.key))); }, [props.provider, props.service]); (0, react.useLayoutEffect)(() => { if (!stabilizeAfterLocationLayout.current || formRef.current === null) return; stabilizeAfterLocationLayout.current = false; stabilizeProviderCard(formRef.current.closest("[data-provider]") ?? formRef.current); }, [customLocations]); const submit = async (event) => { event.preventDefault(); const locationsComplete = props.activeScope === "workspace" || globalLocationFields(props.provider).every((field) => !customLocations.has(field.key) || String(draft.settings[field.key] ?? "").trim() !== ""); if (!configurationComplete(props.provider, draft, props.service) || !locationsComplete || saving || props.disabled) return; setSaving(true); setFailed(null); setSaved(false); const settings = { ...draft.settings }; for (const field of globalLocationFields(props.provider)) if (props.activeScope === "workspace" || !customLocations.has(field.key)) settings[field.key] = ""; try { await props.onSave(props.provider, { settings }); setSaved(true); } catch (reason) { setFailed(message(reason)); } finally { setSaving(false); } }; const update = (key, value) => { setDraft((current) => ({ ...current, settings: { ...current.settings, [key]: value } })); setFailed(null); setSaved(false); }; const useCustomLocation = (field, custom) => { stabilizeAfterLocationLayout.current = true; setCustomLocations((current) => { const next = new Set(current); if (custom) next.add(field.key); else next.delete(field.key); return next; }); setFailed(null); setSaved(false); }; const stabilizeLocationCard = () => { if (formRef.current === null) return; stabilizeProviderCard(formRef.current.closest("[data-provider]") ?? formRef.current); }; const locations = globalLocationFields(props.provider); const regularFields = serviceFields(props.provider).filter((field) => field.role !== "global-location"); const locationsComplete = props.activeScope === "workspace" || locations.every((field) => !customLocations.has(field.key) || String(draft.settings[field.key] ?? "").trim() !== ""); const formComplete = configurationComplete(props.provider, draft, props.service) && locationsComplete; const field = (descriptor) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderField, { field: descriptor, value: draft.settings[descriptor.key], layout: "settings", saved: props.service.configuredSecrets.includes(descriptor.key), disabled: props.disabled || saving, onChange: (value) => update(descriptor.key, value) }, descriptor.key); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { ref: formRef, className: css.providerServiceForm, onSubmit: (event) => void submit(event), "data-provider": props.provider.id, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.providerServicePrompt, children: t(props.service.configured ? "config.providerServiceHint" : "config.providerEnableHint") }), locations.map((location) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GlobalLocationSetting, { className: css.providerServiceLocation, name: `${props.provider.id}-${location.key}-location`, ariaLabel: `${props.provider.label} ${t("config.providerGlobalLocation")}`, label: t("config.providerGlobalLocation"), hint: t(props.activeScope === "workspace" ? "config.providerGlobalLocationWorkspaceHint" : "config.providerGlobalLocationHint", { provider: props.provider.label }), defaultLabel: t("config.providerDefaultLocation"), customLabel: t("config.custom"), custom: customLocations.has(location.key), workspace: props.activeScope === "workspace", disabled: props.disabled || saving, onInteract: stabilizeLocationCard, onChange: (custom) => useCustomLocation(location, custom), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.providerLocationField, children: field(location) }) }, location.key)), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.providerSettingsGrid, children: regularFields.map(field) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: `${css.memoryConfigFooter} ${css.providerServiceFooter}`, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.configFeedback, "aria-live": "polite", children: [failed !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.error, children: t("config.providerSaveFailed", { error: failed }) }), saved && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.packSuccess, children: t("config.providerServiceSaved") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { type: "submit", variant: "primary", size: "sm", disabled: props.disabled || saving || !formComplete, children: saving ? t("config.saving") : t(props.service.configured ? "config.saveProviderService" : "config.enableProvider") })] }) ] }); } function ProviderPanel(props) { const t = useT$3(); const css = memorySettingsStyles; const [enabled, setEnabled] = (0, react.useState)(props.service.enabled); const [expanded, setExpanded] = (0, react.useState)(props.service.enabled && !props.service.configured); const [toggling, setToggling] = (0, react.useState)(false); const [failed, setFailed] = (0, react.useState)(null); const rowRef = (0, react.useRef)(null); const stabilizeAfterLayout = (0, react.useRef)(false); (0, react.useLayoutEffect)(() => { if (!stabilizeAfterLayout.current || rowRef.current === null) return; stabilizeAfterLayout.current = false; stabilizeProviderCard(rowRef.current); }, [enabled, expanded]); (0, react.useEffect)(() => { if (toggling) return; setEnabled(props.service.enabled); if (!props.service.enabled) setExpanded(false); }, [props.service.enabled, toggling]); const toggle = async (next) => { setFailed(null); stabilizeAfterLayout.current = true; if (next && !props.service.configured) { setEnabled(true); setExpanded(true); return; } if (!next && !props.service.enabled) { setEnabled(false); setExpanded(false); return; } const restoreEnabled = enabled; const restoreExpanded = expanded; setEnabled(next); if (!next && expanded) setExpanded(false); setToggling(true); try { const updated = await props.onToggle(props.provider, next); setEnabled(updated.enabled); if (!next) setExpanded(false); } catch (reason) { setEnabled(restoreEnabled); if (restoreExpanded) setExpanded(true); setFailed(message(reason)); } finally { setToggling(false); } }; const stateKey = enabled ? props.service.configured ? "config.providerEnabled" : "config.providerNeedsConfiguration" : props.service.configured ? "config.providerDisabledConfigured" : "config.providerDisabled"; const providerScope = props.provider.workspaceBinding === "provider-global" ? "global" : props.activeScope; const controlDisabled = props.disabled || toggling; const toggleExpanded = () => { stabilizeAfterLayout.current = true; setExpanded((value) => !value); }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { ref: rowRef, className: css.providerRow, "data-provider": props.provider.id, "data-enabled": enabled || void 0, "data-expanded": expanded || void 0, role: "group", "aria-label": `${props.provider.label} ${t("config.providerServiceTitle")}`, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.providerRowHeader, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css.providerDisclosure, "aria-expanded": expanded, disabled: !enabled || controlDisabled, onClick: toggleExpanded, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.providerIdentity, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderIcon, { providerId: props.provider.id, icon: props.provider.icon, className: css.providerMark }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: props.provider.label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: providerSummary(t, props.provider) })] })] }), enabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: `${css.providerChevron} ${css$8.smoothChevron}`, size: 14 })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.providerEnableControl, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.providerScopeTag, "data-scope": providerScope, children: t(`config.${providerScope}`) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.providerState, "data-enabled": enabled || void 0, children: t(stateKey) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, { className: css.providerToggle, checked: enabled, label: t("config.providerToggleAria", { provider: props.provider.label }), disabled: controlDisabled, onChange: (next) => void toggle(next) }) ] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SafeReveal, { children: failed !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.providerToggleError, role: "alert", children: t("config.providerToggleFailed", { error: failed }) }) : null }), enabled && expanded && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: `${css.providerInlineBody} ${css$8.inlineExpand}`, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderServiceForm, { provider: props.provider, service: props.service, activeScope: props.activeScope, disabled: controlDisabled, onSave: props.onSave }) }) ] }); } function ProviderSettingsSection(props) { const t = useT$3(); const css = memorySettingsStyles; const { client, retained, onCatalog } = props; const initialCatalog = client === void 0 ? void 0 : retainedCatalog(retained); const [catalog, setCatalog] = (0, react.useState)(() => initialCatalog ?? EMPTY_PROVIDER_CATALOG); const [loading, setLoading] = (0, react.useState)(client !== void 0 && initialCatalog === void 0); const [failed, setFailed] = (0, react.useState)(null); const loadRequests = useRequestVersion(); const load = (0, react.useCallback)(async (quiet = false) => { if (client === void 0) return; const request = loadRequests.begin(); if (!quiet) setLoading(true); setFailed(null); try { const next = await client.providerServices(); if (!loadRequests.isCurrent(request)) return; retained.set(RETAINED_PROVIDERS$1, next); setCatalog(next); onCatalog?.(next); } catch (reason) { if (!loadRequests.isCurrent(request)) return; setFailed(message(reason)); } finally { if (!quiet && loadRequests.isCurrent(request)) setLoading(false); } }, [ client, loadRequests, onCatalog, retained ]); const blocked = props.blocked !== void 0; const pending = props.pending === true; (0, react.useEffect)(() => { if (blocked || pending) { loadRequests.begin(); setLoading(pending); setFailed(null); return; } const cached = client === void 0 ? void 0 : retainedCatalog(retained); setCatalog(cached ?? EMPTY_PROVIDER_CATALOG); if (cached !== void 0) onCatalog?.(cached); setLoading(client !== void 0 && cached === void 0); load(cached !== void 0); }, [ blocked, client, load, loadRequests, onCatalog, pending, props.refreshKey, retained ]); const acceptService = (0, react.useCallback)((service) => { setCatalog((current) => { const items = current.items.some((item) => item.providerId === service.providerId) ? current.items.map((item) => item.providerId === service.providerId ? service : item) : [...current.items, service]; const next = { ...current, items, generatedAt: (/* @__PURE__ */ new Date()).toISOString() }; if (client !== void 0) retained.set(RETAINED_PROVIDERS$1, next); onCatalog?.(next); return next; }); }, [ client, onCatalog, retained ]); const save = async (provider, draft) => { if (client === void 0) throw new Error(t("config.providerUnavailable")); const settings = Object.fromEntries(Object.entries(draft.settings).filter(([key, value]) => serviceFields(provider).find((field) => field.key === key)?.input !== "secret" || String(value).trim() !== "")); acceptService(await client.updateProviderService({ providerId: provider.id, settings, enabled: true })); props.onChanged?.(); }; const toggle = async (provider, enabled) => { if (client === void 0) throw new Error(t("config.providerUnavailable")); const updated = await client.updateProviderService({ providerId: provider.id, settings: {}, enabled }); acceptService(updated); props.onChanged?.(); return updated; }; const disabled = props.disabled || props.scopeChanging || client === void 0 || loading || catalog.generatedAt === ""; if (blocked) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SafeReveal, { children: props.blocked }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.providerList, children: props.leading })] }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SafeReveal, { children: props.notice ?? null }), props.scopeChanging && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.scopeChanging, role: "status", children: t("config.saveScopeBeforeProviders") }), props.workspaceLabel !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.providerTarget, children: t("config.providerTargetWorkspace", { workspace: props.workspaceLabel }) }), loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.visuallyHidden, role: "status", children: t("config.loadingProviders") }), failed !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.providerLoadError, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.error, children: t("config.providerLoadFailed", { error: failed }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", onClick: () => void load(), children: t("config.retryProviders") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.providerList, "aria-busy": loading, children: [props.leading, catalog.providers.map((provider) => { const service = catalog.items.find((item) => item.providerId === provider.id) ?? { providerId: provider.id, enabled: false, configured: false, settings: {}, configuredSecrets: [] }; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderPanel, { provider, service, disabled, activeScope: props.activeScope, onSave: save, onToggle: toggle }, provider.id); })] }) ] }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/settings-client.ts const clients = /* @__PURE__ */ new WeakMap(); function memorySpacesSettingsClient(operations) { let client = clients.get(operations); if (client === void 0) { client = { statusSummary: () => operations.read("status-summary"), providerServices: () => operations.read("provider-services"), updateProviderService: (request) => operations.write("provider-service-update", JSON.parse(JSON.stringify(request))), embeddingStatus: () => operations.read("embedding-status"), fillEmbeddings: (memoryBodyId) => operations.write("embedding-fill", { memoryBodyId }) }; clients.set(operations, client); } return client; } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/settings.tsx const PACKAGE_NAME = "dsh-brain-mnemon-source-memory-spaces"; function yieldsComponentSettings(client) { return typeof client.MNEMON_COMPONENT_FALLBACK_PRIORITY === "number"; } function installMemorySpacesSettings(ctx) { const { locale } = ctx; return installMemoryComponentUI(ctx, { packageName: PACKAGE_NAME, settings: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemorySpacesSettings, { ...props, ...locale === void 0 ? {} : { locale } }) }); } const RECALL_POLICY_IDS = [ "strict-v1", "balanced-v1", "exhaustive-v1" ]; function isRecallPolicyId(value) { return value !== void 0 && RECALL_POLICY_IDS.includes(value); } function embeddingDraft(value) { const embedding = value?.embedding; return { endpoint: embedding?.endpoint?.trim() || "http://localhost:11434", model: embedding?.model?.trim() || "nomic-embed-text", apiKey: "", apiKeyEnv: embedding?.apiKeyEnv ?? "", clearApiKey: false, protocol: embedding?.protocol ?? "auto" }; } function recallDraft(value) { return { defaultRecallLimit: String(value?.defaultRecallLimit ?? 10), policy: isRecallPolicyId(value?.recallQuality?.policy) ? value.recallQuality.policy : DEFAULT_RECALL_QUALITY_POLICY, timeoutMs: String(value?.timeoutMs ?? 1e4) }; } function parseStrictInteger(raw) { const trimmed = raw.trim(); if (!/^\d+$/u.test(trimmed)) return void 0; const parsed = Number(trimmed); return Number.isSafeInteger(parsed) ? parsed : void 0; } function validRecallLimit(raw) { const parsed = parseStrictInteger(raw); return parsed !== void 0 && parsed >= 1 && parsed <= 50; } function validTimeoutMs(raw) { const parsed = parseStrictInteger(raw); return parsed !== void 0 && parsed >= 100 && parsed <= 12e4; } function validEmbeddingEndpoint(value) { const endpoint = value.trim(); if (endpoint === "" || endpoint.length > 2048) return false; try { const parsed = new URL(endpoint); return ["http:", "https:"].includes(parsed.protocol) && parsed.username === "" && parsed.password === "" && !endpoint.includes("?") && !endpoint.includes("#"); } catch { return false; } } function validEmbeddingModel(value) { const model = value.trim(); return model.length > 0 && model.length <= 200 && !/[\u0000-\u001f\u007f]/u.test(model); } function validEmbeddingApiKey(value) { const key = value.trim(); return key.length <= 2048 && !/[\u0000-\u001f\u007f]/u.test(key); } const validProtocol = (protocol) => MNEMON_EMBEDDING_PROTOCOLS.includes(protocol); function embeddingProblem(draft, t) { if (!validEmbeddingEndpoint(draft.endpoint)) return t("config.embeddingEndpointInvalid"); if (!validEmbeddingModel(draft.model)) return t("config.embeddingModelInvalid"); if (!validEmbeddingApiKey(draft.apiKey)) return t("config.embeddingApiKeyInvalid"); if (draft.apiKeyEnv.trim() && !EMBEDDING_ENVIRONMENT_NAME.test(draft.apiKeyEnv.trim())) return t("config.embeddingEnvInvalid"); if (draft.apiKey.trim() && draft.apiKeyEnv.trim()) return t("config.embeddingAuthChoice"); if (!validProtocol(draft.protocol)) return t("config.embeddingProtocolInvalid"); return null; } function recallProblem(draft, t) { if (!validRecallLimit(draft.defaultRecallLimit)) return t("config.defaultRecallLimitInvalid"); if (!validTimeoutMs(draft.timeoutMs)) return t("config.timeoutMsInvalid"); return null; } function embeddingValue(enabled, draft, secure, legacyKey = "") { const auth = secure ? { apiKey: draft.apiKey.trim(), apiKeyEnv: draft.apiKeyEnv.trim(), ...draft.clearApiKey ? { clearApiKey: true } : {} } : { apiKey: legacyKey }; const endpoint = draft.endpoint.trim().replace(/\/+$/u, ""); if (enabled) return { enabled: true, endpoint, model: draft.model.trim(), protocol: draft.protocol, ...auth }; return { enabled: false, ...validEmbeddingEndpoint(draft.endpoint) ? { endpoint } : {}, ...validEmbeddingModel(draft.model) ? { model: draft.model.trim() } : {}, ...validProtocol(draft.protocol) ? { protocol: draft.protocol } : {}, ...validEmbeddingApiKey(draft.apiKey) ? auth : {} }; } function MemorySpacesSettings(props) { if (props.host === void 0) return null; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemorySourcePageFrame, { locale: props.language, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingsTranslation, { locale: props.locale, language: props.language, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SpacesSettings, { page: props, host: props.host }) }) }); } const noLocaleChanges = () => () => {}; function SettingsTranslation(props) { const { locale, language } = props; const subscribe = (0, react.useCallback)((listener) => locale?.subscribe?.(listener) ?? noLocaleChanges(), [locale]); const getChain = (0, react.useCallback)(() => { const snapshot = locale?.getSnapshot?.(); return snapshot === void 0 ? "" : languageChain(snapshot).join("\n"); }, [locale]); const chain = (0, react.useSyncExternalStore)(subscribe, getChain, getChain); const translate = (0, react.useMemo)(() => locale === void 0 ? void 0 : settingsTranslate(locale, chain === "" ? void 0 : chain.split("\n"), language), [ locale, chain, language ]); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SourceTranslation, { value: translate, children: props.children }); } const RETAINED_CLI = "status-summary"; const RETAINED_PROVIDERS = "provider-services"; function SpacesSettings({ page, host }) { const t = useT$3(); const css = memorySettingsStyles; const { configuration, retained } = host; const snapshot = (0, react.useSyncExternalStore)(configuration.subscribe, configuration.getSnapshot, configuration.getSnapshot); const value = snapshot.value; const client = (0, react.useMemo)(() => host.operations === void 0 ? void 0 : memorySpacesSettingsClient(host.operations), [host.operations]); const saved = embeddingDraft(value); const secure = value?.embedding?.apiKeyStorage !== void 0; const legacy = value?.embedding?.apiKeyStorage === "legacy"; const connectionValue = (enabled, draft) => embeddingValue(enabled, draft, secure, value?.embedding?.apiKey); const managedSaved = value?.embedding?.enabled === true; const managed = useLive(managedSaved, async (enabled) => { await configuration.set("embedding", connectionValue(enabled, saved)); }); const form = useStaged(saved, async (draft) => { await configuration.set("embedding", connectionValue(managedSaved, draft)); form.edit({ apiKey: "", clearApiKey: false }); }); const [nativeCliFound, setNativeCliFound] = (0, react.useState)(() => retained.get(RETAINED_CLI)?.commandFound); const [providerCatalog, setProviderCatalog] = (0, react.useState)(() => client === void 0 ? void 0 : retained.get(RETAINED_PROVIDERS)); const [status, setStatus] = (0, react.useState)({ state: "idle" }); const [fill, setFill] = (0, react.useState)(void 0); const [policyOpen, setPolicyOpen] = (0, react.useState)(() => page.section === "policy"); const [recallOpen, setRecallOpen] = (0, react.useState)(() => page.section === "recall"); const statusRequest = (0, react.useRef)(0); (0, react.useEffect)(() => { if (page.section === "policy") setPolicyOpen(true); if (page.section === "recall") setRecallOpen(true); }, [page.section]); const on = page.component.enabled; const activeScope = value?.storageScope === "workspace" || value?.storageScope === "workspaces" ? "workspace" : "global"; const workspaceIdentity = activeScope === "workspace" ? page.workspace?.id ?? page.workspace?.path ?? page.workspace?.label ?? "" : ""; const embeddingSignature = JSON.stringify([ value?.embedding?.enabled ?? false, value?.embedding?.endpoint ?? "", value?.embedding?.model ?? "", value?.embedding?.protocol ?? "", value?.embedding?.apiKeyStorage ?? "", value?.embedding?.apiKeyConfigured ?? false, value?.embedding?.apiKeyEnv ?? "" ]); const providerScopeKey = `${activeScope}:${workspaceIdentity}`; const lastProviderScopeKey = (0, react.useRef)(providerScopeKey); const providerRefreshKeyRef = (0, react.useRef)(0); if (lastProviderScopeKey.current !== providerScopeKey) { lastProviderScopeKey.current = providerScopeKey; providerRefreshKeyRef.current += 1; } const fallbackProvider = (0, react.useMemo)(() => nativeFallbackProvider(t, nativeCliFound !== false), [nativeCliFound, t]); const policyProviders = (0, react.useMemo)(() => { if (providerCatalog === void 0 || providerCatalog.providers.length === 0) return [fallbackProvider]; const serviceById = new Map(providerCatalog.items.map((item) => [item.providerId, item])); return [fallbackProvider, ...providerCatalog.providers.filter((provider) => provider.id !== NATIVE_PROVIDER_ID).map((provider) => { const item = serviceById.get(provider.id); return { ...provider, serviceConfigured: item !== void 0 && item.enabled && item.configured }; })]; }, [fallbackProvider, providerCatalog]); const policyForm = useStaged((0, react.useMemo)(() => createPlacementPolicyDraft(value?.persistenceStrategy, policyProviders), [policyProviders, value?.persistenceStrategy]), async (draft) => { const merged = { ...draft, providerConnections: mergeProviderDefaults(policyProviders, draft.providerConnections) }; await configuration.set("persistenceStrategy", cleanJson(serializePlacementPolicy(merged, policyProviders))); host.changed(); }); const effectivePolicyDraft = (0, react.useMemo)(() => ({ ...policyForm.draft, providerConnections: mergeProviderDefaults(policyProviders, policyForm.draft.providerConnections) }), [policyForm.draft, policyProviders]); const recallForm = useStaged((0, react.useMemo)(() => recallDraft(value), [ value?.defaultRecallLimit, value?.recallQuality?.policy, value?.timeoutMs ]), async (draft) => { const nextLimit = parseStrictInteger(draft.defaultRecallLimit) ?? 10; const nextTimeout = parseStrictInteger(draft.timeoutMs) ?? 1e4; let wrote = false; if (nextLimit !== (value?.defaultRecallLimit ?? 10)) { await configuration.set("defaultRecallLimit", nextLimit); wrote = true; } const savedPolicy = isRecallPolicyId(value?.recallQuality?.policy) ? value.recallQuality.policy : DEFAULT_RECALL_QUALITY_POLICY; if (draft.policy !== savedPolicy) { await configuration.set("recallQuality", cleanJson({ ...value?.recallQuality ?? {}, policy: draft.policy })); wrote = true; } if (nextTimeout !== (value?.timeoutMs ?? 1e4)) { await configuration.set("timeoutMs", nextTimeout); wrote = true; } recallForm.edit({ defaultRecallLimit: String(nextLimit), timeoutMs: String(nextTimeout) }); if (wrote) host.changed(); }); (0, react.useEffect)(() => { if (client === void 0 || !on) { setNativeCliFound(void 0); setProviderCatalog(void 0); retained.delete(RETAINED_CLI); return; } let current = true; client.statusSummary().then((summary) => { if (!current) return; setNativeCliFound(summary.commandFound); retained.set(RETAINED_CLI, { commandFound: summary.commandFound }); }, () => { if (current) { setNativeCliFound(void 0); retained.delete(RETAINED_CLI); } }); return () => { current = false; }; }, [ activeScope, client, on, retained, workspaceIdentity ]); (0, react.useEffect)(() => () => { retained.delete(RETAINED_CLI); }, [retained]); (0, react.useEffect)(() => { statusRequest.current += 1; setStatus({ state: "idle" }); setFill(void 0); }, [ activeScope, client, embeddingSignature, on, workspaceIdentity ]); if (!on) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.panelNote, children: t("spaces.offNote") }); const test = () => { if (client === void 0) return; const request = statusRequest.current + 1; statusRequest.current = request; setStatus((previous) => ({ state: "loading", ...previous.value === void 0 ? {} : { value: previous.value } })); client.embeddingStatus().then((value) => { if (statusRequest.current === request) setStatus({ state: "ready", value }); }, (reason) => { if (statusRequest.current === request) setStatus({ state: "error", error: message(reason) }); }); }; const fillSpace = (space) => { if (client === void 0 || fill?.state === "running") return; const target = { memoryBodyId: space.memoryBodyId, name: space.name }; setFill({ ...target, state: "running" }); client.fillEmbeddings(space.memoryBodyId).then((result) => { setFill({ ...target, state: "done", result }); test(); }, (reason) => { setFill({ ...target, state: "failed", error: message(reason) }); test(); }); }; const readOnly = value?.writeEnabled === false; const disabled = !page.writable || snapshot.status === "loading" || !snapshot.writable; const cliMissing = nativeCliFound === false; const totalProviders = policyProviders.length; const enabledProviders = (cliMissing ? 0 : 1) + (providerCatalog?.items.filter((item) => item.providerId !== "mnemon-native" && item.enabled).length ?? 0); const recallBadge = t("config.recallBadge", { limit: recallForm.draft.defaultRecallLimit, policy: t(`config.recallPolicyShort.${recallForm.draft.policy}`) }); const handleProviderChanged = () => { host.changed(); }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css.panelSection, "data-settings-section": "providers", "aria-labelledby": "mnemon-spaces-providers", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.panelHeading, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { id: "mnemon-spaces-providers", children: t("config.providersTitle") }), totalProviders > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.settingsProvidersBadge, children: t("config.providersBadge", { enabled: enabledProviders, total: totalProviders }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("config.providersDescription") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderSettingsSection, { client, retained, ...activeScope !== "workspace" || page.workspace?.label === void 0 ? {} : { workspaceLabel: page.workspace.label }, activeScope, refreshKey: providerRefreshKeyRef.current, disabled: disabled || readOnly, scopeChanging: false, onChanged: handleProviderChanged, onCatalog: setProviderCatalog, ...readOnly ? { notice: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Callout, { tone: "warning", className: css.groupCallout, title: t("config.providersReadOnlyTitle"), children: t("config.providersReadOnlyDetail") }) } : {}, leading: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NativeProviderCard, { activeScope, cliMissing, t, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbeddingEditor, { secure, credentialSaved: value?.embedding?.apiKeyStorage === "credentials", managed: managed.value, draft: form.draft, disabled, connectionAvailable: client !== void 0, cliMissing, changing: form.dirty, status, t, onEdit: form.edit, onTest: () => { setFill(void 0); test(); }, canFill: !disabled && !readOnly, fill, onFill: fillSpace, onManaged: (on) => { if (!on) form.discard(); managed.set(on); }, actions: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteFailure, { error: managed.failed, t }), legacy && !form.dirty && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: disabled || form.saving, onClick: () => { form.apply(); }, children: t("config.embeddingMigrateKey") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: form.dirty, saving: form.saving, invalid: embeddingProblem(form.draft, t), failed: form.failed, applied: form.applied, disabled, t, onDiscard: form.discard, onApply: () => { form.apply(); } }) ] }) }) }) })] }), supportsSettingsSection$1("policy") && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: `${css.panelSection} ${css$8.settingsSection} ${css$8.settingsPolicy}`, "data-settings-section": "policy", "data-open": policyOpen ? "" : void 0, "aria-labelledby": "mnemon-spaces-policy", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css$8.settingsPolicyToggle, "aria-expanded": policyOpen, ...policyOpen ? { "aria-controls": "mnemon-spaces-policy-body" } : {}, "data-disclosure-open": policyOpen ? void 0 : "", onClick: () => setPolicyOpen((open) => !open), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css$8.settingsPolicyHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { id: "mnemon-spaces-policy", children: t("config.policyTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("config.policyDescription") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css$8.settingsPolicyMeta, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.settingsPolicyBadge, children: t(effectivePolicyDraft.mode === "automatic" ? "overview.placementAutomatic" : "overview.placementManual") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: css$8.smoothChevron, size: 14 })] })] }), policyOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { id: "mnemon-spaces-policy-body", className: `${css$8.settingsPolicyBody} ${css$8.inlineExpand}`, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PlacementModeFieldset, { mode: effectivePolicyDraft.mode, radioGroupName: "settings-persistence-mode", disabled: disabled || policyForm.saving, onChange: (mode) => policyForm.edit({ mode }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PlacementTargetControls, { draft: effectivePolicyDraft, providers: policyProviders, providerRadioGroupName: "settings-strategy-provider", fieldLayout: "settings", disabled: disabled || policyForm.saving, onChange: policyForm.edit }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: policyForm.dirty, saving: policyForm.saving, invalid: placementPolicyProblem(effectivePolicyDraft, policyProviders, t), failed: policyForm.failed, applied: policyForm.applied, disabled, t, onDiscard: policyForm.discard, onApply: () => { policyForm.apply(); } }) ] })] }), supportsSettingsSection$1("recall") && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: `${css.panelSection} ${css$8.settingsSection} ${css$8.settingsRecall}`, "data-settings-section": "recall", "data-open": recallOpen ? "" : void 0, "aria-labelledby": "mnemon-spaces-recall", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css$8.settingsPolicyToggle, "aria-expanded": recallOpen, "aria-labelledby": "mnemon-spaces-recall", ...recallOpen ? { "aria-controls": "mnemon-spaces-recall-body" } : {}, "data-disclosure-open": recallOpen ? void 0 : "", onClick: () => setRecallOpen((open) => !open), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css$8.settingsPolicyHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { id: "mnemon-spaces-recall", children: t("config.recallTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("config.recallDescription") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css$8.settingsPolicyMeta, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$8.settingsPolicyBadge, children: recallBadge }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: css$8.smoothChevron, size: 14 })] })] }), recallOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { id: "mnemon-spaces-recall-body", className: `${css$8.settingsPolicyBody} ${css$8.inlineExpand}`, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.settingsRows, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SpacesSettingRow, { htmlFor: "mnemon-spaces-recall-limit", title: t("config.defaultRecallLimit"), hint: t("config.defaultRecallLimitHint"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: "mnemon-spaces-recall-limit", className: css$8.settingsNumberInput, type: "number", inputMode: "numeric", min: 1, max: 50, step: 1, "aria-label": t("config.defaultRecallLimit"), "aria-invalid": !validRecallLimit(recallForm.draft.defaultRecallLimit), value: recallForm.draft.defaultRecallLimit, disabled: disabled || recallForm.saving, onChange: (event) => recallForm.edit({ defaultRecallLimit: event.target.value }) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SpacesSelectRow, { id: "mnemon-spaces-recall-policy", label: t("config.recallQualityPolicy"), value: recallForm.draft.policy, disabled: disabled || recallForm.saving, options: RECALL_POLICY_IDS.map((id) => ({ value: id, label: t(`config.recallPolicy.${id}`), detail: t(`config.recallPolicy.${id}.detail`) })), onChange: (policy) => recallForm.edit({ policy }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SpacesSettingRow, { htmlFor: "mnemon-spaces-timeout-ms", title: t("config.timeoutMs"), hint: t("config.timeoutMsHint"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: "mnemon-spaces-timeout-ms", className: css$8.settingsNumberInput, type: "number", inputMode: "numeric", min: 100, max: 12e4, step: 100, "aria-label": t("config.timeoutMs"), "aria-invalid": !validTimeoutMs(recallForm.draft.timeoutMs), value: recallForm.draft.timeoutMs, disabled: disabled || recallForm.saving, onChange: (event) => recallForm.edit({ timeoutMs: event.target.value }) }) }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: recallForm.dirty, saving: recallForm.saving, invalid: recallProblem(recallForm.draft, t), failed: recallForm.failed, applied: recallForm.applied, disabled, t, onDiscard: recallForm.discard, onApply: () => { recallForm.apply(); } })] })] }) ] }); } function SpacesSettingRow(props) { const title = props.htmlFor === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { id: props.titleId, children: props.title }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", { id: props.titleId, htmlFor: props.htmlFor, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: props.title }) }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.settingsRow, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.settingsRowCopy, children: [title, props.hint !== void 0 && props.hint !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: props.hint })] }), props.children !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.settingsRowControl, children: props.children })] }); } function SpacesSelectRow(props) { const [open, setOpen] = (0, react.useState)(false); const titleId = `${props.id}-title`; const valueId = (0, react.useId)(); const current = props.options.find((option) => option.value === props.value); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SpacesSettingRow, { title: props.label, titleId, hint: current?.detail, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, { open, onClose: () => setOpen(false), align: "end", portal: true, selectedId: props.value, listClassName: css$8.settingsSelectMenu, items: props.options.map((option) => ({ id: option.value, label: option.detail === void 0 ? option.label : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css$8.settingsSelectOption, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: option.label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: option.detail })] }) })), onSelect: (id) => { setOpen(false); if (id !== props.value) props.onChange(id); }, anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css$8.settingsSelector, "aria-haspopup": "menu", "aria-expanded": open, "aria-labelledby": `${titleId} ${valueId}`, disabled: props.disabled === true, onClick: () => setOpen((value) => !value), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { id: valueId, children: current?.label ?? props.value }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 12 })] }) }) }); } function NativeProviderCard(props) { const css = memorySettingsStyles; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", { className: css.providerRow, "data-provider": NATIVE_PROVIDER_ID, "data-native": "", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("summary", { className: css.providerRowHeader, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.providerIdentity, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderIcon, { providerId: NATIVE_PROVIDER_ID, icon: { kind: "brand", value: "mnemon" }, className: css.providerMark }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: props.t("config.nativeName") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: props.t("config.nativeSummary") })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.providerEnableControl, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.providerScopeTag, "data-scope": props.activeScope, children: props.t(`config.${props.activeScope}`) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.providerState, "data-enabled": props.cliMissing ? void 0 : "", children: props.t(props.cliMissing ? "config.nativeCliMissing" : "config.officialNative") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: `${css.providerChevron} ${css$8.smoothChevron}`, size: 14 }) ] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.providerInlineBody, children: props.children })] }); } function embeddingStatusText(t, status) { const coverage = { embedded: status.embedded, total: status.totalInsights, coverage: status.coverage }; return status.protocol === void 0 ? t(status.available ? "config.embeddingStatusAvailable" : "config.embeddingStatusUnavailable", { model: status.model, ...coverage }) : t(status.available ? "config.embeddingStatusAvailableWithProtocol" : "config.embeddingStatusUnavailableWithProtocol", { model: status.model, protocol: status.protocol, ...coverage }); } function EmbeddingEditor(props) { const { draft, t, status } = props; const css = memorySettingsStyles; const feedback = props.cliMissing ? t("config.embeddingCliMissing") : props.changing ? t("config.embeddingSaveBeforeTest") : status.state === "loading" ? t("config.embeddingTesting") : status.state === "error" ? t("config.embeddingStatusFailed", { error: status.error ?? "" }) : status.state === "ready" && status.value !== void 0 ? embeddingStatusText(t, status.value) : !props.connectionAvailable ? t("config.embeddingTestUnavailable") : t("config.embeddingNotTested"); const text = (field, type, label, valid, placeholder) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [label, /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type, "aria-label": label, "aria-invalid": !valid, value: draft[field], disabled: props.disabled || (field === "apiKey" || field === "apiKeyEnv") && (!props.secure || draft.clearApiKey), autoComplete: "off", spellCheck: false, autoCapitalize: "none", autoCorrect: "off", placeholder, onChange: (event) => props.onEdit({ [field]: event.target.value }) })] }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css.editor, "aria-labelledby": "mnemon-embedding-heading", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.editorHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { id: "mnemon-embedding-heading", children: t("config.embeddingTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("config.embeddingDescription") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-embedding-managed", label: t("config.embeddingManaged"), hint: t("config.embeddingManagedHint"), checked: props.managed, disabled: props.disabled, onChange: props.onManaged }), props.managed && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: `${css$8.embeddingManagedBody} ${css$8.inlineExpand}`, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.fieldGrid, children: [ text("endpoint", "url", t("config.embeddingEndpoint"), validEmbeddingEndpoint(draft.endpoint), "http://localhost:11434"), text("model", "text", t("config.embeddingModel"), validEmbeddingModel(draft.model), "nomic-embed-text"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { label: t("config.embeddingProtocol"), value: draft.protocol, disabled: props.disabled, options: [ { value: "auto", label: t("config.embeddingProtocolAuto") }, { value: "ollama", label: t("config.embeddingProtocolOllama") }, { value: "openai", label: t("config.embeddingProtocolOpenai") } ], onChange: (protocol) => props.onEdit({ protocol }) }), text("apiKey", "password", t("config.embeddingApiKey"), validEmbeddingApiKey(draft.apiKey), t("config.embeddingKeyPlaceholder")), props.secure && text("apiKeyEnv", "text", t("config.embeddingApiKeyEnv"), !draft.apiKeyEnv.trim() || EMBEDDING_ENVIRONMENT_NAME.test(draft.apiKeyEnv.trim()), "MY_EMBEDDING_API_KEY") ] }), props.secure ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [props.credentialSaved && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.editorNote, children: t("config.embeddingCredentialSaved") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { className: css.providerBoolean, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "checkbox", checked: draft.clearApiKey, disabled: props.disabled, onChange: (event) => props.onEdit({ clearApiKey: event.target.checked, apiKey: "", apiKeyEnv: "" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("config.embeddingClearKey") })] })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.editorNote, children: t("config.embeddingUpgradeHost") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.editorNote, children: t("config.embeddingSecurity") }) ] }), props.actions, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.embeddingTest, "aria-live": "polite", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: status.state === "error" ? css.error : void 0, role: status.state === "error" ? "alert" : void 0, children: feedback }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: props.disabled || !props.connectionAvailable || props.cliMissing || props.changing || status.state === "loading" || props.fill?.state === "running", onClick: props.onTest, children: t("config.embeddingTest") })] }), !props.cliMissing && !props.changing && (status.state === "ready" || status.state === "loading") && (status.value?.spaces ?? []).length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbeddingSpaces, { spaces: status.value.spaces, available: status.value.available, canFill: props.canFill, counting: status.state === "loading", fill: props.fill, onFill: props.onFill, t }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmbeddingFillOutcome, { fill: props.fill, t }) ] }); } function EmbeddingSpaces(props) { const { t, fill } = props; const css = memorySettingsStyles; const missing = (space) => space.error === void 0 && space.embedded < space.totalInsights; const fillable = props.available && props.canFill; const running = fill?.state === "running" ? fill.memoryBodyId : void 0; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.embeddingSpaces, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { id: "mnemon-embedding-spaces", children: t("config.embeddingSpaces") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { "aria-labelledby": "mnemon-embedding-spaces", children: props.spaces.map((space) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { "data-missing": missing(space) ? "" : void 0, "data-failed": space.error === void 0 ? void 0 : "", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.embeddingSpaceName, title: space.name, children: space.name }), !space.active && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.embeddingSpaceState, children: t("common.inactive") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.embeddingSpaceCount, children: space.error === void 0 ? t("config.embeddingSpaceCounts", { embedded: space.embedded, total: space.totalInsights, coverage: space.coverage }) : t("config.embeddingSpaceFailed", { error: space.error }) }), fillable && missing(space) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: running !== void 0 || props.counting, "aria-busy": running === space.memoryBodyId, "aria-label": t(running === space.memoryBodyId ? "config.embeddingFillingLabel" : "config.embeddingFillLabel", { name: space.name }), onClick: () => props.onFill(space), children: running === space.memoryBodyId ? t("config.embeddingFilling") : t("config.embeddingFill") }) ] }, space.memoryBodyId)) }), props.spaces.some(missing) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t(!props.canFill ? "config.embeddingMissing" : props.available ? "config.embeddingMissingFill" : "config.embeddingMissingOffline") }), props.spaces.some((space) => space.error !== void 0) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("config.embeddingSpacesUnread") }) ] }); } function EmbeddingFillOutcome(props) { const { fill, t } = props; const css = memorySettingsStyles; if (fill === void 0 || fill.state === "running") return null; const failure = (text) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: `${css.embeddingFillOutcome} ${css.error}`, role: "alert", children: text }); if (fill.state === "failed") return failure(t("config.embeddingFillFailed", { name: fill.name, error: fill.error })); const { filled, remaining, model, stopped } = fill.result; const name = fill.name; if (remaining > 0 && stopped === "refused" && filled === 0) return failure(t("config.embeddingFillRefused", { name, model })); const text = remaining === 0 ? filled > 0 ? t("config.embeddingFillDone", { name, filled }) : void 0 : stopped === "refused" ? t("config.embeddingFillPartly", { name, filled, remaining }) : t("config.embeddingFillMore", { name, filled, remaining }); return text === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.embeddingFillOutcome, role: "status", children: text }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-memory-spaces/src/client/ui.tsx function memorySpacesPageClient(management) { const client = createMemorySourcePageClient(management); const input = cleanJson; return { canAssist: client.canAssist, status: () => client.read("status-summary", null, { coalesce: true }), bodies: () => client.read("bodies", null, { coalesce: true }), bodyDirectory: () => client.read("body-directory", null, { coalesce: true }), graph: (memoryBodyIds) => client.read("graph", input({ memoryBodyIds }), { coalesce: true }), list: (request) => client.read("list", input(request ?? {})), entities: (entity, limit) => client.read("entities", input({ entity, limit })), entityMemories: (entity, offset, limit) => client.read("entity-memories", input({ entity, offset, limit })), entityRelated: (entity, limit, view) => client.read("entity-related", input({ entity, limit, view })), search: (request) => client.read("search", input({ ...request, inspect: true })), related: (id, memoryBodyId) => client.read("related", input({ id, memoryBodyId })), reconnectBody: (memoryBodyId) => client.read("body-reconnect", { memoryBodyId }), remember: (request) => client.mutate("remember", input(request), true), forget: (id, memoryBodyId) => client.mutate("forget", input({ id, memoryBodyId }), true), createBody: (request) => request.placement !== void 0 && client.canAssist("body-create") ? client.assist("body-create", input(request), true) : client.mutate("body-create", input(request), true), updateBody: (memoryBodyId, request) => typeof request.active === "boolean" && Object.keys(request).every((key) => key === "active") && client.canAssist("activation") ? client.assist("activation", { memoryBodyId, active: request.active }, true) : client.mutate("body-update", input({ memoryBodyId, ...request }), true), deleteBody: (memoryBodyId) => client.mutate("body-delete", { memoryBodyId }, true), rediscoverBodies: () => client.mutate("provider-rediscover", { trigger: "manual" }, true), agentSearch: (request) => client.assist("agent-search", input(request), false), supervise: (content, idempotencyKey) => client.assist("supervise", input({ content, idempotencyKey }), true), maintainBodyMetadata: (memoryBodyIds) => client.assist("body-metadata-maintain", { memoryBodyIds }, true) }; } const rememberedPages = /* @__PURE__ */ new WeakMap(); const EMPTY_BODIES = []; const TABS$1 = [ { id: "spaces", key: "nav.overview" }, { id: "explore", key: "nav.search" }, { id: "content", key: "nav.content" }, { id: "entities", key: "nav.entities" } ]; function MemorySpacesSourceView(props) { const t = useT$3(); const client = (0, react.useMemo)(() => props.management === void 0 ? void 0 : memorySpacesPageClient(props.management), [props.management]); const [revision, setRevision] = (0, react.useState)(0); const [status, setStatus] = (0, react.useState)(null); const [page, setPage] = (0, react.useState)(() => props.management !== void 0 ? rememberedPages.get(props.management) ?? (props.page === "remember" ? "spaces" : props.page) : props.page); const [seed, setSeed] = (0, react.useState)(""); const [rememberOpen, setRememberOpen] = (0, react.useState)(props.page === "remember"); const [strategyOpen, setStrategyOpen] = (0, react.useState)(false); const [error, setError] = (0, react.useState)(null); const headerRef = (0, react.useRef)(null); const revealElement = (0, react.useCallback)((element) => { props.onRevealElement?.(element, (headerRef.current?.getBoundingClientRect().height ?? 0) + 14); }, [props.onRevealElement]); const lastRefreshKey = (0, react.useRef)(props.refreshKey); const suppressRefreshEcho = (0, react.useRef)(false); const [reloads, setReloads] = (0, react.useState)(0); const notifyParentRefresh = (0, react.useCallback)(() => { if (props.onRefresh === void 0) return; suppressRefreshEcho.current = true; props.onRefresh(); setTimeout(() => { suppressRefreshEcho.current = false; }, 0); }, [props.onRefresh]); const refresh = (0, react.useCallback)(() => { setRevision((value) => value + 1); notifyParentRefresh(); }, [notifyParentRefresh]); const handleBodyReconnect = (0, react.useCallback)((body) => { setStatus((current) => current === null || current.memoryBodies === void 0 ? current : { ...current, memoryBodies: current.memoryBodies.map((item) => item.id === body.id ? body : item) }); }, []); const handleBodyMetadata = (0, react.useCallback)((updates) => { setStatus((current) => { if (current === null || current.memoryBodies === void 0) return current; const byId = new Map(updates.map((update) => [update.memoryBodyId, update])); return { ...current, memoryBodies: current.memoryBodies.map((item) => { const update = byId.get(item.id); return update === void 0 ? item : { ...item, name: update.title, description: update.description }; }) }; }); notifyParentRefresh(); }, [notifyParentRefresh]); (0, react.useEffect)(() => { if (lastRefreshKey.current === props.refreshKey) return; lastRefreshKey.current = props.refreshKey; if (suppressRefreshEcho.current) { suppressRefreshEcho.current = false; return; } setRevision((value) => value + 1); setReloads((value) => value + 1); }, [props.refreshKey]); (0, react.useEffect)(() => { setPage(props.management !== void 0 && props.navigationInput === void 0 ? rememberedPages.get(props.management) ?? (props.page === "remember" ? "spaces" : props.page) : props.page === "remember" ? "spaces" : props.page); setRememberOpen(props.page === "remember"); const value = props.navigationInput; setSeed(typeof value === "object" && value !== null && !Array.isArray(value) && typeof value.seed === "string" ? value.seed : ""); }, [props.page, props.navigationInput]); (0, react.useEffect)(() => { if (props.management !== void 0) rememberedPages.set(props.management, page); }, [props.management, page]); (0, react.useLayoutEffect)(() => { props.onResetScroll?.(); }, [page, props.onResetScroll]); (0, react.useEffect)(() => { let active = true; setError(null); client?.status().then((value) => { if (active) setStatus(value); }).catch((reason) => { if (active) setError(message(reason)); }); return () => { active = false; }; }, [client, revision]); const explore = (0, react.useCallback)((query) => { setSeed(query); setPage("explore"); }, []); const remember = (0, react.useCallback)((content = "") => { setSeed(content); setRememberOpen(true); }, []); if (client === void 0) return null; const writable = props.writable === true && status?.writeEnabled === true; const activationEnabled = status?.writeEnabled === true && (writable || client.canAssist("activation")); const agentAvailable = client.canAssist("supervise"); const forget = async (insight) => { await client.forget(insight.id, insight.memoryBodyId); refresh(); }; const bodies = status?.memoryBodies ?? EMPTY_BODIES; const preferences = props.preferences; const policySettingsAvailable = props.onOpenSettings !== void 0 && supportsSettingsSection$1("policy"); const showStrategyAction = policySettingsAvailable || preferences !== void 0; const openStrategy = () => { if (policySettingsAvailable) props.onOpenSettings("policy"); else setStrategyOpen(true); }; const onTabKeyDown = (event) => { const currentIndex = TABS$1.findIndex((tab) => tab.id === page); if (currentIndex < 0) return; let nextIndex = -1; if (event.key === "ArrowRight") nextIndex = (currentIndex + 1) % TABS$1.length; else if (event.key === "ArrowLeft") nextIndex = (currentIndex - 1 + TABS$1.length) % TABS$1.length; else if (event.key === "Home") nextIndex = 0; else if (event.key === "End") nextIndex = TABS$1.length - 1; else return; event.preventDefault(); const nextTab = TABS$1[nextIndex]; setPage(nextTab.id); event.currentTarget.querySelectorAll("[role=\"tab\"]")[nextIndex]?.focus(); }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: sidebarCss$3.memoryWorkspace, ref: headerRef, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageHeader, { title: t("nav.spaces"), description: t("overview.description"), ...writable ? {} : { meta: activationEnabled ? t("common.activationOnly") : t("common.readOnly") }, action: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$8.memoryHeaderActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: appearanceClass(css$8.primaryButton, sidebarCss$3.memoryWriteButton), disabled: !writable, onClick: () => remember(), children: t("nav.rememberAction") }), showStrategyAction && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$8.secondaryButton, onClick: openStrategy, children: t("strategy.action") })] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: sidebarCss$3.memoryNavigation, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: sidebarCss$3.memoryTabs, role: "tablist", "aria-label": t("nav.memory.aria"), onKeyDown: onTabKeyDown, children: TABS$1.map((tab) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", role: "tab", tabIndex: page === tab.id ? 0 : -1, "aria-selected": page === tab.id, "data-active": page === tab.id ? "" : void 0, onClick: () => setPage(tab.id), children: t(tab.key) }, tab.id)) }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SafeReveal, { className: css$8.workspaceErrorReveal, children: error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$8.inlineError, role: "alert", children: error }) }), page === "spaces" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OverviewPage, { active: props.active ?? true, client, metadataClient: client, revision, reloadKey: reloads, activationEnabled, writeEnabled: writable, agentAvailable, fallbackBodies: bodies, fallbackDirectory: status?.memoryBodyDirectory, catalogKnown: status?.memoryBodies !== void 0, onMutate: refresh, onAgentRefresh: refresh, onBodyReconnect: handleBodyReconnect, onBodyMetadata: handleBodyMetadata, onExplore: explore, ...props.onOpenSettings === void 0 ? {} : { onOpenSettings: props.onOpenSettings } }), page === "explore" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ExplorePage, { client, agentClient: client, agentAvailable: client.canAssist("agent-search"), status, seed, writeEnabled: writable, onForget: forget, onRevealElement: revealElement }), page === "entities" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EntitiesPage, { client, revision, writeEnabled: writable, onForget: forget, onExplore: explore }), page === "content" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ListPage, { client, revision, writeEnabled: writable, onForget: forget, onClone: (insight) => remember(insight.content), onExplore: explore }), rememberOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RememberPage, { client, agentAvailable, memoryBodies: bodies, writeEnabled: writable, seed, embeddingManaged: status?.embeddingManaged, onMutate: refresh, onClose: () => setRememberOpen(false), onView: () => { setRememberOpen(false); setPage("content"); } }), strategyOpen && preferences !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PersistenceStrategyDialog, { client, settingsScope: { setPath: async (path, value) => { if (path.length !== 1 || path[0] !== "persistenceStrategy") throw new Error("Preference path is outside this Source"); await preferences.replace(cleanJson({ persistenceStrategy: value })); } }, config: preferences.value, writable: preferences.writable, agentAvailable, onClose: () => setStrategyOpen(false) }) ] }); } function MemorySpacesSourcePage(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemorySourcePageFrame, { locale: props.locale, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemorySpacesSourceView, { ...props }, props.sourceInstanceKey) }); } function installMemorySpacesUI(ctx, t = translateEn) { return installMemorySourceUI(ctx, { sourceTypeId: "memory-spaces", pages: [ { id: "spaces", key: "nav.spaces", order: 300, glyph: "◇" }, { id: "remember", key: "nav.rememberAction", order: 400, glyph: "+" }, { id: "explore", key: "nav.search", order: 500, glyph: "⌕" }, { id: "entities", key: "nav.entities", order: 600, glyph: "◎" }, { id: "content", key: "nav.content", order: 700, glyph: "≡" } ].map((page) => ({ id: page.id, order: page.order, label: () => t(page.key), navigation: { stickyHeader: false, group: page.id === "spaces" ? "storage" : "tools", primary: page.id === "spaces", glyph: page.glyph }, component: (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemorySpacesSourcePage, { ...props, page: page.id }) })) }); } function apply$5(ctx) { installMemorySpacesUI(ctx, ctx.locale.bind("mnemon")); if (yieldsComponentSettings(extension_sdk_exports)) installMemorySpacesSettings(ctx); } // vendor/dsh-mnemon/src/client/skills-settings.tsx const SKILLS_PACKAGE = "dsh-brain-mnemon-source-skills"; const SKILLS_MANAGEMENT_INSTANCE = "skills/default"; const AUTO_MODEL = "auto"; const CREATION_ROOTS = [ "project-dsh", "project-agents", "user-dsh", "user-agents" ]; function encodeModelChoice(selection) { if (selection === null || selection === void 0) return AUTO_MODEL; const provider = selection.provider?.trim() ?? ""; const model = selection.model?.trim() ?? ""; return provider === "" || model === "" ? AUTO_MODEL : `${provider}|${model}`; } function decodeModelChoice(value) { if (value === "" || value === AUTO_MODEL) return null; const splitAt = value.indexOf("|"); if (splitAt <= 0 || splitAt >= value.length - 1) return null; return { provider: value.slice(0, splitAt), model: value.slice(splitAt + 1) }; } function normalizeMarketRegistries(payload) { return (Array.isArray(payload?.registries) ? payload.registries : []).flatMap((raw) => { const id = typeof raw?.id === "string" ? raw.id.trim() : ""; if (id === "") return []; const url = (raw.location ?? raw.url ?? "").trim(); const skillCount = typeof raw.entries === "number" ? raw.entries : typeof raw.skillCount === "number" ? raw.skillCount : 0; return [{ id, name: raw.name, label: raw.label || id, url, builtin: raw.builtin === true, enabled: raw.enabled !== false, skillCount, ...typeof raw.error === "string" && raw.error.trim() !== "" ? { error: raw.error.trim() } : {} }]; }); } function resolvedSkills(value) { return { ...DEFAULT_SKILLS_CONFIG, ...value }; } const PARAMETERS = [ { key: "reviewThreshold", min: 1, max: 50, integer: true }, { key: "idleSeconds", min: 0, max: 3600, integer: true, unit: "s" }, { key: "cooldownSeconds", min: 0, max: 86400, integer: true, unit: "s" }, { key: "minConfidence", min: 0, max: 1, integer: false }, { key: "expiryDays", min: 1, max: 90, integer: true, unit: "d" }, { key: "maxPendingPerSession", min: 1, max: 20, integer: true }, { key: "casesPerRun", min: 1, max: 20, integer: true } ]; function formatCompactTokens(text) { const value = Number(text); if (!Number.isInteger(value) || value <= 0) return text; return value >= 1024 && value % 1024 === 0 ? `${value / 1024}K` : String(value); } const DRAFT_PARAMETERS = [{ key: "draftMaxTokens", min: 128, max: 131072, integer: true }, { key: "draftRetryMaxTokens", min: 128, max: 131072, integer: true }]; const DIRECTORY_FIELDS = [{ key: "dshHome", placeholder: "~/.dsh" }, { key: "agentsHome", placeholder: "~/.agents" }]; function parameterValue(field, text) { if (text.trim() === "") return void 0; const value = Number(text); if (!Number.isFinite(value) || value < field.min || value > field.max) return void 0; return field.integer && !Number.isInteger(value) ? void 0 : value; } const parametersOf = (settings) => Object.fromEntries(PARAMETERS.map((field) => [field.key, String(settings[field.key])])); function set(key, value) { return { op: "set", path: [key], value }; } function unwrapManagementResult(result) { if (typeof result === "object" && result !== null) { if ("value" in result) return result.value; if ("payload" in result) return result.payload; } return result; } function createSkillsManagement(client) { const revisions = /* @__PURE__ */ new Map(); const aliases = /* @__PURE__ */ new Map(); let catalogInflight; const refreshCatalog = async () => { catalogInflight ??= client.sourceManagementCatalog().finally(() => { catalogInflight = void 0; }); const catalog = await catalogInflight; for (const instance of catalog.sources ?? []) revisions.set(instance.sourceInstanceKey, instance.revision); return catalog; }; const resolveAlias = async (sourceInstanceKey) => { const match = /^([a-z0-9-]+)\/default$/u.exec(sourceInstanceKey); if (match === null) return void 0; try { const target = namedToolInstance(((await refreshCatalog()).sources ?? []).filter((source) => source.sourceTypeId === match[1]), match[1]); if (target === void 0) return void 0; aliases.set(sourceInstanceKey, target.sourceInstanceKey); return target.sourceInstanceKey; } catch { return; } }; const resolveTargetKey = async (sourceInstanceKey) => { const cached = aliases.get(sourceInstanceKey); if (cached !== void 0) return cached; if (/^([a-z0-9-]+)\/default$/u.test(sourceInstanceKey)) { const resolved = await resolveAlias(sourceInstanceKey); if (resolved !== void 0) return resolved; } return sourceInstanceKey; }; const readRaw = async (targetKey, operation, input) => { const result = await client.readSourceManagement(targetKey, operation, input); if (typeof result?.revision === "string") revisions.set(targetKey, result.revision); return result; }; const mutateRaw = async (targetKey, operation, input, revision) => { const result = await client.mutateSourceManagement(targetKey, operation, input, revision, true); if (typeof result?.revision === "string") revisions.set(targetKey, result.revision); return result; }; return { async read(sourceInstanceKey, operation, input = {}) { const targetKey = await resolveTargetKey(sourceInstanceKey); try { return unwrapManagementResult(await readRaw(targetKey, operation, input)); } catch (error) { if (!/does not expose management operations|unknown source instance/iu.test(error instanceof Error ? error.message : String(error))) throw error; aliases.delete(sourceInstanceKey); const resolvedKey = await resolveAlias(sourceInstanceKey); if (resolvedKey === void 0 || resolvedKey === targetKey) throw error; return unwrapManagementResult(await readRaw(resolvedKey, operation, input)); } }, async mutate(sourceInstanceKey, operation, input = {}) { let targetKey = await resolveTargetKey(sourceInstanceKey); const resolveRevision = async (forceRefresh) => { if (!forceRefresh) { const cached = revisions.get(targetKey); if (cached !== void 0 && cached !== "") return cached; } try { const catalog = await refreshCatalog(); const direct = (catalog.sources ?? []).find((instance) => instance.sourceInstanceKey === targetKey); if (direct !== void 0) return direct.revision; const match = /^([a-z0-9-]+)\/default$/u.exec(sourceInstanceKey); if (match !== null) { const aliased = namedToolInstance((catalog.sources ?? []).filter((source) => source.sourceTypeId === match[1]), match[1]); if (aliased !== void 0) { targetKey = aliased.sourceInstanceKey; aliases.set(sourceInstanceKey, targetKey); return aliased.revision; } } } catch { return ""; } return ""; }; const revision = await resolveRevision(false); try { return unwrapManagementResult(await mutateRaw(targetKey, operation, input, revision)); } catch (error) { const text = error instanceof Error ? error.message : String(error); if (/does not expose management operations|unknown source instance/iu.test(text)) { aliases.delete(sourceInstanceKey); const resolvedKey = await resolveAlias(sourceInstanceKey); if (resolvedKey !== void 0 && resolvedKey !== targetKey) { targetKey = resolvedKey; return unwrapManagementResult(await mutateRaw(targetKey, operation, input, revisions.get(targetKey) ?? "")); } } if (!/revision/iu.test(text)) throw error; const refreshed = await resolveRevision(true); if (refreshed === "" || refreshed === revision) throw error; return unwrapManagementResult(await mutateRaw(targetKey, operation, input, refreshed)); } } }; } function SkillsSettings(props) { const { scope, page, connection, directoryPicker, t } = props; const localePreference = useLocalePreference$4(page.language); const baseId = (0, react.useId)(); const snapshot = useScope(scope); const saved = resolvedSkills(snapshot.value); const write = (key) => async (value) => { await scope.mutate([set(key, value)]); }; const evolution = useLive(saved.evolution, write("evolution")); const allowCreate = useLive(saved.allowCreate, write("allowCreate")); const allowUpdate = useLive(saved.allowUpdate, write("allowUpdate")); const linkedUpdates = useLive(saved.allowLinkedUpdates, write("allowLinkedUpdates")); const autoBacktest = useLive(saved.autoBacktest, write("autoBacktest")); const autoAdopt = useLive(saved.autoAdopt, write("autoAdopt")); const hints = useLive(saved.hints, write("hints")); const sidebar = useLive(saved.sidebar, write("sidebar")); const destination = useStaged({ targetScope: saved.targetScope }, async (draft) => { await scope.mutate([set("targetScope", draft.targetScope)]); }); const creation = useStaged({ enabled: saved.skillRoots !== void 0, create: saved.skillRoots?.create ?? ["user-dsh", "project-dsh"], default: saved.skillRoots?.default ?? "user-dsh" }, async (draft) => { await scope.mutate([draft.enabled ? { op: "set", path: ["skillRoots"], value: { create: draft.create, default: draft.default } } : { op: "unset", path: ["skillRoots"] }]); }); const creationInvalid = creation.draft.enabled && (creation.draft.create.length === 0 || !creation.draft.create.includes(creation.draft.default)) ? t("skills.roots.invalid") : null; const savedDirectories = { dshHome: saved.dshHome ?? "", agentsHome: saved.agentsHome ?? "" }; const directories = useStaged(savedDirectories, async (draft) => { const operations = []; for (const { key } of DIRECTORY_FIELDS) { const next = draft[key].trim(); if (next !== savedDirectories[key].trim()) operations.push(next === "" ? { op: "unset", path: [key] } : set(key, next)); } if (operations.length > 0) await scope.mutate(operations); }); const parameters = useStaged(parametersOf(saved), async (draft) => { const changed = PARAMETERS.filter((field) => parameterValue(field, draft[field.key]) !== saved[field.key]); if (changed.length > 0) await scope.mutate(changed.map((field) => set(field.key, parameterValue(field, draft[field.key])))); }); const draftBudgets = useStaged({ draftMaxTokens: String(saved.draftMaxTokens), draftRetryMaxTokens: String(saved.draftRetryMaxTokens) }, async (draft) => { const changed = DRAFT_PARAMETERS.filter((field) => parameterValue(field, draft[field.key]) !== saved[field.key]); if (changed.length > 0) await scope.mutate(changed.map((field) => set(field.key, parameterValue(field, draft[field.key])))); }); const adoptionBudget = useStaged({ limit: String(saved.autoAdoptDailyLimit), timeZone: saved.autoAdoptTimeZone }, async (draft) => { await scope.mutate([set("autoAdoptDailyLimit", Number(draft.limit)), set("autoAdoptTimeZone", draft.timeZone.trim())]); }); const invalidAdoption = parameterValue({ min: 0, max: 100, integer: true }, adoptionBudget.draft.limit) === void 0 || !validSkillsTimeZone(adoptionBudget.draft.timeZone.trim()); const disabled = !page.writable || snapshot.status === "loading" || !snapshot.writable; const invalid = PARAMETERS.find((field) => parameterValue(field, parameters.draft[field.key]) === void 0); const invalidDraft = DRAFT_PARAMETERS.find((field) => parameterValue(field, draftBudgets.draft[field.key]) === void 0); const canPickDirectory = directoryPicker?.available() === true; const [pickingKey, setPickingKey] = (0, react.useState)(null); const [pickerFailed, setPickerFailed] = (0, react.useState)(false); const pickSeq = (0, react.useRef)(0); (0, react.useEffect)(() => () => { pickSeq.current += 1; }, []); const pickDirectory = async (key) => { if (!canPickDirectory || disabled || directories.saving || pickingKey !== null) return; const current = ++pickSeq.current; setPickingKey(key); setPickerFailed(false); try { const picked = await directoryPicker.pick(); if (pickSeq.current === current && picked !== null) directories.edit({ [key]: picked }); } catch { if (pickSeq.current === current) setPickerFailed(true); } finally { if (pickSeq.current === current) setPickingKey(null); } }; const client = (0, react.useMemo)(() => connection === void 0 ? void 0 : new MnemonClient(connection, page.sessionId, page.workspace?.id), [ connection, page.sessionId, page.workspace?.id ]); const management = (0, react.useMemo)(() => client === void 0 ? void 0 : createSkillsManagement(client), [client]); const [modelsState, setModelsState] = (0, react.useState)({ ready: false, catalog: null, draft: AUTO_MODEL, run: AUTO_MODEL, savingSlot: null, error: null }); const [marketState, setMarketState] = (0, react.useState)({ ready: false, registries: [], busyAction: null, addInput: "", error: null }); (0, react.useEffect)(() => { if (client === void 0 || management === void 0) { setModelsState({ ready: false, catalog: null, draft: AUTO_MODEL, run: AUTO_MODEL, savingSlot: null, error: null }); setMarketState({ ready: false, registries: [], busyAction: null, addInput: "", error: null }); return; } let active = true; Promise.all([client.taskAgentModels(true).catch(() => null), management.read(SKILLS_MANAGEMENT_INSTANCE, "draft-preferences", {})]).then(([catalog, prefs]) => { if (!active) return; setModelsState({ ready: true, catalog, draft: encodeModelChoice(prefs?.model ?? prefs?.draftModel), run: encodeModelChoice(prefs?.runModel), savingSlot: null, error: null }); }, () => { if (active) setModelsState((current) => ({ ...current, ready: false })); }); management.read(SKILLS_MANAGEMENT_INSTANCE, "market", {}).then((market) => { if (!active) return; setMarketState({ ready: true, registries: normalizeMarketRegistries(market), busyAction: null, addInput: "", error: null }); }, () => { if (active) setMarketState((current) => ({ ...current, ready: false })); }); return () => { active = false; }; }, [client, management]); const modelOptions = (selectedValue) => { const listed = (modelsState.catalog?.groups ?? []).flatMap((group) => group.models.map((model) => ({ value: `${group.id}|${model.id}`, label: `${group.name} / ${model.name}` }))); const missingSelected = selectedValue !== AUTO_MODEL && !listed.some((option) => option.value === selectedValue) ? [{ value: selectedValue, label: selectedValue.replace("|", " / ") }] : []; return [ { value: AUTO_MODEL, label: t("skills.modelAuto") }, ...missingSelected, ...listed ]; }; const updateModelSlot = (slot, nextValue) => { if (management === void 0) return; const previous = modelsState[slot]; setModelsState((current) => ({ ...current, [slot]: nextValue, savingSlot: slot, error: null })); management.mutate(SKILLS_MANAGEMENT_INSTANCE, "draft-preference", { slot, model: decodeModelChoice(nextValue) }).then((updated) => { setModelsState((current) => ({ ...current, draft: updated !== void 0 && ("model" in updated || "draftModel" in updated) ? encodeModelChoice(updated.model ?? updated.draftModel) : slot === "draft" ? nextValue : current.draft, run: updated !== void 0 && "runModel" in updated ? encodeModelChoice(updated.runModel) : slot === "run" ? nextValue : current.run, savingSlot: current.savingSlot === slot ? null : current.savingSlot })); }, (reason) => { setModelsState((current) => ({ ...current, [slot]: previous, savingSlot: current.savingSlot === slot ? null : current.savingSlot, error: message(reason) })); }); }; const runMarketMutation = (busyKey, operation, input, clearInput = false) => { if (management === void 0) return; setMarketState((current) => ({ ...current, busyAction: busyKey, error: null })); management.mutate(SKILLS_MANAGEMENT_INSTANCE, operation, input).then((updated) => { if (Array.isArray(updated?.registries)) { setMarketState((current) => ({ ...current, registries: normalizeMarketRegistries(updated), busyAction: null, ...clearInput ? { addInput: "" } : {} })); return; } return management.read(SKILLS_MANAGEMENT_INSTANCE, "market", {}).then((reloaded) => { setMarketState((current) => ({ ...current, registries: normalizeMarketRegistries(reloaded), busyAction: null, ...clearInput ? { addInput: "" } : {} })); }); }).catch((reason) => { setMarketState((current) => ({ ...current, busyAction: null, error: message(reason) })); }); }; const marketRegistries = marketState.registries.map((registry) => ({ ...registry, label: (pickLocalizedText(registry.name, localePreference) || registry.label).trim() || registry.id })); const configuredDirectoriesCount = [savedDirectories.dshHome, savedDirectories.agentsHome].filter((value) => value.trim() !== "").length; const rootsBadge = saved.skillRoots !== void 0 ? t("skills.badgeCustom", { count: saved.skillRoots.create.length }) : t("skills.badgeDefault"); const parametersBadge = t("skills.parametersBadge", { threshold: parameters.draft.reviewThreshold, idle: parameters.draft.idleSeconds }); const draftBadge = `${formatCompactTokens(draftBudgets.draft.draftMaxTokens)} / ${formatCompactTokens(draftBudgets.draft.draftRetryMaxTokens)}`; const directoriesBadge = configuredDirectoriesCount > 0 ? t("skills.badgeCustom", { count: configuredDirectoriesCount }) : t("skills.badgeDefault"); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonSettingsCard_module_css_default.panelSection, "aria-label": t("skills.label"), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rows, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", { className: MnemonSettingsCard_module_css_default.settingsSubheading, children: t("skills.groupSurface") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-skills-hints", label: t("skills.hints"), hint: t("skills.hintsHint"), checked: hints.value, disabled, onChange: hints.set }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-skills-sidebar", label: t("skills.sidebar"), hint: t("skills.sidebarHint"), checked: sidebar.value, disabled, onChange: sidebar.set }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", { className: MnemonSettingsCard_module_css_default.settingsSubheading, children: t("skills.groupPlacement") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-skills-target", label: t("skills.targetScope"), hint: t("skills.targetScopeHint"), value: destination.draft.targetScope, options: [ "user", "project", "storage" ].map((value) => ({ value, label: t(`skills.targetScope.${value}`) })), disabled: disabled || destination.saving || saved.skillRoots !== void 0, onChange: (targetScope) => destination.edit({ targetScope }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: destination.dirty, saving: destination.saving, applied: destination.applied, failed: destination.failed, disabled, invalid: null, t, onDiscard: destination.discard, onApply: () => { destination.apply(); } }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AdvancedSection, { title: t("skills.roots.title"), hint: t("skills.roots.hint"), badge: rootsBadge, defaultOpen: saved.skillRoots !== void 0, section: "roots", activeSection: page.section, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rows, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-skills-roots", label: t("skills.roots.enabled"), hint: "", checked: creation.draft.enabled, disabled: disabled || creation.saving, onChange: (enabled) => creation.edit({ enabled }) }), creation.draft.enabled && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [CREATION_ROOTS.map((kind) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: `mnemon-skills-root-${kind}`, label: t(`skills.root.${kind}`), hint: "", checked: creation.draft.create.includes(kind), disabled: disabled || creation.saving, onChange: (enabled) => creation.edit({ create: enabled ? [...creation.draft.create, kind] : creation.draft.create.filter((root) => root !== kind) }) }, kind)), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-skills-root-default", label: t("skills.roots.default"), value: creation.draft.default, options: CREATION_ROOTS.map((value) => ({ value, label: t(`skills.root.${value}`) })), disabled: disabled || creation.saving, onChange: (value) => creation.edit({ default: value }) })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: creation.dirty, saving: creation.saving, applied: creation.applied, failed: creation.failed, disabled, invalid: creationInvalid, t, onDiscard: creation.discard, onApply: () => { creation.apply(); } })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-skills-linked-updates", label: t("skills.allowLinkedUpdates"), hint: t("skills.allowLinkedUpdatesHint"), checked: linkedUpdates.value, disabled, onChange: linkedUpdates.set }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", { className: MnemonSettingsCard_module_css_default.settingsSubheading, children: t("skills.groupEvolution") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-skills-evolution", label: t("skills.evolution"), hint: t("skills.evolutionHint"), checked: evolution.value, disabled, onChange: evolution.set }), evolution.value && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.evolutionGroup, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-skills-create", label: t("skills.allowCreate"), hint: t("skills.allowCreateHint"), checked: allowCreate.value, disabled, onChange: allowCreate.set }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-skills-update", label: t("skills.allowUpdate"), hint: t("skills.allowUpdateHint"), checked: allowUpdate.value, disabled, onChange: allowUpdate.set }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-skills-backtest", label: t("skills.autoBacktest"), hint: t("skills.autoBacktestHint"), checked: autoBacktest.value, disabled, onChange: autoBacktest.set }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-skills-auto-adopt", label: t("skills.autoAdopt"), hint: t("skills.autoAdoptHint"), checked: autoAdopt.value, disabled: disabled || !autoBacktest.value, onChange: autoAdopt.set }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.nestedBudgetGroup, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, { htmlFor: `${baseId}-adopt-limit`, title: t("skills.autoAdoptDailyLimit"), hint: t("skills.autoBudgetHint"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: `${baseId}-adopt-limit`, className: `${MnemonSettingsCard_module_css_default.numberInput} ${MnemonSettingsCard_module_css_default.alignedNumberInput}`, type: "number", min: 0, max: 100, step: 1, inputMode: "numeric", value: adoptionBudget.draft.limit, disabled: disabled || adoptionBudget.saving, "aria-invalid": parameterValue({ min: 0, max: 100, integer: true }, adoptionBudget.draft.limit) === void 0, onChange: (event) => adoptionBudget.edit({ limit: event.target.value }) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, { htmlFor: `${baseId}-adopt-tz`, title: t("skills.autoAdoptTimeZone"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: `${baseId}-adopt-tz`, className: MnemonSettingsCard_module_css_default.compactTextInput, type: "text", value: adoptionBudget.draft.timeZone, placeholder: "local / Asia/Shanghai", disabled: disabled || adoptionBudget.saving, "aria-invalid": !validSkillsTimeZone(adoptionBudget.draft.timeZone.trim()), onChange: (event) => adoptionBudget.edit({ timeZone: event.target.value }) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: adoptionBudget.dirty, saving: adoptionBudget.saving, applied: adoptionBudget.applied, failed: adoptionBudget.failed, disabled, t, invalid: invalidAdoption ? t("skills.autoBudgetInvalid") : null, onDiscard: adoptionBudget.discard, onApply: () => { adoptionBudget.apply(); } }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AdvancedSection, { title: t("skills.parameters"), badge: parametersBadge, section: "parameters", activeSection: page.section, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rows, children: PARAMETERS.map((field) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, { htmlFor: `${baseId}-param-${field.key}`, title: t(`skills.${field.key}`), children: field.unit !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.unitInput, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: `${baseId}-param-${field.key}`, type: "number", step: field.integer ? 1 : .05, inputMode: field.integer ? "numeric" : "decimal", value: parameters.draft[field.key], disabled, "aria-invalid": parameterValue(field, parameters.draft[field.key]) === void 0, onChange: (event) => parameters.edit({ [field.key]: event.target.value }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.unitSuffix, "aria-hidden": "true", children: field.unit })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: `${baseId}-param-${field.key}`, className: MnemonSettingsCard_module_css_default.numberInput, type: "number", step: field.integer ? 1 : .05, inputMode: field.integer ? "numeric" : "decimal", value: parameters.draft[field.key], disabled, "aria-invalid": parameterValue(field, parameters.draft[field.key]) === void 0, onChange: (event) => parameters.edit({ [field.key]: event.target.value }) }) }, field.key)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: parameters.dirty, saving: parameters.saving, applied: parameters.applied, failed: parameters.failed, disabled, t, invalid: invalid === void 0 ? null : t("skills.invalid", { field: t(`skills.${invalid.key}`), min: invalid.min, max: invalid.max }), onDiscard: parameters.discard, onApply: () => { parameters.apply(); } })] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", { className: MnemonSettingsCard_module_css_default.settingsSubheading, children: t("skills.groupGeneration") }), modelsState.ready && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.skillsSubgroup, "data-settings-section": "models", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-skills-draft-model", label: t("skills.draftModel"), hint: t("skills.draftModelHint"), value: modelsState.draft, options: modelOptions(modelsState.draft), disabled: disabled || modelsState.savingSlot === "draft", onChange: (value) => updateModelSlot("draft", value) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-skills-run-model", label: t("skills.runModel"), hint: t("skills.runModelHint"), value: modelsState.run, options: modelOptions(modelsState.run), disabled: disabled || modelsState.savingSlot === "run", onChange: (value) => updateModelSlot("run", value) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteFailure, { error: modelsState.error, t }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AdvancedSection, { title: t("skills.draftGeneration"), hint: t("skills.draftBudgetHint"), badge: draftBadge, section: "draft", activeSection: page.section, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rows, children: DRAFT_PARAMETERS.map((field) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, { htmlFor: `${baseId}-${field.key}`, title: t(`skills.${field.key}`), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.unitInput, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: `${baseId}-${field.key}`, type: "number", step: 1, min: field.min, max: field.max, inputMode: "numeric", value: draftBudgets.draft[field.key], disabled: disabled || draftBudgets.saving, "aria-invalid": parameterValue(field, draftBudgets.draft[field.key]) === void 0, onChange: (event) => draftBudgets.edit({ [field.key]: event.target.value }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.unitSuffix, "aria-hidden": "true", children: "tok" })] }) }, field.key)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: draftBudgets.dirty, saving: draftBudgets.saving, applied: draftBudgets.applied, failed: draftBudgets.failed, disabled, t, invalid: invalidDraft === void 0 ? null : t("skills.invalid", { field: t(`skills.${invalidDraft.key}`), min: invalidDraft.min, max: invalidDraft.max }), onDiscard: draftBudgets.discard, onApply: () => { draftBudgets.apply(); } })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", { className: MnemonSettingsCard_module_css_default.settingsSubheading, children: t("skills.groupSources") }), marketState.ready && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AdvancedSection, { title: t("skills.market"), badge: `${marketState.registries.filter((registry) => registry.enabled).length}/${marketState.registries.length}`, section: "market", activeSection: page.section, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.marketHeader, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.panelNote, children: t("skills.marketHint") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ActionButton, { label: t("skills.marketRefresh"), pendingLabel: t("skills.marketRefreshing"), pending: marketState.busyAction === "refresh", disabled: disabled || marketState.busyAction !== null, onClick: () => runMarketMutation("refresh", "market-refresh", {}) })] }), marketState.registries.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.panelNote, children: t("skills.marketEmpty") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.marketList, children: marketRegistries.map((registry) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.marketRow, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.marketCopy, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.marketTitle, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: registry.label }), registry.builtin && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "neutral", children: t("skills.marketBuiltin") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.marketCount, children: t("skills.marketSkillCount", { count: registry.skillCount }) }) ] }), registry.url !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: registry.url }), registry.error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.panelError, children: registry.error }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.marketControls, children: [!registry.builtin && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: disabled || marketState.busyAction !== null, "aria-label": `${t("skills.marketRemove")} · ${registry.label}`, onClick: () => runMarketMutation(`remove:${registry.id}`, "registry-remove", { id: registry.id }), children: t("skills.marketRemove") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, { className: MnemonSettingsCard_module_css_default.switch, checked: registry.enabled, label: registry.label, disabled: disabled || marketState.busyAction !== null, onChange: (enabled) => runMarketMutation(`toggle:${registry.id}`, "registry-toggle", { id: registry.id, enabled }) })] })] }, registry.id)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.marketAddRow, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { className: MnemonSettingsCard_module_css_default.directoryInput, type: "text", value: marketState.addInput, placeholder: t("skills.marketAddPlaceholder"), "aria-label": t("skills.marketAddPlaceholder"), disabled: disabled || marketState.busyAction !== null, autoComplete: "off", spellCheck: false, onChange: (event) => setMarketState((current) => ({ ...current, addInput: event.target.value, error: null })), onKeyDown: (event) => { const trimmed = marketState.addInput.trim(); if (event.key === "Enter" && trimmed !== "" && !disabled && marketState.busyAction === null) { event.preventDefault(); runMarketMutation("add", "registry-add", { location: trimmed }, true); } } }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ActionButton, { primary: true, label: t("skills.marketAdd"), pendingLabel: t("skills.marketAdding"), pending: marketState.busyAction === "add", disabled: disabled || marketState.busyAction !== null || marketState.addInput.trim() === "", onClick: () => runMarketMutation("add", "registry-add", { location: marketState.addInput.trim() }, true) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteFailure, { error: marketState.error, t }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AdvancedSection, { title: t("skills.directories"), hint: t("skills.directoriesHint"), badge: directoriesBadge, defaultOpen: configuredDirectoriesCount > 0, section: "directories", activeSection: page.section, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: `${MnemonSettingsCard_module_css_default.fieldGrid} ${MnemonSettingsCard_module_css_default.directoryFields}`, children: DIRECTORY_FIELDS.map(({ key, placeholder }) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t(`skills.${key}`), canPickDirectory ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.directoryPickerRow, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { className: MnemonSettingsCard_module_css_default.directoryInput, type: "text", value: directories.draft[key], placeholder, disabled: disabled || directories.saving, autoComplete: "off", spellCheck: false, autoCapitalize: "none", autoCorrect: "off", onChange: (event) => directories.edit({ [key]: event.target.value }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: disabled || directories.saving || pickingKey !== null, "aria-busy": pickingKey === key || void 0, "aria-label": `${t("storage.chooseDirectory")} · ${t(`skills.${key}`)}`, onClick: () => { pickDirectory(key); }, children: t("storage.chooseDirectory") })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { className: MnemonSettingsCard_module_css_default.directoryInput, type: "text", value: directories.draft[key], placeholder, disabled: disabled || directories.saving, autoComplete: "off", spellCheck: false, autoCapitalize: "none", autoCorrect: "off", onChange: (event) => directories.edit({ [key]: event.target.value }) })] }, key)) }), pickerFailed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.panelError, role: "alert", children: t("storage.pickFailed") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: directories.dirty, saving: directories.saving, applied: directories.applied, failed: directories.failed, disabled, invalid: null, t, onDiscard: directories.discard, onApply: () => { directories.apply(); } }) ] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteFailure, { error: evolution.failed ?? allowCreate.failed ?? allowUpdate.failed ?? linkedUpdates.failed ?? autoBacktest.failed ?? autoAdopt.failed ?? hints.failed ?? sidebar.failed, t })] }); } // vendor/dsh-mnemon/src/client/component-settings.tsx const RUNTIME_PACKAGE = "dsh-brain-mnemon-source-runtime"; const DOCUMENTS_PACKAGE$1 = "dsh-brain-mnemon-source-documents"; const MEMORY_SPACES_PACKAGE = "dsh-brain-mnemon-source-memory-spaces"; const THREE_TIER_PACKAGE = "dsh-brain-mnemon-strategy-default-three-tier"; function installShippedComponentSettings(ctx, services) { const { locale } = ctx; const disposers = [ installMemoryComponentUI(ctx, { packageName: RUNTIME_PACKAGE, settings: (page) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RuntimeSettings, { ...services, page }) }), installMemoryComponentUI(ctx, { packageName: DOCUMENTS_PACKAGE$1, settings: (page) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DocumentsSettings, { ...services, page }) }), installMemoryComponentFallbackUI(ctx, { packageName: MEMORY_SPACES_PACKAGE, settings: (page) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemorySpacesSettings, { ...page, ...locale === void 0 ? {} : { locale } }) }), installMemoryComponentUI(ctx, { packageName: THREE_TIER_PACKAGE, settings: (page) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ThreeTierSettings, { ...services, page }) }), ...services.skillsScope === void 0 ? [] : [installMemoryComponentUI(ctx, { packageName: SKILLS_PACKAGE, settings: (page) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillsSettings, { scope: services.skillsScope, page, connection: services.connection, directoryPicker: services.directoryPicker, t: services.t }) })] ]; return () => { for (const dispose of disposers.reverse()) dispose(); }; } const RUNTIME_LIMITS = ["userLimitBytes", "memoryLimitBytes"]; function runtimeLimitValue(text) { if (text.trim() === "") return void 0; const value = Number(text); return Number.isInteger(value) && value >= 1 && value <= RUNTIME_MEMORY_LIMIT_MAX_BYTES ? value : void 0; } const RUNTIME_MAINTENANCE_MIN_TOKENS = 128; const RUNTIME_MAINTENANCE_MAX_TOKENS = 131072; function runtimeMaintenanceTokens(text) { if (text.trim() === "") return void 0; const value = Number(text); return Number.isInteger(value) && value >= RUNTIME_MAINTENANCE_MIN_TOKENS && value <= RUNTIME_MAINTENANCE_MAX_TOKENS ? value : void 0; } function documentsLimitValue(text) { if (text.trim() === "") return void 0; const value = Number(text); return Number.isInteger(value) && value >= 1 && value <= 104857600 ? value : void 0; } function formatByteEquivalent(bytes) { if (bytes === void 0 || !Number.isFinite(bytes) || bytes <= 0) return null; const formatUnit = (value, unit) => { return `${Number.isInteger(value) ? String(value) : value.toFixed(1).replace(/\.0$/u, "")} ${unit}`; }; if (bytes >= 1048576) return formatUnit(bytes / 1048576, "MiB"); if (bytes >= 1024) return formatUnit(bytes / 1024, "KiB"); return `${bytes} B`; } function formatTokenBadge(tokens) { if (tokens === void 0 || !Number.isFinite(tokens) || tokens <= 0) return void 0; if (tokens >= 1024 && tokens % 1024 === 0) return `${tokens / 1024}K tok`; return `${tokens} tok`; } function RuntimeSettings(props) { const { scope, page, t } = props; const baseId = (0, react.useId)(); const snapshot = useScope(scope); const profile = useLive(snapshot.value?.runtimeUserScope === "global" ? "global" : "storage", async (value) => { await scope.mutate([{ op: "set", path: ["runtimeUserScope"], value }]); }); const disabled = !page.writable || snapshot.status === "loading" || !snapshot.writable; const configured = snapshot.value?.runtimeMemory; const deferred = useLive(configured?.deferLowPriority === true, async (value) => { await scope.mutate([{ op: "set", path: ["runtimeMemory", "deferLowPriority"], value }]); }); const bm25 = useLive(configured?.bm25Recall === true, async (value) => { await scope.mutate([{ op: "set", path: ["runtimeMemory", "bm25Recall"], value }]); }); const indexPush = useLive(configured?.indexPush === true, async (value) => { await scope.mutate([{ op: "set", path: ["runtimeMemory", "indexPush"], value }]); }); const inheritance = useLive(configured?.inheritToSubagents === true, async (value) => { await scope.mutate([{ op: "set", path: ["runtimeMemory", "inheritToSubagents"], value }]); }); const snapshotRefresh = useLive(configured?.snapshotRefresh === "session-start" ? "session-start" : "on-change", async (value) => { await scope.mutate([{ op: "set", path: ["runtimeMemory", "snapshotRefresh"], value }]); }); const savedLimits = { userLimitBytes: String(configured?.userLimitBytes ?? RUNTIME_MEMORY_LIMITS.user), memoryLimitBytes: String(configured?.memoryLimitBytes ?? RUNTIME_MEMORY_LIMITS.memory) }; const limits = useStaged(savedLimits, async (draft) => { const changed = RUNTIME_LIMITS.filter((key) => runtimeLimitValue(draft[key]) !== runtimeLimitValue(savedLimits[key])); if (changed.length > 0) await scope.mutate(changed.map((key) => ({ op: "set", path: ["runtimeMemory", key], value: runtimeLimitValue(draft[key]) }))); }); const savedMaintenance = String(configured?.maintenanceMaxTokens ?? 8192); const maintenance = useStaged({ maintenanceMaxTokens: savedMaintenance }, async (draft) => { const next = runtimeMaintenanceTokens(draft.maintenanceMaxTokens); if (next !== void 0 && next !== runtimeMaintenanceTokens(savedMaintenance)) await scope.mutate([{ op: "set", path: ["runtimeMemory", "maintenanceMaxTokens"], value: next }]); }); const invalid = RUNTIME_LIMITS.find((key) => runtimeLimitValue(limits.draft[key]) === void 0); const maintenanceValue = runtimeMaintenanceTokens(maintenance.draft.maintenanceMaxTokens); const invalidMaintenance = maintenanceValue === void 0; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonSettingsCard_module_css_default.panelSection, "aria-labelledby": `${baseId}-scope-heading`, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.panelHeading, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { id: `${baseId}-scope-heading`, children: t("config.runtimeSectionScope") }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rows, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { "data-settings-section": "user-scope", children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-runtime-user-scope", label: t("config.runtimeUserScopeTitle"), value: profile.value, disabled, onChange: profile.set, options: [{ value: "storage", label: t("config.runtimeUserScopeStorage"), detail: t("config.runtimeUserScopeStorageHint") }, { value: "global", label: t("config.runtimeUserScopeGlobal"), detail: t("config.runtimeUserScopeGlobalHint") }] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { "data-settings-section": "snapshot-refresh", children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-runtime-snapshot-refresh", label: t("config.runtimeSnapshotRefreshTitle"), value: snapshotRefresh.value, disabled, onChange: snapshotRefresh.set, options: [{ value: "on-change", label: t("config.runtimeSnapshotRefreshOnChange"), detail: t("config.runtimeSnapshotRefreshOnChangeHint") }, { value: "session-start", label: t("config.runtimeSnapshotRefreshSessionStart"), detail: t("config.runtimeSnapshotRefreshSessionStartHint") }] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { "data-settings-section": "inheritance", children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-runtime-inherit-subagents", label: t("config.runtimeInheritance"), hint: t("config.runtimeInheritanceHint"), checked: inheritance.value, disabled, onChange: inheritance.set }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { "data-settings-section": "deferred-runtime", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-runtime-defer-low", label: t("config.runtimeDeferred"), hint: t("config.runtimeDeferredHint"), checked: deferred.value, disabled, onChange: deferred.set }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-runtime-bm25", label: t("config.runtimeBm25RecallLabel"), ariaLabel: t("config.runtimeBm25Recall"), badge: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "info", children: t("board.experimental") }), hint: t("config.runtimeBm25RecallHint"), checked: bm25.value, disabled, onChange: bm25.set }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-runtime-index-push", label: t("config.runtimeIndexPushLabel"), ariaLabel: t("config.runtimeIndexPush"), badge: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "info", children: t("board.experimental") }), hint: t("config.runtimeIndexPushHint"), checked: indexPush.value, disabled, onChange: indexPush.set }) ] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteFailure, { error: profile.failed ?? snapshotRefresh.failed ?? inheritance.failed ?? deferred.failed ?? bm25.failed ?? indexPush.failed, t }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonSettingsCard_module_css_default.panelSection, "data-settings-section": "limits", "aria-labelledby": "mnemon-runtime-limits", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.panelHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { id: "mnemon-runtime-limits", children: t("config.runtimeLimitsTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { id: "mnemon-runtime-limits-hint", children: t("config.runtimeLimitsHint", { user: RUNTIME_MEMORY_LIMITS.user / 1024, memory: RUNTIME_MEMORY_LIMITS.memory / 1024 }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rows, children: RUNTIME_LIMITS.map((key) => { const parsed = runtimeLimitValue(limits.draft[key]); const equiv = formatByteEquivalent(parsed); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SettingRow, { htmlFor: `${baseId}-${key}`, title: t(`config.runtime.${key}`), children: [equiv !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.inputEquiv, "aria-hidden": "true", children: equiv }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: `${baseId}-${key}`, className: MnemonSettingsCard_module_css_default.numberInput, type: "number", min: "1", max: RUNTIME_MEMORY_LIMIT_MAX_BYTES, step: "1", inputMode: "numeric", value: limits.draft[key], disabled: disabled || limits.saving, "aria-describedby": "mnemon-runtime-limits-hint", "aria-invalid": parsed === void 0, onChange: (event) => limits.edit({ [key]: event.target.value }) })] }, key); }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: limits.dirty, saving: limits.saving, applied: limits.applied, failed: limits.failed, disabled, t, note: t("config.runtimeLimitsApply"), invalid: invalid === void 0 ? null : t("config.runtimeLimitInvalid", { field: t(`config.runtime.${invalid}`), max: RUNTIME_MEMORY_LIMIT_MAX_BYTES }), onDiscard: limits.discard, onApply: () => { limits.apply(); } }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AdvancedSection, { title: t("config.runtimeAdvanced"), hint: t("config.runtimeMaintenanceHint", { defaultTokens: DEFAULT_RUNTIME_MAINTENANCE_MAX_TOKENS }), badge: formatTokenBadge(maintenanceValue), section: "maintenance", activeSection: page.section, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rows, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, { htmlFor: `${baseId}-maintenance`, title: t("config.runtime.maintenanceMaxTokens"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.unitInput, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: `${baseId}-maintenance`, type: "number", min: RUNTIME_MAINTENANCE_MIN_TOKENS, max: RUNTIME_MAINTENANCE_MAX_TOKENS, step: "1", inputMode: "numeric", value: maintenance.draft.maintenanceMaxTokens, disabled: disabled || maintenance.saving, "aria-invalid": invalidMaintenance, onChange: (event) => maintenance.edit({ maintenanceMaxTokens: event.target.value }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.unitSuffix, "aria-hidden": "true", children: "tok" })] }) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: maintenance.dirty, saving: maintenance.saving, applied: maintenance.applied, failed: maintenance.failed, disabled, t, invalid: invalidMaintenance ? t("config.runtimeMaintenanceInvalid", { field: t("config.runtime.maintenanceMaxTokens"), min: RUNTIME_MAINTENANCE_MIN_TOKENS, max: RUNTIME_MAINTENANCE_MAX_TOKENS }) : null, onDiscard: maintenance.discard, onApply: () => { maintenance.apply(); } })] }) ] })] }); } function DocumentsSettings(props) { const { scope, page, t } = props; const baseId = (0, react.useId)(); const snapshot = useScope(scope); const disabled = !page.writable || snapshot.status === "loading" || !snapshot.writable; const documentsScope = useLive(snapshot.value?.documentsScope === "global" ? "global" : "storage", async (value) => { await scope.mutate([{ op: "set", path: ["documentsScope"], value }]); }); const configured = snapshot.value?.documents; const savedLimit = String(configured?.limitBytes ?? 10485760); const capacity = useStaged({ limitBytes: savedLimit }, async (draft) => { const next = documentsLimitValue(draft.limitBytes); if (next !== void 0 && next !== documentsLimitValue(savedLimit)) await scope.mutate([{ op: "set", path: ["documents"], value: { ...configured, limitBytes: next } }]); }); const parsedLimit = documentsLimitValue(capacity.draft.limitBytes); const invalid = parsedLimit === void 0; const equiv = formatByteEquivalent(parsedLimit); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonSettingsCard_module_css_default.panelSection, "data-settings-section": "documents-scope", "aria-labelledby": `${baseId}-scope-heading`, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.panelHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { id: `${baseId}-scope-heading`, children: t("config.documentsScopeSection") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("config.componentScopeSwitchHint") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rows, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-documents-modal-scope", label: t("config.documentsScopeTitle"), value: documentsScope.value, disabled, onChange: documentsScope.set, options: [{ value: "storage", label: t("config.componentScopeStorage"), detail: t("config.documentsScopeStorageHint") }, { value: "global", label: t("config.componentScopeGlobal"), detail: t("config.documentsScopeGlobalHint") }] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteFailure, { error: documentsScope.failed, t }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonSettingsCard_module_css_default.panelSection, "data-settings-section": "capacity", "aria-labelledby": "mnemon-documents-limits", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.panelHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { id: "mnemon-documents-limits", children: t("config.documentsLimitsTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { id: "mnemon-documents-limits-hint", children: t("config.documentsLimitsHint", { defaultMiB: DOCUMENTS_DEFAULT_LIMIT_BYTES / 1048576, maxMiB: DOCUMENTS_MAX_LIMIT_BYTES / 1048576 }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rows, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SettingRow, { htmlFor: `${baseId}-limit`, title: t("config.documents.limitBytes"), children: [equiv !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.inputEquiv, "aria-hidden": "true", children: equiv }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: `${baseId}-limit`, className: MnemonSettingsCard_module_css_default.numberInput, type: "number", min: "1", max: DOCUMENTS_MAX_LIMIT_BYTES, step: "1", inputMode: "numeric", value: capacity.draft.limitBytes, disabled: disabled || capacity.saving, "aria-describedby": "mnemon-documents-limits-hint", "aria-invalid": invalid, onChange: (event) => capacity.edit({ limitBytes: event.target.value }) })] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: capacity.dirty, saving: capacity.saving, applied: capacity.applied, failed: capacity.failed, disabled, t, note: t("config.documentsLimitsApply"), invalid: invalid ? t("config.documentsLimitInvalid", { field: t("config.documents.limitBytes"), max: DOCUMENTS_MAX_LIMIT_BYTES }) : null, onDiscard: capacity.discard, onApply: () => { capacity.apply(); } }) ] })] }); } const LIMITS = [ { key: "minIntervalMs", min: 5e3, max: 864e5, scale: 1e3, unit: "s" }, { key: "maxPerSession", min: 0, max: 200, scale: 1, unit: "x" }, { key: "maxContextChars", min: 1e3, max: 1e6, scale: 1, unit: "ch" }, { key: "maxTokens", min: 128, max: 131072, scale: 1, unit: "tok" } ]; function reviewOf(value) { return { ...DEFAULT_IDLE_REVIEW, ...value?.idleReview }; } const choiceOf = (review) => ({ enabled: review.enabled, silent: review.silent, runtimeMemory: review.runtimeMemory, persistWatermark: review.persistWatermark, provider: review.provider, fallback: review.fallback, agentTeams: review.agentTeams }); const limitsOf = (review) => Object.fromEntries(LIMITS.map((limit) => [limit.key, String(review[limit.key] / limit.scale)])); function limitValue(limit, text) { if (text.trim() === "") return void 0; const value = Math.round(Number(text) * limit.scale); return Number.isInteger(value) && value >= limit.min && value <= limit.max ? value : void 0; } function reviewWrite(configured, next, before) { const changed = Object.keys(next).filter((key) => next[key] !== before[key]); if (changed.length === 0) return []; return [{ op: "set", path: ["idleReview"], value: { ...configured, ...Object.fromEntries(changed.map((key) => [key, next[key]])) } }]; } function ThreeTierSettings(props) { const { scope, connection, page, t } = props; const snapshot = useScope(scope); const savedReview = reviewOf(snapshot.value); const taskAgent = useTaskAgentModel({ scope, connection, sessionId: page.sessionId, workspaceId: page.workspace?.id }); const configured = snapshot.value?.idleReview; const choice = useLive(choiceOf(savedReview), async (next) => { const operations = reviewWrite(configured, next, choiceOf(savedReview)); if (operations.length > 0) await scope.mutate(operations); }); const limits = useStaged(limitsOf(savedReview), async (draft) => { const next = Object.fromEntries(LIMITS.map((limit) => [limit.key, limitValue(limit, draft[limit.key])])); const before = Object.fromEntries(LIMITS.map((limit) => [limit.key, savedReview[limit.key]])); const operations = reviewWrite(configured, next, before); if (operations.length > 0) await scope.mutate(operations); }); const disabled = !page.writable || snapshot.status === "loading" || !snapshot.writable; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonSettingsCard_module_css_default.panelSection, "aria-labelledby": "mnemon-three-tier-background", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.panelHeading, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { id: "mnemon-three-tier-background", children: t("config.backgroundTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("config.backgroundDescription") }), taskAgent.catalog.state === "loading" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.miniSpinner, "aria-hidden": "true" }) ] }), !page.component.enabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Callout, { tone: "idle", title: t("threeTier.offNote") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rows, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskAgentModelRows, { mode: taskAgent.choosing ? "fixed" : taskAgent.route.mode, route: taskAgent.route, settled: taskAgent.settled, choosing: taskAgent.choosing, catalog: taskAgent.catalog.value, state: taskAgent.catalog.state, error: taskAgent.catalog.error, retry: taskAgent.retry, disabled, onMode: taskAgent.setMode, onRoute: taskAgent.setRoute, t }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IdleReviewRows, { choice: choice.value, limits, disabled, activeSection: page.section, onChoice: (next) => choice.set({ ...choice.value, ...next }), t })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteFailure, { error: taskAgent.failed ?? choice.failed, t }) ] }); } function IdleReviewRows(props) { const { choice, limits, t } = props; const baseId = (0, react.useId)(); const invalid = LIMITS.find((limit) => limitValue(limit, limits.draft[limit.key]) === void 0); const limitsBadge = `${limits.draft.minIntervalMs}s · ${limits.draft.maxPerSession}x`; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-idle-review", label: t("config.reviewTitle"), ariaLabel: t("config.reviewEnabled"), hint: t("config.reviewDescription"), checked: choice.enabled, disabled: props.disabled, onChange: (enabled) => props.onChoice({ enabled }) }), choice.enabled && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.evolutionGroup, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-review-silent", label: t("config.reviewSilent"), hint: t("config.reviewSilentHint"), checked: choice.silent, disabled: props.disabled, onChange: (silent) => props.onChoice({ silent }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-review-persist-watermark", label: t("config.reviewPersistWatermark"), hint: t("config.reviewPersistWatermarkHint"), checked: choice.persistWatermark, disabled: props.disabled, onChange: (persistWatermark) => props.onChoice({ persistWatermark }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-review-runtime-memory", label: t("config.reviewRuntimeMemory"), hint: t("config.reviewRuntimeMemoryHint"), checked: choice.runtimeMemory, disabled: props.disabled, onChange: (runtimeMemory) => props.onChoice({ runtimeMemory }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-review-provider", label: t("config.reviewProvider"), value: choice.provider, disabled: props.disabled, onChange: (provider) => props.onChoice({ provider }), options: [{ value: "spawn", label: t("config.reviewSpawn"), detail: t("config.reviewSpawnHint") }, { value: "fork", label: t("config.reviewFork"), detail: t("config.reviewForkHint") }] }), choice.provider === "fork" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-review-fallback", label: t("config.reviewFallback"), value: choice.fallback, disabled: props.disabled, onChange: (fallback) => props.onChoice({ fallback }), options: [{ value: "spawn", label: t("config.reviewSpawn") }, { value: "skip", label: t("config.reviewSkip") }] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-review-teams", label: t("config.reviewAgentTeams"), value: choice.agentTeams, disabled: props.disabled, onChange: (agentTeams) => props.onChoice({ agentTeams }), options: [{ value: "pause", label: t("config.reviewTeamPause"), detail: t("config.reviewTeamPauseHint") }, { value: "scoped", label: t("config.reviewTeamScoped"), detail: t("config.reviewTeamScopedHint") }] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AdvancedSection, { title: t("config.reviewLimits"), badge: limitsBadge, section: "review-limits", activeSection: props.activeSection, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rows, children: LIMITS.map((limit) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, { htmlFor: `${baseId}-${limit.key}`, title: t(`config.review.${limit.key}`), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.unitInput, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: `${baseId}-${limit.key}`, type: "number", step: "1", inputMode: "numeric", value: limits.draft[limit.key], disabled: props.disabled, "aria-invalid": limitValue(limit, limits.draft[limit.key]) === void 0, onChange: (event) => limits.edit({ [limit.key]: event.target.value }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.unitSuffix, "aria-hidden": "true", children: limit.unit })] }) }, limit.key)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: limits.dirty, saving: limits.saving, applied: limits.applied, failed: limits.failed, disabled: props.disabled, t, invalid: invalid === void 0 ? null : t("config.reviewLimitInvalid", { field: t(`config.review.${invalid.key}`), min: invalid.min / invalid.scale, max: invalid.max / invalid.scale }), onDiscard: limits.discard, onApply: () => { limits.apply(); } })] }) ] })] }); } // vendor/dsh-mnemon/src/client/MnemonReviewSection.tsx const STATUS_KEY = { pending: "review.statusPending", accepted: "review.statusAccepted", rejected: "review.statusRejected" }; const STATUS_TONE$1 = { pending: "warning", accepted: "success", rejected: "quiet" }; function brief(value, max) { const text = value.replace(/\s+/gu, " ").trim(); return text.length <= max ? text : text.slice(0, max - 1) + "…"; } function targetName(t, target) { return target === "user" ? t("review.targetUser") : t("review.targetMemory"); } function operationText(t, operation) { switch (operation.kind) { case "runtime-add": return t("review.opAdd", { target: targetName(t, operation.target), content: brief(operation.content, 160) }); case "runtime-replace": return t("review.opReplace", { target: targetName(t, operation.target), from: brief(operation.oldText, 80), to: brief(operation.content, 160) }); case "runtime-remove": return t("review.opRemove", { target: targetName(t, operation.target), text: brief(operation.oldText, 160) }); case "document-archive": return t("review.opArchive", { id: operation.documentId }); } } function stamp$1(value) { const parsed = new Date(value); return Number.isNaN(parsed.getTime()) ? value : parsed.toLocaleString(); } function MnemonReviewSection(props) { const { t } = props; const client = (0, react.useMemo)(() => props.client ?? (props.connection === void 0 ? null : new MnemonClient(props.connection, props.sessionId, props.workspaceId)), [ props.client, props.connection, props.sessionId, props.workspaceId ]); const [ledger, setLedger] = (0, react.useState)(null); const [openId, setOpenId] = (0, react.useState)(null); const [busy, setBusy] = (0, react.useState)(null); const [failed, setFailed] = (0, react.useState)(null); const [complaint, setComplaint] = (0, react.useState)(null); const [notice, setNotice] = (0, react.useState)(null); const [opinion, setOpinion] = (0, react.useState)(""); const [guidance, setGuidance] = (0, react.useState)(""); const [chosen, setChosen] = (0, react.useState)({}); const [historyOpen, setHistoryOpen] = (0, react.useState)(false); const refresh = (0, react.useCallback)(async () => { if (client === null) return; setLedger(await client.reviewLedger()); }, [client]); (0, react.useEffect)(() => { if (client === null) return; let active = true; client.reviewLedger().then((value) => { if (active) setLedger(value); }).catch((reason) => { if (active) setFailed(message(reason)); }); return () => { active = false; }; }, [client]); const submit = (id, work) => { if (client === null) return; setBusy(id); setFailed(null); setComplaint(null); setNotice(null); work(client).then(refresh).catch((reason) => setFailed(message(reason))).finally(() => setBusy(null)); }; const restOf = (entry) => { const done = entry.appliedOperations ?? []; return entry.operations.map((_operation, index) => index).filter((index) => !done.includes(index)); }; const selectionOf = (entry) => chosen[entry.id] ?? restOf(entry); const keep = (entry, next) => { setChosen((previous) => ({ ...previous, [entry.id]: next.sort((left, right) => left - right) })); }; const toggle = (entry, index) => { const current = selectionOf(entry); keep(entry, current.includes(index) ? current.filter((item) => item !== index) : [...current, index]); }; const runReconcile = () => { if (client === null) return; setBusy("reconcile"); setFailed(null); setComplaint(null); setNotice(null); client.reconcile(guidance).then(async (result) => { const parts = [result.action === "planned" ? t("review.planned", { operations: result.operations }) : t("review.none")]; if (result.guided === true) parts.push(t("review.guided")); if (result.remoteEntries !== void 0 && result.remoteEntries > 0) parts.push(t("review.remoteEntries", { count: result.remoteEntries })); setNotice(parts.join(" ")); setLedger(await client.reviewLedger()); }).catch((reason) => setFailed(message(reason))).finally(() => setBusy(null)); }; const leaveOpinion = (id) => { const text = opinion.trim(); if (text === "") return; submit(id, (api) => api.reviewOpinion(id, text).then(() => { setOpinion(""); setNotice(t("review.opinionAdded")); })); }; const apply = (entry) => { const selection = selectionOf(entry); if (selection.length === 0) { setComplaint(t("review.noSelection")); return; } submit(entry.id, (api) => api.applyReview(entry.id, selection).finally(() => props.onApplied?.()).then((result) => { setNotice(t("review.applied", { count: result.applied })); setChosen((previous) => { const next = { ...previous }; delete next[entry.id]; return next; }); })); }; const entries = ledger?.entries ?? []; const pending = ledger?.pending ?? 0; const finished = (entry) => (entry.appliedOperations ?? []).length >= entry.operations.length; const history = entries.filter((entry) => entry.status === "accepted" && (finished(entry) || entry.appliedAt !== void 0 && entry.appliedOperations === void 0)); const current = entries.filter((entry) => !history.includes(entry)); const renderEntry = (entry) => { const open = openId === entry.id; const selection = selectionOf(entry); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.reviewEntry, "data-status": entry.status, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.reviewTitle, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: entry.title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: STATUS_TONE$1[entry.status], children: t(STATUS_KEY[entry.status]) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rowActions, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", onClick: () => { setOpenId(open ? null : entry.id); }, children: open ? t("review.collapse") : t("review.expand") }), entry.status === "pending" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: busy !== null, onClick: () => { submit(entry.id, (api) => api.decideReview(entry.id, "accepted")); }, children: t("review.accept") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: busy !== null, onClick: () => { submit(entry.id, (api) => api.decideReview(entry.id, "rejected")); }, children: t("review.reject") })] }), entry.status === "accepted" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: busy !== null || props.disabled, onClick: () => { apply(entry); }, children: busy === entry.id ? t("review.applying") : selection.length > 0 && selection.length < restOf(entry).length ? t("review.applyCount", { count: selection.length }) : t("review.apply") }), entry.status !== "pending" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: busy !== null, onClick: () => { submit(entry.id, (api) => api.reopenReview(entry.id)); }, children: t("review.reopen") }) ] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("review.meta", { count: entry.operations.length, machine: entry.machine.label, time: stamp$1(entry.createdAt) }) }), entry.foreignMachines.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("review.foreign", { machines: entry.foreignMachines.join(", ") }) }), entry.appliedAt !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: MnemonSettingsCard_module_css_default.syncSuccess, children: t("review.appliedAt", { time: stamp$1(entry.appliedAt) }) }), (entry.appliedOperations ?? []).length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("review.appliedCount", { count: (entry.appliedOperations ?? []).length, total: entry.operations.length }) }), entry.failure !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.error, role: "alert", children: t("review.applyFailed", { error: entry.failure }) }), entry.status === "rejected" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("review.rejectedHint") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: open && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.reviewDetails, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: entry.summary }), entry.status === "accepted" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.reviewSelection, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("review.selectHint") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rowActions, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.reviewSelected, children: t("review.selected", { count: selection.length, total: restOf(entry).length }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: busy !== null, onClick: () => { keep(entry, restOf(entry)); }, children: t("review.selectAll") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: busy !== null, onClick: () => { keep(entry, []); }, children: t("review.selectNone") }) ] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", { className: MnemonSettingsCard_module_css_default.reviewOperations, children: entry.operations.map((operation, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { "data-applied": (entry.appliedOperations ?? []).includes(index), children: [(entry.appliedOperations ?? []).includes(index) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: operationText(t, operation) }) : entry.status === "accepted" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, { className: MnemonSettingsCard_module_css_default.reviewOperationCheckbox, checked: selection.includes(index), disabled: busy !== null, label: operationText(t, operation), onChange: () => { toggle(entry, index); } }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: operationText(t, operation) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: operation.reason })] }, index)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.reviewOpinions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("review.opinions") }), entry.opinions.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("review.noOpinions") }) : entry.opinions.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: item.author === "agent" ? t("review.authorAgent") : t("review.authorUser") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: item.text })] }, item.id))] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.reviewOpinionForm, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "text", value: opinion, placeholder: t("review.opinionPlaceholder"), "aria-label": t("review.opinions"), disabled: busy !== null, onChange: (event) => setOpinion(event.target.value) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: busy !== null || opinion.trim() === "", onClick: () => { leaveOpinion(entry.id); }, children: t("review.opinionSend") })] }) ] }) }) ] }, entry.id); }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncRow, role: "group", "aria-labelledby": "mnemon-review-heading", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, { title: t("config.reconcileTitle"), titleId: "mnemon-review-heading", hint: t("config.reconcileDescription"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rowActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: props.disabled || client === null || busy !== null, onClick: runReconcile, children: busy === "reconcile" ? t("review.reconciling") : t("review.reconcile") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: client === null || busy !== null, onClick: () => { submit("load", refresh); }, children: t("review.refresh") })] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.reviewGuidance, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", { htmlFor: "mnemon-review-guidance", children: t("review.guidanceLabel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: "mnemon-review-guidance", type: "text", value: guidance, placeholder: t("review.guidancePlaceholder"), disabled: busy !== null, onChange: (event) => setGuidance(event.target.value) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("review.guidanceHint") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.syncState, "aria-live": "polite", children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: pending === 0 ? t("review.empty") : t("review.pending", { count: pending }) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: complaint !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.error, role: "alert", children: complaint }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: failed !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.error, role: "alert", children: t("review.failed", { error: failed }) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: notice !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncSuccess, role: "status", children: notice }) }), history.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rowActions, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", onClick: () => { setHistoryOpen(true); }, children: t("review.history", { count: history.length }) }) }), current.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.reviewList, children: current.map(renderEntry) }), historyOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonDialog, { title: t("review.historyTitle"), closeLabel: t("common.close"), busy: busy !== null, onClose: () => { setHistoryOpen(false); }, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncDialogBody, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("review.historyHint") }), history.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("review.historyEmpty") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.reviewList, children: history.map(renderEntry) })] }) }) ] }); } // vendor/dsh-mnemon/src/client/MnemonSyncDialogs.tsx const HISTORY_PAGE = 20; const SHOWN_CONFLICTS = 5; function componentCount(t, component, count) { if (component === "runtime") return t("config.syncCountRuntime", { count }); if (component === "documents") return t("config.syncCountDocuments", { count }); return t("config.syncCountSpaces", { count }); } function componentName(t, component) { if (component === "runtime") return t("config.syncComponentRuntime"); if (component === "documents") return t("config.syncComponentDocuments"); return t("config.syncComponentSpaces"); } function clip(value, max) { const text = value.replace(/\s+/gu, " ").trim(); return text.length <= max ? text : text.slice(0, max - 1) + "…"; } const AUTOMATIC_MESSAGE = /^Mnemon sync \d{4}-\d{2}-\d{2}T[\d:.]+Z$/u; function summaryLine(t, summary) { return summary.map((entry) => componentCount(t, entry.component, entry.items)).join(" · "); } function SyncHistoryDialog({ client, repoUrl, credential, t, onClose }) { const [history, setHistory] = (0, react.useState)(null); const [busy, setBusy] = (0, react.useState)(true); const [failed, setFailed] = (0, react.useState)(null); const [capped, setCapped] = (0, react.useState)(false); const load = (0, react.useCallback)(async (limit) => { setBusy(true); setFailed(null); try { const page = await client.syncBackups(limit); setHistory((current) => { if (current === null || limit === void 0) return page; const fresh = page.commits.filter((commit) => !current.commits.some((held) => held.commit === commit.commit)); if (fresh.length === 0) setCapped(true); return { ...page, commits: [...current.commits, ...fresh] }; }); } catch (reason) { setFailed(failureText(t, reasonOf(reason), message(reason), repoUrl, credential)); } finally { setBusy(false); } }, [ client, repoUrl, credential, t ]); (0, react.useEffect)(() => { load(); }, [load]); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonDialog, { title: t("config.syncHistory"), description: t("config.syncHistoryHint"), closeLabel: t("common.close"), wide: true, busy, contentReady: history !== null || failed !== null, onClose, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncDialogBody, children: [ history === null && failed === null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncDialogNote, role: "status", children: t("config.syncHistoryLoading") }), failed !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.error, role: "alert", children: failed }), history !== null && history.commits.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncDialogNote, children: t("config.syncHistoryEmpty") }), history !== null && history.commits.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", { className: MnemonSettingsCard_module_css_default.syncHistoryList, children: history.commits.map((commit) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { className: MnemonSettingsCard_module_css_default.syncHistoryEntry, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncHistoryHead, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: when(commit.pushedAt ?? commit.committedAt) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("config.syncHistoryFrom", { machine: commit.machine === void 0 ? t("config.syncHistoryUnknownMachine") : commit.machine.label.trim() || commit.machine.id }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "quiet", children: commit.commit.slice(0, 8) }) ] }), commit.components.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: summaryLine(t, commit.components) }), !AUTOMATIC_MESSAGE.test(commit.message) && commit.message.trim() !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: MnemonSettingsCard_module_css_default.syncHistoryMessage, children: commit.message }) ] }, commit.commit)) }), capped && history !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncDialogNote, children: t("config.syncHistoryCapped", { count: history.commits.length }) }), history?.truncated === true && !capped && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rowActions, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: busy, onClick: () => void load(history.commits.length + HISTORY_PAGE), children: busy ? t("config.syncHistoryLoading") : t("config.syncHistoryMore") }) }) ] }) }); } function SyncCompareDialog({ client, repoUrl, credential, writable, t, onClose, onSync, onChanged }) { const [preview, setPreview] = (0, react.useState)(null); const [difference, setDifference] = (0, react.useState)(null); const [busy, setBusy] = (0, react.useState)("read"); const [failed, setFailed] = (0, react.useState)(null); const [empty, setEmpty] = (0, react.useState)(false); const [notice, setNotice] = (0, react.useState)(null); const [showConflicts, setShowConflicts] = (0, react.useState)(false); const read = (0, react.useCallback)(async () => { setBusy("read"); setFailed(null); setEmpty(false); try { const nextPreview = await client.previewSync(); const nextDifference = await client.syncDiff(); setPreview(nextPreview); setDifference(nextDifference); } catch (reason) { setPreview(null); setDifference(null); setEmpty(reasonOf(reason) === "remote-empty"); setFailed(failureText(t, reasonOf(reason), message(reason), repoUrl, credential)); } finally { setBusy(null); } }, [ client, repoUrl, credential, t ]); (0, react.useEffect)(() => { read(); }, [read]); const merge = async (revive) => { if (busy !== null) return; setBusy(revive ? "revive" : "merge"); setFailed(null); setNotice(null); let failure = null; try { const result = await client.pullSync(void 0, revive); const added = result.runtime?.added ?? 0; setNotice((revive ? t("config.syncCompareRevived", { count: added }) : added > 0 ? t("config.syncMergedCount", { count: added }) : t("config.syncMerged", { commit: result.commit.slice(0, 8) })) + runtimeArchiveNotice(t, result.runtime?.archived)); } catch (reason) { failure = failureText(t, reasonOf(reason), message(reason), repoUrl, credential); } finally { setBusy(null); } onChanged(); await read(); if (failure !== null) setFailed(failure); }; const sync = async () => { if (busy !== null) return; setBusy("sync"); setFailed(null); setNotice(null); const failure = await onSync(); setBusy(null); if (failure === null) { onClose(); return; } await read(); setFailed(failure); }; const goToReview = () => { onClose(); const heading = document.getElementById("mnemon-review-heading"); if (heading !== null && typeof heading.scrollIntoView === "function") heading.scrollIntoView({ block: "start", behavior: "smooth" }); }; const conflicts = difference?.conflicts ?? []; const conflicted = new Set(conflicts.flatMap((conflict) => [conflict.target + "\0" + conflict.local.content, conflict.target + "\0" + conflict.remote.content])); const heldBack = difference?.heldBack ?? 0; const removals = difference?.remoteTombstones.length ?? 0; const remoteOnly = difference === null ? 0 : Math.max(difference.remoteOnly.filter((entry) => !conflicted.has(entry.target + "\0" + entry.content)).length - heldBack, 0); const localOnly = difference === null ? 0 : Math.max(difference.localOnly.filter((entry) => !conflicted.has(entry.target + "\0" + entry.content)).length - removals, 0); const differs = (component) => preview?.components.find((entry) => entry.component === component)?.changed === true; const runtimeDiffers = remoteOnly + localOnly + conflicts.length > 0; const anything = runtimeDiffers || removals + heldBack > 0 || differs("documents") || differs("memory-spaces"); const mergeable = remoteOnly + conflicts.length + removals > 0 || differs("documents") || differs("memory-spaces"); const ready = preview !== null && difference !== null; const machine = difference?.remote.machine === void 0 ? t("config.syncHistoryUnknownMachine") : difference.remote.machine.label.trim() || difference.remote.machine.id; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonDialog, { title: t("config.syncCompareTitle"), closeLabel: t("common.close"), wide: true, busy: busy !== null && busy !== "read", contentReady: ready || failed !== null, onClose, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: busy !== null || !writable || !ready || !mergeable, onClick: () => void merge(false), children: busy === "merge" ? t("config.syncMerging") : t("config.syncMergeOnly") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: busy !== null || !writable || !(ready || empty), onClick: () => void sync(), children: busy === "sync" ? t("config.syncNowRunning") : t("config.syncNow") })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncDialogBody, children: [ busy === "read" && !ready && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncDialogNote, role: "status", children: t("config.syncCompareLoading") }), failed !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.error, role: "alert", children: failed }), notice !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncSuccess, role: "status", children: notice }), ready && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncDialogNote, children: t("config.syncCompareRemote", { machine, time: when(difference.pushedAt ?? preview.pushedAt) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("ul", { className: MnemonSettingsCard_module_css_default.syncCompareList, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: componentName(t, "runtime") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { "data-differs": runtimeDiffers || void 0, children: runtimeDiffers ? [t("config.syncCompareRuntime", { remote: remoteOnly, local: localOnly }), ...conflicts.length > 0 ? [t("config.syncCompareConflicts", { count: conflicts.length })] : []].join(" · ") : t("config.syncCompareSame") })] }), ["documents", "memory-spaces"].map((component) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: componentName(t, component) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { "data-differs": differs(component) || void 0, children: differs(component) ? t("config.syncCompareDiffers") : t("config.syncCompareSame") })] }, component))] }), !anything && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncDialogNote, children: t("config.syncCompareAllSame") }), difference.truncated && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncDialogNote, children: t("config.syncCompareTruncated") }), removals > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncDialogNote, children: t("config.syncCompareRemovals", { count: removals }) }), conflicts.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncCompareNote, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncDialogNote, children: t("config.syncCompareConflictNote", { count: conflicts.length }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rowActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", "aria-expanded": showConflicts, onClick: () => setShowConflicts((value) => !value), children: showConflicts ? t("review.collapse") : t("config.syncCompareShowConflicts") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", onClick: goToReview, children: t("config.syncCompareGoReview") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: showConflicts && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { className: MnemonSettingsCard_module_css_default.syncConflictList, children: conflicts.slice(0, SHOWN_CONFLICTS).map((conflict) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { className: MnemonSettingsCard_module_css_default.syncConflict, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("config.syncDiffHere") }), clip(conflict.local.content, 240)] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("config.syncDiffThere") }), clip(conflict.remote.content, 240)] })] }, conflict.target + "\0" + conflict.local.content)) }) }) ] }), heldBack > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncCompareNote, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncDialogNote, children: t("config.syncCompareHeldBack", { count: heldBack }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rowActions, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: busy !== null || !writable, onClick: () => void merge(true), children: busy === "revive" ? t("config.syncCompareReviving") : t("config.syncCompareRevive") }) })] }) ] }) ] }) }); } function SyncConfirmDialog(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonDialog, { title: props.title, closeLabel: props.t("common.close"), busy: props.busy === true, onClose: props.onClose, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: props.busy === true, onClick: props.onClose, children: props.t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: props.busy === true, onClick: props.onConfirm, children: props.confirm })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncDialogBody, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncDialogNote, children: props.body }), props.error !== void 0 && props.error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.error, role: "alert", children: props.error })] }) }); } // vendor/dsh-mnemon/src/client/sync-feedback.tsx function FeedbackLine({ value }) { if (value === null) return null; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: [MnemonSettingsCard_module_css_default.syncFeedbackLine, value.tone === "error" ? MnemonSettingsCard_module_css_default.error : MnemonSettingsCard_module_css_default.syncSuccess].join(" "), role: value.tone === "error" ? "alert" : "status", children: value.text }); } // vendor/dsh-mnemon/src/client/MnemonSyncRepositoryPicker.tsx const SHOWN_REPOSITORIES = 50; function RepositoryPicker({ client, login, current, disabled, creating, t, onChoose, onCreate, onSignInAgain }) { const [repositories, setRepositories] = (0, react.useState)(null); const [loading, setLoading] = (0, react.useState)(false); const [failed, setFailed] = (0, react.useState)(null); const [query, setQuery] = (0, react.useState)(""); const [confirming, setConfirming] = (0, react.useState)(null); const load = (0, react.useCallback)(async () => { setLoading(true); setFailed(null); try { setRepositories((await client.githubRepositories()).repositories); } catch (reason) { const expired = reasonOf(reason) === "github-unauthorized"; setFailed({ text: expired ? t("config.syncGitHubExpiredGrant") : t("config.syncRepositoriesFailed", { error: message(reason) }), expired }); } finally { setLoading(false); } }, [client, t]); (0, react.useEffect)(() => { load(); }, [load]); const needle = query.trim().toLowerCase(); const matches = (repositories ?? []).filter((repository) => needle === "" || repository.fullName.toLowerCase().includes(needle)); const exact = (repositories ?? []).some((repository) => repository.name.toLowerCase() === needle && (login === void 0 || repository.owner.toLowerCase() === login.toLowerCase())); const creatable = needle !== "" && !exact && repositoryNameValid(query) && !query.includes("/"); const pick = (repository) => { if (!repository.private) { setConfirming(repository); return; } onChoose(repository); }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncPicker, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.fieldGrid, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("config.syncRepositoryLabel"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "search", value: query, "aria-label": t("config.syncRepositorySearch"), placeholder: t("config.syncRepositorySearch"), disabled, autoComplete: "off", spellCheck: false, autoCapitalize: "none", autoCorrect: "off", onChange: (event) => setQuery(event.target.value) })] }) }), loading && repositories === null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.editorNote, role: "status", children: t("config.syncRepositoriesLoading") }), failed !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncWarning, role: "alert", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: failed.text }), failed.expired ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", onClick: onSignInAgain, children: t("config.syncGitHubSignInAgain") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: loading, onClick: () => void load(), children: t("config.syncRepositoriesRetry") })] }), repositories !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("ul", { className: MnemonSettingsCard_module_css_default.syncRepositoryList, "aria-label": t("config.syncRepositoryLabel"), children: [ creatable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonSettingsCard_module_css_default.syncRepositoryOption, disabled, onClick: () => void onCreate(query.trim()), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: creating ? t("config.syncRepositoryCreating") : t("config.syncRepositoryCreate", { name: (login === void 0 ? "" : login + "/") + query.trim() }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "quiet", children: t("config.syncRepositoryPrivate") })] }) }), matches.slice(0, SHOWN_REPOSITORIES).map((repository) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonSettingsCard_module_css_default.syncRepositoryOption, disabled: disabled || !repository.push, "aria-current": repository.url === current ? "true" : void 0, onClick: () => pick(repository), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: repository.fullName }), repository.url === current && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "outline", children: t("config.syncRepositoryCurrent") }), !repository.push && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "quiet", children: t("config.syncRepositoryNoPush") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "quiet", children: repository.private ? t("config.syncRepositoryPrivate") : t("config.syncRepositoryPublic") }) ] }) }, repository.fullName)), matches.length === 0 && !creatable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { className: MnemonSettingsCard_module_css_default.editorNote, children: needle === "" ? t("config.syncRepositoriesNone") : t("config.syncRepositoriesEmpty") }), matches.length > SHOWN_REPOSITORIES && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { className: MnemonSettingsCard_module_css_default.editorNote, children: t("config.syncRepositoriesMore", { count: matches.length - SHOWN_REPOSITORIES }) }) ] }), needle !== "" && !creatable && !exact && !repositoryNameValid(query) && !query.includes("/") && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.error, children: t("config.syncRepositoryNameInvalid") }), confirming !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SyncConfirmDialog, { title: t("config.syncPublicTitle"), body: t("config.syncPublicBody", { name: confirming.fullName }), confirm: t("config.syncPublicConfirm"), t, onClose: () => setConfirming(null), onConfirm: () => { const repository = confirming; setConfirming(null); onChoose(repository); } }) ] }); } // vendor/dsh-mnemon/src/client/MnemonSyncGitHubConnect.tsx function GitHubConnect(props) { const { client, github, disabled, cancellable, t, onGitHub, onReadGitHub, onCancel, onConnected } = props; const [busy, setBusy] = (0, react.useState)(null); const [failed, setFailed] = (0, react.useState)(null); const [copied, setCopied] = (0, react.useState)(false); const [pollTick, setPollTick] = (0, react.useState)(0); const [pollMs, setPollMs] = (0, react.useState)(5e3); const flow = github.flow; const signedIn = github.signedIn; const start = async () => { if (busy !== null) return; setBusy("start"); setFailed(null); setCopied(false); try { const next = await client.githubStart(); onGitHub(next); setPollMs(next.flow?.intervalMs ?? 5e3); setPollTick(0); } catch (reason) { setFailed(t("config.syncGitHubFailed", { error: message(reason) })); } finally { setBusy(null); } }; const cancel = async () => { if (busy !== null) return; setBusy("cancel"); setFailed(null); try { onGitHub(await client.githubCancel()); } catch (reason) { setFailed(message(reason)); } finally { setBusy(null); } }; const signOut = async () => { if (busy !== null) return; setBusy("signout"); setFailed(null); try { onGitHub(await client.githubSignOut()); } catch (reason) { setFailed(message(reason)); } finally { setBusy(null); } }; const signInAgain = async () => { await signOut(); await start(); }; const copyAndOpen = async () => { if (flow === void 0) return; const copying = (0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(flow.userCode).catch(() => false); const opened = window.open(flow.verificationUri, "_blank"); if (opened !== null) opened.opener = null; setCopied(await copying); if (opened === null) setFailed(t("config.syncGitHubOpenBlocked", { url: flow.verificationUri })); }; (0, react.useEffect)(() => { if (flow === void 0 || signedIn) return; let active = true; const timer = setTimeout(() => { (async () => { try { const answer = await client.githubPoll(); if (!active) return; setFailed(null); if (answer.status === "pending") { if (answer.intervalMs !== void 0) setPollMs(answer.intervalMs); setPollTick((current) => current + 1); return; } await onReadGitHub(); if (!active) return; if (answer.status === "expired") setFailed(t("config.syncGitHubExpired")); else if (answer.status === "denied") setFailed(t("config.syncGitHubDenied")); else if (answer.status === "error") setFailed(t("config.syncGitHubFailed", { error: answer.message ?? "" })); } catch (reason) { if (active) { setFailed(message(reason)); setPollTick((current) => current + 1); } } })(); }, Math.max(pollMs, 1e3)); return () => { active = false; clearTimeout(timer); }; }, [ client, flow?.userCode, signedIn, pollMs, pollTick, onReadGitHub, t ]); const choose = async (repository) => { setBusy("choose"); setFailed(null); try { await client.configureSync({ repoUrl: repository.url, token: null }); await onConnected(); } catch (reason) { setFailed(message(reason)); } finally { setBusy(null); } }; const create = async (name) => { setBusy("create"); setFailed(null); try { const created = await client.githubCreateRepository(name, true); await client.configureSync({ repoUrl: created.url, token: null }); await onConnected(); } catch (reason) { setFailed(failureText(t, reasonOf(reason), message(reason), "")); } finally { setBusy(null); } }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ !signedIn && flow === void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.editorNote, children: github.writable ? t("config.syncGitHubHint") : t("config.syncGitHubReadOnly") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rowActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: disabled || !github.writable || busy !== null, onClick: () => void start(), children: busy === "start" ? t("config.syncGitHubStarting") : t("config.syncGitHubSignIn") }), cancellable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: busy !== null, onClick: onCancel, children: t("common.cancel") })] })] }), !signedIn && flow !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncDevice, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.editorNote, children: t("config.syncGitHubCode") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncCode, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: flow.userCode }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", onClick: () => void copyAndOpen(), children: t("config.syncGitHubCopyOpen") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: busy !== null, onClick: () => void cancel(), children: t("common.cancel") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.editorNote, role: "status", children: copied ? t("config.syncGitHubCopied") : t("config.syncGitHubWaiting") }) ] }), signedIn && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncAccount, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: github.login === void 0 ? t("config.syncViaGitHubAnonymous") : t("config.syncGitHubSignedIn", { login: github.login }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: disabled || busy !== null, onClick: () => void signOut(), children: t("config.syncGitHubSignOut") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RepositoryPicker, { client, login: github.login, current: props.status.config.repoUrl, disabled: disabled || busy !== null, creating: busy === "create", t, onChoose: choose, onCreate: create, onSignInAgain: () => void signInAgain() }), cancellable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rowActions, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: busy !== null, onClick: onCancel, children: t("common.cancel") }) }) ] }), failed !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.error, role: "alert", children: failed }) ] }); } // vendor/dsh-mnemon/src/client/MnemonSyncAdvancedSettings.tsx function AdvancedSettings({ client, status, disabled, t, onSaved }) { const [open, setOpen] = (0, react.useState)(false); const config = status.config; const savedMode = authorModeOf(config.authorName, config.authorEmail); const [branch, setBranch] = (0, react.useState)(config.branch); const [subdir, setSubdir] = (0, react.useState)(config.subdir); const [mode, setMode] = (0, react.useState)(savedMode); const [name, setName] = (0, react.useState)(savedMode === "custom" ? config.authorName : ""); const [email, setEmail] = (0, react.useState)(savedMode === "custom" ? config.authorEmail : ""); const savedLabel = status.machine?.label ?? ""; const savedSource = status.machineLabel?.source ?? "hostname"; const hostname = status.machineLabel?.hostname ?? savedLabel; const [nameSource, setNameSource] = (0, react.useState)(savedSource); const [machineName, setMachineName] = (0, react.useState)(savedSource === "custom" ? savedLabel : ""); const [busy, setBusy] = (0, react.useState)(false); const [feedback, setFeedback] = (0, react.useState)(null); const radio = (0, react.useId)(); const nameRadio = (0, react.useId)(); (0, react.useEffect)(() => { setBranch(config.branch); setSubdir(config.subdir); const next = authorModeOf(config.authorName, config.authorEmail); setMode(next); setName(next === "custom" ? config.authorName : ""); setEmail(next === "custom" ? config.authorEmail : ""); }, [ config.branch, config.subdir, config.authorName, config.authorEmail ]); (0, react.useEffect)(() => { setNameSource(savedSource); setMachineName(savedSource === "custom" ? savedLabel : ""); }, [savedSource, savedLabel]); const author = mode === "default" ? { authorName: MNEMON_SYNC_DEFAULT_AUTHOR_NAME, authorEmail: MNEMON_SYNC_DEFAULT_AUTHOR_EMAIL } : mode === "machine" ? { authorName: "", authorEmail: "" } : { authorName: name.trim(), authorEmail: email.trim() }; const branchOk = branchValid(branch); const subdirOk = directoryValid(subdir); const authorChanged = author.authorName !== config.authorName || author.authorEmail !== config.authorEmail; const customOk = mode !== "custom" || !authorChanged || name.trim() !== "" && emailValid(email); const normalizedSubdir = subdir.trim().replaceAll("\\", "/").split("/").filter((part) => part !== "").join("/") + "/"; const moved = branch.trim() !== config.branch || normalizedSubdir !== config.subdir; const nameOk = nameSource === "hostname" || machineNameValid(machineName); const renamed = nameSource !== savedSource || nameSource === "custom" && machineName.trim() !== savedLabel; const ready = (moved || renamed || author.authorName !== config.authorName || author.authorEmail !== config.authorEmail) && branchOk && subdirOk && customOk && nameOk; const shownName = nameSource === "hostname" ? hostname : machineName.trim(); const save = async () => { if (!ready || busy) return; setBusy(true); setFeedback(null); try { await client.configureSync({ branch: branch.trim(), subdir: subdir.trim(), ...author, ...renamed ? { machineLabel: nameSource === "hostname" ? null : machineName.trim() } : {} }); setFeedback({ tone: "success", text: t("config.syncAdvancedSaved") }); onSaved(); } catch (reason) { setFeedback({ tone: "error", text: message(reason) }); } finally { setBusy(false); } }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncAdvanced, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonSettingsCard_module_css_default.syncDisclosure, "aria-expanded": open, onClick: () => setOpen((value) => !value), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("config.syncAdvanced") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: [ savedLabel, config.branch, config.subdir, savedMode === "default" ? t("config.syncAuthorDefault") : savedMode === "machine" ? t("config.syncAuthorMachine") : config.authorName || config.authorEmail || t("config.syncAuthorCustom") ].filter((part) => part !== "").join(" · ") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { className: MnemonSettingsCard_module_css_default.providerChevron, size: 14 }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: open && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.editor, children: [ status.machine !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncChoice, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.syncFieldLabel, id: nameRadio + "-label", children: t("config.syncMachineName") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.inlineChoices, role: "radiogroup", "aria-labelledby": nameRadio + "-label", children: ["hostname", "custom"].map((value) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "radio", name: nameRadio, value, checked: nameSource === value, disabled: disabled || busy, onChange: () => setNameSource(value) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: value === "hostname" ? t("config.syncMachineHostname") : t("config.syncMachineCustom") })] }, value)) }), nameSource === "custom" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.fieldGrid, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [ t("config.syncMachineNameLabel"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "text", value: machineName, "aria-label": t("config.syncMachineName"), disabled: disabled || busy, "aria-invalid": machineName.trim() === "" || nameOk ? void 0 : true, autoComplete: "off", spellCheck: false, onChange: (event) => setMachineName(event.target.value) }), machineName.trim() !== "" && !nameOk && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: MnemonSettingsCard_module_css_default.error, children: t("config.syncMachineNameInvalid") }) ] }) }), (nameSource === "hostname" || nameOk) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.editorNote, children: nameSource === "hostname" ? t("config.syncMachineHostnameNote", { name: shownName }) : t("config.syncMachineCustomNote", { name: shownName }) }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.fieldGrid, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [ t("config.syncBranch"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "text", value: branch, "aria-label": t("config.syncBranch"), disabled: disabled || busy, "aria-invalid": branchOk ? void 0 : true, autoComplete: "off", spellCheck: false, autoCapitalize: "none", autoCorrect: "off", onChange: (event) => setBranch(event.target.value) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: branchOk ? t("config.syncDefaultValue", { value: "mnemon-sync" }) : t("config.syncBranchInvalid") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [ t("config.syncSubdir"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "text", value: subdir, "aria-label": t("config.syncSubdir"), disabled: disabled || busy, "aria-invalid": subdirOk ? void 0 : true, autoComplete: "off", spellCheck: false, autoCapitalize: "none", autoCorrect: "off", onChange: (event) => setSubdir(event.target.value) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: subdirOk ? t("config.syncDefaultValue", { value: "mnemon/" }) : t("config.syncSubdirInvalid") }) ] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncChoice, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.syncFieldLabel, id: radio + "-label", children: t("config.syncAuthor") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.inlineChoices, role: "radiogroup", "aria-labelledby": radio + "-label", children: [ "default", "machine", "custom" ].map((value) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "radio", name: radio, value, checked: mode === value, disabled: disabled || busy, onChange: () => setMode(value) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: value === "default" ? t("config.syncAuthorDefault") : value === "machine" ? t("config.syncAuthorMachine") : t("config.syncAuthorCustom") })] }, value)) }), mode === "default" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.editorNote, children: t("config.syncAuthorDefaultNote", { identity: DEFAULT_AUTHOR }) }), mode === "machine" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.editorNote, children: t("config.syncAuthorMachineNote") }), mode === "custom" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.fieldGrid, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("config.syncAuthorName"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "text", value: name, "aria-label": t("config.syncAuthorName"), disabled: disabled || busy, autoComplete: "off", spellCheck: false, onChange: (event) => setName(event.target.value) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [ t("config.syncAuthorEmail"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "email", value: email, "aria-label": t("config.syncAuthorEmail"), disabled: disabled || busy, "aria-invalid": email.trim() === "" || emailValid(email) ? void 0 : true, autoComplete: "off", spellCheck: false, onChange: (event) => setEmail(event.target.value) }), email.trim() !== "" && !emailValid(email) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: MnemonSettingsCard_module_css_default.error, children: t("config.syncAuthorEmailInvalid") }) ] })] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.memoryConfigFooter, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.configFeedback, "aria-live": "polite", children: feedback !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FeedbackLine, { value: feedback }) : moved && branchOk && subdirOk ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.editorNote, children: t("config.syncAdvancedNote") }) : renamed && nameOk ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.editorNote, children: t("config.syncMachineRenameNote") }) : null }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: disabled || !ready || busy, onClick: () => void save(), children: busy ? t("config.syncSaving") : t("config.syncSave") }) })] }) ] }) })] }); } // vendor/dsh-mnemon/src/client/MnemonSyncSection.tsx const STATUS_SETTLE_INITIAL_MS = 250; const STATUS_SETTLE_MAX_MS = 1e3; const STATUS_SETTLE_ATTEMPTS = 8; function MnemonSyncSection({ client: sharedClient, connection, sessionId, workspaceId, disabled, enabled, onEnabled, onMerged, t }) { const client = (0, react.useMemo)(() => sharedClient ?? (connection === void 0 ? null : new MnemonClient(connection, sessionId, workspaceId)), [ connection, sessionId, sharedClient, workspaceId ]); const [status, setStatus] = (0, react.useState)(null); const [loaded, setLoaded] = (0, react.useState)(false); const [loadFailed, setLoadFailed] = (0, react.useState)(null); const [checking, setChecking] = (0, react.useState)(false); const [github, setGithub] = (0, react.useState)(null); const [editing, setEditing] = (0, react.useState)(false); const [busy, setBusy] = (0, react.useState)(null); const [syncFeedback, setSyncFeedback] = (0, react.useState)(null); const [repositoryFeedback, setRepositoryFeedback] = (0, react.useState)(null); const [autoFeedback, setAutoFeedback] = (0, react.useState)(null); const [dialog, setDialog] = (0, react.useState)(null); const [disconnectFailed, setDisconnectFailed] = (0, react.useState)(null); const [editMode, setEditMode] = (0, react.useState)(void 0); const readStatus = (0, react.useCallback)(async () => { if (client === null) return; setChecking(true); try { setStatus(await client.syncStatus()); setLoadFailed(null); } catch (reason) { setLoadFailed(message(reason)); } finally { setChecking(false); setLoaded(true); } }, [client]); const readGitHub = (0, react.useCallback)(async () => { if (client === null) return; try { setGithub(await client.githubStatus()); } catch { setGithub(null); } }, [client]); (0, react.useEffect)(() => { if (client === null) { setLoaded(true); return; } if (!enabled) return; let active = true; setLoaded(false); (async () => { let next = await client.syncStatus(); let delayMs = STATUS_SETTLE_INITIAL_MS; for (let attempt = 0; active && next.enabled === false && attempt < STATUS_SETTLE_ATTEMPTS; attempt += 1) { await new Promise((settle) => setTimeout(settle, delayMs)); delayMs = Math.min(delayMs * 2, STATUS_SETTLE_MAX_MS); next = await client.syncStatus(); } return next; })().then((next) => { if (active) { setStatus(next); setLoadFailed(null); setLoaded(true); } }, (reason) => { if (active) { setLoadFailed(message(reason)); setLoaded(true); } }); client.githubStatus().then((next) => { if (active) setGithub(next); }, () => { if (active) setGithub(null); }); return () => { active = false; }; }, [client, enabled]); const repoUrl = status?.config.repoUrl; const connected = status !== null && status.enabled !== false && repoUrl !== void 0; const editable = !disabled && client !== null; const gitReady = status?.git.available === true; const credential = status?.config.credentialSource ?? "none"; const sync = async () => { if (client === null || busy !== null || repoUrl === void 0) return null; setBusy("sync"); setSyncFeedback(null); let failure = null; try { const feedback = syncResult(t, await client.pushSync(), repoUrl, credential); setSyncFeedback(feedback); if (feedback.tone === "error") failure = feedback.text; } catch (reason) { failure = t("config.syncFailed", { error: failureText(t, reasonOf(reason), message(reason), repoUrl, credential) }); setSyncFeedback({ tone: "error", text: failure }); } finally { setBusy(null); } onMerged?.(); readStatus(); return failure; }; const setAutoSync = async (minutes) => { if (client === null || busy !== null) return; setBusy("auto"); setAutoFeedback(null); try { const next = await client.configureSync({ autoBackupMinutes: minutes }); setStatus((current) => current === null ? current : { ...current, config: next }); readStatus(); } catch (reason) { setAutoFeedback({ tone: "error", text: message(reason) }); } finally { setBusy(null); } }; const disconnect = async () => { if (client === null || busy !== null) return; setBusy("disconnect"); setRepositoryFeedback(null); setSyncFeedback(null); setDisconnectFailed(null); try { await client.configureSync({ repoUrl: null, token: null, autoBackupMinutes: 0 }); setDialog(null); setEditing(false); setRepositoryFeedback({ tone: "success", text: t("config.syncDisconnected") }); readStatus(); } catch (reason) { setDisconnectFailed(message(reason)); } finally { setBusy(null); } }; const connectedTo = async () => { setEditing(false); setSyncFeedback(null); setRepositoryFeedback(null); await readStatus(); }; const fixCredentials = () => { setRepositoryFeedback(null); setEditMode(repoUrl !== void 0 && onGitHub(repoUrl) && github?.available === true ? "github" : "address"); setEditing(true); }; const autoBackup = status?.autoBackup; const minutes = status?.config.autoBackupMinutes ?? 0; const autoOptions = AUTO_SYNC_CHOICES.map((choice) => ({ value: String(choice), label: intervalLabel(t, choice) })); const autoHint = autoBackup?.lastError !== void 0 && minutes > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.error, children: t("config.syncAutoFailed", { error: failureText(t, autoBackup.lastFailure, autoBackup.lastError, repoUrl ?? "", credential) }) }) : minutes <= 0 ? t("config.syncAutoHintOff") : [autoBackup?.nextAt === void 0 ? "" : t("config.syncAutoNext", { time: when(autoBackup.nextAt) }), autoBackup?.lastAt === void 0 ? "" : t("config.syncAutoLast", { time: when(autoBackup.lastAt) })].filter(Boolean).join(" · ") || t("config.syncAutoHintOn"); const lastRun = status?.lastRun; const syncHint = lastRun === void 0 ? t("config.syncNever") : lastRun.kind === "merge" ? t("config.syncLastMerge", { time: when(lastRun.at) }) : t("config.syncLast", { time: when(lastRun.at) }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncRow, role: "group", "aria-labelledby": "mnemon-sync-heading", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-sync-enabled", titleId: "mnemon-sync-heading", label: t("config.syncTitle"), hint: t("config.syncSimpleDescription"), checked: enabled, disabled, onChange: onEnabled }), enabled && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncPanel, children: [ client === null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.readOnly, children: t("config.syncUnavailable") }), client !== null && !loaded && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.syncDialogNote, role: "status", children: t("config.syncLoading") }), client !== null && loaded && status === null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.error, role: "alert", children: t("config.syncUnavailableReason", { error: loadFailed ?? "" }) }), client !== null && loaded && status !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ !gitReady && status.enabled !== false && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncWarning, role: "status", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("config.syncGitMissing", { required: status.git.required }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: checking, onClick: () => void readStatus(), children: t("config.syncRecheck") })] }), connected && !editing ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SettingRow, { title: t("config.syncRepository"), titleId: "mnemon-sync-repository-title", hint: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(RepositoryState, { status, checking, t, onRecheck: () => void readStatus(), onFix: editable ? fixCredentials : void 0 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FeedbackLine, { value: repositoryFeedback })] }), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: !editable || busy !== null, onClick: () => { setRepositoryFeedback(null); setEditMode(void 0); setEditing(true); }, children: t("config.syncChange") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: !editable || busy !== null, onClick: () => setDialog("disconnect"), children: t("config.syncDisconnect") })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncConnect, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, { title: t("config.syncRepository"), titleId: "mnemon-sync-repository-title", hint: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [t("config.syncRepositoryHint"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FeedbackLine, { value: repositoryFeedback })] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RepositoryEditor, { client, status, github, disabled: !editable, cancellable: connected, initialMode: editMode, t, onGitHub: setGithub, onReadGitHub: readGitHub, onRefresh: readStatus, onCancel: () => { setEditing(false); readStatus(); }, onConnected: connectedTo })] }), connected && !editing && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(SettingRow, { title: t("config.syncRowTitle"), titleId: "mnemon-sync-now-title", hint: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [syncHint, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FeedbackLine, { value: syncFeedback })] }), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: !gitReady || busy !== null, onClick: () => { setSyncFeedback(null); setDialog("compare"); }, children: t("config.syncCheck") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: !gitReady || !editable || busy !== null, onClick: () => void sync(), children: busy === "sync" ? t("config.syncNowRunning") : t("config.syncNow") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, { title: t("config.syncAuto"), titleId: "mnemon-sync-auto-title", hint: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [autoHint, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FeedbackLine, { value: autoFeedback })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingSelect, { labelledBy: "mnemon-sync-auto-title", value: String(minutes), options: autoOptions, disabled: !editable || busy !== null, onChange: (value) => void setAutoSync(Number(value)) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, { title: t("config.syncHistory"), titleId: "mnemon-sync-history-title", hint: t("config.syncHistoryHint"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: !gitReady, onClick: () => setDialog("history"), children: t("config.syncHistoryView") }) }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AdvancedSettings, { client, status, disabled: !editable, t, onSaved: readStatus }) ] }) ] }), client !== null && repoUrl !== void 0 && dialog === "compare" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SyncCompareDialog, { client, repoUrl, credential, writable: editable, t, onClose: () => setDialog(null), onSync: sync, onChanged: () => { onMerged?.(); readStatus(); } }), client !== null && repoUrl !== void 0 && dialog === "history" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SyncHistoryDialog, { client, repoUrl, credential, t, onClose: () => setDialog(null) }), repoUrl !== void 0 && dialog === "disconnect" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SyncConfirmDialog, { title: t("config.syncDisconnectTitle"), body: t("config.syncDisconnectBody", { repository: repositoryName(repoUrl) }), confirm: t("config.syncDisconnect"), busy: busy === "disconnect", error: disconnectFailed, t, onConfirm: () => void disconnect(), onClose: () => { setDialog(null); setDisconnectFailed(null); } }) ] }); } function syncResult(t, result, repoUrl, credential) { const added = result.merged?.runtime?.added ?? 0; const commit = result.commit.slice(0, 8); const archive = runtimeArchiveNotice(t, result.merged?.runtime?.archived); if (result.pushed) return { tone: "success", text: (added > 0 ? t("config.syncDoneMerged", { count: added, commit }) : t("config.syncDone", { commit })) + archive }; if (!result.committed) return { tone: "success", text: (added > 0 ? t("config.syncUpToDateMerged", { count: added }) : t("config.syncUpToDate")) + archive }; return { tone: "error", text: t("config.syncPushFailed", { reason: failureText(t, result.failure, result.reason ?? "", repoUrl, credential) }) + archive }; } function RepositoryState({ status, checking, t, onRecheck, onFix }) { const url = status.config.repoUrl ?? ""; const remote = status.remote; const credential = credentialText(t, status); const state = checking ? { dot: "ongoing", text: t("config.syncStateChecking") } : !status.git.available ? { dot: "idle", text: t("config.syncReasonGitMissing") } : !remote.reachable ? { dot: "error", text: issueText(t, remote.issue, url, remote.error, status.config.credentialSource) } : { dot: credential === void 0 && transportOf(url) === "https" ? "warning" : "done", text: [remote.branchExists ? t("config.syncStateConnected") : t("config.syncStateNewBranch", { branch: status.config.branch }), ...credential !== void 0 ? [credential] : transportOf(url) === "https" ? [onGitHub(url) ? t("config.syncNoCredential") : t("config.syncNoCredentialToken")] : []].join(" · ") }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.syncRepositoryState, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.syncRepositoryName, children: transportOf(url) === "local" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.PathLabel, { path: url }) : repositoryName(url) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.syncStateLine, "data-tone": state.dot, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: state.dot }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: state.text }), !checking && onFix !== void 0 && (remote.issue === "auth" || remote.issue === "not-found") && transportOf(url) === "https" && status.git.available && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonSettingsCard_module_css_default.syncInlineAction, onClick: onFix, children: t("config.syncFixCredentials") }), !checking && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonSettingsCard_module_css_default.syncInlineAction, onClick: onRecheck, children: t("config.syncRecheck") }) ] })] }); } function RepositoryEditor(props) { const { status, github, t } = props; const githubOffered = github?.available === true; const saved = status.config.repoUrl; const [mode, setMode] = (0, react.useState)(() => props.initialMode ?? (githubOffered && (saved === void 0 || onGitHub(saved)) ? "github" : "address")); const chosen = (0, react.useRef)(props.initialMode !== void 0); (0, react.useEffect)(() => { if (!chosen.current && githubOffered && saved === void 0) setMode("github"); }, [githubOffered, saved]); const name = (0, react.useId)(); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.editor, children: [githubOffered && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.inlineChoices, role: "radiogroup", "aria-label": t("config.syncConnectWith"), children: ["github", "address"].map((value) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "radio", name, value, checked: mode === value, disabled: props.disabled, onChange: () => { chosen.current = true; setMode(value); } }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: value === "github" ? t("config.syncModeGitHub") : t("config.syncModeAddress") })] }, value)) }), mode === "github" && githubOffered && github !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(GitHubConnect, { ...props, github }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AddressConnect, { ...props })] }); } function sameHost(left, right) { try { return new URL(left.trim()).host.toLowerCase() === new URL(right.trim()).host.toLowerCase(); } catch { return false; } } function AddressConnect({ client, status, disabled, cancellable, t, onRefresh, onCancel, onConnected }) { const saved = status.config.repoUrl ?? ""; const [url, setUrl] = (0, react.useState)(saved); const [token, setToken] = (0, react.useState)(""); const [busy, setBusy] = (0, react.useState)(null); const [feedback, setFeedback] = (0, react.useState)(null); const tokenId = (0, react.useId)(); const problem = repositoryProblem(url); const https = transportOf(url) === "https"; const environment = status.config.credentialSource === "environment"; const storedToken = status.config.credentialSource === "token" && sameHost(url, saved); const changed = url.trim() !== saved || token.trim() !== ""; const ready = url.trim() !== "" && problem === void 0 && changed; const connect = async () => { if (!ready || busy !== null) return; setBusy("connect"); setFeedback(null); try { const next = url.trim(); await client.configureSync({ repoUrl: next, ...https && token.trim() !== "" ? { token: token.trim() } : {}, ...https ? {} : { token: null } }); setToken(""); await onConnected(); } catch (reason) { setFeedback({ tone: "error", text: message(reason) }); } finally { setBusy(null); } }; const removeToken = async () => { if (busy !== null) return; setBusy("token"); setFeedback(null); try { await client.configureSync({ token: null }); setFeedback({ tone: "success", text: t("config.syncTokenRemoved") }); onRefresh(); } catch (reason) { setFeedback({ tone: "error", text: message(reason) }); } finally { setBusy(null); } }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.fieldGrid, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("config.syncRepoUrl"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: "text", value: url, "aria-label": t("config.syncRepoUrl"), placeholder: t("config.syncRepoUrlPlaceholder"), disabled: disabled || busy !== null, "aria-invalid": problem === void 0 ? void 0 : true, autoComplete: "off", spellCheck: false, autoCapitalize: "none", autoCorrect: "off", onChange: (event) => setUrl(event.target.value), onKeyDown: (event) => { if (event.key === "Enter") connect(); } })] }), https && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.syncFieldBox, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.syncFieldLabel, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", { htmlFor: tokenId, children: t("config.syncToken") }), storedToken && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonSettingsCard_module_css_default.syncInlineAction, disabled: disabled || busy !== null, onClick: () => void removeToken(), children: t("config.syncTokenRemove") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: tokenId, type: "password", value: token, "aria-label": t("config.syncToken"), disabled: disabled || busy !== null || environment, placeholder: environment ? t("config.syncTokenEnvironment", { env: "MNEMON_SYNC_GIT_TOKEN" }) : storedToken ? t("config.syncTokenSaved") : t("config.syncTokenOptional"), autoComplete: "new-password", spellCheck: false, onChange: (event) => setToken(event.target.value) })] })] }), problem !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.error, children: problem === "credentials" ? t("config.syncRepoUrlCredentials") : t("config.syncRepoUrlInvalid") }), https && problem === void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.editorNote, children: t("config.syncTokenHint") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.memoryConfigFooter, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.configFeedback, "aria-live": "polite", children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FeedbackLine, { value: feedback }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [cancellable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: busy !== null, onClick: onCancel, children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: disabled || !ready || busy !== null, onClick: () => void connect(), children: busy === "connect" ? t("config.syncConnecting") : saved === "" ? t("config.syncConnect") : t("config.syncSave") })] })] }) ] }); } // vendor/dsh-mnemon/src/client/MnemonStorageSection.tsx function legacyPackDirectory(value) { const packs = value.customPacks ?? []; return packs.find((pack) => pack.id === value.customPackId)?.dataDir?.trim() ?? (packs.length === 1 ? packs[0]?.dataDir?.trim() : void 0) ?? ""; } function savedDirectory(value) { return value.dataDir?.trim() || legacyPackDirectory(value); } function savedScope(value) { return value.storageScope ?? (savedDirectory(value) === "" ? "global" : "custom"); } function storedScope(draft) { return draft.scope === "global" ? draft.location === "custom" ? "custom" : "global" : draft.scope; } function storageDraft(value) { const resolved = value ?? {}; const dataDir = savedDirectory(resolved); const stored = savedScope(resolved); return { scope: stored === "workspace" || stored === "workspaces" ? stored : "global", location: stored === "custom" || stored !== "global" && dataDir !== "" ? "custom" : "default", dataDir }; } function storageMissing(draft) { return draft.scope !== "workspace" && draft.location === "custom" && draft.dataDir.trim() === ""; } function isAbsoluteDirectoryPath(directory) { if (directory.includes("\0")) return false; const posixAbsolute = directory.startsWith("/"); const homeRelative = directory === "~" || directory.startsWith("~/"); const windowsDriveAbsolute = /^[a-zA-Z]:[\\/]/.test(directory); const windowsUncAbsolute = /^\\\\[^\\/]+[\\/][^\\/]+/.test(directory); return posixAbsolute || homeRelative || windowsDriveAbsolute || windowsUncAbsolute; } function storageProblem(t, draft) { if (draft.scope === "workspace" || draft.location === "default") return null; const directory = draft.dataDir.trim(); if (directory === "") return null; return isAbsoluteDirectoryPath(directory) ? null : t("config.customAbsolute"); } function Path(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonSettingsCard_module_css_default.location, children: [props.label !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.PathLabel, { path: props.value })] }); } function MnemonStorageSection(props) { const { t } = props; const localePreference = useLocalePreference$4(props.language); const value = props.value ?? {}; const excludedCount = (value.excludedWorkspaces ?? []).length; const exclusion = useStaged({ paths: (value.excludedWorkspaces ?? []).join("\n") }, async (draft) => { await props.scope.mutate([{ op: "set", path: ["excludedWorkspaces"], value: [...new Set(draft.paths.split(/\r?\n/u).map((path) => path.trim()).filter(Boolean))] }]); props.onSaved(); }); const saved = storageDraft(value); const storage = useStaged(saved, async (draft) => { const operations = []; const scope = storedScope(draft); if (scope !== savedScope(value)) operations.push({ op: "set", path: ["storageScope"], value: scope }); if (draft.scope !== "workspace") { const directory = draft.location === "custom" ? draft.dataDir.trim() : ""; if (directory !== saved.dataDir.trim()) operations.push(directory === "" && draft.scope === "global" ? { op: "unset", path: ["dataDir"] } : { op: "set", path: ["dataDir"], value: directory }); } if (operations.length === 0) return; if (Object.hasOwn(props.user, "customPackId")) operations.push({ op: "unset", path: ["customPackId"] }); if (Object.hasOwn(props.user, "customPacks")) operations.push({ op: "unset", path: ["customPacks"] }); await props.scope.mutate(operations); props.onSaved(); }); const sync = useLive(props.value?.syncEnabled === true, async (value) => { await props.scope.mutate([{ op: "set", path: ["syncEnabled"], value }]); }); const documentsScope = useLive(props.value?.documentsScope === "global" ? "global" : "storage", async (value) => { await props.scope.mutate([{ op: "set", path: ["documentsScope"], value }]); }); const memorySpacesScope = useLive(props.value?.memorySpacesScope === "global" ? "global" : "storage", async (value) => { await props.scope.mutate([{ op: "set", path: ["memorySpacesScope"], value }]); }); const { draft } = storage; const problem = storageProblem(t, draft); const canPick = props.target?.nativeDirectoryPicker === true && props.directoryPicker?.available() === true; const [picking, setPicking] = (0, react.useState)(false); const [pickerFailed, setPickerFailed] = (0, react.useState)(false); const pendingPick = (0, react.useRef)(void 0); const savedKey = JSON.stringify(saved); (0, react.useEffect)(() => { setPickerFailed(false); return () => { if (pendingPick.current !== void 0) pendingPick.current.active = false; }; }, [ draft, savedKey, props.scope, props.disabled, props.sessionId, props.workspaceId, props.directoryPicker, canPick, storage.saving ]); (0, react.useEffect)(() => () => { pendingPick.current = void 0; }, []); const pickDirectory = async () => { if (!canPick || props.disabled || storage.saving || pendingPick.current !== void 0) return; const request = { active: true }; pendingPick.current = request; setPicking(true); setPickerFailed(false); try { const directory = await props.directoryPicker.pick(); if (pendingPick.current === request && request.active && directory !== null) storage.edit({ dataDir: directory }); } catch { if (pendingPick.current === request && request.active) setPickerFailed(true); } finally { if (pendingPick.current === request) { pendingPick.current = void 0; setPicking(false); } } }; const focusDirectory = (0, react.useRef)(false); const chooseLocation = (location) => { focusDirectory.current = location === "custom"; storage.edit({ location, dataDir: saved.dataDir }); }; const order = (entry) => MNEMON_PACK_COMPONENTS.indexOf(entry.typeId ?? ""); const users = (props.dashboard?.entries ?? []).filter((entry) => entry.roles.includes("source") && order(entry) >= 0).sort((left, right) => order(left) - order(right)); const runtime = users.find((entry) => entry.packageName === "dsh-brain-mnemon-source-runtime" && entry.enabled); const current = storage.dirty ? void 0 : props.target?.root; const defaultRoot = props.target?.defaultRoot ?? (saved.scope === "global" && saved.location === "default" ? current : void 0); const directoryHint = draft.scope === "workspaces" ? current === void 0 ? "" : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Path, { label: t("storage.thisWorkspace"), value: current }) : draft.location === "default" && defaultRoot !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Path, { value: defaultRoot }) : ""; const directoryInput = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { id: "mnemon-data-directory", className: MnemonSettingsCard_module_css_default.directoryInput, type: "text", value: draft.dataDir, "aria-label": t("config.dataDirectory"), "aria-invalid": problem !== null, placeholder: t("storage.directoryExample"), disabled: props.disabled, autoComplete: "off", spellCheck: false, autoCapitalize: "none", autoCorrect: "off", ref: (element) => { if (element !== null && focusDirectory.current) { focusDirectory.current = false; element.focus(); } }, onChange: (event) => storage.edit({ dataDir: event.target.value }) }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonSettingsCard_module_css_default.section, "aria-labelledby": "mnemon-storage-heading", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.sectionHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { id: "mnemon-storage-heading", children: t("config.storageTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComponentChips, { label: t("storage.usedBy"), chips: users.map((entry) => { const name = componentCopy(entry, localePreference).label; return { key: entry.entryId, name, on: entry.enabled, title: t("storage.usedByTitle", { component: name }), open: () => props.onOpen(entry) }; }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rows, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-storage-scope", label: t("config.scopeTitle"), value: draft.scope, disabled: props.disabled, onChange: (scope) => storage.edit({ scope }), options: [ { value: "global", label: t("config.global"), detail: t("config.globalScopeHint") }, { value: "workspace", label: t("config.workspace"), detail: t("config.workspaceScopeHint") }, { value: "workspaces", label: t("config.workspaces"), detail: t("config.workspacesHint") } ] }), draft.scope === "workspace" ? current === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, { title: t("config.dataDirectory"), hint: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Path, { value: current }) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(GlobalLocationSetting, { name: "mnemon-data-location", className: MnemonSettingsCard_module_css_default.locationRow, ariaLabel: t("config.dataDirectory"), label: t("config.dataDirectory"), hint: directoryHint, defaultLabel: t("storage.default"), customLabel: t("config.custom"), custom: draft.location === "custom", workspace: false, disabled: props.disabled, onChange: (custom) => chooseLocation(custom ? "custom" : "default"), children: [canPick ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.directoryPickerRow, children: [directoryInput, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: props.disabled || storage.saving || picking, "aria-busy": picking || void 0, onClick: () => { pickDirectory(); }, children: t("storage.chooseDirectory") })] }) : directoryInput, pickerFailed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.panelError, role: "alert", children: t("storage.pickFailed") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: storage.dirty, saving: storage.saving, invalid: problem, failed: storage.failed, applied: storage.applied, disabled: props.disabled || storageMissing(draft), note: t("storage.moveNote"), t, onDiscard: storage.discard, onApply: () => { storage.apply(); } }), saved.scope !== "global" && runtime !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SettingRow, { title: t("config.runtimeUserScopeTitle"), hint: t(value.runtimeUserScope === "global" ? "storage.userProfileShared" : "storage.userProfileByWorkspace"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageLink, { label: t("storage.runtimeSettings"), onOpen: () => props.onOpen(runtime, "user-scope") }) }), saved.scope !== "global" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.panelNote, children: t("config.componentScopeSwitchHint") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-documents-scope", label: t("config.documentsScopeTitle"), value: documentsScope.value, disabled: props.disabled, onChange: documentsScope.set, options: [{ value: "storage", label: t("config.componentScopeStorage"), detail: t("config.documentsScopeStorageHint") }, { value: "global", label: t("config.componentScopeGlobal"), detail: t("config.documentsScopeGlobalHint") }] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-memory-spaces-scope", label: t("config.memorySpacesScopeTitle"), value: memorySpacesScope.value, disabled: props.disabled, onChange: memorySpacesScope.set, options: [{ value: "storage", label: t("config.componentScopeStorage"), detail: t("config.memorySpacesScopeStorageHint") }, { value: "global", label: t("config.componentScopeGlobal"), detail: t("config.memorySpacesScopeGlobalHint") }] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteFailure, { error: documentsScope.failed ?? memorySpacesScope.failed, t }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AdvancedSection, { title: t("workspace.excludeTitle"), hint: t("workspace.excludeHint"), badge: excludedCount > 0 ? t("workspace.excludeCount", { count: excludedCount }) : t("workspace.excludeNone"), defaultOpen: excludedCount > 0, section: "exclusions", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { id: "mnemon-excluded-workspaces", className: MnemonSettingsCard_module_css_default.workspacePaths, rows: 3, "aria-label": t("workspace.excludeTitle"), placeholder: t("workspace.excludePlaceholder"), value: exclusion.draft.paths, disabled: props.disabled || exclusion.saving, spellCheck: false, autoCapitalize: "none", onChange: (event) => exclusion.edit({ paths: event.target.value }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PanelActions, { dirty: exclusion.dirty, saving: exclusion.saving, invalid: null, failed: exclusion.failed, applied: exclusion.applied, disabled: props.disabled, note: t("workspace.excludeNote"), t, onDiscard: exclusion.discard, onApply: () => { exclusion.apply(); } })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonPackSection, { ...props.client === void 0 ? {} : { client: props.client }, ...props.connection === void 0 ? {} : { connection: props.connection }, ...props.sessionId === void 0 ? {} : { sessionId: props.sessionId }, ...props.workspaceId === void 0 ? {} : { workspaceId: props.workspaceId }, target: props.target, ...props.onDataChanged === void 0 ? {} : { onImported: props.onDataChanged }, t }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonSyncSection, { ...props.client === void 0 ? {} : { client: props.client }, ...props.connection === void 0 ? {} : { connection: props.connection }, ...props.sessionId === void 0 ? {} : { sessionId: props.sessionId }, ...props.workspaceId === void 0 ? {} : { workspaceId: props.workspaceId }, disabled: props.disabled, enabled: sync.value, onEnabled: sync.set, ...props.onDataChanged === void 0 ? {} : { onMerged: props.onDataChanged }, t }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteFailure, { error: sync.failed, t }), sync.value && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonReviewSection, { ...props.client === void 0 ? {} : { client: props.client }, ...props.connection === void 0 ? {} : { connection: props.connection }, ...props.sessionId === void 0 ? {} : { sessionId: props.sessionId }, ...props.workspaceId === void 0 ? {} : { workspaceId: props.workspaceId }, disabled: props.disabled, ...props.onDataChanged === void 0 ? {} : { onApplied: props.onDataChanged }, t }) ] })] }); } // vendor/dsh-mnemon/src/client/MnemonSettingsCard.tsx const NO_CHANGE_SIGNAL$1 = { subscribe: () => () => {}, getSnapshot: () => 0, bump: () => {} }; const NO_COMPONENT_LIST = { subscribe: () => () => {}, getSnapshot: () => void 0 }; function dataRelevantConfigKey(status, value) { if (status === "loading") return "loading"; if (status === "unavailable") return "unavailable"; const record = value; return JSON.stringify([ record?.storageScope ?? null, record?.dataDir ?? null, record?.customPackId ?? null, record?.customPacks ?? null, record?.excludedWorkspaces ?? null, record?.memoryTopology ?? null, record?.memoryView ?? null, record?.documents ?? null ]); } function MnemonSettingsCard({ scope, interactionScope: suppliedInteractionScope, connection, directoryPicker, sessionId, workspaceId, workspaceLabel, language = "zh", t: translate, componentChanges = NO_CHANGE_SIGNAL$1, componentSettings, component, componentList = NO_COMPONENT_LIST }) { const localePreference = useLocalePreference$4(language); const t = translate ?? translateFor(localePreference); const interactionScope = suppliedInteractionScope ?? scope; const coreSnapshot = useScope(scope); const interactionSnapshot = useScope(interactionScope); const [targetRevision, setTargetRevision] = (0, react.useState)(0); const componentRevision = (0, react.useSyncExternalStore)(componentChanges.subscribe, componentChanges.getSnapshot, componentChanges.getSnapshot); const groupRowListed = (0, react.useSyncExternalStore)(componentList.subscribe, componentList.getSnapshot, componentList.getSnapshot) === true; const dataConfigKey = dataRelevantConfigKey(coreSnapshot.status, coreSnapshot.value); const seenDataConfig = (0, react.useRef)({ key: dataConfigKey, revision: 0 }); if (seenDataConfig.current.key !== dataConfigKey) seenDataConfig.current = { key: dataConfigKey, revision: seenDataConfig.current.revision + 1 }; const dataRevision = targetRevision + componentRevision + seenDataConfig.current.revision; const sharedClient = (0, react.useMemo)(() => connection === void 0 ? void 0 : new MnemonClient(connection, sessionId, workspaceId), [ connection, sessionId, workspaceId ]); const view = useViewStore(sharedClient, dataRevision); const pages = usePageTrail(); const entries = view.state.dashboard?.entries; const openPage = pages.open; (0, react.useEffect)(() => { if (entries === void 0 || component !== void 0) return; const take = () => { const requested = takeComponentPageRequest(); const entry = requested === void 0 ? void 0 : entries.find((candidate) => candidate.packageName === requested.packageName); if (entry !== void 0) openPage(entry.entryId, "configuration", requested?.section); }; take(); return subscribeComponentPage(take); }, [ entries, component, openPage ]); const layerSettings = (0, react.useMemo)(() => ({ set: async (layerId, enabled) => { await scope.mutate([{ op: "set", path: [ "memoryTopology", "layers", layerId, "enabled" ], value: enabled }]); setTargetRevision((revision) => revision + 1); } }), [scope]); const root = (0, react.useRef)(null); const feedbackToast = useViewFeedback(view, root, t, language); const [memorySystem, setMemorySystem] = (0, react.useState)(null); const [memorySystemState, setMemorySystemState] = (0, react.useState)(sharedClient === void 0 ? "unavailable" : "loading"); const topologyRequest = (0, react.useRef)(0); const { target } = usePackTarget(connection, sessionId, workspaceId, dataRevision, sharedClient); (0, react.useEffect)(() => { if (sharedClient === void 0) { topologyRequest.current += 1; setMemorySystem(null); setMemorySystemState("unavailable"); return; } const request = topologyRequest.current + 1; topologyRequest.current = request; setMemorySystemState("loading"); sharedClient.memorySystem().then((descriptor) => { if (topologyRequest.current !== request) return; setMemorySystem(descriptor); setMemorySystemState("ready"); }, () => { if (topologyRequest.current !== request) return; setMemorySystem(null); setMemorySystemState("error"); }); return () => { topologyRequest.current += 1; }; }, [sharedClient, dataRevision]); const coreUser = (0, react.useMemo)(() => isRecord(coreSnapshot.user) ? coreSnapshot.user : {}, [coreSnapshot.user]); const loading = coreSnapshot.status === "loading" || interactionSnapshot.status === "loading"; const writable = coreSnapshot.writable && interactionSnapshot.writable; const display = useLive(normalizeDisplayMode(coreSnapshot.value?.displayMode), async (value) => { await scope.mutate([{ op: "set", path: ["displayMode"], value }]); }); const turnBar = useLive(interactionSnapshot.value?.turnBar !== false, async (value) => { await interactionScope.mutate([{ op: "set", path: ["turnBar"], value }]); }); const saveAction = useLive(interactionSnapshot.value?.saveAction !== false, async (value) => { await interactionScope.mutate([{ op: "set", path: ["saveAction"], value }]); }); const taskAgent = useTaskAgentModel({ scope, connection, sessionId, workspaceId }); const confirmWrites = useLive(coreSnapshot.value?.confirmWrites === true, async (value) => { await scope.mutate([{ op: "set", path: ["confirmWrites"], value }]); }); const settingsRenderer = (0, react.useMemo)(() => componentSettings === void 0 ? void 0 : { has: (packageName) => componentSettings.has(packageName), render: (entry, writableNow, section) => componentSettings.render(entry, { enabled: entry.enabled, label: componentCopy(entry, localePreference).label, writable: writableNow, language, ...sessionId === void 0 ? {} : { sessionId }, ...workspaceId === void 0 ? {} : { workspace: { id: workspaceId, ...workspaceLabel === void 0 ? {} : { label: workspaceLabel } } }, ...section === void 0 ? {} : { section } }) }, [ componentSettings, language, localePreference, sessionId, workspaceId, workspaceLabel ]); if (coreSnapshot.status === "unavailable" && interactionSnapshot.status === "unavailable") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", { className: MnemonSettingsCard_module_css_default.page, "aria-label": t("config.aria"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.error, role: "alert", children: t("config.unavailable") }) }); const coreDisabled = loading || !coreSnapshot.writable; const readOnlyNotice = connection !== void 0 && isRemoteConnection(connection) ? t("config.remoteReadOnly") : t("config.readOnly"); const interactionDisabled = loading || !interactionSnapshot.writable; if (component !== void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { ref: root, className: MnemonSettingsCard_module_css_default.page, "aria-label": t("config.aria"), "aria-busy": loading, children: [ !writable && !loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.readOnlyNotice, children: readOnlyNotice }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CompositionBoard, { view, system: memorySystem, systemPending: memorySystemState === "loading", layers: layerSettings, readOnly: !coreSnapshot.writable, language, t, pages, page: component, ...settingsRenderer === void 0 ? {} : { componentSettings: settingsRenderer } }), feedbackToast ] }); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", { ref: root, className: MnemonSettingsCard_module_css_default.page, "aria-label": t("config.aria"), "aria-busy": loading, children: loading ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.loading, role: "status", children: t("common.loading") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ !writable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.readOnlyNotice, children: readOnlyNotice }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CompositionBoard, { view, system: memorySystem, systemPending: memorySystemState === "loading", layers: layerSettings, readOnly: !coreSnapshot.writable, language, t, pages, ...settingsRenderer === void 0 ? {} : { componentSettings: settingsRenderer } }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonSettingsCard_module_css_default.section, "data-settings-section": "write-confirmation", "aria-labelledby": "mnemon-write-confirmation-heading", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.sectionHeading, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { id: "mnemon-write-confirmation-heading", children: t("config.memoryWriting") }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rows, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-confirm-writes", label: t("config.confirmWrites"), badge: confirmWrites.value ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "warning", children: t("config.confirmWritesBadge") }) : void 0, hint: t("config.confirmWritesHint"), checked: confirmWrites.value, disabled: coreDisabled, onChange: confirmWrites.set }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteFailure, { error: confirmWrites.failed, t }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonSettingsCard_module_css_default.section, "data-settings-section": "task-agent", "aria-labelledby": "mnemon-task-agent-heading", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.sectionHeading, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { id: "mnemon-task-agent-heading", children: t("config.taskAgentSectionTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("config.taskAgentSectionDescription") }), taskAgent.catalog.state === "loading" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSettingsCard_module_css_default.miniSpinner, "aria-hidden": "true" }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.rows, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskAgentModelRows, { idPrefix: "mnemon-card-task-agent", mode: taskAgent.choosing ? "fixed" : taskAgent.route.mode, route: taskAgent.route, settled: taskAgent.settled, choosing: taskAgent.choosing, catalog: taskAgent.catalog.value, state: taskAgent.catalog.state, error: taskAgent.catalog.error, retry: taskAgent.retry, disabled: coreDisabled, onMode: taskAgent.setMode, onRoute: taskAgent.setRoute, t }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteFailure, { error: taskAgent.failed, t }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonStorageSection, { scope, value: coreSnapshot.value, user: coreUser, disabled: coreDisabled, dashboard: view.state.dashboard, target, ...sharedClient === void 0 ? {} : { client: sharedClient }, ...directoryPicker === void 0 ? {} : { directoryPicker }, ...connection === void 0 ? {} : { connection }, ...sessionId === void 0 ? {} : { sessionId }, ...workspaceId === void 0 ? {} : { workspaceId }, language, t, onOpen: (entry, section) => pages.open(entry.entryId, "configuration", section), onSaved: () => setTargetRevision((revision) => revision + 1), onDataChanged: componentChanges.bump }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonSettingsCard_module_css_default.section, "aria-labelledby": "mnemon-interface-heading", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSettingsCard_module_css_default.sectionHeading, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h2", { id: "mnemon-interface-heading", children: t("config.interfaceTitle") }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSettingsCard_module_css_default.rows, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectRow, { id: "mnemon-display", label: t("config.displayTitle"), value: display.value, disabled: coreDisabled, onChange: display.set, options: [{ value: "sidebar", label: t("config.displaySidebar"), detail: t("config.displaySidebarHint") }, { value: "builtin", label: t("config.displayBuiltin"), detail: t("config.displayBuiltinHint") }] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-interaction-turn-bar", label: t("config.interactionTurnBar"), hint: t("config.interactionTurnBarHint"), checked: turnBar.value, disabled: interactionDisabled, onChange: turnBar.set }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ToggleRow, { id: "mnemon-interaction-save-action", label: t("config.interactionSaveAction"), hint: t("config.interactionSaveActionHint"), checked: saveAction.value, disabled: interactionDisabled, onChange: saveAction.set }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteFailure, { error: display.failed ?? turnBar.failed ?? saveAction.failed, t }) ] }), groupRowListed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonSettingsCard_module_css_default.componentListNote, children: t("config.componentListNote") }), feedbackToast ] }) }); } // vendor/dsh-mnemon/src/client/session-binding.ts function useMnemonSessionId(binding) { const subscribe = (0, react.useCallback)((listener) => binding.subscribe(listener), [binding]); const getSnapshot = (0, react.useCallback)(() => binding.getSnapshot().key, [binding]); return (0, react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot); } // vendor/dsh-mnemon/src/client/MnemonSettingsHost.tsx function MnemonSettingsHost({ view, currentSession, sessions, workspaces, localeRuntime, componentSettingsDirectory, componentHost, renderSlot, renderContributed, ...props }) { const sessionId = useMnemonSessionId(currentSession); const subscribeSessions = (0, react.useCallback)((listener) => sessions.list.subscribe(listener), [sessions.list]); const getSessionCwd = (0, react.useCallback)(() => { const byId = sessions.list.getSnapshot().byId; if (sessionId === void 0 || !Object.hasOwn(byId, sessionId)) return null; return byId[sessionId]?.cwd ?? null; }, [sessionId, sessions.list]); const subscribeWorkspaces = (0, react.useCallback)((listener) => workspaces.list.subscribe(listener), [workspaces.list]); const getWorkspaces = (0, react.useCallback)(() => workspaces.list.getSnapshot(), [workspaces.list]); const subscribeLocale = (0, react.useCallback)((listener) => localeRuntime.subscribe(listener), [localeRuntime]); const getLocale = (0, react.useCallback)(() => localeRuntime.getSnapshot(), [localeRuntime]); const locale = (0, react.useSyncExternalStore)(subscribeLocale, getLocale, getLocale); const localeFallbacks = (0, react.useMemo)(() => localeFallbackChain(locale), [locale]); const cwd = (0, react.useSyncExternalStore)(subscribeSessions, getSessionCwd, getSessionCwd) ?? void 0; const workspaceList = (0, react.useSyncExternalStore)(subscribeWorkspaces, getWorkspaces, getWorkspaces); const subscribeDirectory = (0, react.useCallback)((listener) => componentSettingsDirectory?.subscribe(listener) ?? (() => {}), [componentSettingsDirectory]); const getDirectory = (0, react.useCallback)(() => componentSettingsDirectory?.getSnapshot(), [componentSettingsDirectory]); const contributed = (0, react.useSyncExternalStore)(subscribeDirectory, getDirectory, getDirectory); const componentSettings = (0, react.useMemo)(() => renderSlot === void 0 && renderContributed === void 0 || contributed === void 0 ? void 0 : { has: (packageName) => contributed.has(packageName), render: (entry, page) => { const host = componentHost?.(entry.packageName, page.sessionId, page.workspace?.id); const owner = { component: { packageName: entry.packageName, label: page.label, enabled: page.enabled }, writable: page.writable, language: page.language, ...page.sessionId === void 0 ? {} : { sessionId: page.sessionId }, ...page.workspace === void 0 ? {} : { workspace: page.workspace }, ...page.section === void 0 ? {} : { section: page.section }, ...host === void 0 ? {} : { host } }; return renderSlot !== void 0 ? renderSlot(MNEMON_COMPONENT_SETTINGS_SLOT, owner, { entryKey: entry.packageName, fallback: null }) : renderContributed(entry.packageName, owner); } }, [ renderSlot, renderContributed, contributed, componentHost ]); if (view !== "page") return null; const normalizePath = (value) => value.replace(/[\\/]+$/u, ""); const workspace = sessionId === void 0 ? workspaceList.items[0] : cwd === void 0 ? void 0 : workspaceList.items.find((candidate) => normalizePath(candidate.path) === normalizePath(cwd)); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LocaleFallbackContext.Provider, { value: localeFallbacks, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonSettingsCard, { ...props, ...componentSettings === void 0 ? {} : { componentSettings }, language: locale.active, ...sessionId === void 0 ? {} : { sessionId }, ...workspace === void 0 ? {} : { workspaceId: String(workspace.workspaceId), workspaceLabel: workspace.title } }) }); } function MnemonComponentRowHost(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonSettingsHost, { ...props }); } // vendor/dsh-mnemon/src/client/picker.ts const MNEMON_PICKER_CHANNEL = "mnemon/picker"; function isRemoteResultEnvelope(value) { return typeof value === "object" && value !== null && "ok" in value && typeof value.ok === "boolean"; } function unwrapRemoteOutcome(outcome, fallbackError) { if (!isRemoteResultEnvelope(outcome)) return outcome; if (outcome.ok) return outcome.value; throw new Error(outcome.error?.message ?? fallbackError); } function normalizeNativePickResult(result) { if (result === null || typeof result === "string") return result; if (result.cancelled === true) return null; return typeof result.path === "string" ? result.path : null; } function directoryPicker(ctx) { const directRemotePicker = () => { try { const fromCtx = ctx.remote?.directoryPicker; if (fromCtx !== void 0) return fromCtx; } catch {} return ctx.connection?.remote?.directoryPicker; }; const workspaceService = () => ctx.get("uiWorkspace"); const remotePicker = () => { const direct = directRemotePicker(); if (direct !== void 0) return direct; return ctx.get("remote")?.directoryPicker; }; const hasRemotePick = (picker) => typeof picker?.pickNative === "function" || typeof picker?.pick === "function"; const invokeRemotePick = async (picker) => { if (typeof picker.mode === "function") { if (unwrapRemoteOutcome(await picker.mode(), "Directory chooser is unavailable") !== "native") throw new Error("Directory chooser is unavailable"); } return normalizeNativePickResult(unwrapRemoteOutcome(typeof picker.pickNative === "function" ? await picker.pickNative() : await picker.pick(), "Directory chooser failed")); }; const callFallbackPickerRpc = async (endpoint, payload = {}) => { const call = ctx.connection?.rpc?.call; if (typeof call !== "function") throw new Error("Directory chooser is unavailable"); const response = await call(MNEMON_PICKER_CHANNEL, endpoint, payload); if (!response.ok) throw new Error(response.error?.message ?? "Directory chooser failed"); return response.value; }; return { available: () => { try { if (isRemoteConnection(ctx.connection)) return false; if (hasRemotePick(directRemotePicker())) return true; if (typeof workspaceService()?.pickDirectory === "function") return true; return hasRemotePick(remotePicker()); } catch { return false; } }, pick: async () => { if (isRemoteConnection(ctx.connection)) throw new Error("Directory chooser is unavailable"); const direct = directRemotePicker(); if (direct !== void 0 && hasRemotePick(direct)) return await invokeRemotePick(direct); const workspace = workspaceService(); if (typeof workspace?.pickDirectory === "function") return await workspace.pickDirectory(); const viaGetRemote = remotePicker(); if (viaGetRemote !== void 0 && hasRemotePick(viaGetRemote)) return await invokeRemotePick(viaGetRemote); return normalizeNativePickResult(await callFallbackPickerRpc("pick")); }, mode: async () => { const remote = remotePicker(); if (typeof remote?.mode === "function") return unwrapRemoteOutcome(await remote.mode(), "Directory chooser is unavailable"); if (!isRemoteConnection(ctx.connection) && (hasRemotePick(remote) || typeof workspaceService()?.pickDirectory === "function")) return "native"; if (typeof remote?.list === "function") return "browse"; try { const fallback = await callFallbackPickerRpc("mode"); return typeof fallback === "string" ? fallback : fallback?.mode ?? "disabled"; } catch { return "disabled"; } }, list: async (path) => { const remote = remotePicker(); if (typeof remote?.list === "function") return unwrapRemoteOutcome(await remote.list(path), "Could not list directory"); return await callFallbackPickerRpc("list", path === void 0 ? {} : { path }); }, createDirectory: async (parentPath, name) => { const remote = remotePicker(); if (typeof remote?.createDirectory === "function") { const created = unwrapRemoteOutcome(await remote.createDirectory(parentPath, name), "Could not create directory"); return typeof created === "string" ? created : created.path; } const created = await callFallbackPickerRpc("mkdir", { parentPath, name }); return typeof created === "string" ? created : created.path; } }; } // vendor/dsh-mnemon/src/client/component-host.ts const LENT = { "dsh-brain-mnemon-source-memory-spaces": { reads: [ "embedding", "persistenceStrategy", "defaultRecallLimit", "recallQuality", "timeoutMs", "storageScope", "writeEnabled" ], owns: [ "embedding", "persistenceStrategy", "defaultRecallLimit", "recallQuality", "timeoutMs" ], read: [ "status-summary", "embedding-status", "provider-services" ], write: ["embedding-fill", "provider-service-update"], join: ["status-summary", "provider-services"] } }; function configurationOf(scope, lent) { let source; let snapshot = { status: "loading", writable: false }; return { getSnapshot() { const current = scope.getSnapshot(); if (current === source) return snapshot; source = current; const value = current.value; snapshot = { status: current.status, writable: current.writable, ...current.revision === void 0 ? {} : { revision: current.revision }, ...value === void 0 ? {} : { value: Object.fromEntries(lent.reads.flatMap((key) => Object.hasOwn(value, key) ? [[key, value[key]]] : [])) } }; return snapshot; }, subscribe: (listener) => scope.subscribe(listener), async set(key, value) { if (!lent.owns.includes(key)) throw new Error(`dsh-brain-mnemon does not lend this component the setting ${key}`); await scope.mutate([{ op: "set", path: [key], value }]); } }; } const SCOPE_FIELDS = ["sessionId", "workspaceId"]; function createComponentHosts(services) { const configurations = /* @__PURE__ */ new Map(); const hosts = /* @__PURE__ */ new Map(); return (packageName, sessionId, workspaceId) => { const lent = LENT[packageName]; if (lent === void 0) return void 0; const key = [ packageName, sessionId ?? "", workspaceId ?? "" ].join("\0"); let host = hosts.get(key); if (host !== void 0) return host; let configuration = configurations.get(packageName); if (configuration === void 0) { configuration = configurationOf(services.scope, lent); configurations.set(packageName, configuration); } const { connection, componentChanges } = services; const client = connection === void 0 ? void 0 : new MnemonClient(connection, sessionId, workspaceId); const call = (mode, names, operation, input) => { const endpoint = names.find((name) => name === operation); if (endpoint === void 0) return Promise.reject(/* @__PURE__ */ new Error(`dsh-brain-mnemon does not serve this component the ${mode} operation ${operation}`)); if (input !== void 0 && (typeof input !== "object" || input === null || Array.isArray(input))) return Promise.reject(/* @__PURE__ */ new Error(`${operation} takes an object`)); const named = SCOPE_FIELDS.filter((field) => input !== void 0 && Object.hasOwn(input, field)); if (named.length > 0) return Promise.reject(/* @__PURE__ */ new Error(`${operation} runs in the page's conversation and workspace; it takes no ${named.join(" or ")}`)); return client.componentOperation(mode, endpoint, input ?? {}); }; const reading = /* @__PURE__ */ new Map(); const read = (operation, input) => { if (!lent.join.includes(operation)) return call("read", lent.read, operation, input); const key = [ operation, services.scope.getSnapshot().revision ?? "", JSON.stringify(input ?? {}) ].join("\0"); let pending = reading.get(key); if (pending === void 0) { pending = call("read", lent.read, operation, input).finally(() => { reading.delete(key); }); reading.set(key, pending); } return pending; }; host = { configuration, ...client === void 0 ? {} : { operations: { read, write: (operation, input) => call("write", lent.write, operation, input) } }, changed: () => { componentChanges?.bump(); }, retained: /* @__PURE__ */ new Map() }; hosts.set(key, host); return host; }; } // vendor/dsh-mnemon/src/client/component-status.tsx const DOCUMENTS_PACKAGE = "dsh-brain-mnemon-source-documents"; const WorkbenchStatusContext = (0, react.createContext)(null); function installShippedComponentStatus(ctx) { const disposers = [ installMemoryComponentUI(ctx, { packageName: RUNTIME_PACKAGE, status: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RuntimeStatus, {}) }), installMemoryComponentUI(ctx, { packageName: DOCUMENTS_PACKAGE, status: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DocumentsStatus, {}) }), installMemoryComponentUI(ctx, { packageName: MEMORY_SPACES_PACKAGE, status: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SpacesStatus, {}) }), installMemoryComponentUI(ctx, { packageName: SKILLS_PACKAGE, status: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillsStatus, {}) }) ]; return () => { for (const dispose of disposers.reverse()) dispose(); }; } function Figure(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: props.headline }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: props.detail })] }); } function RuntimeStatus() { const t = useT$4(); const storage = (0, react.useContext)(WorkbenchStatusContext)?.storage; const area = storage?.scopes.find((scope) => scope.kind === (storage.activeKind ?? "global"))?.areas.find((candidate) => candidate.kind === "runtime"); if (area === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Figure, { headline: t("status.runtimeWaiting"), detail: t("status.runtimeWaitingDetail") }); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Figure, { headline: t("status.runtimeRatio", { user: Number(area.details.userEntries ?? 0), memory: Number(area.details.memoryEntries ?? 0) }), detail: t("status.runtimeBytes", { bytes: humanBytes(area.bytes) }) }); } function DocumentsStatus() { const t = useT$4(); const documents = (0, react.useContext)(WorkbenchStatusContext)?.documents; if (documents === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Figure, { headline: t("status.documentsWaiting"), detail: t("status.documentsSession") }); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Figure, { headline: t("status.documentRatio", { active: documents.activeCount, archived: documents.archivedCount }), detail: t("status.documentUsage", { used: humanBytes(documents.activeBytes), limit: humanBytes(documents.limitBytes) }) }); } function SpacesStatus() { const t = useT$4(); const status = (0, react.useContext)(WorkbenchStatusContext); const spaces = status?.memoryBodies; if (spaces === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Figure, { headline: t("status.directoryUnsynced"), detail: t("status.activeMemories", { count: status?.stats?.totalInsights ?? 0 }) }); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Figure, { headline: t("status.activeRatio", { active: spaces.filter((space) => space.active).length, total: spaces.length }), detail: t("status.activeMemories", { count: status?.stats?.totalInsights ?? 0 }) }); } function SkillsStatus() { const t = useT$4(); const skills = (0, react.useContext)(WorkbenchStatusContext)?.skills; if (skills === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Figure, { headline: t("board.running"), detail: t("skills.statusOff") }); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Figure, { headline: t("skills.statusCount", { count: skills.skills }), detail: !skills.evolution ? t("skills.statusOff") : skills.waiting > 0 ? t("skills.statusOn", { waiting: skills.waiting }) : t("skills.statusIdle") }); } // vendor/dsh-mnemon/src/client/anchor.ts const MNEMON_ANCHOR_EVENT = "mnemon:anchor"; const pendingBySession = /* @__PURE__ */ new Map(); function keyOf(sessionId) { return sessionId === void 0 || sessionId === "" ? "*" : sessionId; } function dispatchMnemonAnchor(anchor) { pendingBySession.set(keyOf(anchor.sessionId), anchor); window.dispatchEvent(new CustomEvent(MNEMON_ANCHOR_EVENT, { detail: anchor })); } const EVERY_PAGE = () => true; function consumeMnemonAnchor(sessionId, accepts = EVERY_PAGE) { const key = keyOf(sessionId); const anchor = pendingBySession.get(key); if (anchor === void 0 || !accepts(anchor.page)) return null; pendingBySession.delete(key); return anchor; } function subscribeMnemonAnchor(sessionId, onAnchor, accepts = EVERY_PAGE) { const key = keyOf(sessionId); const handler = (event) => { const anchor = event.detail; if (anchor !== void 0 && keyOf(anchor.sessionId) === key && accepts(anchor.page)) { if (pendingBySession.get(key) === anchor) pendingBySession.delete(key); onAnchor(anchor); } }; window.addEventListener(MNEMON_ANCHOR_EVENT, handler); return () => window.removeEventListener(MNEMON_ANCHOR_EVENT, handler); } const css$7 = "._3g7pq_root{min-width:0;margin:2px 0}._3g7pq_bar{border-radius:var(--dsw-radius-sm);cursor:pointer;min-width:0;max-width:100%;height:24px;color:var(--dsw-alias-label-tertiary);font:inherit;background:0 0;border:0;align-items:center;gap:6px;padding:0 6px;font-size:12px;line-height:18px;transition:background-color .12s,color .12s;display:flex}._3g7pq_bar:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}._3g7pq_bar:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}._3g7pq_mark{flex:none;display:inline-flex}._3g7pq_label{flex:none;font-weight:500}._3g7pq_metrics{align-items:center;gap:8px;min-width:0;display:inline-flex;overflow:hidden}._3g7pq_metrics span{white-space:nowrap}._3g7pq_failureMetric{color:var(--dsw-alias-state-error-primary)}._3g7pq_chevron{flex:none;margin-left:auto;transition:transform .12s}._3g7pq_chevronOpen{transform:rotate(180deg)}._3g7pq_details{gap:4px;min-width:0;margin:2px 0 4px;padding:4px 6px;list-style:none;display:grid;container-type:inline-size}._3g7pq_toolRow{align-items:flex-start;gap:8px;min-width:0;display:flex}._3g7pq_toolChip{corner-shape:round;cursor:pointer;background:var(--dsw-alias-bg-module-platform);color:var(--dsw-alias-label-secondary);font:inherit;white-space:nowrap;border:none;border-radius:999px;flex:none;align-items:center;gap:3px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px;transition:background-color .12s,color .12s;display:inline-flex}._3g7pq_toolCount{color:var(--dsw-alias-label-tertiary);font-variant-numeric:tabular-nums}._3g7pq_toolChip:hover{background:var(--dsw-alias-interactive-bg-active);color:var(--dsw-alias-label-primary)}._3g7pq_toolChip:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:1px}._3g7pq_items{flex:auto;justify-items:start;gap:2px;min-width:0;display:grid}._3g7pq_item{border-radius:var(--dsw-radius-sm);cursor:pointer;min-width:0;max-width:100%;color:var(--dsw-alias-label-secondary);font:inherit;text-align:left;background:0 0;border:0;align-items:baseline;gap:6px;padding:0 4px;font-size:12px;line-height:19px;transition:background-color .12s,color .12s;display:flex}._3g7pq_item:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}._3g7pq_item:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:1px}._3g7pq_itemText{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}._3g7pq_itemPlace{min-width:0;max-width:40%;color:var(--dsw-alias-label-tertiary);text-overflow:ellipsis;white-space:nowrap;flex:0 auto;overflow:hidden}._3g7pq_itemMore{color:var(--dsw-alias-label-tertiary);padding:0 4px;font-size:12px;line-height:19px}@container (width<=420px){._3g7pq_toolRow{flex-direction:column;align-items:stretch;gap:2px}._3g7pq_toolChip{align-self:flex-start}}@media (prefers-reduced-motion:reduce){._3g7pq_bar,._3g7pq_chevron,._3g7pq_toolChip,._3g7pq_item{transition:none}}"; const tagId$4 = "dsh-brain-mnemon/src/client/MnemonTurnTail.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$4) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$4; document.head.appendChild(tag); } if (tag.textContent !== css$7) tag.textContent = css$7; } var MnemonTurnTail_module_css_default = { "bar": "_3g7pq_bar", "chevron": "_3g7pq_chevron", "chevronOpen": "_3g7pq_chevronOpen", "details": "_3g7pq_details", "failureMetric": "_3g7pq_failureMetric", "item": "_3g7pq_item", "itemMore": "_3g7pq_itemMore", "itemPlace": "_3g7pq_itemPlace", "itemText": "_3g7pq_itemText", "items": "_3g7pq_items", "label": "_3g7pq_label", "mark": "_3g7pq_mark", "metrics": "_3g7pq_metrics", "root": "_3g7pq_root", "toolChip": "_3g7pq_toolChip", "toolCount": "_3g7pq_toolCount", "toolRow": "_3g7pq_toolRow" }; // vendor/dsh-mnemon/src/client/memory-icon.tsx const MEMORY_ICON_PATHS = [ "M8 3.4C8 2.2 7.2 1.5 6.2 1.5C5.2 1.5 4.4 2.2 4.3 3.2C2.8 3.2 1.9 4.4 2.2 5.8C.9 6.8 1 8.8 2.4 9.6C2.1 11 3.1 12.2 4.5 12.2C4.8 14.7 8 14.9 8 12.3C8 14.9 11.2 14.7 11.5 12.2C12.9 12.2 13.9 11 13.6 9.6C15 8.8 15.1 6.8 13.8 5.8C14.1 4.4 13.2 3.2 11.7 3.2C11.6 2.2 10.8 1.5 9.8 1.5C8.8 1.5 8 2.2 8 3.4Z", "M8 3.4v8.9", "M4.3 3.2C4.2 4.1 4.7 4.8 5.5 5.1M11.7 3.2C11.8 4.1 11.3 4.8 10.5 5.1", "M2.4 9.6C3.2 10 4.4 9.7 4.8 8.8M13.6 9.6C12.8 10 11.6 9.7 11.2 8.8", "M4.5 12.2C4.4 11.2 4.9 10.5 5.7 10.2M11.5 12.2C11.6 11.2 11.1 10.5 10.3 10.2" ]; function MemoryIcon({ size, ...marker }) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("svg", { ...marker, "aria-hidden": "true", viewBox: "0 0 16 16", width: size, height: size, fill: "none", stroke: "currentColor", strokeWidth: "1", strokeLinecap: "round", strokeLinejoin: "round", children: MEMORY_ICON_PATHS.map((path) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: path }, path)) }); } function createMemoryIcon(size) { const namespace = "http://www.w3.org/2000/svg"; const icon = document.createElementNS(namespace, "svg"); icon.setAttribute("viewBox", "0 0 16 16"); icon.setAttribute("width", String(size)); icon.setAttribute("height", String(size)); icon.setAttribute("fill", "none"); icon.setAttribute("stroke", "currentColor"); icon.setAttribute("stroke-width", "1"); icon.setAttribute("stroke-linecap", "round"); icon.setAttribute("stroke-linejoin", "round"); icon.setAttribute("aria-hidden", "true"); for (const data of MEMORY_ICON_PATHS) { const path = document.createElementNS(namespace, "path"); path.setAttribute("d", data); icon.append(path); } return icon; } // vendor/dsh-mnemon/src/client/MnemonTurnTail.tsx function turnNumber$1(turn) { const value = turn?.turn; return typeof value === "number" ? value : void 0; } function isClosedTurn$1(turn) { return turn?.status === "closed"; } function memoryPageForTool(name) { return memoryTool(name)?.page ?? "memory-spaces/spaces"; } function turnTools(names) { const counts = /* @__PURE__ */ new Map(); for (const name of names) counts.set(name, (counts.get(name) ?? 0) + 1); return [...counts].map(([name, count]) => ({ name, count })); } function itemTarget(toolName, sourceTypeId, operationId, item, text) { if (sourceTypeId === "documents") return { page: "documents/library", seed: item.id }; if (sourceTypeId === "runtime") return { page: "runtime/entries", seed: text }; if (sourceTypeId === "memory-spaces" && operationId !== "manage-spaces") return { page: "memory-spaces/explore", seed: text }; return { page: memoryPageForTool(toolName) }; } function turnItems(activity) { const byTool = /* @__PURE__ */ new Map(); const add = (toolName, sourceTypeId, operationId, item, key) => { const memory = sourceTypeId === "memory-spaces" && item.excerpt !== void 0; const text = memory ? item.excerpt : item.title; if (text === item.id) return; const items = byTool.get(toolName) ?? []; if (items.some((existing) => existing.text === text)) return; items.push({ key, text, ...memory ? { place: item.title } : {}, ...itemTarget(toolName, sourceTypeId, operationId, item, text) }); byTool.set(toolName, items); }; for (const read of activity.retrieved ?? []) read.items.forEach((item, index) => add(read.toolName, read.sourceTypeId, read.operationId, item, `${read.callId}:${index}`)); for (const write of activity.writebacks ?? []) add(write.toolName, write.sourceTypeId, write.operationId, write.item, write.callId); return byTool; } const ITEMS_PER_TOOL = 3; const MnemonTurnTail = (0, react.memo)(function MnemonTurnTail({ turn, seq, sessionId, connection, localeRuntime, t }) { const subscribeLocale = (0, react.useCallback)((listener) => localeRuntime.subscribe(listener), [localeRuntime]); const getLocale = (0, react.useCallback)(() => localeRuntime.getSnapshot(), [localeRuntime]); (0, react.useSyncExternalStore)(subscribeLocale, getLocale, getLocale); const [activity, setActivity] = (0, react.useState)(void 0); const [open, setOpen] = (0, react.useState)(false); const number = turnNumber$1(turn); const closed = isClosedTurn$1(turn); (0, react.useEffect)(() => { if (!closed || number === void 0) { setActivity(null); return; } let alive = true; new MnemonClient(connection, sessionId).turnActivity(number, seq).then((result) => { if (alive) setActivity(result); }).catch(() => { if (alive) setActivity(null); }); return () => { alive = false; }; }, [ connection, sessionId, number, seq, closed ]); if (!closed || number === void 0) return null; if (activity === void 0 || activity === null) return null; const openPage = (page, seed, event) => { event.stopPropagation(); dispatchMnemonAnchor({ page, ...seed === void 0 ? {} : { seed }, ...sessionId === void 0 ? {} : { sessionId } }); }; const items = turnItems(activity); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonTurnTail_module_css_default.root, "data-open": open || void 0, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonTurnTail_module_css_default.bar, "aria-expanded": open, onClick: () => setOpen((value) => !value), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonTurnTail_module_css_default.mark, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryIcon, { size: 14 }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonTurnTail_module_css_default.label, children: t("turnTail.label") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonTurnTail_module_css_default.metrics, children: [ activity.recalls > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("turnTail.recall", { count: activity.recalls }) }), activity.writes > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("turnTail.write", { count: activity.writes }) }), activity.documentSearches > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("turnTail.documents", { count: activity.documentSearches }) }), activity.inspections > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("turnTail.inspect", { count: activity.inspections }) }), activity.failures > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonTurnTail_module_css_default.failureMetric, children: t("turnTail.failed", { count: activity.failures }) }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 12, className: `${MnemonTurnTail_module_css_default.chevron} ${open ? MnemonTurnTail_module_css_default.chevronOpen : ""}` }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: open && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { className: MnemonTurnTail_module_css_default.details, "aria-label": t("turnTail.toolList"), children: turnTools(activity.names).map(({ name, count }) => { const key = memoryTool(name)?.label; const label = key === void 0 ? name : t(key); const used = items.get(name) ?? []; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { className: MnemonTurnTail_module_css_default.toolRow, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, { label: name, side: "bottom", children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonTurnTail_module_css_default.toolChip, "aria-label": t("turnTail.openTool", { tool: label }), onClick: (event) => openPage(memoryPageForTool(name), void 0, event), children: [label, count > 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonTurnTail_module_css_default.toolCount, children: ["×", count] })] }) }), used.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonTurnTail_module_css_default.items, children: [used.slice(0, ITEMS_PER_TOOL).map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonTurnTail_module_css_default.item, title: item.text, onClick: (event) => openPage(item.page, item.seed, event), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonTurnTail_module_css_default.itemText, children: item.text }), item.place !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonTurnTail_module_css_default.itemPlace, children: item.place })] }, item.key)), used.length > ITEMS_PER_TOOL && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonTurnTail_module_css_default.itemMore, children: t("turnTail.more", { count: used.length - ITEMS_PER_TOOL }) })] })] }, name); }) }) })] }); }); // vendor/dsh-mnemon/src/client/document-visibility.ts function useDocumentVisible() { return (0, react.useSyncExternalStore)(documentVisibilityStore.subscribe, documentVisibilityStore.getSnapshot, () => true); } // vendor/dsh-mnemon/src/client/change-signal.ts var MnemonChangeSignal = class extends ChangeSignal {}; const css$6 = ".ebWjsW_root{min-width:0;max-width:100%;height:24px;color:var(--dsw-alias-label-tertiary);align-items:center;gap:6px;margin:2px 0;padding:0 6px;font-size:12px;line-height:18px;display:flex}.ebWjsW_mark{flex:none;display:inline-flex}.ebWjsW_label{flex:none;font-weight:500}.ebWjsW_items{align-items:center;gap:4px;min-width:0;display:inline-flex;overflow:hidden}.ebWjsW_item{border-radius:var(--dsw-radius-sm);cursor:pointer;min-width:0;max-width:220px;color:var(--dsw-alias-label-secondary);font:inherit;text-overflow:ellipsis;white-space:nowrap;background:0 0;border:0;padding:0 6px;font-size:12px;line-height:20px;transition:background-color .12s,color .12s;overflow:hidden}.ebWjsW_item:hover{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-primary)}.ebWjsW_item:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:1px}.ebWjsW_item[data-tone=accent]{color:var(--dsw-alias-state-business-primary)}.ebWjsW_state{white-space:nowrap;flex:none;padding:0 6px}.ebWjsW_state[data-tone=error]{color:var(--dsw-alias-label-tertiary)}@media (prefers-reduced-motion:reduce){.ebWjsW_item{transition:none}}"; const tagId$3 = "dsh-brain-mnemon/src/client/SkillTurnTail.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$3) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$3; document.head.appendChild(tag); } if (tag.textContent !== css$6) tag.textContent = css$6; } var SkillTurnTail_module_css_default = { "item": "ebWjsW_item", "items": "ebWjsW_items", "label": "ebWjsW_label", "mark": "ebWjsW_mark", "root": "ebWjsW_root", "state": "ebWjsW_state" }; // vendor/dsh-mnemon/src/client/SkillTurnTail.tsx const SKILLS_PAGE = "skills/library"; const POLL_MS$1 = 3e3; const SETTLE_CHECKS = 2; const NO_CHANGES = new MnemonChangeSignal(); const MAX_SKILL_ACTIVITY_SESSIONS = 32; const entries = /* @__PURE__ */ new WeakMap(); function entryOf(connection, sessionId) { let sessions = entries.get(connection); if (sessions === void 0) { sessions = /* @__PURE__ */ new Map(); entries.set(connection, sessions); } let entry = sessions.get(sessionId); if (entry !== void 0) { sessions.delete(sessionId); sessions.set(sessionId, entry); return entry; } entry = { settle: 0, checkedCursor: -1, requestedCursor: -1, revision: 0, componentRevision: 0, listeners: /* @__PURE__ */ new Set() }; sessions.set(sessionId, entry); if (sessions.size > MAX_SKILL_ACTIVITY_SESSIONS) { for (const [candidateId, candidate] of sessions) if (candidateId !== sessionId && candidate.listeners.size === 0 && candidate.loading === void 0) { cancelScheduled(candidate); sessions.delete(candidateId); if (sessions.size <= MAX_SKILL_ACTIVITY_SESSIONS) break; } while (sessions.size > MAX_SKILL_ACTIVITY_SESSIONS) { const oldest = sessions.keys().next().value; if (oldest === void 0 || oldest === sessionId) break; const victim = sessions.get(oldest); if (victim !== void 0) cancelScheduled(victim); sessions.delete(oldest); } } return entry; } function waiting(snapshot) { return snapshot?.reviews.some((review) => review.state === "scheduled" || review.state === "reviewing") === true; } function cancelScheduled(entry) { entry.cancelScheduled?.(); delete entry.cancelScheduled; } function invalidate(entry) { entry.revision += 1; entry.checkedCursor = -1; entry.settle = SETTLE_CHECKS; cancelScheduled(entry); } function invalidateSkillActivity(connection) { for (const [sessionId, entry] of entries.get(connection) ?? []) { invalidate(entry); schedule(connection, sessionId, entry, 0, true); } } function schedule(connection, sessionId, entry, delay = 0, idle = false) { if (entry.loading !== void 0 || entry.cancelScheduled !== void 0 || entry.listeners.size === 0) return; const run = () => { delete entry.cancelScheduled; load(connection, sessionId, entry); }; if (idle && typeof requestIdleCallback === "function") { const id = requestIdleCallback(run, { timeout: 1e3 }); entry.cancelScheduled = () => cancelIdleCallback(id); } else { const timer = setTimeout(run, delay); entry.cancelScheduled = () => clearTimeout(timer); } } function load(connection, sessionId, entry) { if (entry.loading !== void 0 || entry.listeners.size === 0) return; const cursor = entry.requestedCursor; const revision = entry.revision; let succeeded = false; entry.loading = new MnemonClient(connection, sessionId).skillActivity().then((snapshot) => { if (revision !== entry.revision) return; entry.snapshot = snapshot; entry.checkedCursor = snapshot.available ? cursor : -1; succeeded = true; }, () => void 0).finally(() => { delete entry.loading; for (const listener of [...entry.listeners]) listener(); if (revision !== entry.revision || succeeded && entry.requestedCursor > cursor) entry.nextReadAt = Date.now(); else if (waiting(entry.snapshot)) entry.nextReadAt = Date.now() + POLL_MS$1; else if (entry.settle > 0) { entry.settle -= 1; entry.nextReadAt = Date.now() + POLL_MS$1; } else delete entry.nextReadAt; if (entry.nextReadAt !== void 0) schedule(connection, sessionId, entry, Math.max(0, entry.nextReadAt - Date.now())); }); } function useSkillActivity(connection, sessionId, cursor, revision) { const visible = useDocumentVisible(); const entry = sessionId === void 0 ? void 0 : entryOf(connection, sessionId); const subscribe = (0, react.useCallback)((listener) => { if (entry === void 0 || !visible || cursor === void 0) return () => {}; entry.listeners.add(listener); return () => { entry.listeners.delete(listener); if (entry.listeners.size === 0) cancelScheduled(entry); }; }, [ entry, visible, cursor ]); const getSnapshot = (0, react.useCallback)(() => entry?.snapshot, [entry]); const snapshot = (0, react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot); (0, react.useEffect)(() => { if (entry === void 0 || sessionId === void 0 || cursor === void 0 || !visible) return; if (entry.componentRevision !== revision) { entry.componentRevision = revision; invalidate(entry); } if (cursor > entry.requestedCursor) { entry.requestedCursor = cursor; entry.settle = SETTLE_CHECKS; cancelScheduled(entry); } if (entry.snapshot === void 0 || cursor > entry.checkedCursor) schedule(connection, sessionId, entry, 0, true); else if (entry.nextReadAt !== void 0) schedule(connection, sessionId, entry, Math.max(0, entry.nextReadAt - Date.now())); }, [ connection, entry, sessionId, cursor, visible, revision ]); return snapshot; } function turnNumber(turn) { const value = turn?.turn; return typeof value === "number" ? value : void 0; } function isClosedTurn(turn) { return turn?.status === "closed"; } const SkillTurnTail = (0, react.memo)(function SkillTurnTail({ turn, seq, sessionId, connection, componentChanges = NO_CHANGES, localeRuntime, t }) { const subscribeLocale = (0, react.useCallback)((listener) => localeRuntime.subscribe(listener), [localeRuntime]); const getLocale = (0, react.useCallback)(() => localeRuntime.getSnapshot(), [localeRuntime]); (0, react.useSyncExternalStore)(subscribeLocale, getLocale, getLocale); const number = turnNumber(turn); const closed = isClosedTurn(turn); const revision = (0, react.useSyncExternalStore)(componentChanges.subscribe, componentChanges.getSnapshot, componentChanges.getSnapshot); const snapshot = useSkillActivity(connection, sessionId, closed && number !== void 0 ? seq : void 0, revision); if (!closed || number === void 0 || snapshot?.available !== true) return null; const used = snapshot.turns.find((entry) => entry.turn === number)?.skills ?? []; const review = snapshot.reviews.find((entry) => entry.turn === number); const reviewing = review?.state === "scheduled" || review?.state === "reviewing"; const suggestions = review?.suggestions ?? []; const failed = review?.state === "error"; if (used.length === 0 && !reviewing && suggestions.length === 0 && !failed) return null; const open = (seed) => dispatchMnemonAnchor({ page: SKILLS_PAGE, seed, ...sessionId === void 0 ? {} : { sessionId } }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: SkillTurnTail_module_css_default.root, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: SkillTurnTail_module_css_default.mark, "aria-hidden": "true", children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSkillOutlineRegular, { size: 14 }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: SkillTurnTail_module_css_default.label, children: t("skillTail.label") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: SkillTurnTail_module_css_default.items, children: [ used.map((skill) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: SkillTurnTail_module_css_default.item, title: t("skillTail.openSkill", { name: skill.name }), onClick: () => open(`name:${skill.name}`), children: skill.name }, skill.name)), reviewing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: SkillTurnTail_module_css_default.state, role: "status", children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { active: true, children: t("skillTail.reviewing") }) }), !reviewing && suggestions.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: SkillTurnTail_module_css_default.item, "data-tone": "accent", title: t("skillTail.openSuggestions"), onClick: () => open(suggestions.length === 1 ? `suggestion:${suggestions[0].id}` : "evolution:pending"), children: t("skillTail.suggested", { count: suggestions.length }) }), !reviewing && failed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: SkillTurnTail_module_css_default.state, "data-tone": "error", title: review.error, children: t("skillTail.failed") }) ] }) ] }); }); // vendor/dsh-mnemon/src/client/memory-composer.tsx const MEMORY_COMPOSER_PREFERENCE = "dsh-brain-mnemon:memory-composer"; function readSavedCollapsed() { try { return localStorage.getItem(MEMORY_COMPOSER_PREFERENCE) !== "expanded"; } catch { return true; } } const PANE_CONTAINER_SELECTOR = "#root, .dsh_frame, [data-dsh-frame], .dsh_centerCol, .dsh_rightbarCol, [data-pane=\"conversation\"], [data-conversation-scroll]"; var MemoryComposer = class extends ExternalStore { views = /* @__PURE__ */ new Map(); entries = /* @__PURE__ */ new Map(); register; multiplePanes = false; constructor() { super({ available: false, collapsed: readSavedCollapsed() }); } connect(register) { for (const stop of this.entries.values()) stop(); this.entries.clear(); this.register = register; const available = register !== void 0 && !this.multiplePanes; const next = this.snapshot.available === available ? this.snapshot : { ...this.snapshot, available }; this.snapshot = next; this.sync(); this.notify(); } setMultiplePanes(multiple) { if (this.multiplePanes === multiple) return; this.multiplePanes = multiple; const available = this.register !== void 0 && !multiple; this.snapshot = { ...this.snapshot, available }; this.sync(); this.notify(); } sync() { for (const [id, stop] of this.entries) if (!this.snapshot.available || !this.snapshot.collapsed || !this.views.has(id)) { stop(); this.entries.delete(id); } if (this.snapshot.available && this.snapshot.collapsed && this.register !== void 0) { for (const id of this.views.keys()) if (!this.entries.has(id)) this.entries.set(id, this.register(id)); } } mount(sessionId) { this.views.set(sessionId, (this.views.get(sessionId) ?? 0) + 1); this.sync(); let live = true; return () => { if (!live) return; live = false; const count = this.views.get(sessionId) ?? 0; if (count <= 1) this.views.delete(sessionId); else this.views.set(sessionId, count - 1); this.sync(); }; } setCollapsed(collapsed, persist = true) { if (this.snapshot.collapsed === collapsed) return; this.snapshot = { ...this.snapshot, collapsed }; if (persist) try { localStorage.setItem(MEMORY_COMPOSER_PREFERENCE, collapsed ? "collapsed" : "expanded"); } catch {} this.sync(); this.notify(); } revealSkill(event) { const detail = event.detail; if (typeof detail !== "object" || detail === null || !("sessionId" in detail) || typeof detail.sessionId !== "string" || !this.views.has(detail.sessionId)) return; this.setCollapsed(false); } }; function MemoryComposerToggle({ composer, t }) { const state = (0, react.useSyncExternalStore)(composer.subscribe, composer.getSnapshot, composer.getSnapshot); if (!state.available) return null; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonView_module_css_default.composerToggle, "aria-expanded": !state.collapsed, onClick: () => composer.setCollapsed(!state.collapsed), children: t(state.collapsed ? "composer.expand" : "composer.collapse") }); } function CollapsedComposer({ composer, t }) { return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.composerNotice, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("composer.collapsed") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryComposerToggle, { composer, t })] }); } function installMemoryComposer(ctx, t) { const composer = new MemoryComposer(); const stop = ctx.slots.inject("conversation.composer", () => { if (ctx.slots.spec?.("conversation.composer")?.kind !== "chain") return () => {}; composer.connect((sessionId) => ctx.slots.register({ name: "conversation.composer", priority: Number.MAX_SAFE_INTEGER, select: (owner) => owner.sessionId === sessionId && owner.pendingInteraction === void 0 ? true : null, locale: "mnemon", inject: () => ({ composer, t }) }, CollapsedComposer)); return () => composer.connect(void 0); }); let paneScheduled = false; let paneDisposed = false; let stopSlotSubscription; const observedContainers = /* @__PURE__ */ new Set(); const panes = typeof document === "undefined" ? void 0 : new MutationObserver(() => { schedulePaneSync(); }); const syncPanes = () => { if (paneDisposed || typeof document === "undefined") return; const seats = document.querySelectorAll("[data-composer-seat]"); composer.setMultiplePanes(seats.length > 1); if (panes === void 0) return; const nextTargets = /* @__PURE__ */ new Set([document.body]); for (const container of document.querySelectorAll(PANE_CONTAINER_SELECTOR)) nextTargets.add(container); for (const seat of seats) { let ancestor = seat.parentElement; while (ancestor !== null && ancestor !== document.documentElement) { nextTargets.add(ancestor); ancestor = ancestor.parentElement; } } let changed = nextTargets.size !== observedContainers.size; if (!changed) { for (const element of nextTargets) if (!observedContainers.has(element)) { changed = true; break; } } if (changed) { panes.disconnect(); observedContainers.clear(); for (const element of nextTargets) { observedContainers.add(element); panes.observe(element, { childList: true, subtree: false }); } } }; const schedulePaneSync = () => { if (paneScheduled || paneDisposed) return; paneScheduled = true; queueMicrotask(() => { paneScheduled = false; syncPanes(); }); }; if (typeof document !== "undefined") syncPanes(); const slotsWithSubscribe = ctx.slots; if (typeof slotsWithSubscribe.subscribe === "function") stopSlotSubscription = slotsWithSubscribe.subscribe("conversation.composer", schedulePaneSync); const skill = (event) => composer.revealSkill(event); const preference = (event) => { if (event.key === "dsh-brain-mnemon:memory-composer") composer.setCollapsed(event.newValue !== "expanded", false); }; if (typeof window !== "undefined") { window.addEventListener("dsh-brain-mnemon:skill-use", skill); window.addEventListener("storage", preference); } return { composer, dispose: () => { paneDisposed = true; if (typeof window !== "undefined") { window.removeEventListener("dsh-brain-mnemon:skill-use", skill); window.removeEventListener("storage", preference); } stopSlotSubscription?.(); panes?.disconnect(); observedContainers.clear(); stop(); composer.connect(void 0); } }; } function useMemoryComposerInset(root, enabled) { (0, react.useEffect)(() => { const shell = root.current; const scroll = enabled ? shell?.closest("[data-conversation-scroll]") : void 0; if (shell === null || scroll === void 0 || scroll === null) return; let seat = null; let frameId; let dirty = false; const applyInset = () => { if (seat !== null) { shell.dataset.mnemonComposer = ""; shell.style.setProperty("--mn-composer-inset", `${Math.ceil(seat.getBoundingClientRect().height) + 16}px`); } }; const scheduleInset = () => { if (frameId !== void 0) { dirty = true; return; } applyInset(); if (typeof requestAnimationFrame === "function") frameId = requestAnimationFrame(() => { frameId = void 0; if (dirty) { dirty = false; applyInset(); } }); }; const resize = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(scheduleInset); resize?.observe(scroll); const connect = () => { const next = scroll.querySelector(":scope > [data-composer-seat]"); if (seat !== next) { if (seat !== null) resize?.unobserve(seat); seat = next; if (seat !== null) resize?.observe(seat); } if (seat === null) { delete shell.dataset.mnemonComposer; shell.style.removeProperty("--mn-composer-inset"); } else applyInset(); }; connect(); const children = new MutationObserver(connect); children.observe(scroll, { childList: true, subtree: false }); return () => { if (frameId !== void 0 && typeof cancelAnimationFrame === "function") cancelAnimationFrame(frameId); children.disconnect(); resize?.disconnect(); delete shell.dataset.mnemonComposer; shell.style.removeProperty("--mn-composer-inset"); }; }, [root, enabled]); } // vendor/dsh-mnemon/src/client/starter-update.ts const STORAGE_KEY = "dsh-brain-mnemon.starter-update"; const FRESH_MS = 6e5; function sessionStore() { try { return typeof window === "undefined" ? void 0 : window.sessionStorage; } catch { return; } } function recordStarterUpdate(update, now = Date.now()) { const record = { at: now, ...update.from === void 0 ? {} : { from: update.from }, ...update.to === void 0 ? {} : { to: update.to } }; try { sessionStore()?.setItem(STORAGE_KEY, JSON.stringify(record)); } catch {} } function clearStarterUpdate() { try { sessionStore()?.removeItem(STORAGE_KEY); } catch {} } function pendingStarterUpdate(now = Date.now()) { let raw; try { raw = sessionStore()?.getItem(STORAGE_KEY); } catch { return; } if (raw === null || raw === void 0) return void 0; let value; try { value = JSON.parse(raw); } catch { value = void 0; } if (!isRecord(value) || typeof value.at !== "number" || now - value.at > FRESH_MS || value.at > now + 6e4) { clearStarterUpdate(); return; } return { at: value.at, ...typeof value.from === "string" ? { from: value.from } : {}, ...typeof value.to === "string" ? { to: value.to } : {} }; } function reopenAfterStarterUpdate(workspace) { if (pendingStarterUpdate() === void 0) return () => {}; let unsubscribe; const attempt = () => { const open = workspace.getSnapshot(); if (open === void 0) return; unsubscribe?.(); unsubscribe = void 0; if (pendingStarterUpdate() !== void 0) open(); }; unsubscribe = workspace.subscribe(attempt); attempt(); return () => { unsubscribe?.(); }; } // vendor/dsh-mnemon/src/client/VersionDialog.tsx function versionModeLabel(t, mode, cli = false) { if (mode === "homebrew") return t("versions.modeHomebrew"); if (mode === "go") return t("versions.modeGo"); if (mode === "npm") return t(cli ? "versions.modeNpmCli" : "versions.modeNpm"); if (mode === "link") return t("versions.modeLink"); if (mode === "missing") return t("versions.modeMissing"); return t("versions.modeManual"); } function versionHint(t, component) { if (component.updateHint === "npm") return t("versions.hintNpm"); if (component.updateHint === "npm-missing") return t("versions.hintNpmMissing"); if (component.updateHint === "npm-unmanaged") return t("versions.hintNpmUnmanaged"); if (component.updateHint === "cli-unreadable") return t("versions.hintUnreadable"); if (component.updateHint === "starter") return t("versions.hintStarter"); if (component.updateHint === "brew") return t("versions.hintHomebrew"); if (component.updateHint === "brew-missing") return t("versions.hintBrewMissing"); if (component.updateHint === "go") return t("versions.hintGo"); if (component.updateHint === "dsh") return t("versions.hintDsh"); if (component.updateHint === "pnpm") return t("versions.hintPnpm"); if (component.updateHint === "pnpm-missing") return t("versions.hintPnpmMissing"); if (component.updateHint === "link") return t("versions.hintLink"); if (component.updateHint === "install") return t("versions.hintInstall"); return t("versions.hintManual"); } function versionState(component) { if (component.installMode === "missing") return "missing"; if (component.restartRequired) return "restart"; if (component.current === void 0 || component.latest === void 0 || component.checkError !== void 0) return "unknown"; if (component.outdated) return "available"; return component.current.replace(/^v/, "") === component.latest.replace(/^v/, "") ? "current" : "local"; } function CommandSnippet({ command }) { const t = useT$4(); const [copied, setCopied] = (0, react.useState)(false); const [failed, setFailed] = (0, react.useState)(false); const copy = async () => { const accepted = await (0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(command); setCopied(accepted); setFailed(!accepted); }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.versionCommand, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: command }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonView_module_css_default.ghostButton, "aria-label": t("versions.copyCommand", { command }), onClick: () => void copy(), children: t(copied ? "versions.copied" : "versions.copy") }), failed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { role: "status", children: t("versions.copyFailed") }) ] }); } function NpmGuidance({ component }) { const t = useT$4(); const missing = component.installMode === "missing"; const npm = component.installMode === "npm"; const managed = npm && component.updateHint === "npm"; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonView_module_css_default.versionGuidance, "aria-label": t("versions.npmRecommended"), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t(managed ? "versions.npmMaintenance" : npm ? "versions.npmRepair" : missing ? "versions.npmInstall" : "versions.npmMigrate") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t(managed ? "versions.npmUpdateDetail" : npm ? "versions.npmRepairDetail" : missing ? "versions.npmInstallDetail" : "versions.npmMigrateDetail") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CommandSnippet, { command: managed ? "mnemon update" : "npm install --global @mnemon-dev/mnemon@latest" }), !managed && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", { className: MnemonView_module_css_default.versionGuidanceDetails, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t("versions.npmNextSteps") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("versions.npmVerify") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CommandSnippet, { command: "mnemon --version" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("versions.npmPath") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", { href: "https://github.com/mnemon-dev/mnemon#install", target: "_blank", rel: "noreferrer", children: t("versions.installGuide") }) ] }) ] }); } function dshInstallLabel(t, component) { if (component.installMode === "npm") return t("versions.profileLocation", { name: component.installProfile ?? "—" }); if (component.installMode === "link") return component.installProfile === void 0 ? t("versions.sourceLocation") : t("versions.linkSourceLocation", { name: component.installProfile }); return t("versions.packageLocation"); } function VersionDialog(props) { const t = useT$4(); const [snapshot, setSnapshot] = (0, react.useState)(null); const [checking, setChecking] = (0, react.useState)(true); const [updating, setUpdating] = (0, react.useState)(null); const [error, setError] = (0, react.useState)(null); const [result, setResult] = (0, react.useState)(null); const [packagesOpen, setPackagesOpen] = (0, react.useState)(false); const updateInFlight = (0, react.useRef)(false); const checkRequestRef = (0, react.useRef)(0); const checkTimeoutRef = (0, react.useRef)(null); const check = (0, react.useCallback)(async () => { const requestVersion = ++checkRequestRef.current; setChecking(true); setError(null); let timeout; try { const deadline = new Promise((_resolve, reject) => { timeout = setTimeout(() => reject(new Error(t("versions.timeout"))), 15e3); checkTimeoutRef.current = timeout; }); const next = await Promise.race([props.client.versions(), deadline]); if (checkRequestRef.current === requestVersion) setSnapshot(next); } catch (reason) { if (checkRequestRef.current === requestVersion) setError(message(reason)); } finally { if (timeout !== void 0) clearTimeout(timeout); if (checkTimeoutRef.current === timeout) checkTimeoutRef.current = null; if (checkRequestRef.current === requestVersion) setChecking(false); } }, [props.client, t]); (0, react.useEffect)(() => { check(); return () => { checkRequestRef.current += 1; if (checkTimeoutRef.current !== null) clearTimeout(checkTimeoutRef.current); checkTimeoutRef.current = null; }; }, [check]); const update = async (component) => { if (updateInFlight.current || !props.writeEnabled) return; updateInFlight.current = true; setUpdating(component.id); setError(null); setResult(null); if (component.id === "dsh-brain-mnemon") recordStarterUpdate({ from: component.current, to: component.latest }); try { const next = await props.client.updateVersion(component.id); setResult(next); await check(); props.onRefreshStatus(); } catch (reason) { if (component.id === "dsh-brain-mnemon") clearStarterUpdate(); setError(message(reason)); } finally { setUpdating(null); updateInFlight.current = false; } }; const close = () => { clearStarterUpdate(); props.onClose(); }; const updatingBusy = updating !== null; const controlsBusy = checking || updatingBusy; const resumed = props.resumedUpdate; const starter = snapshot?.components.find((component) => component.id === "dsh-brain-mnemon"); const outcome = result === null && error === null && resumed !== void 0 && snapshot?.lastUpdate?.component === "dsh-brain-mnemon" && Date.parse(snapshot.lastUpdate.at) >= resumed.at - 6e4 ? snapshot.lastUpdate : void 0; const resumedResult = outcome !== void 0 ? outcome.result ?? null : result === null && resumed !== void 0 && snapshot?.lastUpdate === void 0 && starter?.restartRequired === true && (resumed.to === void 0 || starter.current === resumed.to) ? { component: "dsh-brain-mnemon", updated: true, restartRequired: true, ...resumed.from === void 0 ? {} : { previousVersion: resumed.from }, ...starter.current === void 0 ? {} : { currentVersion: starter.current } } : null; const shownResult = result ?? resumedResult; const shownError = error ?? outcome?.error ?? null; const updateButton = (component) => props.writeEnabled && component.outdated && component.updateSupported && component.checkError === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonView_module_css_default.primaryButton, disabled: controlsBusy, onClick: () => void update(component), children: updating === component.id ? t("versions.updating") : t("versions.update") }) : null; const renderPackage = (component) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { className: MnemonView_module_css_default.versionPackage, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.versionPackageHeader, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: component.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { "data-state": versionState(component), children: t(`versions.${versionState(component)}`) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.versionPackageMeta, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: versionModeLabel(t, component.installMode) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(component.managedBy === "starter" ? "versions.managedStarter" : "versions.managedProfile") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.versionPackageNumbers, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [ t("versions.installed"), " ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: component.current ?? "—" }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [ t("versions.latest"), " ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: component.latest ?? "—" }) ] }), component.expectedVersion !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [ t("versions.starterVersion"), " ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: component.expectedVersion }) ] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.versionPackageAction, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { children: [versionHint(t, component), component.checkError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [" ", t("versions.latestUnavailable")] })] }), updateButton(component)] }) ] }, component.id); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("versions.title"), description: t("versions.description"), busy: updatingBusy, contentReady: !checking, onClose: close, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonView_module_css_default.modalFooterMeta, children: snapshot === null ? "" : t("versions.checkedAt", { time: new Date(snapshot.checkedAt).toLocaleTimeString() }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-autofocus": true, className: MnemonView_module_css_default.secondaryButton, disabled: controlsBusy, onClick: () => void check(), children: checking ? t("versions.checkingShort") : t("versions.recheck") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, className: MnemonView_module_css_default.secondaryButton, disabled: updatingBusy, onClick: close, children: t("common.close") })] })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.versionDialogBody, children: [ checking && snapshot === null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.versionChecking, role: "status", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {}), t("versions.checking")] }), shownError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.versionError, role: "alert", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("versions.failed") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: shownError })] }), !props.writeEnabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonView_module_css_default.versionNotice, children: t("versions.readOnly") }), shownResult !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.versionResult, role: "status", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: shownResult.updated ? t("versions.updated", { name: shownResult.component === "mnemon" ? "Mnemon CLI" : shownResult.component }) : t("versions.alreadyCurrent") }), shownResult.restartRequired && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("versions.restartRequired") })] }), snapshot !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.versionList, children: snapshot.components.map((component) => { const state = versionState(component); const packages = component.packages ?? []; const outdated = packages.filter((item) => item.outdated).length; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { "data-outdated": component.outdated || void 0, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: component.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: versionModeLabel(t, component.installMode, component.id === "mnemon") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { "data-state": state, children: t(`versions.${state}`) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.versionNumbers, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("versions.installed") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: component.current ?? "—" })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "→" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("versions.latest") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: component.latest ?? "—" })] }) ] }), component.id === "mnemon" && component.executablePath !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("small", { className: MnemonView_module_css_default.versionLocation, title: component.executablePath, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("versions.executable") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: component.executablePath })] }), component.id === "dsh-brain-mnemon" && component.installPath !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("small", { className: MnemonView_module_css_default.versionLocation, title: component.installPath, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: dshInstallLabel(t, component) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: component.installPath })] }), component.restartRequired && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonView_module_css_default.versionNotice, role: "status", children: t("versions.restartRequired") }), component.checkError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonView_module_css_default.versionNotice, children: t("versions.latestUnavailable") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: versionHint(t, component) }), updateButton(component)] }), component.id === "mnemon" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NpmGuidance, { component }), component.id === "dsh-brain-mnemon" && packages.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.versionPackages, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonView_module_css_default.versionPackagesToggle, "aria-expanded": packagesOpen, "aria-controls": "mnemon-version-packages", onClick: () => setPackagesOpen((open) => !open), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "aria-hidden": "true", children: packagesOpen ? "▾" : "▸" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("versions.packages", { count: packages.length }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: outdated > 0 ? t("versions.packagesOutdated", { count: outdated }) : t(packagesOpen ? "versions.packagesHide" : "versions.packagesDetail") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: packagesOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { id: "mnemon-version-packages", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: MnemonView_module_css_default.versionNotice, children: t("versions.packagesHint") }), [ "source", "strategy", "provider" ].map((kind) => { const members = packages.filter((item) => item.kind === kind); return members.length === 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { "aria-label": t(`versions.kind.${kind}`), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h4", { children: t(`versions.kind.${kind}`) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { children: members.map(renderPackage) })] }, kind); })] }) })] }) ] }, component.id); }) }) ] }) }); } // vendor/dsh-mnemon/src/client/StatusPage.tsx function StatusPage(props) { const t = useT$4(); const [resumedUpdate, setResumedUpdate] = (0, react.useState)(() => pendingStarterUpdate()); const [versionsOpen, setVersionsOpen] = (0, react.useState)(false); const status = props.status; const answered = status !== null || !props.loading; (0, react.useEffect)(() => { if (resumedUpdate === void 0 || !answered) return; if (status !== null && status.restartPending === void 0 && resumedUpdate.to !== void 0 && status.dshMnemonVersion === resumedUpdate.to) { clearStarterUpdate(); setResumedUpdate(void 0); return; } setVersionsOpen(true); }, [answered]); const reviewError = status?.lifecycle?.current?.lastError; const storage = status?.storage; const selectedScopeKind = storage?.activeKind ?? "global"; const selectedScope = storage?.scopes.find((scope) => scope.kind === selectedScopeKind); const idle = (state) => state === "on" ? void 0 : state === "off" ? { title: t("layers.disabledBadge"), detail: t("status.layerOffDetail") } : state === "memory-off" ? { title: t("layers.memoryOffBadge"), detail: t("status.layerMemoryOffDetail") } : { title: t("layers.stoppedBadge"), detail: t("status.layerStoppedDetail") }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.page, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageHeader, { title: t("status.title"), description: t("status.description"), meta: status === null && props.loading ? t("common.loading") : status === null || reviewError !== void 0 || props.attention ? t("status.checkRequired") : t("status.nominal"), ...props.loading ? { loadingLabel: t("status.rechecking") } : {}, action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.statusHeaderActions, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonView_module_css_default.secondaryButton, onClick: () => setVersionsOpen(true), children: t("versions.checkAction") }) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonView_module_css_default.healthStrip, "aria-label": t("status.aria"), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: `${MnemonView_module_css_default.healthIndicator} ${status === null ? MnemonView_module_css_default.healthMuted : MnemonView_module_css_default.healthGood}` }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("status.engine") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: status?.dshMnemonVersion === void 0 ? "dsh-brain-mnemon" : `dsh-brain-mnemon ${status.dshMnemonVersion}` }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: status === null ? t("status.pluginChecking") : t("status.pluginReady") }) ] })] }), props.components.map((card) => { const note = idle(card.state); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { "data-component": card.packageName, "data-interactive": card.onSelect !== void 0 ? "" : void 0, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: `${MnemonView_module_css_default.healthIndicator} ${note === void 0 && status !== null ? MnemonView_module_css_default.healthGood : MnemonView_module_css_default.healthMuted}` }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [card.onSelect !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonView_module_css_default.healthCardAction, onClick: card.onSelect, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: card.label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonView_module_css_default.healthCardChevron, "aria-hidden": "true", children: "›" })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: card.label }), note === void 0 ? props.renderCard(card) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: note.title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: note.detail })] })] })] }, card.key); })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.asyncStatusBlock, children: status !== null && (status.providerServices !== void 0 || status.memoryBodies !== void 0 && nativeInUse(status)) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderHealth, { status, services: status.providerServices ?? [], onOpenConfiguration: props.onOpenConfiguration }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.asyncStatusBlock, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StorageDomains, { catalog: storage, selected: selectedScope, selectedKind: selectedScopeKind, areaName: props.areaName }) }), versionsOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(VersionDialog, { client: props.client, writeEnabled: props.writeEnabled, resumedUpdate, onClose: () => { setResumedUpdate(void 0); setVersionsOpen(false); }, onRefreshStatus: props.onRefresh }) ] }); } function nativeInUse(status) { return status.commandFound || (status.memoryBodies ?? []).some((body) => body.provider.origin === "native"); } function NativeProviderRow({ status }) { const t = useT$4(); const bodies = (status.memoryBodies ?? []).filter((body) => body.provider.origin === "native"); const active = bodies.filter((body) => body.active); const pending = active.filter((body) => body.statusLoading === true); const failed = active.filter((body) => body.statusLoading !== true && !body.healthy); const state = !status.commandFound || failed.length > 0 ? "unhealthy" : active.length === 0 || pending.length > 0 ? "idle" : "healthy"; const error = !status.commandFound ? t("status.nativeCliMissing") : failed.map((body) => `${body.name}: ${body.error ?? t("status.engineUnavailable")}`).join("; "); const version = status.version === void 0 ? t("status.versionWaiting") : `Mnemon ${status.version}`; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { "aria-label": t("status.nativeAria"), "data-status": state, "data-native": "", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderIcon, { providerId: NATIVE_PROVIDER_ID, icon: { kind: "brand", value: "mnemon" }, className: MnemonView_module_css_default.providerHealthMark }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.providerHealthCopy, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("config.nativeName") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("small", { children: [ t(`status.providerState.${state}`), " · ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: version }) ] }), error !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { title: error, children: error }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.providerHealthMeta, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonView_module_css_default.providerHealthSignal, "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("status.providerSpaces", { active: active.length, total: bodies.length }) })] }) ] }); } function ProviderHealth({ status, services, onOpenConfiguration }) { const t = useT$4(); const native = status.memoryBodies !== void 0 && nativeInUse(status); const running = services.filter((service) => service.enabled); const off = services.length - running.length; const enabled = running.length + (native && status.commandFound ? 1 : 0); const total = services.length + (native ? 1 : 0); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonView_module_css_default.providerHealth, "aria-label": t("status.providersAria"), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.statusSectionHeader, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("status.providersTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("status.providersDescription") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonView_module_css_default.phaseBadge, children: t("status.providersEnabled", { enabled, total }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.providerHealthList, children: [native && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(NativeProviderRow, { status }), running.map((service) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { "data-status": service.status, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProviderIcon, { providerId: service.providerId, icon: service.icon, className: MnemonView_module_css_default.providerHealthMark }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.providerHealthCopy, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: service.label }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t(`status.providerState.${service.status}`) }), service.error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { title: service.error, children: service.error }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.providerHealthMeta, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonView_module_css_default.providerHealthSignal, "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("status.providerSpaces", { active: service.activeMemoryBodyCount, total: service.memoryBodyCount }) })] }) ] }, service.providerId))] }), off > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.providerHealthOff, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("status.providersOff", { count: off }) }), onOpenConfiguration !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", onClick: onOpenConfiguration, children: t("common.openConfiguration") })] }) ] }); } function storageScopeLabel(t, kind) { return t(kind === "global" ? "status.storageGlobal" : kind === "workspace" ? "status.storageWorkspace" : kind === "workspaces" ? "status.storageWorkspaces" : "status.storageCustom"); } function storageAreaDetails(t, area) { if (area.kind === "runtime") return t("status.storageRuntimeDetail", { user: area.details.userEntries ?? 0, memory: area.details.memoryEntries ?? 0 }); if (area.kind === "memory-bodies") return t("status.storageSpacesDetail", { active: area.details.activeBodies ?? 0, databases: area.details.databases ?? 0 }); if (area.kind === "documents") return t("status.storageDocumentsDetail", { active: area.details.activeDocuments ?? 0, archived: area.details.archivedDocuments ?? 0 }); return area.details.reviewLedger === true ? t("status.storageStateReady") : t("status.storageStateVolatile"); } function StorageDomains(props) { const t = useT$4(); const areaStatus = (status) => t(status === "ready" ? "status.storageReady" : status === "empty" ? "status.storageEmpty" : status === "missing" ? "status.storageMissing" : "status.storageInvalid"); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonView_module_css_default.storageDomains, "aria-label": t("status.storageDomains"), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.statusSectionHeader, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("status.storageDomains") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("status.storageDomainsText") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonView_module_css_default.phaseBadge, title: t("status.storageFootnote"), children: storageScopeLabel(t, props.selectedKind) })] }), props.catalog === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.storageUnavailable, children: t("status.storageWaiting") }) : props.selected?.root === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.storageUnavailable, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: storageScopeLabel(t, props.selectedKind) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: props.selectedKind === "custom" ? t("status.storageCustomUnset") : t("status.storageWorkspaceUnavailable") })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.storageRoot, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [ storageScopeLabel(t, props.selectedKind), " · ", t("status.storageActiveRoot") ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.PathLabel, { path: props.selected.root })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: humanBytes(props.selected.totalBytes) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: props.selected.available ? t("status.storageAvailable") : t("status.storageNotCreated") })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.storageAreaGrid, children: props.selected.areas.filter((area) => area.kind !== "state").map((area) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { "data-status": area.status, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {}), " ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: props.areaName(area.kind) }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { children: areaStatus(area.status) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.storageAreaMetric, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: area.itemCount }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("status.storageItems") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: humanBytes(area.bytes) }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: storageAreaDetails(t, area) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonView_module_css_default.storagePath, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.PathLabel, { path: area.path }) }), area.issue !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: area.issue }) ] }, area.kind)) })] })] }); } // vendor/dsh-mnemon/src/client/SourceManagementPage.tsx const EMPTY_SOURCE_MANAGEMENT_FIELDS = []; function SourceManagementPage(props) { const t = useT$4(); const fields = props.instance.management.fields ?? EMPTY_SOURCE_MANAGEMENT_FIELDS; const [draft, setDraft] = (0, react.useState)({}); const [loading, setLoading] = (0, react.useState)(false); const [saving, setSaving] = (0, react.useState)(false); const [error, setError] = (0, react.useState)(null); const [saved, setSaved] = (0, react.useState)(false); (0, react.useEffect)(() => { let active = true; setDraft({}); setError(null); setSaved(false); if (fields.length === 0 || props.management === void 0) { setLoading(false); return () => { active = false; }; } setLoading(true); props.management.read(MNEMON_SOURCE_CONFIGURATION_READ).then((result) => { if (!active) return; const values = jsonRecord(jsonRecord(result.value)?.values ?? result.value) ?? {}; setDraft(Object.fromEntries(fields.flatMap((field) => { if (field.secret === true || field.input === "secret") return []; const value = values[field.key]; return value === void 0 ? [] : [[field.key, value]]; }))); }).catch((reason) => { if (active) setError(message(reason)); }).finally(() => { if (active) setLoading(false); }); return () => { active = false; }; }, [ fields, props.instance.revision, props.instance.sourceInstanceKey, props.management ]); const submit = async (event) => { event.preventDefault(); if (props.management === void 0) return; setSaving(true); setSaved(false); setError(null); try { const input = Object.fromEntries(fields.flatMap((field) => { const value = draft[field.key]; if ((field.secret === true || field.input === "secret") && (value === void 0 || value === "")) return []; if (field.input === "number" && value !== void 0 && value !== "") return [[field.key, Number(value)]]; if (field.input === "boolean") return [[field.key, value === true]]; return value === void 0 || value === "" ? [] : [[field.key, value]]; })); await props.management.mutate(MNEMON_SOURCE_CONFIGURATION_MUTATE, input, { confirmed: true }); setSaved(true); props.onMutate(); } catch (reason) { setError(message(reason)); } finally { setSaving(false); } }; const availability = t(`sourcePage.availability.${props.instance.availability}`); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.page, "data-source-management": props.instance.sourceTypeId, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageHeader, { title: props.instance.management.label, description: props.instance.management.description, meta: props.instance.sourceTypeId, ...loading ? { loadingLabel: t("sourcePage.configLoading") } : {} }), props.instances.length > 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { inline: true, size: "sm", className: MnemonView_module_css_default.workspacePicker, label: t("sourcePage.instance"), ariaLabel: t("sourcePage.instanceAria"), value: props.instance.sourceInstanceKey, options: props.instances.map((instance) => ({ value: instance.sourceInstanceKey, label: instance.management.label, detail: instance.sourceInstanceKey })), onChange: props.onSelect }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonView_module_css_default.sourceManagementSummary, "data-availability": props.instance.availability, "aria-label": t("sourcePage.summaryAria"), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.sourceManagementIdentity, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("sourcePage.package") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: props.instance.packageName }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: props.instance.sourceInstanceKey }) ] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dl", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("sourcePage.availability") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: availability })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("sourcePage.role") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: props.instance.role })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("sourcePage.revision") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: short(props.instance.revision, 32) }) })] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.sourceManagementCapabilities, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("sourcePage.permissions") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: props.instance.capabilities.map((capability) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: capability }, capability)) })] }) ] }), props.instance.management.diagnostics !== void 0 && props.instance.management.diagnostics.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: MnemonView_module_css_default.sourceManagementDiagnostics, "aria-label": t("sourcePage.diagnostics"), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("sourcePage.diagnostics") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { children: props.instance.management.diagnostics.map((diagnostic, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: diagnostic }, `${index}:${diagnostic}`)) })] }), fields.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { className: MnemonView_module_css_default.sourceManagementForm, onSubmit: (event) => void submit(event), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("sourcePage.configuration") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("sourcePage.configurationDescription") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.formGrid, children: fields.map((field) => { const value = draft[field.key]; const update = (next) => setDraft((current) => ({ ...current, [field.key]: next })); if (field.input === "boolean") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.providerFieldControl, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, { checked: value === true, label: field.label, onChange: (next) => update(next) }), field.description !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: field.description })] }, field.key); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [ field.label, field.input === "select" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { hideLabel: true, label: field.label, value: typeof value === "string" ? value : "", options: [{ value: "", label: "—" }, ...(field.options ?? []).map((option) => ({ value: option.value, label: option.label }))], onChange: update }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { type: field.input === "secret" ? "password" : field.input === "number" ? "number" : field.input === "url" ? "url" : "text", value: typeof value === "string" || typeof value === "number" ? value : "", required: field.required && field.input !== "secret", autoComplete: field.input === "secret" ? "new-password" : void 0, placeholder: field.input === "secret" ? t("sourcePage.secretPlaceholder") : void 0, onChange: (event) => update(event.target.value) }), field.description !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: field.description }) ] }, field.key); }) }), error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.alert, role: "alert", children: error }), saved && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.runtimeNotice, role: "status", children: t("sourcePage.configSaved") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", className: MnemonView_module_css_default.primaryButton, disabled: saving || loading || props.management === void 0 || props.instance.availability === "unavailable", children: saving ? t("sourcePage.configSaving") : t("sourcePage.configSave") }), props.management === void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("sourcePage.unavailable") })] }) ] }), fields.length === 0 && props.instance.availability === "unavailable" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.emptyState, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonView_module_css_default.emptyGlyph, children: "!" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("sourcePage.unavailable") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("sourcePage.unavailableDescription") })] })] }) ] }); } // vendor/dsh-mnemon/src/client/use-workspace-status.ts function useWorkspaceStatus(client, viewContextKey, active = true) { const [statusState, setStatusState] = (0, react.useState)(() => ({ contextKey: viewContextKey, value: null, loading: true, needsFullStatus: false, error: null })); const currentStatusState = statusState.contextKey === viewContextKey ? statusState : { contextKey: viewContextKey, value: null, loading: true, needsFullStatus: false, error: null }; const status = currentStatusState.value; const statusLoading = currentStatusState.loading; const statusError = currentStatusState.error; const statusRequest = (0, react.useRef)(0); const current = (0, react.useRef)({ client, viewContextKey, active }); current.current = { client, viewContextKey, active }; const stateRef = (0, react.useRef)(currentStatusState); stateRef.current = currentStatusState; const mounted = (0, react.useRef)(true); (0, react.useEffect)(() => { mounted.current = true; return () => { mounted.current = false; }; }, []); return { status, statusLoading, statusError, loadStatus: (0, react.useCallback)(async (includeFull = true) => { if (!mounted.current || !current.current.active || current.current.client !== client || current.current.viewContextKey !== viewContextKey) return; const request = ++statusRequest.current; const isCurrent = () => request === statusRequest.current && mounted.current && current.current.active && current.current.client === client && current.current.viewContextKey === viewContextKey; setStatusState((previous) => ({ contextKey: viewContextKey, value: previous.contextKey === viewContextKey ? previous.value : null, loading: true, needsFullStatus: false, error: null })); try { const summary = await client.statusSummary(); if (!isCurrent()) return; const needsDeepStatus = summary.memoryBodies?.some((body) => body.statusLoading === true) === true || summary.commandFound === true && summary.version === void 0; const resolveFull = typeof includeFull === "function" ? includeFull() : includeFull; if (!needsDeepStatus || !resolveFull) { setStatusState({ contextKey: viewContextKey, value: summary, loading: false, needsFullStatus: needsDeepStatus, error: null }); return; } setStatusState({ contextKey: viewContextKey, value: summary, loading: true, needsFullStatus: false, error: null }); try { const next = await client.status(); if (isCurrent()) setStatusState({ contextKey: viewContextKey, value: next, loading: false, needsFullStatus: false, error: null }); } catch (reason) { if (isCurrent()) setStatusState({ contextKey: viewContextKey, value: summary, loading: false, needsFullStatus: false, error: message(reason) }); } } catch (reason) { if (isCurrent()) setStatusState({ contextKey: viewContextKey, value: null, loading: false, needsFullStatus: false, error: message(reason) }); } }, [client, viewContextKey]), ensureFullStatus: (0, react.useCallback)(() => { const snapshot = stateRef.current; if (!mounted.current || !current.current.active || current.current.client !== client || current.current.viewContextKey !== viewContextKey) return; if (!snapshot.needsFullStatus || snapshot.loading) return; const request = ++statusRequest.current; const isCurrent = () => request === statusRequest.current && mounted.current && current.current.active && current.current.client === client && current.current.viewContextKey === viewContextKey; const summary = snapshot.value; setStatusState({ contextKey: viewContextKey, value: summary, loading: true, needsFullStatus: false, error: null }); client.status().then((next) => { if (isCurrent()) setStatusState({ contextKey: viewContextKey, value: next, loading: false, needsFullStatus: false, error: null }); }, (reason) => { if (isCurrent()) setStatusState({ contextKey: viewContextKey, value: summary, loading: false, needsFullStatus: false, error: message(reason) }); }); }, [client, viewContextKey]) }; } // vendor/dsh-mnemon/src/client/use-source-catalog.ts function bindSourceManagementClient(client, instance, taskClient, assertCurrent, readEpoch, changed) { const pending = /* @__PURE__ */ new Map(); const independent = async (run) => { assertCurrent(); pending.clear(); try { return await run(); } finally { pending.clear(); } }; const write = async (run) => { const result = await independent(run); changed(); return result; }; return { sourceInstanceKey: instance.sourceInstanceKey, revision: instance.revision, ...instance.assistance === void 0 || instance.assistance.length === 0 ? {} : { assistance: { operations: instance.assistance, execute: async (operation, input, options) => { assertCurrent(); const task = [ "agent-search", "supervise", "body-create", "body-metadata-maintain" ].includes(operation); return write(() => (task ? taskClient : client).assistSource(instance.sourceInstanceKey, operation, input, options.expectedRevision, options.confirmed)); } } }, read: async (operation, input = null, options) => { assertCurrent(); if (options?.coalesce !== true) return independent(() => client.readSourceManagement(instance.sourceInstanceKey, operation, input)); const key = JSON.stringify([ readEpoch(), operation, input ]); let entry = pending.get(key); if (entry === void 0) { const created = { promise: client.readSourceManagement(instance.sourceInstanceKey, operation, input).finally(() => { if (pending.get(key) === created) pending.delete(key); }), waiters: 0 }; entry = created; pending.set(key, entry); } entry.waiters += 1; const result = await entry.promise; return entry.waiters > 1 ? structuredClone(result) : result; }, mutate: (operation, input, options) => write(() => client.mutateSourceManagement(instance.sourceInstanceKey, operation, input, options.expectedRevision ?? instance.revision, options.confirmed)), models: async () => { assertCurrent(); return taskClient.taskAgentModels(true); } }; } function useSourceCatalog(client, taskClient, revision, viewContextKey, sourcePageEntries, active = true, onSourceChanged, scopeContextKey = viewContextKey) { const [sourceCatalogState, setSourceCatalogState] = (0, react.useState)(() => ({ contextKey: scopeContextKey, value: null, error: null })); const current = (0, react.useRef)(); const previousRead = current.current; const changed = previousRead?.client !== client || previousRead.viewContextKey !== viewContextKey || previousRead.active !== active || previousRead.revision !== revision; current.current = { client, viewContextKey, active, revision, epoch: (previousRead?.epoch ?? 0) + Number(changed) }; const mounted = (0, react.useRef)(true); (0, react.useEffect)(() => { mounted.current = true; return () => { mounted.current = false; }; }, []); (0, react.useEffect)(() => { if (!active) return; let pending = true; client.sourceManagementCatalog().then((value) => { if (pending) setSourceCatalogState({ contextKey: scopeContextKey, value, error: null }); }).catch((reason) => { if (pending) setSourceCatalogState({ contextKey: scopeContextKey, value: null, error: message(reason) }); }); return () => { pending = false; }; }, [ active, client, revision, scopeContextKey, viewContextKey ]); const sourceCatalog = sourceCatalogState.contextKey === scopeContextKey ? sourceCatalogState.value : null; const sourceInstances = sourceCatalog?.sources ?? []; const bindings = (0, react.useRef)(); return { sourceCatalogState, sourceCatalog, sourceInstances, sourceManagementClients: (0, react.useMemo)(() => { const previous = bindings.current; const reusable = previous?.client === client && previous.taskClient === taskClient && previous.context === viewContextKey && previous.generation === sourceCatalog?.generationId; const values = /* @__PURE__ */ new Map(); for (const source of sourceInstances) { const signature = JSON.stringify(source); const prior = reusable ? previous.values.get(source.sourceInstanceKey) : void 0; values.set(source.sourceInstanceKey, prior?.signature === signature ? prior : { signature, management: bindSourceManagementClient(client, source, taskClient, () => { if (!mounted.current || current.current?.client !== client || current.current.viewContextKey !== viewContextKey) throw new Error("Source page is unmounted or its view context changed"); }, () => current.current.epoch, () => onSourceChanged?.(source.sourceTypeId)) }); } bindings.current = { client, taskClient, context: viewContextKey, ...sourceCatalog === null ? {} : { generation: sourceCatalog.generationId }, values }; return new Map([...values].map(([key, value]) => [key, value.management])); }, [ client, onSourceChanged, sourceCatalog, sourceInstances, taskClient, viewContextKey ]), visibleSourcePages: (0, react.useMemo)(() => { const visibleTypes = new Set(sourceInstances.map((source) => source.sourceTypeId)); return sourcePageEntries.filter((entry) => visibleTypes.has(entry.sourceTypeId)); }, [sourceInstances, sourcePageEntries]), managedSourceTypes: (0, react.useMemo)(() => { const byType = /* @__PURE__ */ new Map(); for (const source of sourceInstances) { if (sourcePageEntries.some((entry) => entry.sourceTypeId === source.sourceTypeId) && (source.management.fields?.length ?? 0) === 0) continue; const current = byType.get(source.sourceTypeId); if (current === void 0) byType.set(source.sourceTypeId, [source]); else current.push(source); } return [...byType.entries()].sort(([left], [right]) => left.localeCompare(right)); }, [sourceInstances, sourcePageEntries]) }; } // vendor/dsh-mnemon/src/client/use-workspace-navigation.ts function sourcePage(entryId) { return `source:${entryId}`; } function sourcePageEntryId(page) { return page.startsWith("source:") ? page.slice(7) : void 0; } function managedSourcePage(sourceTypeId) { return `source-management:${sourceTypeId}`; } function managedSourceTypeId(page) { return page.startsWith("source-management:") ? page.slice(18) : void 0; } function stoppedSourcePage(sourceTypeId) { return `source-stopped:${sourceTypeId}`; } function stoppedSourceTypeId(page) { return page.startsWith("source-stopped:") ? page.slice(15) : void 0; } function useWorkspaceNavigation(options) { const { sessionId, viewContextKey, resetViewportScroll, sourceCatalog, sourcePageEntries, visibleSourcePages, managedSourceTypes, stoppedTypes, disabledTypes, dashboard, sourceName, showWorkspaceToast, accepts, home = "status" } = options; const t = useT$4(); const [page, setPage] = (0, react.useState)(home); const isDisabled = (0, react.useCallback)((target) => { const type = sourcePageEntryId(target)?.split("/")[0] ?? managedSourceTypeId(target) ?? stoppedSourceTypeId(target); return type !== void 0 && disabledTypes.has(type); }, [disabledTypes]); (0, react.useEffect)(() => { if (page === "status" && home !== "status") setPage(home); }, [home, page]); const selectPage = (0, react.useCallback)((next) => setPage(next), []); (0, react.useLayoutEffect)(() => { resetViewportScroll(); }, [ viewContextKey, page, resetViewportScroll ]); const [navigationInput, setNavigationInput] = (0, react.useState)(); const openTab = (0, react.useCallback)((next) => { setNavigationInput(void 0); setPage(next); }, []); const sourceNavigationEntries = (0, react.useMemo)(() => { const entries = []; const stopped = (sourceTypeId, label) => ({ id: "stopped:" + sourceTypeId, page: stoppedSourcePage(sourceTypeId), sourceTypeId, label, detail: sourceTypeId, group: "sources", glyph: "◇", primary: true, stopped: true }); const stoppedShown = /* @__PURE__ */ new Set(); const named = /* @__PURE__ */ new Set(); const tabName = (sourceTypeId, label) => { if (named.has(sourceTypeId)) return label; named.add(sourceTypeId); return sourceName(sourceTypeId, label); }; for (const entry of sourcePageEntries) { const primary = entry.navigation?.primary ?? true; if (visibleSourcePages.includes(entry)) entries.push({ id: entry.id, page: sourcePage(entry.id), sourceTypeId: entry.sourceTypeId, label: primary ? tabName(entry.sourceTypeId, entry.label) : entry.label, detail: entry.navigation?.detail ?? entry.sourceTypeId, group: entry.navigation?.group ?? "sources", glyph: entry.navigation?.glyph ?? "◇", primary }); else if (stoppedTypes.has(entry.sourceTypeId) && !stoppedShown.has(entry.sourceTypeId) && primary) { stoppedShown.add(entry.sourceTypeId); entries.push(stopped(entry.sourceTypeId, tabName(entry.sourceTypeId, entry.label))); } } for (const sourceTypeId of stoppedTypes) if (!stoppedShown.has(sourceTypeId) && dashboard !== null && sourceOf(dashboard, sourceTypeId) !== void 0) entries.push(stopped(sourceTypeId, sourceName(sourceTypeId))); entries.push(...managedSourceTypes.map(([sourceTypeId, instances]) => ({ id: "management:" + sourceTypeId, page: managedSourcePage(sourceTypeId), sourceTypeId, label: sourceName(sourceTypeId, instances[0].management.label), detail: sourceTypeId, group: "sources", glyph: "◇", primary: true }))); return entries.filter((entry) => entry.sourceTypeId === void 0 || !disabledTypes.has(entry.sourceTypeId)); }, [ dashboard, disabledTypes, managedSourceTypes, sourceName, sourcePageEntries, stoppedTypes, visibleSourcePages ]); (0, react.useEffect)(() => { if (isDisabled(page)) { setPage(home); setNavigationInput(void 0); return; } if (sourceCatalog === null) return; const entryId = sourcePageEntryId(page); const managedTypeId = managedSourceTypeId(page); const stoppedTypeId = stoppedSourceTypeId(page); const whileStopped = (sourceTypeId) => sourceTypeId !== void 0 && stoppedTypes.has(sourceTypeId) ? stoppedSourcePage(sourceTypeId) : home; if (entryId !== void 0 && !visibleSourcePages.some((entry) => entry.id === entryId)) setPage(whileStopped(sourcePageEntries.find((entry) => entry.id === entryId)?.sourceTypeId)); else if (managedTypeId !== void 0 && !managedSourceTypes.some(([sourceTypeId]) => sourceTypeId === managedTypeId)) setPage(whileStopped(managedTypeId)); else if (stoppedTypeId !== void 0 && !stoppedTypes.has(stoppedTypeId)) { const resumed = visibleSourcePages.find((entry) => entry.sourceTypeId === stoppedTypeId && (entry.navigation?.primary ?? true)); setPage(resumed !== void 0 ? sourcePage(resumed.id) : managedSourceTypes.some(([sourceTypeId]) => sourceTypeId === stoppedTypeId) ? managedSourcePage(stoppedTypeId) : home); showWorkspaceToast({ text: t("feedback.layerResumed", { layer: sourceName(stoppedTypeId, resumed?.label) }), tone: "success" }); } }, [ isDisabled, managedSourceTypes, page, sourcePageEntries, stoppedTypes, visibleSourcePages, sourceCatalog, showWorkspaceToast, sourceName, t, home ]); (0, react.useLayoutEffect)(() => { setNavigationInput(void 0); }, [viewContextKey]); const applyAnchor = (0, react.useCallback)((anchor) => { if (anchor.page !== "status" && isDisabled(sourcePage(anchor.page))) { setNavigationInput(void 0); selectPage(home); return; } setNavigationInput({ page: anchor.page, value: { seed: anchor.seed ?? "", nonce: Date.now() } }); selectPage(anchor.page === "status" ? "status" : sourcePage(anchor.page)); }, [ home, isDisabled, selectPage ]); (0, react.useEffect)(() => { const held = consumeMnemonAnchor(sessionId, accepts); if (held !== null) applyAnchor(held); return subscribeMnemonAnchor(sessionId, applyAnchor, accepts); }, [ sessionId, applyAnchor, accepts ]); return { page: isDisabled(page) ? home : page, navigationInput, openTab, sourceNavigationEntries }; } // vendor/dsh-mnemon/src/client/composition-notice.ts function reason(system, t) { for (const diagnostic of system.evaluation.diagnostics) { if (diagnostic.code === "missing-strategy") return t("status.reasonNoStrategy"); if (diagnostic.code === "missing-source") return t("status.reasonNoSource"); if (diagnostic.code === "not-composed") return t("status.reasonNotComposed"); if (diagnostic.code !== "composition-rejected") continue; if (/selected memory Strategy (?:type|instance) is unavailable/u.test(diagnostic.message)) return t("status.reasonSelectedStrategyOff"); const dependency = /dependency unavailable: (\S+) requires (\S+)/u.exec(diagnostic.message); if (dependency !== null) return t("status.reasonDependency", { component: dependency[1], requirement: dependency[2] }); if (/(?:capability|slot) conflict/u.test(diagnostic.message)) return t("status.reasonConflict"); return t("status.reasonRejected", { detail: diagnostic.message }); } return ""; } function compositionNotice(system, t) { if (system === void 0) return void 0; const cause = reason(system, t); const detail = (...sentences) => sentences.filter((sentence) => sentence !== "").join(t("config.sentenceGap")); if (!system.serving) return { tone: "error", title: t("status.memoryOff"), detail: detail(cause, t("status.memoryOffDetail")) }; if (system.evaluation.state !== "ready") return { tone: "warn", title: t("status.compositionStale"), detail: detail(cause, t("status.compositionStaleDetail")) }; if (system.evaluation.diagnostics.some((diagnostic) => diagnostic.code === "strategy-fallback")) return { tone: "warn", title: t("status.strategyFallback"), detail: t("status.strategyFallbackDetail") }; } // vendor/dsh-mnemon/src/client/MnemonWorkbench.tsx const SKILLS_SOURCE_TYPE$1 = "skills"; const NO_SKILLS_SNAPSHOT = { status: "unavailable", writable: false, mode: "host" }; const NO_SKILLS_SCOPE = { subscribe: () => () => {}, getSnapshot: () => NO_SKILLS_SNAPSHOT }; const NO_ACTION_SEAT = { subscribe: () => () => {}, getSnapshot: () => void 0 }; const NO_CHANGE_SIGNAL = { subscribe: () => () => {}, getSnapshot: () => 0 }; const EMPTY_SOURCE_PAGE_SNAPSHOT = Object.freeze([]); const EMPTY_SOURCE_PAGE_DIRECTORY = { getSnapshot: () => EMPTY_SOURCE_PAGE_SNAPSHOT, subscribe: () => () => {} }; function CompositionStatus(props) { const t = useT$4(); const summaryId = (0, react.useId)(); const layerDot = (state) => state === "on" ? "done" : state === "stopped" ? "warning" : "idle"; const layerNote = (state) => state === "on" ? void 0 : t(state === "off" ? "layers.disabledBadge" : state === "stopped" ? "layers.stoppedBadge" : "layers.memoryOffBadge"); const anchor = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonView_module_css_default.compositionStatus, onClick: props.onOpen, disabled: props.onOpen === void 0, "aria-label": props.strategy === void 0 ? props.label : `${props.label} · ${props.strategy}`, ...props.layers.length === 0 ? {} : { "aria-describedby": summaryId }, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: props.tone }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.label }), props.strategy !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonView_module_css_default.compositionStrategy, children: props.strategy }) ] }); if (props.layers.length === 0) return anchor; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonView_module_css_default.compositionStatusWrap, children: [anchor, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { id: summaryId, className: MnemonView_module_css_default.compositionSummary, role: "tooltip", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("board.title") }), props.strategy !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonFeedback_module_css_default.chip, "data-state": props.tone === "done" ? "done" : "warning", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: props.tone === "done" ? "done" : "warning" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonFeedback_module_css_default.chipLabel, children: props.strategy })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonView_module_css_default.compositionLayers, children: props.layers.map((layer) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonFeedback_module_css_default.chip, "data-state": layerDot(layer.state), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: layerDot(layer.state) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonFeedback_module_css_default.chipLabel, children: layer.label }), layerNote(layer.state) !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonFeedback_module_css_default.chipNote, children: layerNote(layer.state) }) ] }, layer.id)) }), props.onOpen !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonView_module_css_default.compositionHint, children: t("header.compositionHint") }) ] })] }); } function OrdinaryNotices(props) { const t = useT$4(); const [expanded, setExpanded] = (0, react.useState)(false); const contentsId = (0, react.useId)(); const labels = [props.remoteReadOnly ? t("header.noticeRemoteReadOnly") : void 0, props.reviewPaused ? t("header.noticeIdleReview") : void 0].filter((label) => label !== void 0); if (labels.length === 0) return null; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.noticeGroup, "data-expanded": expanded || void 0, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: MnemonView_module_css_default.noticeToggle, "aria-expanded": expanded, "aria-controls": contentsId, onClick: () => setExpanded((value) => !value), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("header.noticeSummary", { count: labels.length, labels: labels.join(" / ") }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronLeftOutline14, { size: 14 })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { id: contentsId, className: MnemonView_module_css_default.noticeContents, children: [props.remoteReadOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.alert, role: "status", children: t("workspace.remoteReadOnly") }), props.reviewPaused && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.alert, role: "status", children: t(props.reviewPaused === "write-confirmation" ? "status.reviewConfirmationPaused" : props.reviewPaused === "tool-access" ? "status.reviewToolAccessPaused" : "status.reviewTeamPaused") })] })] }); } function BackgroundWorkflowNotice(props) { const t = useT$4(); if (props.workflows === void 0) return null; const missing = [!props.workflows.idleReview ? t("status.workflowIdleReview") : void 0, !props.workflows.runtimeCapacity ? t("status.workflowRuntimeCapacity") : void 0].filter((label) => label !== void 0); if (missing.length === 0) return null; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.alert, role: "status", "aria-label": t("status.workflowUnavailable"), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("status.workflowUnavailable") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("status.workflowUnsupported", { workflows: missing.join(" / ") }) })] }); } function SourceDisabledPage(props) { const t = useT$4(); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.page, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageHeader, { title: props.title, description: t("layers.disabledDescription"), meta: t("layers.disabledBadge"), ...props.onOpenConfiguration === void 0 ? {} : { action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonView_module_css_default.secondaryButton, onClick: props.onOpenConfiguration, children: t("common.openConfiguration") }) } }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "⊘", title: t("layers.disabledTitle", { layer: props.title }), children: t("layers.disabledText") })] }); } function SourceStoppedPage(props) { const t = useT$4(); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.page, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageHeader, { title: props.title, description: t(props.memoryOff ? "layers.memoryOffDescription" : "layers.stoppedDescription"), meta: t(props.memoryOff ? "layers.memoryOffBadge" : "layers.stoppedBadge"), ...props.onOpenConfiguration === void 0 ? {} : { action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonView_module_css_default.secondaryButton, onClick: props.onOpenConfiguration, children: t("common.openConfiguration") }) } }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "⊘", title: t(props.memoryOff ? "layers.memoryOffTitle" : "layers.stoppedTitle", { layer: props.title }), children: t(props.memoryOff ? "layers.memoryOffText" : "layers.stoppedText") })] }); } function WorkspaceNavigation(props) { const t = useT$4(); const navRef = (0, react.useRef)(null); const tabRefs = (0, react.useRef)([]); const entries = [{ id: "status", page: "status", label: t("nav.status"), detail: "", group: "system", glyph: "⌘", primary: true }, ...props.sourcePages].filter((entry) => entry.primary); const selectedType = sourcePageEntryId(props.page)?.split("/")[0]; const isActive = (item) => props.page === item.page || selectedType !== void 0 && selectedType === item.sourceTypeId; const activeIndex = entries.findIndex(isActive); const tabStopIndex = activeIndex >= 0 ? activeIndex : 0; (0, react.useEffect)(() => { const el = navRef.current; if (el === null) return; const syncFade = () => { const overflow = el.scrollWidth - el.clientWidth; el.toggleAttribute("data-fade-left", overflow > 2 && el.scrollLeft > 2); el.toggleAttribute("data-fade-right", overflow > 2 && el.scrollLeft < overflow - 2); }; syncFade(); el.addEventListener("scroll", syncFade, { passive: true }); const observer = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(syncFade); observer?.observe(el); return () => { el.removeEventListener("scroll", syncFade); observer?.disconnect(); }; }, [entries.length]); (0, react.useEffect)(() => { if (activeIndex >= 0) tabRefs.current[activeIndex]?.scrollIntoView?.({ inline: "nearest", block: "nearest" }); }, [activeIndex]); const onTabKeyDown = (index, event) => { if (event.altKey || event.ctrlKey || event.metaKey) return; if (event.key !== "ArrowRight" && event.key !== "ArrowLeft" && event.key !== "Home" && event.key !== "End") return; const enabledIndices = entries.map((_, i) => i).filter((i) => { const el = tabRefs.current[i]; return el === null || el === void 0 || !el.disabled && el.getAttribute("aria-disabled") !== "true"; }); if (enabledIndices.length === 0) return; let targetIndex; if (event.key === "Home") targetIndex = enabledIndices[0]; else if (event.key === "End") targetIndex = enabledIndices[enabledIndices.length - 1]; else { const pos = enabledIndices.indexOf(index); const delta = event.key === "ArrowRight" ? 1 : -1; targetIndex = pos >= 0 ? enabledIndices[(pos + delta + enabledIndices.length) % enabledIndices.length] : enabledIndices[delta > 0 ? 0 : enabledIndices.length - 1]; } event.preventDefault(); tabRefs.current[targetIndex]?.focus(); const target = entries[targetIndex]; if (target !== void 0) props.onSelect(target.page); }; const button = (item, index) => { const active = isActive(item); const badge = item.sourceTypeId !== void 0 && props.disabledTypes.has(item.sourceTypeId) ? t("layers.disabledBadge") : item.stopped === true ? t(props.memoryOff ? "layers.memoryOffBadge" : "layers.stoppedBadge") : void 0; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { ref: (el) => { tabRefs.current[index] = el; }, type: "button", role: "tab", tabIndex: index === tabStopIndex ? 0 : -1, "aria-selected": active, "data-active": active ? "" : void 0, "aria-label": badge === void 0 ? void 0 : item.label + " · " + badge, "data-layer-disabled": badge === void 0 ? void 0 : "", onKeyDown: (event) => onTabKeyDown(index, event), onClick: () => props.onSelect(item.page), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: item.label }), badge !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { className: MnemonView_module_css_default.layerDisabledBadge, children: badge })] }, item.id); }; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: appearanceClass(MnemonView_module_css_default.topNavigation, MnemonSidebarView_module_css_default.topNavigation), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { ref: navRef, className: appearanceClass(MnemonView_module_css_default.nav, MnemonSidebarView_module_css_default.nav), role: "tablist", "aria-label": t("nav.aria"), children: entries.map(button) }) }); } function RestartReminder({ pending }) { const t = useT$4(); return pending.installed !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Callout, { tone: "warning", title: t("versions.pendingInstalledTitle", { version: pending.installed }), children: t("versions.pendingInstalledDetail", { running: pending.running }) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Callout, { tone: "warning", title: t("versions.pendingPackagesTitle", { names: (pending.packages ?? []).join(t("config.listSeparator")) }), children: t("versions.pendingPackagesDetail") }); } function configuredStorageScope(config) { return config?.storageScope ?? (config?.dataDir?.trim() ? "custom" : "global"); } const AREA_SOURCES = { runtime: "runtime", documents: "documents", "memory-bodies": "memory-spaces" }; function storageAreaLabel(t, kind) { return t(kind === "runtime" ? "status.storageRuntime" : kind === "memory-bodies" ? "status.storageSpaces" : kind === "documents" ? "status.storageDocuments" : "status.storageState"); } function MnemonWorkbench(props) { const visible = useDocumentVisible(); const active = props.active !== false && visible; const visibleProps = (0, react.useRef)(props); if (active) visibleProps.current = props; const language = props.locale ?? "zh"; const t = props.t ?? translateFor(props.localeFallbacks ?? language); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(I18nContext.Provider, { value: t, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LocaleContext.Provider, { value: language, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LocaleFallbackContext.Provider, { value: props.localeFallbacks, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonWorkspace, { ...visibleProps.current, active }) }) }) }); } function MnemonWorkspace({ connection, settingsScope, sessionId, workspaceId, workspaceSelection, surface = "sidebar", active = true, titleBar = false, headerActions, onClose, configuration, componentChanges, sourcePageDirectory = EMPTY_SOURCE_PAGE_DIRECTORY, renderSlot, focus, hiddenSourceTypes, skillsScope }) { const shellRef = (0, react.useRef)(null); useMemoryComposerInset(shellRef, surface === "builtin"); const t = useT$4(); const locale = useLocale(); const localePreference = useLocalePreference$4(locale); const configurationSeat = configuration ?? NO_ACTION_SEAT; const openConfiguration = (0, react.useSyncExternalStore)(configurationSeat.subscribe, configurationSeat.getSnapshot, configurationSeat.getSnapshot); const componentSignal = componentChanges ?? NO_CHANGE_SIGNAL; const componentRevision = (0, react.useSyncExternalStore)(componentSignal.subscribe, componentSignal.getSnapshot, componentSignal.getSnapshot); const subscribeSettings = (0, react.useCallback)((listener) => settingsScope.subscribe(listener), [settingsScope]); const getSettingsSnapshot = (0, react.useCallback)(() => settingsScope.getSnapshot(), [settingsScope]); const liveSettingsSnapshot = (0, react.useSyncExternalStore)(subscribeSettings, getSettingsSnapshot, getSettingsSnapshot); const visibleSettings = (0, react.useRef)(liveSettingsSnapshot); if (active) visibleSettings.current = liveSettingsSnapshot; const settingsSnapshot = visibleSettings.current; const subscribeSourcePages = (0, react.useCallback)((listener) => sourcePageDirectory.subscribe(listener), [sourcePageDirectory]); const getSourcePages = (0, react.useCallback)(() => sourcePageDirectory.getSnapshot(), [sourcePageDirectory]); const allSourcePageEntries = (0, react.useSyncExternalStore)(subscribeSourcePages, getSourcePages, getSourcePages); const skillsSeat = skillsScope ?? NO_SKILLS_SCOPE; const subscribeSkills = (0, react.useCallback)((listener) => skillsSeat.subscribe(listener), [skillsSeat]); const getSkillsSnapshot = (0, react.useCallback)(() => skillsSeat.getSnapshot(), [skillsSeat]); const skillsSnapshot = (0, react.useSyncExternalStore)(subscribeSkills, getSkillsSnapshot, getSkillsSnapshot); const focusType = focus?.sourceTypeId; const hiddenKey = hiddenSourceTypes?.join("\0") ?? ""; const shows = (0, react.useCallback)((sourceTypeId) => focusType !== void 0 ? sourceTypeId === focusType : !hiddenKey.split("\0").includes(sourceTypeId), [focusType, hiddenKey]); const sourcePageEntries = (0, react.useMemo)(() => allSourcePageEntries.filter((entry) => shows(entry.sourceTypeId)), [allSourcePageEntries, shows]); const client = (0, react.useMemo)(() => new MnemonClient(connection, sessionId, workspaceId), [ connection, sessionId, workspaceId ]); const taskClient = (0, react.useMemo)(() => surface === "builtin" ? client : new MnemonClient(connection, void 0, workspaceId), [ client, connection, surface, workspaceId ]); const connectionContext = (0, react.useRef)({ connection, revision: 0 }); if (connectionContext.current.connection !== connection) connectionContext.current = { connection, revision: connectionContext.current.revision + 1 }; const clientContextKey = `${connectionContext.current.revision}\u0000${sessionId ?? ""}\u0000${workspaceId ?? ""}`; const storageContext = settingsSnapshot.revision === void 0 ? "loading" : JSON.stringify([ settingsSnapshot.value?.storageScope ?? null, settingsSnapshot.value?.dataDir ?? null, settingsSnapshot.value?.runtimeUserScope ?? null, settingsSnapshot.value?.documentsScope ?? null, settingsSnapshot.value?.memorySpacesScope ?? null ]); const effectiveWorkspace = workspaceId ?? (surface === "builtin" ? sessionId ?? "" : ""); const surfaceScopeKey = `${connectionContext.current.revision}\u0000${storageContext}\u0000${effectiveWorkspace}`; const viewContextKey = `${clientContextKey}\u0000${storageContext}`; const workspaceToast = useToast(); const showWorkspaceToast = workspaceToast.show; const canvasRef = (0, react.useRef)(null); const resetViewportScroll = (0, react.useCallback)(() => { const canvas = canvasRef.current; if (canvas !== null) canvas.scrollTop = 0; }, []); const revealElement = (0, react.useCallback)((element, topInset) => { const canvas = canvasRef.current; if (canvas === null || !canvas.contains(element)) return; const header = topInset === void 0 && canvas.hasAttribute("data-lock-page-header") ? canvas.querySelector(`.${MnemonView_module_css_default.pageHeader}`) : null; const inset = topInset ?? (header === null ? 0 : header.getBoundingClientRect().height + 12); canvas.scrollTop = Math.max(0, canvas.scrollTop + element.getBoundingClientRect().top - canvas.getBoundingClientRect().top - inset); }, []); const { status, statusLoading, statusError, loadStatus, ensureFullStatus } = useWorkspaceStatus(client, viewContextKey, active); const [catalogRevision, setCatalogRevision] = (0, react.useState)(0); const [dashboardRevision, setDashboardRevision] = (0, react.useState)(0); const { sourceCatalogState, sourceCatalog, sourceInstances, sourceManagementClients, visibleSourcePages, managedSourceTypes: allManagedSourceTypes } = useSourceCatalog(client, taskClient, catalogRevision, viewContextKey, sourcePageEntries, active, (0, react.useCallback)((sourceTypeId) => { if (sourceTypeId === "skills") invalidateSkillActivity(connection); }, [connection]), surfaceScopeKey); const managedSourceTypes = (0, react.useMemo)(() => allManagedSourceTypes.filter(([sourceTypeId]) => shows(sourceTypeId)), [allManagedSourceTypes, shows]); const [selectedSourceInstances, setSelectedSourceInstances] = (0, react.useState)({}); const stoppedLayers = status?.memorySystem?.configuration.layers; const stoppedTypes = (0, react.useMemo)(() => { if (sourceCatalog === null || stoppedLayers === void 0) return /* @__PURE__ */ new Set(); const running = new Set(sourceInstances.map((source) => source.sourceTypeId)); return new Set(Object.keys(stoppedLayers).filter((id) => !running.has(id) && shows(id))); }, [ sourceCatalog, sourceInstances, stoppedLayers, shows ]); const [dashboard, setDashboard] = (0, react.useState)(null); const dashboardClientRef = (0, react.useRef)(client); dashboardClientRef.current = client; (0, react.useEffect)(() => { if (!active) return; let current = true; dashboardClientRef.current.viewDashboard().then((value) => { if (current) setDashboard(Array.isArray(value?.entries) ? value : null); }, () => { if (current) setDashboard(null); }); return () => { current = false; }; }, [ active, surfaceScopeKey, dashboardRevision, componentRevision ]); const sourceName = (0, react.useCallback)((sourceTypeId, fallback) => { const component = dashboard === null ? void 0 : sourceOf(dashboard, sourceTypeId); return component === void 0 ? fallback ?? sourceTypeId : componentCopy(component, localePreference).label; }, [dashboard, localePreference]); const strategyName = (typeId) => { const component = dashboard?.entries.find((entry) => entry.roles.includes("strategy") && entry.typeId === typeId); return component === void 0 ? typeId : componentCopy(component, localePreference).label; }; const switchedOff = (0, react.useMemo)(() => { const entries = dashboard?.entries ?? []; const enabled = new Set(entries.filter((entry) => entry.enabled).map(layerOf)); const managedPackages = new Set(entries.map((entry) => entry.packageName)); for (const source of dashboard?.sources ?? []) if (!managedPackages.has(source.packageName)) enabled.add(source.sourceTypeId); return new Set(entries.filter((entry) => !entry.enabled).map(layerOf).filter((id) => id !== void 0 && !enabled.has(id))); }, [dashboard]); const savedLayers = settingsSnapshot.value?.memoryTopology?.layers; const configuredLayers = status?.memorySystem?.configuration.layers; const disabledTypes = (0, react.useMemo)(() => new Set([.../* @__PURE__ */ new Set([ ...Object.keys(configuredLayers ?? {}), ...Object.keys(savedLayers ?? {}), ...switchedOff ])].filter((id) => (savedLayers?.[id]?.enabled ?? configuredLayers?.[id]?.enabled) === false || switchedOff.has(id))), [ configuredLayers, savedLayers, switchedOff ]); const focusPage = focusType === void 0 || disabledTypes.has(focusType) ? void 0 : sourcePageEntries.find((entry) => entry.navigation?.primary ?? true); const home = focusPage === void 0 ? "status" : `source:${focusPage.id}`; const { page, navigationInput, openTab, sourceNavigationEntries } = useWorkspaceNavigation({ sessionId, viewContextKey: surfaceScopeKey, resetViewportScroll, sourceCatalog, sourcePageEntries, visibleSourcePages, managedSourceTypes, stoppedTypes, disabledTypes, dashboard, sourceName, showWorkspaceToast, accepts: (0, react.useCallback)((target) => target === "status" ? focusType === void 0 : shows(target.split("/")[0]), [focusType, shows]), home }); const focused = focusType !== void 0; const wantsFullStatus = !focused && page === "status"; const wantsFullStatusRef = (0, react.useRef)(wantsFullStatus); wantsFullStatusRef.current = wantsFullStatus; const reloadStatus = (0, react.useCallback)(() => loadStatus(() => wantsFullStatusRef.current), [loadStatus]); (0, react.useEffect)(() => { if (active) reloadStatus(); }, [active, reloadStatus]); (0, react.useEffect)(() => { if (active && wantsFullStatus) ensureFullStatus(); }, [ active, ensureFullStatus, wantsFullStatus ]); const currentView = (0, react.useRef)({ active, client, viewContextKey }); currentView.current = { active, client, viewContextKey }; const viewMounted = (0, react.useRef)(true); (0, react.useEffect)(() => { viewMounted.current = true; return () => { viewMounted.current = false; }; }, []); const isBoundView = (0, react.useCallback)(() => viewMounted.current && currentView.current.client === client && currentView.current.viewContextKey === viewContextKey, [client, viewContextKey]); const isCurrentView = (0, react.useCallback)(() => currentView.current.active && isBoundView(), [isBoundView]); const assertCurrentView = (0, react.useCallback)(() => { if (!isBoundView()) throw new Error("Source page is unmounted or its view context changed"); }, [isBoundView]); const latestProviderConnectionsRef = (0, react.useRef)(settingsSnapshot.value?.persistenceStrategy?.providerConnections); latestProviderConnectionsRef.current = settingsSnapshot.value?.persistenceStrategy?.providerConnections; const skillsEvolutionSetting = skillsSnapshot.value?.evolution ?? DEFAULT_SKILLS_CONFIG.evolution; const memoSkillsPreferences = (0, react.useMemo)(() => skillsScope === void 0 || skillsSnapshot.status !== "ready" ? void 0 : { value: { evolution: skillsEvolutionSetting }, writable: skillsSnapshot.writable, replace: async (value) => { assertCurrentView(); const evolution = jsonRecord(value)?.evolution; if (typeof evolution !== "boolean") throw new Error("Skills preferences take evolution as a boolean"); await skillsScope.mutate([{ op: "set", path: ["evolution"], value: evolution }]); } }, [ assertCurrentView, skillsEvolutionSetting, skillsScope, skillsSnapshot.status, skillsSnapshot.writable ]); const rawPersistenceStrategy = settingsSnapshot.value?.persistenceStrategy; const memoMemorySpacesPreferences = (0, react.useMemo)(() => ({ value: { persistenceStrategy: { ...rawPersistenceStrategy, providerConnections: isRecord(rawPersistenceStrategy?.providerConnections) ? rawPersistenceStrategy.providerConnections : {} } }, writable: settingsSnapshot.writable, replace: async (value) => { assertCurrentView(); const requested = jsonRecord(value)?.persistenceStrategy; const strategy = requested === void 0 ? void 0 : jsonRecord(requested); if (strategy === void 0) throw new Error("Persistence strategy preferences must be an object"); const connections = jsonRecord(strategy.providerConnections ?? {}) ?? {}; const merged = { ...latestProviderConnectionsRef.current }; for (const [id, fields] of Object.entries(connections)) merged[id] = { ...merged[id], ...jsonRecord(fields) }; await settingsScope.mutate([{ op: "set", path: ["persistenceStrategy"], value: { ...strategy, providerConnections: merged } }]); } }), [ assertCurrentView, rawPersistenceStrategy, settingsScope, settingsSnapshot.writable ]); const mutate = (0, react.useCallback)(() => { if (!isCurrentView()) return; setCatalogRevision((value) => value + 1); reloadStatus(); }, [isCurrentView, reloadStatus]); const refreshAll = (0, react.useCallback)(() => { if (!isCurrentView()) return; setCatalogRevision((value) => value + 1); setDashboardRevision((value) => value + 1); reloadStatus(); }, [isCurrentView, reloadStatus]); const [refreshKey, setRefreshKey] = (0, react.useState)(0); const refreshPage = (0, react.useCallback)(() => { setRefreshKey((value) => value + 1); refreshAll(); }, [refreshAll]); const seenComponents = (0, react.useRef)(componentRevision); (0, react.useEffect)(() => { if (!active || componentRevision === seenComponents.current) return; seenComponents.current = componentRevision; refreshPage(); }, [ active, componentRevision, refreshPage ]); const seenSettings = (0, react.useRef)({ revision: settingsSnapshot.revision, context: viewContextKey }); (0, react.useEffect)(() => { if (!active) return; const seen = seenSettings.current; seenSettings.current = { revision: settingsSnapshot.revision, context: viewContextKey }; if (seen.revision !== settingsSnapshot.revision && seen.context === viewContextKey) refreshAll(); }, [ active, settingsSnapshot.revision, viewContextKey, refreshAll ]); const activationEnabled = status?.writeEnabled === true; const writeEnabled = activationEnabled && settingsSnapshot.status === "ready" && settingsSnapshot.writable; const remoteReadOnly = activationEnabled && settingsSnapshot.status === "ready" && !settingsSnapshot.writable && isRemoteConnection(connection); const workspaceContext = status?.workspaceContext; const storageMode = workspaceContext?.mode ?? status?.storage?.activeKind ?? configuredStorageScope(settingsSnapshot.value); const storageModeText = storageScopeLabel(t, storageMode); const showWorkspacePicker = (isWorkspaceStorageScope(storageMode) || workspaceContext?.workspaces?.some((workspace) => workspace.participation.excluded)) && workspaceSelection !== void 0 && workspaceSelection.options.length > 0; const canAlignWorkspace = workspaceContext !== void 0 && isWorkspaceStorageScope(workspaceContext.mode) && !workspaceContext.aligned && workspaceSelection?.effectiveWorkspaceId !== void 0; const workspaceDifference = workspaceContext === void 0 ? "" : `${t("workspace.selectedRoot", { root: workspaceContext.selectedRoot })}; ${t("workspace.effectiveRoot", { root: workspaceContext.effectiveRoot })}`; const workspaceParticipation = workspaceContext?.participation; const excludedWorkspaceIds = new Set(workspaceContext?.workspaces?.filter((workspace) => workspace.participation.excluded).map((workspace) => workspace.id)); const workspacePicker = showWorkspacePicker && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { inline: true, size: "sm", className: appearanceClass(MnemonView_module_css_default.workspacePicker, MnemonSidebarView_module_css_default.workspacePicker), label: t("workspace.viewing"), ariaLabel: t("workspace.selectorAria"), value: workspaceSelection.selectedWorkspaceId ?? "", options: workspaceSelection.options.map((workspace) => ({ value: workspace.id, label: excludedWorkspaceIds.has(workspace.id) ? `${workspace.title} · ${t("workspace.excluded")}` : workspace.title })), onChange: workspaceSelection.onSelect }); const notice = compositionNotice(status?.memorySystem, t); const memoryOff = status?.memorySystem !== void 0 && !status.memorySystem.serving; const composingType = status?.memorySystem?.serving === true ? status.memorySystem.strategyTypeId : void 0; const composingLabel = composingType === void 0 ? void 0 : strategyName(composingType); const statusTone = status === null && statusLoading ? "ongoing" : statusError !== null || notice?.tone === "error" || status?.healthy === false && notice === void 0 ? "error" : notice !== void 0 ? "warning" : "done"; const connectionLabel = status === null && statusLoading ? t("header.checking") : notice?.tone === "error" ? t("status.memoryOff") : status?.healthy !== true ? t("header.unavailable") : t("header.connected"); const allInstancesFor = (sourceTypeId) => sourceInstances.filter((source) => source.sourceTypeId === sourceTypeId); const instancesFor = (sourceTypeId) => allInstancesFor(sourceTypeId); const renderSourceContribution = (entryId) => { const sourceTypeId = entryId.split("/")[0]; const instances = instancesFor(sourceTypeId); const selectedKey = selectedSourceInstances[sourceTypeId]; const selected = instances.find((instance) => instance.sourceInstanceKey === selectedKey) ?? instances.find((instance) => isDefaultSourceInstance(instance.sourceInstanceKey, sourceTypeId)) ?? instances[0]; if (selected === void 0 || renderSlot === void 0) return null; if (disabledTypes.has(sourceTypeId)) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SourceDisabledPage, { title: sourceName(sourceTypeId, selected.management.label), onOpenConfiguration: openConfiguration }); const management = sourceManagementClients.get(selected.sourceInstanceKey); const skillsPreferences = sourceTypeId !== SKILLS_SOURCE_TYPE$1 ? void 0 : memoSkillsPreferences; const openSettings = openConfiguration === void 0 ? void 0 : (section) => { requestComponentPage(selected.packageName, section); openConfiguration(); }; const preferences = skillsPreferences ?? (!isDefaultSourceInstance(selected.sourceInstanceKey, "memory-spaces") ? void 0 : memoMemorySpacesPreferences); return renderSlot(MNEMON_SOURCE_PAGE_SLOT, { sourceTypeId, sourceInstanceKey: selected.sourceInstanceKey, sourceInstances: instances, writable: writeEnabled, locale, active, ...management === void 0 ? {} : { management }, ...sessionId === void 0 ? {} : { sessionId }, ...workspaceId === void 0 ? {} : { workspaceId }, ...navigationInput?.page === entryId ? { navigationInput: navigationInput.value } : {}, ...preferences === void 0 ? {} : { preferences }, onRefresh: mutate, refreshKey, onResetScroll: resetViewportScroll, onRevealElement: revealElement, ...onClose === void 0 ? {} : { onReturnToConversation: onClose }, ...openSettings === void 0 ? {} : { onOpenSettings: openSettings }, ...focusType === void 0 ? {} : { standalone: true } }, { only: entryId }); }; const activeStoppedType = stoppedSourceTypeId(page); const stoppedTitle = (sourceTypeId) => sourceName(sourceTypeId, sourceNavigationEntries.find((entry) => entry.page === page)?.label); const layerState = (sourceTypeId) => disabledTypes.has(sourceTypeId) ? "off" : !stoppedTypes.has(sourceTypeId) ? "on" : memoryOff ? "memory-off" : "stopped"; const layerIds = Object.keys(status?.memorySystem?.configuration.layers ?? {}); const headerLayers = layerIds.map((id) => ({ id, label: sourceName(id), state: layerState(id) })); const navPageBySourceType = /* @__PURE__ */ new Map(); for (const entry of sourceNavigationEntries) if (entry.primary && entry.sourceTypeId !== void 0 && !navPageBySourceType.has(entry.sourceTypeId)) navPageBySourceType.set(entry.sourceTypeId, entry.page); const sourceComponents = (dashboard?.entries ?? []).filter((entry) => entry.roles.includes("source")); const rank = (entry) => { const index = layerIds.indexOf(layerOf(entry) ?? ""); return index < 0 ? layerIds.length : index; }; const componentCards = dashboard === null ? layerIds.map((id) => { const targetPage = navPageBySourceType.get(id); return { key: id, packageName: "dsh-brain-mnemon-source-" + id, label: sourceName(id), enabled: layerState(id) !== "off", state: layerState(id), ...targetPage === void 0 ? {} : { onSelect: () => openTab(targetPage) } }; }) : [...sourceComponents].sort((left, right) => rank(left) - rank(right)).map((entry) => { const layerId = layerOf(entry); const targetPage = layerId === void 0 ? void 0 : navPageBySourceType.get(layerId); return { key: entry.entryId, packageName: entry.packageName, label: componentCopy(entry, localePreference).label, enabled: entry.enabled, state: !entry.enabled ? "off" : layerId === void 0 ? memoryOff ? "memory-off" : "stopped" : layerState(layerId), ...targetPage === void 0 ? {} : { onSelect: () => openTab(targetPage) } }; }); const renderCard = (card) => renderSlot === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("board.running") }) : renderSlot(MNEMON_COMPONENT_STATUS_SLOT, { component: { packageName: card.packageName, label: card.label, enabled: card.enabled }, language: locale, ...sessionId === void 0 ? {} : { sessionId }, ...workspaceId === void 0 ? {} : { workspace: { id: workspaceId } } }, { entryKey: card.packageName, fallback: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("board.running") }) }); const areaName = (kind) => { const sourceTypeId = AREA_SOURCES[kind]; return sourceTypeId === void 0 ? storageAreaLabel(t, kind) : sourceName(sourceTypeId, storageAreaLabel(t, kind)); }; const activeSourcePageId = sourcePageEntryId(page); const activeSourcePage = activeSourcePageId === void 0 ? void 0 : visibleSourcePages.find((entry) => entry.id === activeSourcePageId); const activeSourceInstances = activeSourcePage === void 0 ? [] : instancesFor(activeSourcePage.sourceTypeId); const activeSelectedKey = activeSourcePage === void 0 ? void 0 : selectedSourceInstances[activeSourcePage.sourceTypeId]; const activeSelectedInstance = activeSourceInstances.find((instance) => instance.sourceInstanceKey === activeSelectedKey) ?? activeSourceInstances.find((instance) => isDefaultSourceInstance(instance.sourceInstanceKey, activeSourcePage?.sourceTypeId ?? "")) ?? activeSourceInstances[0]; const customSourcePage = activeSourcePage === void 0 || activeSelectedInstance === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.page, "data-source-page": activeSourcePage.id, children: [activeSourceInstances.length > 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { inline: true, size: "sm", className: MnemonView_module_css_default.workspacePicker, label: t("sourcePage.instance"), ariaLabel: t("sourcePage.instanceAria"), value: activeSelectedInstance.sourceInstanceKey, options: activeSourceInstances.map((instance) => ({ value: instance.sourceInstanceKey, label: instance.management.label, detail: instance.sourceInstanceKey })), onChange: (value) => setSelectedSourceInstances((current) => ({ ...current, [activeSourcePage.sourceTypeId]: value })) }), renderSourceContribution(activeSourcePage.id)] }); const activeManagedSourceTypeId = managedSourceTypeId(page); const activeManagedSourceInstances = activeManagedSourceTypeId === void 0 ? [] : allInstancesFor(activeManagedSourceTypeId); const activeManagedSelectedKey = activeManagedSourceTypeId === void 0 ? void 0 : selectedSourceInstances[activeManagedSourceTypeId]; const activeManagedSourceInstance = activeManagedSourceInstances.find((instance) => instance.sourceInstanceKey === activeManagedSelectedKey) ?? activeManagedSourceInstances[0]; const managedSourcePageContent = activeManagedSourceTypeId === void 0 || activeManagedSourceInstance === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SourceManagementPage, { instance: activeManagedSourceInstance, instances: activeManagedSourceInstances, ...sourceManagementClients.get(activeManagedSourceInstance.sourceInstanceKey) === void 0 ? {} : { management: sourceManagementClients.get(activeManagedSourceInstance.sourceInstanceKey) }, onSelect: (sourceInstanceKey) => setSelectedSourceInstances((current) => ({ ...current, [activeManagedSourceTypeId]: sourceInstanceKey })), onMutate: mutate }); const focusPackage = focusType === void 0 ? void 0 : sourceInstances.find((source) => source.sourceTypeId === focusType)?.packageName; const openSettings = openConfiguration === void 0 ? void 0 : focusPackage === void 0 ? focusType === void 0 ? openConfiguration : void 0 : () => { requestComponentPage(focusPackage); openConfiguration(); }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("main", { ref: shellRef, className: appearanceClass(MnemonView_module_css_default.shell, MnemonSidebarView_module_css_default.shell), "data-dsh-plugin": "dsh-brain-mnemon", "data-dsh-part": "mnemon-view", "data-mnemon-surface": surface, "data-mnemon-focus": focusType, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { className: appearanceClass(MnemonView_module_css_default.masthead, MnemonSidebarView_module_css_default.masthead), "data-window-drag": titleBar || void 0, children: [ onClose !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: appearanceClass(MnemonView_module_css_default.ghostButton, MnemonView_module_css_default.backButton), onClick: onClose, "aria-label": t("header.backToConversation"), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(IconChevronLeftOutline14, { size: 14 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("header.backToConversation") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: appearanceClass(MnemonView_module_css_default.brand, MnemonSidebarView_module_css_default.brand), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h1", { children: focus?.title ?? t("tab.label") }), surface === "sidebar" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: MnemonView_module_css_default.storageMode, "aria-label": t("workspace.storageModeAria", { mode: storageModeText }), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("workspace.storageMode") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: storageModeText })] }), workspacePicker, canAlignWorkspace && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: appearanceClass(MnemonView_module_css_default.workspaceMismatch, MnemonSidebarView_module_css_default.workspaceMismatch), role: "status", "aria-label": `${t("workspace.mismatchTitle")}. ${workspaceDifference}`, title: workspaceDifference, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("workspace.mismatchShort") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", onClick: workspaceSelection.onAlign, children: t("workspace.align") })] }) ] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: appearanceClass(MnemonView_module_css_default.headerActions, MnemonSidebarView_module_css_default.headerActions), children: [ headerActions, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: appearanceClass(MnemonView_module_css_default.statusCluster, MnemonSidebarView_module_css_default.statusCluster), children: [!focused && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CompositionStatus, { tone: statusTone, label: connectionLabel, strategy: composingLabel, layers: headerLayers, onOpen: openConfiguration }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonView_module_css_default.iconButton, disabled: statusLoading, onClick: refreshPage, "aria-label": t("common.refresh"), title: t("common.refresh"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, { size: 16 }) })] }), openSettings !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonView_module_css_default.iconButton, onClick: openSettings, "aria-label": t("header.configure"), title: t("header.configure"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSettingsOutlineRegular, { size: 16 }) }) ] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: sourceCatalogState.contextKey === surfaceScopeKey && sourceCatalogState.error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.alert, role: "alert", children: sourceCatalogState.error }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: (statusError !== null || status?.healthy === false && notice === void 0) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.alert, role: "alert", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("header.notReady") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: statusError ?? status?.error })] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { className: MnemonView_module_css_default.notice, children: !focused && statusError === null && notice !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Callout, { tone: notice.tone === "error" ? "error" : "warning", title: notice.title, actions: openConfiguration === void 0 ? void 0 : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", onClick: openConfiguration, children: t("common.openConfiguration") }), children: notice.detail }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { className: MnemonView_module_css_default.notice, children: status?.restartPending !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RestartReminder, { pending: status.restartPending }) }), workspaceToast.element, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: Boolean(workspaceParticipation?.excluded) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.alert, role: "status", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("workspace.excluded") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("workspace.excludedDetail") })] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: (workspaceParticipation?.invalidEntries?.length ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.alert, role: "status", children: t("workspace.invalidExclusions", { count: workspaceParticipation.invalidEntries.length }) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: workspaceParticipation?.reason === "workspace-unavailable" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonView_module_css_default.alert, role: "status", children: t("workspace.unavailable") }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: (remoteReadOnly || !focused && Boolean(status?.lifecycle?.current?.idleReviewBlocked)) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(OrdinaryNotices, { remoteReadOnly, reviewPaused: focused ? void 0 : status?.lifecycle?.current?.idleReviewBlocked }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: !focused && status?.memorySystem?.workflows !== void 0 && (!status.memorySystem.workflows.idleReview || !status.memorySystem.workflows.runtimeCapacity) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BackgroundWorkflowNotice, { workflows: status.memorySystem.workflows }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: !focused && status?.lifecycle?.current?.idleReviewWatermark !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.alert, role: status.lifecycle.current.idleReviewWatermark.state === "error" ? "alert" : "status", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("status.reviewWatermarkUsage", { attempts: status.lifecycle.current.idleReviewAttempts ?? 0, max: status.lifecycle.current.idleReviewWatermark.maxPerSession, restored: status.lifecycle.current.idleReviewWatermark.restoredAttempts }) }), status.lifecycle.current.idleReviewWatermark.state === "error" ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("status.reviewWatermarkPaused") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("status.reviewWatermarkRecovery") })] }) : status.lifecycle.current.nextReviewAt !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("status.reviewWatermarkNext", { time: new Date(status.lifecycle.current.nextReviewAt).toLocaleString(locale) }) })] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: !focused && status?.lifecycle?.current?.lastError !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.alert, role: "alert", "aria-label": t("status.reviewFailed"), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("status.reviewFailed") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: status.lifecycle.current.lastError }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("status.reviewFailedDetail") }), status.lifecycle.current.lastReviewFailure?.status === "partial" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("status.reviewPartial") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("status.reviewRun", { id: status.lifecycle.current.lastReviewFailure.runId ?? "" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { children: status.lifecycle.current.lastReviewFailure.receipts.map((receipt, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: [ receipt.tool, receipt.action, receipt.documentId, receipt.target, receipt.revision ].filter(Boolean).join(" · ") }, index)) }) ] }), /CONTEXT_WINDOW_EXCEEDED|exceed(?:s|ed)? (?:the )?(?:available )?context (?:size|window)/iu.test(status.lifecycle.current.lastError) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("status.reviewContextWindow") }) ] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonView_module_css_default.workspace, children: [!focused && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorkspaceNavigation, { page, onSelect: openTab, sourcePages: sourceNavigationEntries, disabledTypes, memoryOff }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: appearanceClass(MnemonView_module_css_default.canvas, MnemonSidebarView_module_css_default.canvas), ref: canvasRef, "data-testid": "mnemon-canvas", "data-lock-page-header": activeSourcePage?.navigation?.stickyHeader !== false ? "" : void 0, children: [ page === "status" && focus !== void 0 && disabledTypes.has(focus.sourceTypeId) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SourceDisabledPage, { title: focus.title, onOpenConfiguration: openConfiguration }), page === "status" && !focused && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorkbenchStatusContext.Provider, { value: status, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusPage, { client, status, loading: statusLoading, writeEnabled, attention: notice !== void 0, components: componentCards, renderCard, areaName, onRefresh: () => void loadStatus(true), onOpenConfiguration: openConfiguration }) }), activeManagedSourceInstance !== void 0 && managedSourcePageContent, activeSourcePage !== void 0 && customSourcePage, activeStoppedType !== void 0 && (disabledTypes.has(activeStoppedType) ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SourceDisabledPage, { title: stoppedTitle(activeStoppedType), onOpenConfiguration: openConfiguration }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SourceStoppedPage, { title: stoppedTitle(activeStoppedType), memoryOff, onOpenConfiguration: openConfiguration })) ] }, surfaceScopeKey)] }) ] }); } // vendor/dsh-mnemon/src/client/workspace-controller.ts var MnemonWorkspaceController = class extends ExternalStore { constructor() { super({ open: false }); } open() { this.setOpen(true, true); } close() { this.setOpen(false); } setOpen(open, reassert = false) { if (this.snapshot.open === open && !reassert) return; this.setSnapshot({ open }, reassert); } }; const css$5 = ".NS3bAW_workspacePanel{box-sizing:border-box;background:var(--dsw-alias-bg-overlay,var(--dsw-alias-bg-base));pointer-events:auto;min-width:0;min-height:0;display:flex;position:fixed;overflow:hidden}.NS3bAW_workspacePanel>*{flex:auto;width:100%;min-width:0}.NS3bAW_betterSidebarSeat,.NS3bAW_nativeWorkspace{flex:auto;width:100%;min-width:0;height:100%;min-height:0;display:flex;overflow:hidden}.NS3bAW_betterSidebarSeat>*,.NS3bAW_nativeWorkspace>*{flex:auto;min-width:0}.NS3bAW_nativeWorkspace{z-index:2;position:relative}.NS3bAW_nativeWorkspace[data-dsh-brain-mnemon-main-seat]{box-sizing:border-box;padding-block-start:var(--dsh-frame-top-clearance,0px)}.NS3bAW_windowDragBand{height:var(--dsh-frame-top-clearance,0px);position:absolute;inset:0 0 auto}.NS3bAW_nativeWorkspace[hidden]{display:none}.NS3bAW_entry{box-sizing:border-box;border-radius:var(--dsw-radius-md);width:calc(100% - 4px);min-height:36px;color:var(--dsw-alias-label-primary);font:inherit;text-align:left;white-space:nowrap;cursor:pointer;background:0 0;border:none;align-items:center;gap:8px;margin:0 2px;padding:7px 8px;line-height:22px;display:flex}.NS3bAW_entry:hover,.NS3bAW_entry[data-active]{background:var(--dsw-alias-interactive-bg-hover)}.NS3bAW_entry:focus-visible{outline:var(--dsw-focus-ring-width) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:-2px}.NS3bAW_entryIcon{flex:none;justify-content:center;align-items:center;display:inline-flex}.NS3bAW_entryIcon svg{width:16px;height:16px;display:block}.NS3bAW_entryLabel{text-overflow:ellipsis;min-width:0;overflow:hidden}[data-sidebar-collapsed] .NS3bAW_entry{justify-content:center;width:36px;height:36px;min-height:36px;margin:0 auto 12px;padding:0}[data-sidebar-collapsed] .NS3bAW_entryIcon svg{width:18px;height:18px}[data-sidebar-collapsed] .NS3bAW_entryLabel{display:none}"; const tagId$2 = "dsh-brain-mnemon/src/client/MnemonWorkspace.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$2) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$2; document.head.appendChild(tag); } if (tag.textContent !== css$5) tag.textContent = css$5; } var MnemonWorkspace_module_css_default = { "betterSidebarSeat": "NS3bAW_betterSidebarSeat", "entry": "NS3bAW_entry", "entryIcon": "NS3bAW_entryIcon", "entryLabel": "NS3bAW_entryLabel", "nativeWorkspace": "NS3bAW_nativeWorkspace", "windowDragBand": "NS3bAW_windowDragBand", "workspacePanel": "NS3bAW_workspacePanel" }; // vendor/dsh-mnemon/src/client/shared/dom-seat.ts var HeldSeat = class extends ExternalStore { owner; constructor() { super(void 0); } hold(value) { const token = Symbol("held-seat"); this.owner = token; this.setSnapshot(value, true); return () => { if (this.owner !== token) return; this.owner = void 0; this.setSnapshot(void 0); }; } }; function createRafCoalescer(run) { let frameId; let microtaskToken; const cancel = () => { if (frameId !== void 0 && typeof cancelAnimationFrame === "function") cancelAnimationFrame(frameId); frameId = void 0; microtaskToken = void 0; }; const flush = () => { cancel(); run(); }; const schedule = () => { if (frameId !== void 0 || microtaskToken !== void 0) return; if (typeof requestAnimationFrame === "function") { frameId = requestAnimationFrame(() => { frameId = void 0; run(); }); return; } const token = {}; microtaskToken = token; queueMicrotask(() => { if (microtaskToken !== token) return; microtaskToken = void 0; run(); }); }; return { schedule, flush, cancel, get pending() { return frameId !== void 0 || microtaskToken !== void 0; } }; } // vendor/dsh-mnemon/src/client/workspace-mount.tsx const ACTIVE_ATTR = "data-dsh-brain-mnemon-active"; const TASKBOARD_ACTIVE_ATTR = "data-dsh-taskboard-active"; const SSH_ACTIVE_ATTR = "data-dsh-ssh-active"; const ACTIVATE_EVENT = "dsh-panel-activate"; const SIDEBAR_CONTEXT_SELECTOR = "[data-dsh-taskboard-entry], [data-dsh-ssh-entry], [class*=\"sessionRow\"], [class*=\"projectRow\"], [class*=\"searchResultRow\"], [class*=\"searchResultWorkspace\"], [class*=\"newSession\"]"; function resolveWorkspaceColumn() { return document.querySelector("[data-pane=\"conversation\"]") ?? document.querySelector(".dshDesktopConversationSurface") ?? document.querySelector("[class*=\"centerCol\"]") ?? void 0; } function normalizePath(value) { return value.replace(/[\\/]+$/u, ""); } const NO_SKILLS_PANEL = { subscribe: () => () => {}, getSnapshot: () => false }; const SKILLS_APART = ["skills"]; function useHiddenSourceTypes(panel) { const seat = panel ?? NO_SKILLS_PANEL; const subscribe = (0, react.useCallback)((listener) => seat.subscribe(listener), [seat]); const getSnapshot = (0, react.useCallback)(() => seat.getSnapshot(), [seat]); return (0, react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot) ? SKILLS_APART : void 0; } function MnemonBuiltinWorkspaceHost(props) { (0, react.useEffect)(() => props.composer?.mount(props.sessionId), [props.composer, props.sessionId]); const subscribeLocale = (0, react.useCallback)((listener) => props.localeRuntime.subscribe(listener), [props.localeRuntime]); const getLocale = (0, react.useCallback)(() => props.localeRuntime.getSnapshot(), [props.localeRuntime]); const locale = (0, react.useSyncExternalStore)(subscribeLocale, getLocale, getLocale); const localeFallbacks = (0, react.useMemo)(() => localeFallbackChain(locale), [locale]); const hiddenSourceTypes = useHiddenSourceTypes(props.skillsPanel); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonWorkbench, { connection: props.connection, settingsScope: props.settingsScope, sessionId: props.sessionId, ...hiddenSourceTypes === void 0 ? {} : { hiddenSourceTypes }, ...props.skillsScope === void 0 ? {} : { skillsScope: props.skillsScope }, surface: "builtin", headerActions: props.composer === void 0 ? void 0 : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryComposerToggle, { composer: props.composer, t: props.t }), t: props.t, locale: locale.active, localeFallbacks, sourcePageDirectory: props.sourcePageDirectory, ...props.configuration === void 0 ? {} : { configuration: props.configuration }, ...props.componentChanges === void 0 ? {} : { componentChanges: props.componentChanges }, ...props.renderSlot === void 0 ? {} : { renderSlot: props.renderSlot } }); } function MnemonWorkspaceHost(props) { const subscribeLocale = (0, react.useCallback)((listener) => props.localeRuntime.subscribe(listener), [props.localeRuntime]); const getLocale = (0, react.useCallback)(() => props.localeRuntime.getSnapshot(), [props.localeRuntime]); const mainSessionId = useMnemonSessionId(props.currentSession); const sessionId = Object.hasOwn(props, "sessionId") ? props.sessionId : mainSessionId; const explicitCwd = props.cwd; const subscribeSessions = (0, react.useCallback)((listener) => props.sessions.list.subscribe(listener), [props.sessions.list]); const getSessionCwd = (0, react.useCallback)(() => { const byId = props.sessions.list.getSnapshot().byId; if (explicitCwd !== void 0) return explicitCwd; if (sessionId === void 0 || !Object.hasOwn(byId, sessionId)) return null; return byId[sessionId]?.cwd ?? null; }, [ explicitCwd, props.sessions.list, sessionId ]); const subscribeWorkspaces = (0, react.useCallback)((listener) => props.workspaces.list.subscribe(listener), [props.workspaces.list]); const getWorkspaces = (0, react.useCallback)(() => props.workspaces.list.getSnapshot(), [props.workspaces.list]); const locale = (0, react.useSyncExternalStore)(subscribeLocale, getLocale, getLocale); const localeFallbacks = (0, react.useMemo)(() => localeFallbackChain(locale), [locale]); const currentCwd = (0, react.useSyncExternalStore)(subscribeSessions, getSessionCwd, getSessionCwd) ?? void 0; const workspaces = (0, react.useSyncExternalStore)(subscribeWorkspaces, getWorkspaces, getWorkspaces); const hidden = useHiddenSourceTypes(props.skillsPanel); const hiddenSourceTypes = props.focus === void 0 ? hidden : void 0; const [selectedWorkspaceId, setSelectedWorkspaceId] = (0, react.useState)(); const effectiveWorkspace = currentCwd === void 0 ? void 0 : workspaces.items.find((workspace) => normalizePath(workspace.path) === normalizePath(currentCwd)); const fallbackWorkspace = effectiveWorkspace ?? workspaces.items[0]; const resolvedSelectedId = selectedWorkspaceId !== void 0 && workspaces.items.some((workspace) => String(workspace.workspaceId) === selectedWorkspaceId) ? selectedWorkspaceId : fallbackWorkspace === void 0 ? void 0 : String(fallbackWorkspace.workspaceId); (0, react.useEffect)(() => { if (resolvedSelectedId !== selectedWorkspaceId) setSelectedWorkspaceId(resolvedSelectedId); }, [resolvedSelectedId, selectedWorkspaceId]); const selection = (0, react.useMemo)(() => ({ options: workspaces.items.map((workspace) => ({ id: String(workspace.workspaceId), title: workspace.title, path: workspace.path })), ...resolvedSelectedId === void 0 ? {} : { selectedWorkspaceId: resolvedSelectedId }, ...effectiveWorkspace === void 0 ? {} : { effectiveWorkspaceId: String(effectiveWorkspace.workspaceId) }, onSelect: setSelectedWorkspaceId, onAlign: () => { if (effectiveWorkspace !== void 0) setSelectedWorkspaceId(String(effectiveWorkspace.workspaceId)); } }), [ effectiveWorkspace, resolvedSelectedId, workspaces.items ]); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonWorkbench, { connection: props.connection, settingsScope: props.settingsScope, ...sessionId === void 0 ? {} : { sessionId }, ...resolvedSelectedId === void 0 ? {} : { workspaceId: resolvedSelectedId }, workspaceSelection: selection, active: props.active ?? true, titleBar: props.titleBar === true, t: props.t, locale: locale.active, localeFallbacks, sourcePageDirectory: props.sourcePageDirectory, ...props.configuration === void 0 ? {} : { configuration: props.configuration }, ...props.componentChanges === void 0 ? {} : { componentChanges: props.componentChanges }, ...props.renderSlot === void 0 ? {} : { renderSlot: props.renderSlot }, ...props.navigation === void 0 ? {} : { onClose: props.navigation.close }, ...props.focus === void 0 ? {} : { focus: props.focus }, ...hiddenSourceTypes === void 0 ? {} : { hiddenSourceTypes }, ...props.skillsScope === void 0 ? {} : { skillsScope: props.skillsScope } }); } function MnemonSidebarWorkspaceHost(props) { const state = (0, react.useSyncExternalStore)(props.controller.subscribe, props.controller.getSnapshot, props.controller.getSnapshot); const subscribeBetterSidebar = (0, react.useCallback)((listener) => props.betterSidebarSeat?.subscribe(listener) ?? (() => {}), [props.betterSidebarSeat]); const getBetterSidebar = (0, react.useCallback)(() => props.betterSidebarSeat?.getSnapshot(), [props.betterSidebarSeat]); const betterSidebar = (0, react.useSyncExternalStore)(subscribeBetterSidebar, getBetterSidebar, getBetterSidebar); const subscribeNativeSidebar = (0, react.useCallback)((listener) => props.nativeSidebarSeat?.subscribe(listener) ?? (() => {}), [props.nativeSidebarSeat]); const getNativeSidebar = (0, react.useCallback)(() => props.nativeSidebarSeat?.getSnapshot(), [props.nativeSidebarSeat]); const nativeSidebar = (0, react.useSyncExternalStore)(subscribeNativeSidebar, getNativeSidebar, getNativeSidebar); const [bounds, setBounds] = (0, react.useState)(); (0, react.useEffect)(() => { if (!state.open || nativeSidebar?.available) return; let column; let previousInert = false; const update = () => { if (column === void 0) return; const { left, top, width, height } = column.getBoundingClientRect(); setBounds((previous) => previous?.left === left && previous.top === top && previous.width === width && previous.height === height ? previous : { left, top, width, height }); }; const updateCoalescer = createRafCoalescer(update); const scheduleUpdate = () => { updateCoalescer.schedule(); }; const observer = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(scheduleUpdate); const detach = () => { if (column !== void 0) { observer?.unobserve(column); column.inert = previousInert; } column = void 0; }; const connect = () => { const next = resolveWorkspaceColumn(); if (next !== column) { detach(); column = next; if (column !== void 0) { previousInert = column.inert; column.inert = true; observer?.observe(column); } } update(); }; const connectCoalescer = createRafCoalescer(connect); connect(); const shell = new MutationObserver(() => { connectCoalescer.schedule(); }); shell.observe(document.body, { childList: true, subtree: true }); window.addEventListener("resize", scheduleUpdate); return () => { connectCoalescer.cancel(); updateCoalescer.cancel(); shell.disconnect(); observer?.disconnect(); window.removeEventListener("resize", scheduleUpdate); detach(); }; }, [ state.open, props.controller, nativeSidebar?.available ]); (0, react.useEffect)(() => { if (!state.open) return; const escape = (event) => { if (event.key === "Escape" && !event.defaultPrevented && document.querySelector("[role=\"dialog\"]") === null) { if (props.navigation !== void 0) props.navigation.close(); else props.controller.close(); } }; window.addEventListener("keydown", escape); return () => { window.removeEventListener("keydown", escape); }; }, [ state.open, props.controller, props.navigation ]); const betterSidebarView = betterSidebar === void 0 ? null : (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonWorkspaceHost, { connection: props.connection, settingsScope: props.settingsScope, sessions: props.sessions, workspaces: props.workspaces, currentSession: props.currentSession, localeRuntime: props.localeRuntime, sourcePageDirectory: props.sourcePageDirectory, ...props.configuration === void 0 ? {} : { configuration: props.configuration }, ...props.componentChanges === void 0 ? {} : { componentChanges: props.componentChanges }, ...props.skillsScope === void 0 ? {} : { skillsScope: props.skillsScope }, ...props.skillsPanel === void 0 ? {} : { skillsPanel: props.skillsPanel }, sessionId: betterSidebar.scope.sessionId, ...betterSidebar.scope.cwd === void 0 ? {} : { cwd: betterSidebar.scope.cwd }, active: betterSidebar.visible, t: props.t, ...props.renderSlot === void 0 ? {} : { renderSlot: props.renderSlot } }), betterSidebar.target); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ betterSidebarView, nativeSidebar?.target !== void 0 && nativeSidebar.available && (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", { "data-dsh-brain-mnemon-view": true, className: MnemonWorkspace_module_css_default.nativeWorkspace, hidden: !state.open, "aria-label": props.t("tab.label"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonWorkspaceHost, { ...props, active: state.open, titleBar: true }) }), nativeSidebar.target), !nativeSidebar?.available && bounds !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", { "data-dsh-brain-mnemon-view": true, hidden: !state.open, className: MnemonWorkspace_module_css_default.workspacePanel, style: { ...bounds, display: state.open ? void 0 : "none" }, "aria-label": props.t("tab.label"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonWorkspaceHost, { ...props, active: state.open }) }) ] }); } function coordinateSidebarPanels(controller, close = () => controller.close()) { let announcing = false; const applyActive = () => { const html = document.documentElement; if (!controller.getSnapshot().open) { html.removeAttribute(ACTIVE_ATTR); return; } announcing = true; try { document.dispatchEvent(new CustomEvent(ACTIVATE_EVENT, { detail: "ssh" })); document.dispatchEvent(new CustomEvent(ACTIVATE_EVENT, { detail: "taskboard" })); } finally { announcing = false; } html.removeAttribute(TASKBOARD_ACTIVE_ATTR); html.removeAttribute(SSH_ACTIVE_ATTR); html.setAttribute(ACTIVE_ATTR, ""); document.dispatchEvent(new CustomEvent(ACTIVATE_EVENT, { detail: "mnemon" })); }; const onActivate = (event) => { if (announcing || !controller.getSnapshot().open) return; const detail = event.detail; if (detail === "taskboard" || detail === "ssh") close(); }; const onContext = (event) => { if (controller.getSnapshot().open && event.target instanceof Element && event.target.closest(SIDEBAR_CONTEXT_SELECTOR) !== null) close(); }; const observer = new MutationObserver(() => { if (!controller.getSnapshot().open) return; const html = document.documentElement; if (!html.hasAttribute(ACTIVE_ATTR) || html.hasAttribute(TASKBOARD_ACTIVE_ATTR) || html.hasAttribute(SSH_ACTIVE_ATTR)) close(); }); observer.observe(document.documentElement, { attributes: true, attributeFilter: [ ACTIVE_ATTR, TASKBOARD_ACTIVE_ATTR, SSH_ACTIVE_ATTR ] }); document.addEventListener("click", onContext, true); document.addEventListener(ACTIVATE_EVENT, onActivate); const unsubscribe = controller.subscribe(applyActive); applyActive(); return () => { unsubscribe(); observer.disconnect(); document.removeEventListener("click", onContext, true); document.removeEventListener(ACTIVATE_EVENT, onActivate); document.documentElement.removeAttribute(ACTIVE_ATTR); }; } // vendor/dsh-mnemon/src/client/skills-panel.tsx const SKILLS_PANEL_ID = "mnemon-skills"; const SKILLS_SOURCE_TYPE = "skills"; function isSkillsPage(page) { return page.split("/")[0] === SKILLS_SOURCE_TYPE; } var SkillsPanelSeat = class extends ExternalStore { constructor() { super(false); } set(available) { this.setSnapshot(available); } }; var PageBoundary = class extends react.Component { state = { failed: false }; static getDerivedStateFromError() { return { failed: true }; } componentDidCatch(error, info) { console.error("dsh-brain-mnemon: the Skills page failed", error, info.componentStack); } render() { return this.state.failed ? null : this.props.children; } }; function pageRenderer(ctx) { const render = (_slot, props, options) => { const entry = ctx.slots.entriesOfSlot(MNEMON_SOURCE_PAGE_SLOT).find((candidate) => candidate.options.id === options?.only); return entry === void 0 ? null : (0, react.createElement)(PageBoundary, null, (0, react.createElement)(entry.component, props)); }; return render; } function SkillsSidebarIcon({ size }) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { "data-dsh-plugin": "dsh-brain-mnemon", "data-dsh-part": "skills-sidebar-icon", style: { display: "inline-flex" }, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSkillOutlineRegular, { size }) }); } function SkillsMainPanel(props) { const title = props.t("skills.label"); const active = props.usePanelInfo === void 0 ? true : props.usePanelInfo((info) => info.activePanelId === SKILLS_PANEL_ID); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonWorkspace_module_css_default.nativeWorkspace, "data-dsh-brain-mnemon-main-seat": true, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonWorkspace_module_css_default.windowDragBand, "data-window-drag": true, "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", { className: MnemonWorkspace_module_css_default.nativeWorkspace, "aria-label": title, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonWorkspaceHost, { connection: props.connection, settingsScope: props.settingsScope, skillsScope: props.skillsScope, sessions: props.sessions, workspaces: props.workspaces, currentSession: props.currentSession, localeRuntime: props.localeRuntime, sourcePageDirectory: props.sourcePageDirectory, configuration: props.configuration, componentChanges: props.componentChanges, t: props.t, active, titleBar: true, focus: { sourceTypeId: SKILLS_SOURCE_TYPE, title }, renderSlot: props.render, navigation: props.navigation }) })] }); } function mountSkillsPanel(ctx, services, seat) { const render = pageRenderer(ctx); const navigation = { open: () => ctx.layout.selectPanel(SKILLS_PANEL_ID), close: () => ctx.layout.selectPanel(null) }; const openFromAnchor = (event) => { const anchor = event.detail; if (anchor !== void 0 && seat.getSnapshot() && isSkillsPage(anchor.page)) ctx.layout.selectPanel(SKILLS_PANEL_ID); }; const stopNative = ctx.slots.inject("main", () => ctx.slots.inject("sidebar.panellist", () => { const stopMain = ctx.slots.register({ name: "main", key: SKILLS_PANEL_ID, inject: () => ({ ...services, render, navigation }) }, SkillsMainPanel); let stopIcon; try { stopIcon = ctx.slots.register({ name: "sidebar.panellist", id: SKILLS_PANEL_ID, order: 31, label: () => services.t("skills.label"), locale: "mnemon" }, SkillsSidebarIcon); seat.set(true); } catch (error) { seat.set(false); stopIcon?.(); stopMain(); throw error; } return () => { seat.set(false); stopIcon?.(); stopMain(); }; })); if (typeof window !== "undefined") window.addEventListener(MNEMON_ANCHOR_EVENT, openFromAnchor); return () => { if (typeof window !== "undefined") window.removeEventListener(MNEMON_ANCHOR_EVENT, openFromAnchor); stopNative(); seat.set(false); }; } // vendor/dsh-mnemon/src/client/component-list-seat.ts const STARTER_GROUP_ROW_ID = "mnemon-bundle"; var MnemonComponentListSeat = class extends HeldSeat { report(groupRow) { return this.hold(groupRow); } }; // vendor/dsh-mnemon/src/client/MnemonPluginActions.tsx const MNEMON_PACKAGE_NAME = "dsh-brain-mnemon"; function MnemonPluginActions({ subject, workspace, componentList, t }) { const open = (0, react.useSyncExternalStore)(workspace.subscribe, workspace.getSnapshot, workspace.getSnapshot); const groupRow = subject.kind === "bundle" && subject.pkg.name === "dsh-brain-mnemon" ? subject.pkg.rows.some((row) => row.rowId === STARTER_GROUP_ROW_ID) : void 0; (0, react.useEffect)(() => groupRow === void 0 ? void 0 : componentList?.report(groupRow), [groupRow, componentList]); if (subject.kind !== "bundle" || subject.pkg.name !== "dsh-brain-mnemon" || !subject.pkg.enabled || open === void 0) return null; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryIcon, { size: 13 }), onClick: open, children: t("plugin.openWorkspace") }); } const css$4 = ".ypSjoa_wrap{display:inline-flex;position:relative}.ypSjoa_button{corner-shape:round;cursor:pointer;width:28px;height:28px;color:var(--dsw-alias-label-tertiary);background:0 0;border:none;border-radius:28px;justify-content:center;align-items:center;padding:6px;transition:background-color .12s,color .12s;display:inline-flex}.ypSjoa_button:hover,.ypSjoa_button[aria-expanded=true]{background:var(--dsw-alias-interactive-bg-hover);color:var(--dsw-alias-label-secondary)}.ypSjoa_button:active{background:var(--dsw-alias-interactive-bg-active)}.ypSjoa_button:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--dsw-alias-state-business-primary));outline-offset:2px}.ypSjoa_icon{flex:none;width:16px;height:16px;display:inline-flex}.ypSjoa_modal.ypSjoa_modal{width:min(640px, calc(100vw - max(12px, env(safe-area-inset-left,0px)) - max(12px, env(safe-area-inset-right,0px))));flex-direction:column;max-height:calc(100vh - 24px);display:flex;overflow:hidden}.ypSjoa_modalContent.ypSjoa_modalContent{overscroll-behavior:contain;-webkit-overflow-scrolling:touch;flex:auto;min-height:0;overflow-y:auto}.ypSjoa_modalAction{min-width:96px}.ypSjoa_status{min-height:296px;color:var(--dsw-alias-label-tertiary);justify-content:center;align-items:center;margin:0;font-size:13px;line-height:20px;display:flex}.ypSjoa_readOnly{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-state-warn-tertiary);color:var(--dsw-alias-state-warn-label);margin-bottom:12px;padding:8px 12px;font-size:12px;line-height:18px}.ypSjoa_candidate{display:block}.ypSjoa_candidateHeading{justify-content:space-between;align-items:center;gap:8px;min-width:0;margin-bottom:6px;display:flex}.ypSjoa_candidateHeading>label{color:var(--dsw-alias-label-primary);font-size:13px;font-weight:500;line-height:20px}.ypSjoa_candidate textarea{box-sizing:border-box;border:.5px solid var(--dsw-alias-border-l4);border-radius:var(--dsw-radius-md);resize:vertical;background:var(--dsw-alias-bg-layer-3);width:100%;min-height:260px;max-height:50vh;color:var(--dsw-alias-label-primary);font-family:var(--dsw-font-family);padding:10px 12px 14px;scroll-padding-bottom:12px;font-size:14px;line-height:1.55;display:block}.ypSjoa_candidate textarea:focus-visible{outline:var(--dsw-focus-ring-width,2px) solid var(--dsw-focus-ring-color,var(--mn-accent,var(--dsw-alias-state-business-primary)));outline-offset:-1px;border-color:var(--mn-accent,var(--dsw-alias-state-business-primary))}.ypSjoa_destination{margin-top:12px}.ypSjoa_truncated,.ypSjoa_placeNote{color:var(--dsw-alias-label-tertiary);margin-top:6px;font-size:12px;line-height:18px;display:block}.ypSjoa_placeNote[data-tone=blocked]{color:var(--dsw-alias-state-warn-label)}@media (width<=640px),(height<=560px){.ypSjoa_modal.ypSjoa_modal{width:min(100%, calc(100vw - max(8px, env(safe-area-inset-left,0px)) - max(8px, env(safe-area-inset-right,0px))));max-height:calc(100vh - 16px)}.ypSjoa_modal .ypSjoa_modalAction{min-width:0;min-height:44px}.ypSjoa_candidate textarea{min-height:clamp(140px,32vh,220px);max-height:42vh}}@media (pointer:coarse) and (width<=640px),(pointer:coarse) and (height<=560px){.ypSjoa_candidate textarea{font-size:16px}}@supports (height:100dvh){.ypSjoa_modal.ypSjoa_modal{max-height:calc(100dvh - 24px)}@media (width<=640px),(height<=560px){.ypSjoa_modal.ypSjoa_modal{max-height:calc(100dvh - 16px)}.ypSjoa_candidate textarea{min-height:clamp(140px,32dvh,220px);max-height:42dvh}}}@media (prefers-reduced-motion:reduce){.ypSjoa_button{transition:none}}"; const tagId$1 = "dsh-brain-mnemon/src/client/MnemonSaveAction.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$1) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId$1; document.head.appendChild(tag); } if (tag.textContent !== css$4) tag.textContent = css$4; } var MnemonSaveAction_module_css_default = { "button": "ypSjoa_button", "candidate": "ypSjoa_candidate", "candidateHeading": "ypSjoa_candidateHeading", "destination": "ypSjoa_destination", "icon": "ypSjoa_icon", "modal": "ypSjoa_modal", "modalAction": "ypSjoa_modalAction", "modalContent": "ypSjoa_modalContent", "placeNote": "ypSjoa_placeNote", "readOnly": "ypSjoa_readOnly", "status": "ypSjoa_status", "truncated": "ypSjoa_truncated", "wrap": "ypSjoa_wrap" }; // vendor/dsh-mnemon/src/client/MnemonSaveAction.tsx const PREVIEW_LIMIT = 8e3; const MAX_RUNTIME_ENTRY_BYTES = 8192; const RUNTIME_PLACES = { "runtime:memory": "saveAction.to.memory", "runtime:user": "saveAction.to.user" }; function isRuntimePlace(destination) { return destination === "runtime:memory" || destination === "runtime:user"; } function layerAcceptsWrites(system, sourceTypeId) { const layer = system?.configuration.layers[sourceTypeId]; return layer?.enabled !== false && layer?.participation?.write !== "off" && (system?.sources === void 0 || system.sources.some((source) => source.sourceTypeId === sourceTypeId)); } function spaceAcceptsWrites(body, commandFound) { const isNative = (body.provider.typeId ?? body.provider.id) === NATIVE_PROVIDER_ID; return body.active !== false && body.providerEnabled !== false && body.provider.capabilities.remember && (!isNative || commandFound !== false); } function saveDestinations(status, taskAgent, t) { const system = status?.memorySystem; const runtimeOn = layerAcceptsWrites(system, "runtime"); const spacesOn = layerAcceptsWrites(system, "memory-spaces"); const spaces = spacesOn ? (status?.memoryBodies ?? []).filter((body) => spaceAcceptsWrites(body, status?.commandFound)) : []; const providerReady = spaces.length > 0 || status?.commandFound !== false || (status?.providerServices ?? []).some((provider) => provider.enabled && provider.configured); return [ { value: "agent", label: t("saveAction.to.agent"), detail: t("saveAction.to.agentDetail"), disabled: taskAgent === false || !spacesOn || !providerReady }, ...runtimeOn ? Object.keys(RUNTIME_PLACES).map((value) => ({ value, label: t(RUNTIME_PLACES[value]) })) : [], ...spaces.map((body) => ({ value: `space:${body.id}`, label: body.name, detail: t("saveAction.to.space", { provider: body.provider.label }) })) ]; } function embeddingManagement(snapshot) { return snapshot.value === void 0 ? {} : { embeddingManaged: snapshot.value.embedding?.enabled === true }; } function placeSource(catalog, sourceTypeId) { const sources = catalog.sources.filter((source) => source.sourceTypeId === sourceTypeId); return sources.find((source) => isDefaultSourceInstance(source.sourceInstanceKey, sourceTypeId)) ?? sources[0]; } async function saveDirectly(client, destination, place, content, t) { const source = placeSource(await client.sourceManagementCatalog(), isRuntimePlace(destination) ? "runtime" : "memory-spaces"); if (source === void 0) throw new Error(t("saveAction.unavailable")); if (isRuntimePlace(destination)) { const input = { action: "add", target: destination === "runtime:user" ? "user" : "memory", content }; const result = (source.assistance?.includes("mutate") === true ? await client.assistSource(source.sourceInstanceKey, "mutate", input, source.revision, true) : await client.mutateSourceManagement(source.sourceInstanceKey, "mutate", input, source.revision, true)).value; if (result.message?.startsWith("Entry already exists") === true) return { action: "skipped", note: { key: "saveAction.saved.duplicate" } }; return { action: "added", note: { key: result.maintenance === void 0 ? "saveAction.saved.runtime" : "saveAction.saved.runtimeMaintained", params: { count: result.entryCount }, place: RUNTIME_PLACES[destination] } }; } const result = (await client.mutateSourceManagement(source.sourceInstanceKey, "remember", { content, memoryBodyId: destination.slice(6), source: "user" }, source.revision, true)).value; const answered = typeof result.action === "string" ? result.action : "stored"; const action = answered === "queued" ? "accepted" : answered; const outcome = writeOutcome(action); return { action, note: { key: outcome === "skipped" ? "saveAction.saved.duplicate" : outcome === "pending" ? "saveAction.saved.spacePending" : outcome === "written" || outcome === "updated" ? "saveAction.saved.space" : "saveAction.saved.spaceOther", params: { space: place, action: answered } }, ...result.embedded === false ? { unembedded: true } : {} }; } function runtimePlaceNote(destination, content, usage, taskAgent, agentOpen, t) { if (!isRuntimePlace(destination) || content === "") return void 0; const user = destination === "runtime:user"; const target = t(RUNTIME_PLACES[destination]); const entry = content.replace(/\s+/gu, " "); if (entry.includes("§")) return { text: t("saveAction.place.delimiter", { target }), blocked: true }; const bytes = new TextEncoder().encode(entry).length; const room = usage?.[user ? "user" : "memory"]; const cap = Math.min(MAX_RUNTIME_ENTRY_BYTES, room?.limit ?? MAX_RUNTIME_ENTRY_BYTES); const orAgent = agentOpen ? t("saveAction.place.orAgent") : ""; if (bytes > cap) { const exact = humanBytes(bytes) === humanBytes(cap); return { text: t("saveAction.place.tooLong", { target, size: exact ? `${bytes} B` : humanBytes(bytes), limit: exact ? `${cap} B` : humanBytes(cap) }) + orAgent, blocked: true }; } if (room === void 0 || room.used + bytes + (room.used > 0 ? 4 : 0) <= room.limit) return void 0; const kept = Math.floor(room.limit * .7) - 4; const keep = Math.max(0, kept - bytes); const used = humanBytes(room.used); const limit = humanBytes(room.limit); if (user) { if (taskAgent === false) return { text: t("saveAction.place.userFull"), blocked: true }; if (keep === 0) return { text: t("saveAction.place.userTooLong", { size: humanBytes(bytes), max: humanBytes(Math.max(0, kept)) }) + orAgent, blocked: true }; return { text: t("saveAction.place.userCondense", { used, limit, keep: humanBytes(keep) }), blocked: false }; } return { text: t(keep === 0 ? "saveAction.place.fullAll" : "saveAction.place.full", { target, used, limit, keep: humanBytes(keep) }), blocked: false }; } const EMPTY_DESTINATIONS = Object.freeze([]); function MnemonSaveDialog({ open, onOpenChange, messageId, sessionId, connection, settingsScope, t }) { const subscribeSettings = (0, react.useCallback)((listener) => open ? settingsScope.subscribe(listener) : () => {}, [open, settingsScope]); const getSettingsSnapshot = (0, react.useCallback)(() => settingsScope.getSnapshot(), [settingsScope]); const settingsSnapshot = (0, react.useSyncExternalStore)(subscribeSettings, getSettingsSnapshot, getSettingsSnapshot); const managementWritable = settingsSnapshot.status === "ready" && settingsSnapshot.writable; const [writeEnabled, setWriteEnabled] = (0, react.useState)(void 0); const [taskAgent, setTaskAgent] = (0, react.useState)(void 0); const [status, setStatus] = (0, react.useState)(void 0); const [chosen, setChosen] = (0, react.useState)(void 0); const [candidate, setCandidate] = (0, react.useState)(void 0); const [truncated, setTruncated] = (0, react.useState)(false); const [missing, setMissing] = (0, react.useState)(false); const [submitting, setSubmitting] = (0, react.useState)(false); const [outcome, setOutcome] = (0, react.useState)(null); const [usage, setUsage] = (0, react.useState)(void 0); const candidateId = (0, react.useId)(); const openRef = (0, react.useRef)(open); const prevOpenRef = (0, react.useRef)(open); const requestVersionRef = (0, react.useRef)(0); if (prevOpenRef.current !== open) { prevOpenRef.current = open; requestVersionRef.current += 1; } openRef.current = open; const inFlightRef = (0, react.useRef)(void 0); const unseenRef = (0, react.useRef)(void 0); const closePanel = () => { requestVersionRef.current += 1; openRef.current = false; onOpenChange(false); }; (0, react.useEffect)(() => { if (!open) { setWriteEnabled(void 0); setTaskAgent(void 0); setStatus(void 0); setChosen(void 0); setCandidate(void 0); setTruncated(false); setMissing(false); setSubmitting(inFlightRef.current !== void 0); setOutcome(null); setUsage(void 0); return; } const requestVersion = ++requestVersionRef.current; let alive = true; setSubmitting(inFlightRef.current !== void 0); const unseen = unseenRef.current; unseenRef.current = void 0; const restored = unseen ?? inFlightRef.current; if (restored !== void 0) setChosen(restored.destination); if (unseen !== void 0) setOutcome(unseen); const client = new MnemonClient(connection, sessionId); client.status().then((status) => { if (!alive || requestVersionRef.current !== requestVersion) return; setWriteEnabled(status.writeEnabled && managementWritable); setTaskAgent(status.lifecycle?.taskAgentAvailable); setStatus(status); }).catch(() => { if (alive && requestVersionRef.current === requestVersion) setWriteEnabled(false); }); client.assistantMessageText(messageId).then((result) => { if (!alive || requestVersionRef.current !== requestVersion) return; if (restored !== void 0) setCandidate(restored.content); else if (result === null || result.text === "") setMissing(true); else { setTruncated(result.text.length > PREVIEW_LIMIT); setCandidate(result.text.slice(0, PREVIEW_LIMIT)); } }).catch(() => { if (!alive || requestVersionRef.current !== requestVersion) return; if (restored !== void 0) setCandidate(restored.content); else setMissing(true); }); return () => { alive = false; }; }, [ open, connection, sessionId, messageId, managementWritable ]); const content = candidate?.trim() ?? ""; const options = open ? saveDestinations(status, taskAgent, t) : EMPTY_DESTINATIONS; const usable = options.filter((option) => option.disabled !== true); const destination = chosen ?? usable[0]?.value ?? "agent"; const selected = options.find((option) => option.value === destination); const runtimeTarget = isRuntimePlace(destination) ? destination : void 0; (0, react.useEffect)(() => { if (!open || runtimeTarget === void 0 || usage !== void 0 || status === void 0) return; const runtime = status.memorySystem === void 0 ? void 0 : placeSource(status.memorySystem, "runtime"); if (runtime === void 0) { setUsage({}); return; } let alive = true; new MnemonClient(connection, sessionId).readSourceManagement(runtime.sourceInstanceKey, "snapshot").then((result) => { if (alive) setUsage(result.value?.targets ?? {}); }, () => { if (alive) setUsage({}); }); return () => { alive = false; }; }, [ open, runtimeTarget, usage, status, connection, sessionId ]); const agentOpen = options.some((option) => option.value === "agent" && option.disabled !== true); const placeNote = open ? runtimePlaceNote(destination, content, usage, taskAgent, agentOpen, t) : void 0; const answered = outcome !== null && outcome.error === void 0 && outcome.content === content && outcome.destination === destination; const placeReady = runtimeTarget === void 0 || usage !== void 0; const canSubmit = content !== "" && !submitting && writeEnabled === true && selected !== void 0 && selected.disabled !== true && placeReady && placeNote?.blocked !== true && !answered; const submit = () => { if (!canSubmit || inFlightRef.current !== void 0) return; const requestVersion = requestVersionRef.current; const target = destination; inFlightRef.current = { content, destination: target }; setSubmitting(true); setOutcome(null); const client = new MnemonClient(connection, sessionId); (target === "agent" ? client.supervise(content, messageId).then((result) => ({ action: result.action, summary: result.summary, unembedded: (result.unembedded ?? []).length > 0 })) : saveDirectly(client, target, selected?.label ?? target, content, t)).then((result) => ({ content, destination: target, ...result, ...embeddingManagement(settingsScope.getSnapshot()) }), (reason) => ({ content, destination: target, error: message(reason) })).then((result) => { inFlightRef.current = void 0; if (openRef.current && (target !== "agent" || requestVersionRef.current === requestVersion)) setOutcome(result); else if (!openRef.current && target !== "agent") unseenRef.current = result; if (openRef.current) setSubmitting(false); if (isRuntimePlace(target) && result.error === void 0) setUsage(void 0); }); }; const viewMemory = () => { const runtime = outcome !== null && isRuntimePlace(outcome.destination); closePanel(); dispatchMnemonAnchor({ page: runtime ? "runtime/entries" : "memory-spaces/content", ...runtime ? { seed: outcome.content.replace(/\s+/gu, " ") } : {}, ...sessionId === void 0 ? {} : { sessionId } }); }; const direct = writeEnabled === true && destination !== "agent"; const receiptSummary = outcome?.note === void 0 ? outcome?.summary : t(outcome.note.key, { ...outcome.note.params, ...outcome.note.place === void 0 ? {} : { target: t(outcome.note.place) } }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Modal, { open, onClose: closePanel, title: t("saveAction.title"), closeLabel: t("saveAction.close"), description: t(direct ? "saveAction.hintDirect" : "saveAction.hint"), className: MnemonSaveAction_module_css_default.modal, contentClassName: MnemonSaveAction_module_css_default.modalContent, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", className: MnemonSaveAction_module_css_default.modalAction, disabled: submitting, onClick: closePanel, children: outcome === null ? t("common.cancel") : t("saveAction.close") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", className: MnemonSaveAction_module_css_default.modalAction, disabled: !canSubmit, onClick: submit, children: direct ? submitting ? t("saveAction.saving") : t("saveAction.save") : submitting ? t("saveAction.submitting") : t("saveAction.submit") })] }), children: [ writeEnabled === false && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSaveAction_module_css_default.readOnly, role: "status", children: t("saveAction.readOnly") }), candidate === void 0 && !missing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSaveAction_module_css_default.status, children: t("saveAction.fetching") }), missing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonSaveAction_module_css_default.status, role: "status", children: t("saveAction.missing") }), candidate !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSaveAction_module_css_default.candidate, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSaveAction_module_css_default.candidateHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", { htmlFor: candidateId, children: t("saveAction.candidate") }), writeEnabled === true && !direct && taskAgent !== void 0 && usable.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TaskAgentTag, { available: taskAgent && selected?.disabled !== true, t })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { id: candidateId, rows: 12, value: candidate, onChange: (event) => setCandidate(event.target.value), autoFocus: true }), truncated && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: MnemonSaveAction_module_css_default.truncated, children: t("saveAction.truncated", { limit: PREVIEW_LIMIT }) }), writeEnabled === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { className: MnemonSaveAction_module_css_default.destination, label: t("saveAction.to"), value: destination, options, disabled: submitting, onChange: setChosen }), writeEnabled === true && placeNote !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: MnemonSaveAction_module_css_default.placeNote, "data-tone": placeNote.blocked ? "blocked" : "caution", children: placeNote.text }), writeEnabled === true && status !== void 0 && usable.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { className: MnemonSaveAction_module_css_default.placeNote, "data-tone": "blocked", children: t("saveAction.noPlace") }) ] }), outcome !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WriteReceipt, { t, action: outcome.action, summary: receiptSummary, error: outcome.error, unembedded: outcome.unembedded, embeddingManaged: outcome.embeddingManaged, onView: viewMemory, ...isRuntimePlace(outcome.destination) ? { viewLabel: t("receipt.viewRuntime") } : {} }) ] }); } const MnemonSaveAction = (0, react.memo)(function MnemonSaveAction({ messageId, sessionId, connection, settingsScope, localeRuntime, t }) { const subscribeLocale = (0, react.useCallback)((listener) => localeRuntime.subscribe(listener), [localeRuntime]); const getLocale = (0, react.useCallback)(() => localeRuntime.getSnapshot(), [localeRuntime]); (0, react.useSyncExternalStore)(subscribeLocale, getLocale, getLocale); const [open, setOpen] = (0, react.useState)(false); const [dialogMounted, setDialogMounted] = (0, react.useState)(false); const openRef = (0, react.useRef)(false); openRef.current = open; const setPanelOpen = (0, react.useCallback)((next) => { openRef.current = next; if (next) setDialogMounted(true); setOpen(next); }, []); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: MnemonSaveAction_module_css_default.wrap, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, { label: t("saveAction.tooltip"), side: "bottom", disabled: open, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: MnemonSaveAction_module_css_default.button, "aria-label": t("saveAction.button"), "aria-haspopup": "dialog", "aria-expanded": open, onClick: () => setPanelOpen(!openRef.current), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: MnemonSaveAction_module_css_default.icon, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryIcon, { size: 16 }) }) }) }), dialogMounted && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MnemonSaveDialog, { open, onOpenChange: setPanelOpen, messageId, ...sessionId === void 0 ? {} : { sessionId }, connection, settingsScope, t })] }); }); // vendor/dsh-mnemon/src/client/action-seat.ts var MnemonActionSeat = class extends HeldSeat { provide(action) { return this.hold(action); } }; // vendor/dsh-mnemon/src/client/locale-registration.ts function registerMnemonLocales(locale) { let snapshot; let fallback; const withBundledFallback = (dictionary) => new Proxy(dictionary, { get(legacy, key) { if (typeof key !== "string" || !Object.hasOwn(legacy, key)) return Reflect.get(legacy, key); const current = locale.getSnapshot(); if (snapshot !== current) { snapshot = current; const bundled = resolveMnemonLocale(localeFallbackChain(current)); fallback = bundled === "en" || bundled === "zh" ? void 0 : mnemonLocales[bundled]; } return fallback?.[key] ?? legacy[key]; } }); return locale.register("mnemon", { en: withBundledFallback(mnemonLocales.en), zh: withBundledFallback(mnemonLocales.zh) }); } // vendor/dsh-mnemon/src/client/settings.ts var MnemonSettingsScope = class { connection; namespace; requestTimeoutMs; snapshot = { status: "loading", writable: false, mode: "host" }; listeners = /* @__PURE__ */ new Set(); tail = Promise.resolve(); constructor(connection, namespace = MNEMON_SETTINGS_NAMESPACE, requestTimeoutMs = 12e3) { this.connection = connection; this.namespace = namespace; this.requestTimeoutMs = requestTimeoutMs; this.load(); } getSnapshot = () => this.snapshot; subscribe = (listener) => { this.listeners.add(listener); return () => this.listeners.delete(listener); }; mutate(ops) { return this.write(ops); } refresh() { const task = this.tail.then(async () => { try { const response = await this.call("get", { namespace: this.namespace }); if (response.ok) this.publish(response.value); } catch {} }); this.tail = task; return task; } async load() { try { const response = await this.call("get", { namespace: this.namespace }); if (!response.ok) { this.publish({ status: "unavailable", writable: false, mode: "host" }); return; } this.publish(response.value); } catch { this.publish({ status: "unavailable", writable: false, mode: "host" }); } } write(ops) { const task = this.tail.then(async () => { const response = await this.call("mutate", { namespace: this.namespace, ops, ...this.snapshot.revision === void 0 ? {} : { expectedRevision: this.snapshot.revision } }); if (!response.ok) { await this.load(); throw new Error(response.error.message); } this.publish(response.value); }); this.tail = task.catch(() => {}); return task; } async call(endpoint, payload) { const controller = new AbortController(); const timeout = setTimeout(() => controller.abort(), Math.max(1, this.requestTimeoutMs)); try { return await callMnemonRpc(this.connection, MNEMON_SETTINGS_CHANNEL, endpoint, payload, controller.signal); } catch (error) { if (controller.signal.aborted) throw new Error("Mnemon settings request timed out"); throw error; } finally { clearTimeout(timeout); } } publish(snapshot) { this.snapshot = snapshot; for (const listener of this.listeners) try { listener(); } catch (error) { console.warn("dsh-brain-mnemon: settings listener failed; keeping the published Host snapshot", error); } } }; // vendor/dsh-mnemon/src/client/better-sidebar-seat.ts var MnemonBetterSidebarSeat = class extends HeldSeat { attach(target, scope, visible) { return this.hold({ target, scope, visible }); } }; // vendor/dsh-mnemon/src/client/native-sidebar-seat.ts var MnemonNativeSidebarSeat = class extends ExternalStore { constructor() { super({ available: false }); } setAvailable(available) { if (this.snapshot.available === available) return; this.setSnapshot({ ...this.snapshot, available }); } attach(parent) { let target = this.snapshot.target; if (target === void 0) { target = document.createElement("div"); target.style.display = "contents"; this.setSnapshot({ ...this.snapshot, target }); } parent.append(target); return () => { if (target.parentElement === parent) target.remove(); }; } }; // vendor/dsh-mnemon/src/client/sidebar-entry.ts const FAMILY_SELECTOR = "[data-dsh-taskboard-entry], [data-dsh-ssh-entry], [data-dsh-brain-mnemon-entry]"; function sidebarRoot() { const column = document.querySelector("[data-pane=\"sidebar\"], [class*=\"sidebarCol\"], .dshDesktopUpstreamSidebar"); if (column === null) return void 0; return column.querySelector("[class*=\"logoRow\"]")?.parentElement ?? column.firstElementChild; } function newSessionButton(root) { const nested = root.querySelector("button[class*=\"newSession\"]"); if (nested !== null) return nested; for (const child of root.children) if (child.tagName === "BUTTON") return child; } function createEntry(controller) { const entry = document.createElement("button"); entry.type = "button"; entry.dataset.dshMnemonEntry = ""; entry.dataset.dshPlugin = "dsh-brain-mnemon"; entry.dataset.dshPart = "sidebar-entry"; entry.className = MnemonWorkspace_module_css_default.entry ?? ""; const icon = document.createElement("span"); icon.className = MnemonWorkspace_module_css_default.entryIcon ?? ""; icon.append(createMemoryIcon(16)); const label = document.createElement("span"); label.className = MnemonWorkspace_module_css_default.entryLabel ?? ""; entry.append(icon, label); entry.addEventListener("click", () => { controller.open(); }); return { entry, label }; } function placeEntry(root, entry) { const button = newSessionButton(root); if (button === void 0) return false; const row = button.closest("[class*=\"logoRow\"]"); const base = row !== null && row.parentElement === root ? row : button; const parent = base.parentElement ?? root; if (entry.parentElement === parent) return true; const anchor = Array.from(parent.children).filter((element) => element instanceof HTMLElement && element.matches(FAMILY_SELECTOR)).at(-1)?.nextElementSibling ?? base.nextElementSibling; parent.insertBefore(entry, anchor !== null && anchor.parentElement === parent ? anchor : null); return true; } function mountMnemonSidebarEntry(controller, t, subscribeLocale) { const { entry, label } = createEntry(controller); let root; let placed = false; let waitingForRoot = false; const syncLabel = () => { const text = t("tab.label"); if (entry.getAttribute("aria-label") !== text) entry.setAttribute("aria-label", text); if (entry.title !== text) entry.title = text; if (label.textContent !== text) label.textContent = text; }; const syncCoalescer = createRafCoalescer(() => { tryPlace(); }); const waitObserver = new MutationObserver(() => { syncCoalescer.schedule(); }); const detachmentObserver = new MutationObserver(() => { if (root !== void 0 && !root.isConnected) syncCoalescer.schedule(); }); const rootObserver = new MutationObserver(() => { if (root === void 0 || !root.isConnected || !root.contains(entry)) syncCoalescer.schedule(); }); const armWaitObserver = () => { if (waitingForRoot) return; waitingForRoot = true; waitObserver.observe(document.body, { childList: true, subtree: true }); }; const disarmWaitObserver = () => { if (!waitingForRoot) return; waitingForRoot = false; waitObserver.disconnect(); }; const observeRootAncestors = (target) => { detachmentObserver.disconnect(); let ancestor = target.parentElement; while (ancestor !== null) { detachmentObserver.observe(ancestor, { childList: true }); ancestor = ancestor.parentElement; } }; const tryPlace = () => { syncLabel(); if (root !== void 0 && !root.isConnected) { rootObserver.disconnect(); detachmentObserver.disconnect(); root = void 0; placed = false; } if (placed && root !== void 0 && root.contains(entry)) return; if (placed) placed = false; if (root === void 0) { root = sidebarRoot(); if (root === void 0) { armWaitObserver(); return; } disarmWaitObserver(); rootObserver.observe(root, { childList: true, subtree: true }); observeRootAncestors(root); } placed = placeEntry(root, entry); }; const syncActive = () => { if (controller.getSnapshot().open) { entry.dataset.active = "true"; entry.setAttribute("aria-current", "page"); } else { delete entry.dataset.active; entry.removeAttribute("aria-current"); } }; const unsubscribe = controller.subscribe(syncActive); const unsubscribeLocale = subscribeLocale(syncLabel); const dispose = () => { syncCoalescer.cancel(); disarmWaitObserver(); rootObserver.disconnect(); detachmentObserver.disconnect(); unsubscribe(); unsubscribeLocale(); entry.remove(); }; try { syncActive(); tryPlace(); return dispose; } catch (error) { dispose(); throw error; } } // vendor/dsh-mnemon/src/client/native-sidebar.tsx const MNEMON_MAIN_PANEL_ID = "mnemon"; function MnemonSidebarIcon({ size }) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryIcon, { size, "data-dsh-plugin": "dsh-brain-mnemon", "data-dsh-part": "sidebar-icon" }); } function MnemonMainPanel({ seat, controller, usePanelInfo }) { const parent = (0, react.useRef)(null); const panelActive = usePanelInfo === void 0 ? true : usePanelInfo((info) => info.activePanelId === MNEMON_MAIN_PANEL_ID); (0, react.useLayoutEffect)(() => { if (parent.current === null || !panelActive) return; const detach = seat.attach(parent.current); controller.open(); return () => { controller.close(); detach(); }; }, [ seat, controller, panelActive ]); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { ref: parent, className: MnemonWorkspace_module_css_default.nativeWorkspace, "data-dsh-brain-mnemon-main-seat": true, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: MnemonWorkspace_module_css_default.windowDragBand, "data-window-drag": true, "aria-hidden": "true" }) }); } function mountMnemonSidebarNavigation(ctx, t, controller, seat) { let stopFallback; let stopFallbackPanels; let disposed = false; const navigation = { open() { if (seat.getSnapshot().available) ctx.layout.selectPanel(MNEMON_MAIN_PANEL_ID); controller.open(); }, close() { if (seat.getSnapshot().available && controller.getSnapshot().open) ctx.layout.selectPanel(null); controller.close(); } }; const reconcileFallback = () => { if (disposed || seat.getSnapshot().available) { stopFallback?.(); stopFallback = void 0; stopFallbackPanels?.(); stopFallbackPanels = void 0; } else { stopFallbackPanels ??= coordinateSidebarPanels(controller, navigation.close); stopFallback ??= mountMnemonSidebarEntry(controller, t, (listener) => ctx.locale.subscribe(listener)); } }; let stopNative; let stopPanelInfo; const dispose = () => { if (disposed) return; disposed = true; stopPanelInfo?.(); stopPanelInfo = void 0; stopNative?.(); stopFallback?.(); stopFallbackPanels?.(); stopFallback = void 0; stopFallbackPanels = void 0; controller.close(); }; try { const panelInfo = ctx.layout?.panelInfo; if (panelInfo !== void 0 && typeof panelInfo.subscribe === "function" && typeof panelInfo.getSnapshot === "function") stopPanelInfo = panelInfo.subscribe(() => { if (!seat.getSnapshot().available) return; if (panelInfo.getSnapshot().activePanelId !== "mnemon" && controller.getSnapshot().open) controller.close(); }); stopNative = ctx.slots.inject("main", () => ctx.slots.inject("sidebar.panellist", () => { const stopMain = ctx.slots.register({ name: "main", key: MNEMON_MAIN_PANEL_ID, inject: () => ({ seat, controller }) }, MnemonMainPanel); let stopIcon; try { stopIcon = ctx.slots.register({ name: "sidebar.panellist", id: MNEMON_MAIN_PANEL_ID, order: 30, label: () => t("tab.label"), locale: "mnemon" }, MnemonSidebarIcon); seat.setAvailable(true); reconcileFallback(); if (controller.getSnapshot().open) navigation.open(); } catch (error) { seat.setAvailable(false); stopIcon?.(); stopMain(); throw error; } return () => { controller.close(); seat.setAvailable(false); stopIcon?.(); stopMain(); reconcileFallback(); }; })); reconcileFallback(); return { ...navigation, dispose }; } catch (error) { dispose(); throw error; } } // vendor/dsh-mnemon/src/client/better-sidebar.tsx const MNEMON_BETTER_SIDEBAR_TAB_ID = "dsh-brain-mnemon:memory"; function BetterSidebarMemoryTab(props) { const target = (0, react.useRef)(null); (0, react.useEffect)(() => { if (target.current === null) return; return props.seat.attach(target.current, props.scope, props.visible); }, [ props.scope.cwd, props.scope.sessionId, props.seat, props.visible ]); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { ref: target, className: MnemonWorkspace_module_css_default.betterSidebarSeat, "data-dsh-brain-mnemon-better-sidebar-seat": true }); } function mountBetterSidebarTab(ctx, t, seat) { let current; const reconcile = () => { const service = ctx.get("betterSidebar"); if (current?.service === service) return; current?.dispose(); current = void 0; if (service === void 0) return; current = { service, dispose: service.registerTab({ id: MNEMON_BETTER_SIDEBAR_TAB_ID, title: () => t("tab.label"), icon: (size) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemoryIcon, { size }), order: 55, single: true, component: ({ scope, visible }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BetterSidebarMemoryTab, { seat, scope, visible }) }) }; }; reconcile(); const unsubscribe = ctx.on("internal/service", (name) => { if (name === "betterSidebar") reconcile(); }); return () => { unsubscribe(); current?.dispose(); current = void 0; }; } // vendor/dsh-mnemon/src/client/subagent-token-usage.tsx const MNEMON_SUBAGENT_TOKEN_USAGE_KEY = "mnemonSubagentTokenUsage"; const SUBAGENT_LINEAGE_SLOT = "conversation.session.header.lineage"; const SUBAGENT_LOCALE = "subagent"; const MNEMON_SHADOW_PRIORITY = -100; const scopedSnapshots = /* @__PURE__ */ new WeakMap(); function isTokenUsage(value) { if (!isRecord(value)) return false; const usage = value; return [ "uncachedInputTokens", "outputTokens", "cacheReadTokens", "cacheWriteTokens" ].every((key) => { const count = usage[key]; return typeof count === "number" && Number.isSafeInteger(count) && count >= 0; }); } function scopeSubagentTokenUsage(state) { const cached = scopedSnapshots.get(state); if (cached !== void 0) return cached; let byId; for (const [id, summary] of Object.entries(state.byId)) { if (summary.origin !== "subagent") continue; const projections = summary.projectionValues; const scopedUsage = projections?.[MNEMON_SUBAGENT_TOKEN_USAGE_KEY]; if (!isTokenUsage(scopedUsage)) continue; byId ??= { ...state.byId }; byId[id] = { ...summary, projectionValues: { ...projections, tokenUsage: scopedUsage } }; } const scoped = byId === void 0 ? state : { ...state, byId }; scopedSnapshots.set(state, scoped); return scoped; } function createScopedUseSessions(useSessions) { return (selector, equal) => useSessions((state) => selector(scopeSubagentTokenUsage(state)), equal); } function lineageShadow(official) { return function MnemonSubagentHeaderLineage(props) { return (0, react.createElement)(official, { ...props, useSessions: createScopedUseSessions(props.useSessions) }); }; } function officialLineage(entries) { return entries.find((entry) => (entry.options.priority ?? 0) === 0 && entry.locale === SUBAGENT_LOCALE && typeof entry.component === "function" && typeof entry.inject === "function"); } function mountSubagentTokenUsageOverride(ctx) { const slots = ctx.slots; let official; let disposeShadow; const reconcile = () => { const entries = slots.entries(SUBAGENT_LINEAGE_SLOT); if (official !== void 0 && entries.includes(official)) return; const disposePreviousShadow = disposeShadow; disposeShadow = void 0; official = void 0; disposePreviousShadow?.(); official = officialLineage(entries); if (official === void 0) return; disposeShadow = slots.register({ name: SUBAGENT_LINEAGE_SLOT, priority: MNEMON_SHADOW_PRIORITY, locale: official.locale, inject: official.inject, registrant: "dsh-brain-mnemon/subagent-token-usage" }, lineageShadow(official.component)); }; const unsubscribe = slots.subscribe(SUBAGENT_LINEAGE_SLOT, reconcile); reconcile(); return () => { unsubscribe(); disposeShadow?.(); }; } // vendor/dsh-mnemon/src/client/retired-memory-snapshot.ts const retiredMemorySnapshot = { kind: "dsh-brain-mnemon/retired-memory-snapshot", target: "chat", match(event) { if (event.type !== "developer/message") return null; const message = event.data.message; if (!isRecord(message) || message.role !== "developer" || typeof message.id !== "string" || !Array.isArray(message.content) || message.content.length !== 0) return null; const source = message.source; if (!isRecord(source) || source.form !== "memory-snapshot-retired") return null; if (!(source.kind === "dsh-brain-mnemon" || source.kind === "plugin:dsh-brain-mnemon" || source.kind === "plugin" && source.plugin === "dsh-brain-mnemon")) return null; return { id: message.id, role: "start", exclusive: true }; }, start: () => null, update: () => null, buildViewNode: () => null }; // vendor/dsh-mnemon/src/client/index.ts const inject$1 = [ "slots", "sessions", "workspaces", "uiSession", "connection", "locale", "layout" ]; const INTERACTION_UNITS = { turnBar: { slot: "conversation.chat.turnTail", enabled: (value) => enabledOf(value, "turnBar"), register(ctx, namespace, translate) { return ctx.slots.register({ name: "conversation.chat.turnTail", id: "dsh-brain-mnemon/turn-tail", locale: namespace, inject: (sessionId) => ({ ...typeof sessionId === "string" && sessionId !== "" ? { sessionId } : {}, connection: ctx.connection, localeRuntime: ctx.locale, t: translate }) }, MnemonTurnTail); } }, saveAction: { slot: "conversation.chat.assistant-actions", enabled: (value) => enabledOf(value, "saveAction"), register(ctx, namespace, translate, settings) { return ctx.slots.register({ name: "conversation.chat.assistant-actions", id: "mnemon-save", order: 90, locale: namespace, inject: (sessionId) => ({ ...typeof sessionId === "string" && sessionId !== "" ? { sessionId } : {}, connection: ctx.connection, settingsScope: settings, localeRuntime: ctx.locale, t: translate }) }, MnemonSaveAction); } } }; function enabledOf(value, key) { return isRecord(value) && value[key] !== false; } var MnemonConversationViewSeat = class extends HeldSeat { provide(activate) { return this.hold(activate); } }; function skillsApart(event, seats) { const page = event.detail?.page; return page !== void 0 && isSkillsPage(page) && seats.skills.panel.getSnapshot(); } function followHostSettings(form, scopes) { let seen = form.getSnapshot().revision; return form.subscribe(() => { const revision = form.getSnapshot().revision; if (revision === void 0 || revision === seen) return; seen = revision; for (const scope of scopes) if (scope.getSnapshot().revision !== revision) scope.refresh(); }); } function mountSidebarMemoryView(ctx, settings, namespace, translate, seats) { const controller = new MnemonWorkspaceController(); let launcher; const navigation = { open: () => { if (launcher === void 0) controller.open(); else launcher.open(); }, close: () => { if (launcher === void 0) controller.close(); else launcher.close(); } }; const sourcePageDirectory = createMemorySourcePageDirectory(ctx); const betterSidebarSeat = new MnemonBetterSidebarSeat(); const nativeSidebarSeat = new MnemonNativeSidebarSeat(); const slotName = "shell.overlay"; const disposeView = ctx.slots.inject(slotName, () => ctx.slots.register({ name: slotName, id: "mnemon", order: 30, label: () => translate("tab.label"), locale: namespace, children: { [MNEMON_SOURCE_PAGE_SLOT]: { kind: "list", scope: "root" }, [MNEMON_COMPONENT_STATUS_SLOT]: { kind: "keyed", scope: "root" } }, inject: () => ({ connection: ctx.connection, settingsScope: settings, sessions: ctx.sessions, workspaces: ctx.workspaces, currentSession: ctx.uiSession.adapter.current, localeRuntime: ctx.locale, sourcePageDirectory, navigation, controller, betterSidebarSeat, nativeSidebarSeat, configuration: seats.configuration, componentChanges: seats.components, skillsScope: seats.skills.scope, skillsPanel: seats.skills.panel, t: translate }) }, MnemonSidebarWorkspaceHost)); let disposeBetterSidebar; let withdrawWorkspace; let listening = false; let disposed = false; const openMemoryView = (event) => { if (event === void 0 || !skillsApart(event, seats)) navigation.open(); }; const dispose = () => { if (disposed) return; disposed = true; withdrawWorkspace?.(); try { launcher?.dispose(); } finally { if (listening) window.removeEventListener(MNEMON_ANCHOR_EVENT, openMemoryView); try { disposeBetterSidebar?.(); } finally { disposeView(); } } }; try { disposeBetterSidebar = mountBetterSidebarTab(ctx, translate, betterSidebarSeat); if (typeof window !== "undefined" && typeof document !== "undefined") { window.addEventListener(MNEMON_ANCHOR_EVENT, openMemoryView); listening = true; launcher = mountMnemonSidebarNavigation(ctx, translate, controller, nativeSidebarSeat); } withdrawWorkspace = seats.workspace.provide(() => openMemoryView()); return dispose; } catch (error) { dispose(); throw error; } } function mountBuiltinMemoryView(ctx, settings, namespace, translate, seats) { const composer = installMemoryComposer(ctx, translate); const sourcePageDirectory = createMemorySourcePageDirectory(ctx); const disposeView = ctx.slots.inject("conversation.view", () => ctx.slots.register({ name: "conversation.view", id: "mnemon", order: 30, label: () => translate("tab.label"), locale: namespace, children: { [MNEMON_SOURCE_PAGE_SLOT]: { kind: "list", scope: "root" }, [MNEMON_COMPONENT_STATUS_SLOT]: { kind: "keyed", scope: "root" } }, inject: (sessionId) => ({ connection: ctx.connection, settingsScope: settings, sessionId, composer: composer.composer, localeRuntime: ctx.locale, sourcePageDirectory, configuration: seats.configuration, componentChanges: seats.components, skillsScope: seats.skills.scope, skillsPanel: seats.skills.panel, t: translate }) }, MnemonBuiltinWorkspaceHost)); const dispose = () => { disposeView(); composer.dispose(); }; if (typeof window === "undefined" || typeof document === "undefined") return dispose; const LEGACY_TAB_MAX_FRAMES = 4; const selectMemoryTabDom = () => { const label = translate("tab.label").trim(); const eligible = (candidate) => !candidate.hasAttribute("disabled") && candidate.getAttribute("aria-disabled") !== "true" && candidate.closest("[hidden], [aria-hidden=\"true\"]") === null; const conversations = [...document.querySelectorAll("[data-slot=\"main.conversation\"]")].filter(eligible); if (conversations.length > 1) return "ambiguous"; if (conversations.length === 0) return "absent"; const tabs = [...conversations[0].querySelectorAll("[role=\"tab\"]")].filter((candidate) => candidate.textContent?.trim() === label && eligible(candidate)); if (tabs.length > 1) return "ambiguous"; if (tabs.length === 0) return "absent"; tabs[0].click(); return "activated"; }; const activateMemoryTab = (sessionId) => { const direct = seats.conversationView.getSnapshot(); if (direct !== void 0 && direct(sessionId)) return "activated"; return selectMemoryTabDom(); }; const openView = (event) => { if (skillsApart(event, seats)) return; const sessionId = event.detail?.sessionId; const mainSessionId = ctx.uiSession.adapter.current.getSnapshot().key; if (mainSessionId === void 0 || sessionId !== void 0 && sessionId !== mainSessionId) return; activateMemoryTab(mainSessionId); }; window.addEventListener(MNEMON_ANCHOR_EVENT, openView); let frame; const openFromPanel = () => { ctx.layout.selectPanel(null); if (frame !== void 0) { cancelAnimationFrame(frame); frame = void 0; } const targetSessionId = ctx.uiSession.adapter.current.getSnapshot().key; if (targetSessionId !== void 0 && activateMemoryTab(targetSessionId) !== "absent") return; let attempts = 0; const attempt = () => { frame = void 0; const currentSessionId = ctx.uiSession.adapter.current.getSnapshot().key; if ((currentSessionId === void 0 ? selectMemoryTabDom() : activateMemoryTab(currentSessionId)) !== "absent" || (attempts += 1) >= LEGACY_TAB_MAX_FRAMES) return; frame = requestAnimationFrame(attempt); }; frame = requestAnimationFrame(attempt); }; const current = ctx.uiSession.adapter.current; const sessions = ctx.sessions.list; let withdrawWorkspace; const followSession = () => { const key = current.getSnapshot().key; const open = key !== void 0 && Object.hasOwn(sessions.getSnapshot().byId, key); if (open && withdrawWorkspace === void 0) withdrawWorkspace = seats.workspace.provide(openFromPanel); else if (!open && withdrawWorkspace !== void 0) { withdrawWorkspace(); withdrawWorkspace = void 0; } }; const unsubscribeSession = current.subscribe(followSession); const unsubscribeSessions = sessions.subscribe(followSession); followSession(); return () => { unsubscribeSession(); unsubscribeSessions(); withdrawWorkspace?.(); if (frame !== void 0) cancelAnimationFrame(frame); window.removeEventListener(MNEMON_ANCHOR_EVENT, openView); dispose(); }; } function apply$4(rawContext) { const ctx = rawContext; const settings = new MnemonSettingsScope(ctx.connection, MNEMON_SETTINGS_NAMESPACE); const interactionSettings = new MnemonSettingsScope(ctx.connection, MNEMON_UI_SETTINGS_NAMESPACE); const skillsSettings = new MnemonSettingsScope(ctx.connection, MNEMON_SKILLS_SETTINGS_NAMESPACE); const seats = { configuration: new MnemonActionSeat(), workspace: new MnemonActionSeat(), conversationView: new MnemonConversationViewSeat(), components: new MnemonChangeSignal(), componentList: new MnemonComponentListSeat(), skills: { scope: skillsSettings, panel: new SkillsPanelSeat() } }; const namespace = "mnemon"; ctx.effect(() => registerMnemonLocales(ctx.locale), "dsh-brain-mnemon: locale dictionaries"); const translate = ctx.locale.bind(namespace); ctx.inject(["remoteAccess"], (inner) => { inner.effect(() => bindConnectionRemoteAccess(ctx.connection, inner.remoteAccess), "dsh-brain-mnemon: remote access capability"); }); ctx.inject(["uiConversation"], (inner) => { inner.uiConversation.events?.register(retiredMemorySnapshot); const views = inner.uiConversation; const selectFn = views.views?.select ?? views.views?.activate ?? views.selectView; if (typeof selectFn === "function") inner.effect(() => seats.conversationView.provide((sessionId) => selectFn(sessionId, "mnemon") !== false), "dsh-brain-mnemon: conversation view activation"); }); ctx.inject(["pluginNavigation"], (inner) => { inner.effect(() => seats.configuration.provide(() => { inner.pluginNavigation.openBundle(MNEMON_PACKAGE_NAME); }), "dsh-brain-mnemon: configuration entry"); }); ctx.inject(["remote"], (inner) => { inner.effect(() => { const disposers = [inner.remote.$on("plugin-manager/changed", seats.components.bump), inner.on("connection/reset", seats.components.bump)]; return () => { for (const dispose of disposers) dispose(); }; }, "dsh-brain-mnemon: component changes"); }); ctx.inject(["configForms"], (inner) => { inner.effect(() => followHostSettings(inner.configForms.get(MNEMON_SETTINGS_NAMESPACE), [ settings, interactionSettings, skillsSettings ]), "dsh-brain-mnemon: DSH settings revisions"); }); ctx.slots.inject("conversation.session.header.lineage", () => mountSubagentTokenUsageOverride(ctx)); let activeMemoryWorkspace; const reconcileMemoryWorkspace = () => { const snapshot = settings.getSnapshot(); const mode = snapshot.status === "loading" || snapshot.value?.tabEnabled === false ? void 0 : normalizeDisplayMode(snapshot.value?.displayMode); if (activeMemoryWorkspace?.mode === mode) return; activeMemoryWorkspace?.dispose(); activeMemoryWorkspace = mode === void 0 ? void 0 : { mode, dispose: mode === "builtin" ? mountBuiltinMemoryView(ctx, settings, namespace, translate, seats) : mountSidebarMemoryView(ctx, settings, namespace, translate, seats) }; }; ctx.effect(() => { const unsubscribe = settings.subscribe(reconcileMemoryWorkspace); reconcileMemoryWorkspace(); return () => { unsubscribe(); activeMemoryWorkspace?.dispose(); activeMemoryWorkspace = void 0; }; }, "dsh-brain-mnemon: memory workspace entry"); ctx.effect(() => reopenAfterStarterUpdate(seats.workspace), "dsh-brain-mnemon: reopen after a Starter update"); const componentSettingsDirectory = createComponentSettingsDirectory(ctx); const componentHost = createComponentHosts({ scope: settings, connection: ctx.connection, componentChanges: seats.components }); const configurationServices = () => ({ componentSettingsDirectory, componentHost, directoryPicker: directoryPicker(ctx), scope: settings, interactionScope: interactionSettings, connection: ctx.connection, sessions: ctx.sessions, workspaces: ctx.workspaces, currentSession: ctx.uiSession.adapter.current, localeRuntime: ctx.locale, componentChanges: seats.components, componentList: seats.componentList, t: translate }); const renderContributed = (packageName, owner) => renderComponentRegion(ctx, MNEMON_COMPONENT_SETTINGS_SLOT, packageName, owner); ctx.slots.inject("plugins.bundle.config", () => ctx.slots.register({ name: "plugins.bundle.config", key: MNEMON_PACKAGE_NAME, locale: namespace, children: { [MNEMON_COMPONENT_SETTINGS_SLOT]: { kind: "keyed", scope: "root" } }, inject: () => ({ ...configurationServices(), renderContributed }) }, MnemonSettingsHost)); for (const { rowId, packageName } of STARTER_COMPONENT_ROWS) ctx.slots.inject("plugins.row.config", () => ctx.slots.register({ name: "plugins.row.config", key: `${MNEMON_PACKAGE_NAME}#${rowId}`, locale: namespace, inject: () => ({ ...configurationServices(), component: packageName, renderContributed }) }, MnemonComponentRowHost)); ctx.effect(() => installShippedComponentSettings(ctx, { scope: settings, skillsScope: skillsSettings, connection: ctx.connection, directoryPicker: directoryPicker(ctx), t: translate }), "dsh-brain-mnemon: shipped component settings"); ctx.effect(() => installShippedComponentStatus(ctx), "dsh-brain-mnemon: shipped component status"); ctx.slots.inject("plugins.detail.actions", () => ctx.slots.register({ name: "plugins.detail.actions", id: "dsh-brain-mnemon/open-workspace", locale: namespace, inject: () => ({ workspace: seats.workspace, componentList: seats.componentList, t: translate }) }, MnemonPluginActions)); const active = /* @__PURE__ */ new Map(); const reconcile = () => { const value = interactionSettings.getSnapshot().value; for (const key of Object.keys(INTERACTION_UNITS)) { const unit = INTERACTION_UNITS[key]; const enabled = unit.enabled(value); if (enabled && !active.has(key)) active.set(key, ctx.slots.inject(unit.slot, () => unit.register(ctx, namespace, translate, settings))); else if (!enabled && active.has(key)) { active.get(key)(); active.delete(key); } } }; ctx.effect(() => { const unsubscribe = interactionSettings.subscribe(reconcile); reconcile(); return () => { unsubscribe(); for (const dispose of [...active.values()].reverse()) dispose(); active.clear(); }; }, "dsh-brain-mnemon: interaction surfaces"); let skillTail; let skillsPanel; const sourcePageDirectory = createMemorySourcePageDirectory(ctx); const reconcileSkills = () => { const snapshot = skillsSettings.getSnapshot(); const ready = snapshot.status === "ready"; const hints = ready && snapshot.value?.hints !== false; const sidebar = ready && snapshot.value?.sidebar === true; if (hints && skillTail === void 0) skillTail = ctx.slots.inject("conversation.chat.turnTail", () => ctx.slots.register({ name: "conversation.chat.turnTail", id: "dsh-brain-mnemon/skill-tail", order: 100, locale: namespace, inject: (sessionId) => ({ ...typeof sessionId === "string" && sessionId !== "" ? { sessionId } : {}, connection: ctx.connection, componentChanges: seats.components, localeRuntime: ctx.locale, t: translate }) }, SkillTurnTail)); else if (!hints && skillTail !== void 0) { skillTail(); skillTail = void 0; } if (sidebar && skillsPanel === void 0) skillsPanel = mountSkillsPanel(ctx, { connection: ctx.connection, settingsScope: settings, skillsScope: skillsSettings, sessions: ctx.sessions, workspaces: ctx.workspaces, currentSession: ctx.uiSession.adapter.current, localeRuntime: ctx.locale, sourcePageDirectory, configuration: seats.configuration, componentChanges: seats.components, t: translate }, seats.skills.panel); else if (!sidebar && skillsPanel !== void 0) { skillsPanel(); skillsPanel = void 0; } }; ctx.effect(() => { const unsubscribe = skillsSettings.subscribe(reconcileSkills); reconcileSkills(); return () => { unsubscribe(); skillsPanel?.(); skillTail?.(); skillsPanel = void 0; skillTail = void 0; }; }, "dsh-brain-mnemon: skills surfaces"); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-runtime/presentation/locales.json var locales_default$2 = { zh: { "nav.runtime": "运行时", "runtime.title": "运行时记忆", "runtime.description": "每轮对话常驻的精简上下文。", "runtime.total": "{count} 条记忆", "runtime.entriesAria": "运行时记忆列表", "runtime.scopeAria": "运行时记忆范围", "runtime.scopeAll": "全部", "runtime.filterAria": "筛选运行时记忆", "runtime.filterPlaceholder": "筛选…", "runtime.noMatch": "没有符合当前范围与查询条件的记忆。", "runtime.hotContext": "每轮上下文", "runtime.addTitle": "添加运行时记忆", "runtime.addDescription": "常驻每轮对话;长篇背景请存入记忆空间。", "runtime.content": "运行时记忆内容", "runtime.placeholder": "输入简短、独立的事实或偏好…", "runtime.target": "保存到", "runtime.importance": "重要性", "runtime.saving": "处理中…", "runtime.addButton": "新建", "runtime.addAction": "添加", "runtime.target.user": "用户画像", "runtime.target.user.description": "身份、习惯与协作偏好(仅本地)", "runtime.target.memory": "工作记忆", "runtime.target.memory.description": "项目事实与约定;超限时自动归档", "runtime.importance.critical": "关键", "runtime.importance.normal": "普通", "runtime.importance.low": "低", "runtime.branches": "适用分支", "runtime.branchesPlaceholder": "main, dev(留空不限)", "runtime.branchesHint": "留空表示全部分支可见", "runtime.branchBadge": "分支限定", "runtime.editContent": "编辑运行时记忆", "runtime.editAction": "编辑", "runtime.saveEdit": "保存", "runtime.removeAction": "移除", "runtime.removeTitle": "移除运行时记忆?", "runtime.removeWarning": "移除后,这条内容将不再随每轮上下文加载。该操作无法撤销。", "runtime.result.add": "已添加到{target} · 当前 {count} 条", "runtime.result.replace": "已更新{target} · 当前 {count} 条", "runtime.result.remove": "已从{target}移除 · 当前 {count} 条", "runtime.result.maintenance": "容量整理完成:已先归档到记忆空间 {spaces},再更新{target} · 当前 {count} 条", "runtime.result.localCompaction": "本地画像整理完成:未写入记忆空间,已更新{target} · 当前 {count} 条", "runtime.result.localArchive": "容量整理完成:没有可写的记忆空间,已先把 {archived} 条移入本地归档,再更新{target} · 当前 {count} 条", "runtime.readOnly": "当前不能在此修改运行时记忆;已有内容仍可查看。", "runtime.pinned": "已固定", "runtime.pin": "固定", "runtime.unpin": "取消固定", "runtime.pinnedNotice": "条目已固定,容量整理时会保留在运行时记忆中。", "runtime.unpinnedNotice": "已取消固定,恢复通常的容量维护规则。", "runtime.pinBudget": "固定:{count} 条 · 投影字符 {used} / {limit}" }, en: { "nav.runtime": "Runtime", "runtime.title": "Runtime Memory", "runtime.description": "Compact context carried into every turn.", "runtime.total": "{count} entries", "runtime.entriesAria": "Runtime memory list", "runtime.scopeAria": "Runtime memory scope", "runtime.scopeAll": "All", "runtime.filterAria": "Filter runtime memory", "runtime.filterPlaceholder": "Filter…", "runtime.noMatch": "No runtime memory matches the current scope and query.", "runtime.hotContext": "Every-turn context", "runtime.addTitle": "Add runtime memory", "runtime.addDescription": "Injected every turn; use Memory Spaces for long-term notes.", "runtime.content": "Runtime memory content", "runtime.placeholder": "One concise, standalone fact or preference…", "runtime.target": "Save to", "runtime.importance": "Importance", "runtime.saving": "Working…", "runtime.addButton": "New", "runtime.addAction": "Add", "runtime.target.user": "User Profile", "runtime.target.user.description": "Identity, habits, and preferences (local only)", "runtime.target.memory": "Working Memory", "runtime.target.memory.description": "Project facts and conventions; auto-archived when full", "runtime.importance.critical": "Critical", "runtime.importance.normal": "Normal", "runtime.importance.low": "Low", "runtime.branches": "Branches", "runtime.branchesPlaceholder": "main, dev (blank = all)", "runtime.branchesHint": "Leave blank for all branches", "runtime.branchBadge": "Branch-scoped", "runtime.editContent": "Edit runtime memory", "runtime.editAction": "Edit", "runtime.saveEdit": "Save", "runtime.removeAction": "Remove", "runtime.removeTitle": "Remove runtime memory?", "runtime.removeWarning": "After removal, this content will no longer load with every turn. This action cannot be undone.", "runtime.result.add": "Added to {target} · {count} entries", "runtime.result.replace": "Updated {target} · {count} entries", "runtime.result.remove": "Removed from {target} · {count} entries", "runtime.result.maintenance": "Capacity maintenance complete: archived to {spaces}, then updated {target} · {count} entries", "runtime.result.localCompaction": "Local profile compaction complete: no Memory Space write; updated {target} · {count} entries", "runtime.result.localArchive": "Capacity maintenance complete: with no Memory Space to write to, moved {archived} entries to the local archive, then updated {target} · {count} entries", "runtime.readOnly": "Runtime memory cannot be changed here; existing entries remain available for inspection.", "runtime.pinned": "Pinned", "runtime.pin": "Pin", "runtime.unpin": "Unpin", "runtime.pinnedNotice": "Entry pinned. It stays in hot memory during capacity maintenance.", "runtime.unpinnedNotice": "Entry unpinned. Normal capacity rules apply.", "runtime.pinBudget": "Pinned: {count} entries · {used} / {limit} projection characters" }, ja: { "nav.runtime": "ランタイム", "runtime.title": "ランタイムメモリ", "runtime.description": "毎ターン引き継がれるコンパクトなコンテキスト。", "runtime.total": "{count} 件", "runtime.entriesAria": "ランタイムメモリ一覧", "runtime.scopeAria": "ランタイムメモリの範囲", "runtime.scopeAll": "すべて", "runtime.filterAria": "ランタイムメモリを絞り込む", "runtime.filterPlaceholder": "絞り込み…", "runtime.noMatch": "現在の範囲と検索条件に一致するランタイムメモリはありません。", "runtime.hotContext": "毎ターン注入コンテキスト", "runtime.addTitle": "ランタイムメモリを追加", "runtime.addDescription": "毎ターン注入されます。長期的なメモにはメモリスペースを使ってください。", "runtime.content": "ランタイムメモリの内容", "runtime.placeholder": "簡潔で独立した事実や好みを 1 件入力…", "runtime.target": "保存先", "runtime.importance": "重要度", "runtime.saving": "処理中…", "runtime.addButton": "新規", "runtime.addAction": "追加", "runtime.target.user": "ユーザープロファイル", "runtime.target.user.description": "属性、習慣、好み(ローカルのみ)", "runtime.target.memory": "作業メモリ", "runtime.target.memory.description": "プロジェクトの事実と規約(上限到達時に自動アーカイブ)", "runtime.importance.critical": "重要", "runtime.importance.normal": "通常", "runtime.importance.low": "低", "runtime.branches": "ブランチ", "runtime.branchesPlaceholder": "main, dev(空欄=すべて)", "runtime.branchesHint": "空欄にするとすべてのブランチに適用されます", "runtime.branchBadge": "ブランチ限定", "runtime.editContent": "ランタイムメモリを編集", "runtime.editAction": "編集", "runtime.saveEdit": "保存", "runtime.removeAction": "削除", "runtime.removeTitle": "ランタイムメモリを削除しますか?", "runtime.removeWarning": "削除すると、この内容は毎ターンのコンテキストに読み込まれなくなります。この操作は元に戻せません。", "runtime.result.add": "{target}に追加しました · 現在 {count} 件", "runtime.result.replace": "{target}を更新しました · 現在 {count} 件", "runtime.result.remove": "{target}から削除しました · 現在 {count} 件", "runtime.result.maintenance": "容量整理が完了しました:{spaces} にアーカイブしたあと {target}を更新しました · 現在 {count} 件", "runtime.result.localCompaction": "ローカルプロファイルの圧縮が完了しました:メモリスペースへの書き込みなしで {target}を更新しました · 現在 {count} 件", "runtime.result.localArchive": "容量整理が完了しました:書き込み可能なメモリスペースがないため {archived} 件をローカルアーカイブへ移動し、{target}を更新しました · 現在 {count} 件", "runtime.readOnly": "ここではランタイムメモリを変更できません。既存エントリの閲覧は引き続き可能です。", "runtime.pinned": "ピン留め済み", "runtime.pin": "ピン留め", "runtime.unpin": "ピン留め解除", "runtime.pinnedNotice": "エントリをピン留めしました。容量整理の際もランタイムメモリに保持されます。", "runtime.unpinnedNotice": "ピン留めを解除しました。通常の容量ルールが適用されます。", "runtime.pinBudget": "ピン留め:{count} 件 · 投影文字数 {used} / {limit}" }, es: { "nav.runtime": "Ejecución", "runtime.title": "Memoria de ejecución", "runtime.description": "Contexto compacto incluido en cada turno.", "runtime.total": "{count} entradas", "runtime.entriesAria": "Lista de memoria de ejecución", "runtime.scopeAria": "Ámbito de memoria de ejecución", "runtime.scopeAll": "Todo", "runtime.filterAria": "Filtrar memoria de ejecución", "runtime.filterPlaceholder": "Filtrar…", "runtime.noMatch": "Ninguna entrada de memoria de ejecución coincide con el ámbito y la consulta actuales.", "runtime.hotContext": "Contexto en cada turno", "runtime.addTitle": "Añadir memoria de ejecución", "runtime.addDescription": "Se inyecta en cada turno; usa Espacios de memoria para notas a largo plazo.", "runtime.content": "Contenido de memoria de ejecución", "runtime.placeholder": "Un hecho o preferencia conciso e independiente…", "runtime.target": "Guardar en", "runtime.importance": "Importancia", "runtime.saving": "Procesando…", "runtime.addButton": "Nuevo", "runtime.addAction": "Añadir", "runtime.target.user": "Perfil de usuario", "runtime.target.user.description": "Identidad, hábitos y preferencias (solo local)", "runtime.target.memory": "Memoria de trabajo", "runtime.target.memory.description": "Hechos y convenciones del proyecto; se archiva automáticamente al llenarse", "runtime.importance.critical": "Crítica", "runtime.importance.normal": "Normal", "runtime.importance.low": "Baja", "runtime.branches": "Ramas", "runtime.branchesPlaceholder": "main, dev (vacío = todas)", "runtime.branchesHint": "Déjalo en blanco para todas las ramas", "runtime.branchBadge": "Limitado a ramas", "runtime.editContent": "Editar memoria de ejecución", "runtime.editAction": "Editar", "runtime.saveEdit": "Guardar", "runtime.removeAction": "Quitar", "runtime.removeTitle": "¿Quitar memoria de ejecución?", "runtime.removeWarning": "Tras quitarlo, este contenido dejará de cargarse en cada turno. Esta acción no se puede deshacer.", "runtime.result.add": "Añadido a {target} · {count} entradas", "runtime.result.replace": "Actualizado {target} · {count} entradas", "runtime.result.remove": "Quitado de {target} · {count} entradas", "runtime.result.maintenance": "Mantenimiento de capacidad completado: archivado en {spaces} y actualizado {target} · {count} entradas", "runtime.result.localCompaction": "Compactación local del perfil completada: sin escritura en Espacios de memoria; actualizado {target} · {count} entradas", "runtime.result.localArchive": "Mantenimiento de capacidad completado: sin Espacio de memoria donde escribir, se movieron {archived} entradas al archivo local y se actualizó {target} · {count} entradas", "runtime.readOnly": "No se puede modificar la memoria de ejecución aquí; las entradas existentes siguen disponibles para consulta.", "runtime.pinned": "Fijada", "runtime.pin": "Fijar", "runtime.unpin": "Desfijar", "runtime.pinnedNotice": "Entrada fijada. Permanecerá en la memoria activa durante el mantenimiento de capacidad.", "runtime.unpinnedNotice": "Entrada desfijada. Se aplican las reglas de capacidad habituales.", "runtime.pinBudget": "Fijadas: {count} entradas · {used} / {limit} caracteres de proyección" }, fr: { "nav.runtime": "Exécution", "runtime.title": "Mémoire d'exécution", "runtime.description": "Contexte compact transporté dans chaque tour.", "runtime.total": "{count} entrée(s)", "runtime.entriesAria": "Liste de la Mémoire d'exécution", "runtime.scopeAria": "Portée de la Mémoire d'exécution", "runtime.scopeAll": "Tout", "runtime.filterAria": "Filtrer la Mémoire d'exécution", "runtime.filterPlaceholder": "Filtrer…", "runtime.noMatch": "Aucune Mémoire d'exécution ne correspond à la portée et à la requête actuelles.", "runtime.hotContext": "Contexte de chaque tour", "runtime.addTitle": "Ajouter une Mémoire d'exécution", "runtime.addDescription": "Injectée à chaque tour ; utilisez les Espaces de mémoire pour les notes à long terme.", "runtime.content": "Contenu de la Mémoire d'exécution", "runtime.placeholder": "Un fait ou une préférence concis et autonome…", "runtime.target": "Enregistrer dans", "runtime.importance": "Importance", "runtime.saving": "Traitement…", "runtime.addButton": "Nouveau", "runtime.addAction": "Ajouter", "runtime.target.user": "Profil utilisateur", "runtime.target.user.description": "Identité, habitudes et préférences (local uniquement)", "runtime.target.memory": "Mémoire de travail", "runtime.target.memory.description": "Faits et conventions du projet ; archivés automatiquement lorsqu'elle est pleine", "runtime.importance.critical": "Critique", "runtime.importance.normal": "Normale", "runtime.importance.low": "Faible", "runtime.branches": "Branches", "runtime.branchesPlaceholder": "main, dev (vide = toutes)", "runtime.branchesHint": "Laisser vide pour toutes les branches", "runtime.branchBadge": "Limité aux branches", "runtime.editContent": "Modifier la Mémoire d'exécution", "runtime.editAction": "Modifier", "runtime.saveEdit": "Enregistrer", "runtime.removeAction": "Supprimer", "runtime.removeTitle": "Supprimer cette Mémoire d'exécution ?", "runtime.removeWarning": "Après suppression, ce contenu ne sera plus chargé à chaque tour. Cette action est irréversible.", "runtime.result.add": "Ajouté à {target} · {count} entrée(s)", "runtime.result.replace": "{target} mis à jour · {count} entrée(s)", "runtime.result.remove": "Supprimé de {target} · {count} entrée(s)", "runtime.result.maintenance": "Maintenance de capacité terminée : archivé dans {spaces}, puis {target} mis à jour · {count} entrée(s)", "runtime.result.localCompaction": "Compaction locale du profil terminée : aucune écriture d'Espace de mémoire ; {target} mis à jour · {count} entrée(s)", "runtime.result.localArchive": "Maintenance de capacité terminée : sans Espace de mémoire accessible en écriture, {archived} entrée(s) déplacée(s) vers l'archive locale, puis {target} mis à jour · {count} entrée(s)", "runtime.readOnly": "La Mémoire d'exécution ne peut pas être modifiée ici ; les entrées existantes restent consultables.", "runtime.pinned": "Épinglé", "runtime.pin": "Épingler", "runtime.unpin": "Désépingler", "runtime.pinnedNotice": "Entrée épinglée. Elle reste en mémoire vive lors de la maintenance de capacité.", "runtime.unpinnedNotice": "Entrée désépinglée. Les règles normales de capacité s'appliquent.", "runtime.pinBudget": "Épinglées : {count} entrée(s) · {used} / {limit} caractères projetés" }, de: { "nav.runtime": "Laufzeit", "runtime.title": "Laufzeitspeicher", "runtime.description": "Kompakter Kontext, der in jede Runde übernommen wird.", "runtime.total": "{count} Einträge", "runtime.entriesAria": "Liste des Laufzeitspeichers", "runtime.scopeAria": "Bereich des Laufzeitspeichers", "runtime.scopeAll": "Alle", "runtime.filterAria": "Laufzeitspeicher filtern", "runtime.filterPlaceholder": "Filtern…", "runtime.noMatch": "Kein Eintrag im Laufzeitspeicher entspricht dem aktuellen Bereich und der Suche.", "runtime.hotContext": "Kontext jeder Runde", "runtime.addTitle": "Laufzeitspeicher hinzufügen", "runtime.addDescription": "Wird in jeder Runde eingefügt; verwenden Sie Speicherbereiche für langfristige Notizen.", "runtime.content": "Inhalt des Laufzeitspeichers", "runtime.placeholder": "Ein kurzer, eigenständiger Fakt oder eine Präferenz…", "runtime.target": "Speichern unter", "runtime.importance": "Wichtigkeit", "runtime.saving": "Wird verarbeitet…", "runtime.addButton": "Neu", "runtime.addAction": "Hinzufügen", "runtime.target.user": "Benutzerprofil", "runtime.target.user.description": "Identität, Gewohnheiten und Präferenzen (nur lokal)", "runtime.target.memory": "Arbeitsgedächtnis", "runtime.target.memory.description": "Projektfakten und Konventionen; wird bei voller Kapazität automatisch archiviert", "runtime.importance.critical": "Kritisch", "runtime.importance.normal": "Normal", "runtime.importance.low": "Niedrig", "runtime.branches": "Branches", "runtime.branchesPlaceholder": "main, dev (leer = alle)", "runtime.branchesHint": "Leer lassen für alle Branches", "runtime.branchBadge": "Branch-gebunden", "runtime.editContent": "Laufzeitspeicher bearbeiten", "runtime.editAction": "Bearbeiten", "runtime.saveEdit": "Speichern", "runtime.removeAction": "Entfernen", "runtime.removeTitle": "Laufzeitspeicher entfernen?", "runtime.removeWarning": "Nach dem Entfernen wird dieser Inhalt nicht mehr in jeder Runde geladen. Diese Aktion kann nicht rückgängig gemacht werden.", "runtime.result.add": "Zu {target} hinzugefügt · {count} Einträge", "runtime.result.replace": "{target} aktualisiert · {count} Einträge", "runtime.result.remove": "Aus {target} entfernt · {count} Einträge", "runtime.result.maintenance": "Kapazitätswartung abgeschlossen: in {spaces} archiviert, dann {target} aktualisiert · {count} Einträge", "runtime.result.localCompaction": "Lokale Profilkomprimierung abgeschlossen: kein Schreibvorgang in Speicherbereiche; {target} aktualisiert · {count} Einträge", "runtime.result.localArchive": "Kapazitätswartung abgeschlossen: ohne beschreibbaren Speicherbereich wurden {archived} Einträge ins lokale Archiv verschoben, dann {target} aktualisiert · {count} Einträge", "runtime.readOnly": "Der Laufzeitspeicher kann hier nicht geändert werden; vorhandene Einträge bleiben einsehbar.", "runtime.pinned": "Angeheftet", "runtime.pin": "Anheften", "runtime.unpin": "Lösen", "runtime.pinnedNotice": "Eintrag angeheftet. Bleibt bei der Kapazitätswartung im Laufzeitspeicher.", "runtime.unpinnedNotice": "Anheftung gelöst. Es gelten die normalen Kapazitätsregeln.", "runtime.pinBudget": "Angeheftet: {count} Einträge · {used} / {limit} Projektionszeichen" }, ru: { "nav.runtime": "Память выполнения", "runtime.title": "Память выполнения", "runtime.description": "Компактный контекст, передаваемый в каждый ход.", "runtime.total": "Записей: {count}", "runtime.entriesAria": "Список памяти выполнения", "runtime.scopeAria": "Область памяти выполнения", "runtime.scopeAll": "Все", "runtime.filterAria": "Фильтр памяти выполнения", "runtime.filterPlaceholder": "Фильтр…", "runtime.noMatch": "Нет записей памяти выполнения, подходящих под текущую область и запрос.", "runtime.hotContext": "Контекст каждого хода", "runtime.addTitle": "Добавить запись памяти выполнения", "runtime.addDescription": "Подставляется в каждый ход; для долгосрочных заметок используйте Пространства памяти.", "runtime.content": "Содержимое памяти выполнения", "runtime.placeholder": "Один краткий самостоятельный факт или предпочтение…", "runtime.target": "Сохранить в", "runtime.importance": "Важность", "runtime.saving": "Обработка…", "runtime.addButton": "Создать", "runtime.addAction": "Добавить", "runtime.target.user": "Профиль пользователя", "runtime.target.user.description": "Личность, привычки и предпочтения (только локально)", "runtime.target.memory": "Рабочая память", "runtime.target.memory.description": "Факты и соглашения проекта; автоматически архивируется при заполнении", "runtime.importance.critical": "Критическая", "runtime.importance.normal": "Обычная", "runtime.importance.low": "Низкая", "runtime.branches": "Ветки", "runtime.branchesPlaceholder": "main, dev (пусто = все)", "runtime.branchesHint": "Оставьте пустым для всех веток", "runtime.branchBadge": "По веткам", "runtime.editContent": "Редактировать запись памяти выполнения", "runtime.editAction": "Редактировать", "runtime.saveEdit": "Сохранить", "runtime.removeAction": "Удалить", "runtime.removeTitle": "Удалить запись памяти выполнения?", "runtime.removeWarning": "После удаления это содержимое больше не будет загружаться в каждом ходе. Это действие нельзя отменить.", "runtime.result.add": "Добавлено в {target} · записей: {count}", "runtime.result.replace": "Обновлено: {target} · записей: {count}", "runtime.result.remove": "Удалено из {target} · записей: {count}", "runtime.result.maintenance": "Обслуживание объёма завершено: заархивировано в {spaces}, затем обновлено: {target} · записей: {count}", "runtime.result.localCompaction": "Локальное сжатие профиля завершено: без записи в Пространство памяти; обновлено: {target} · записей: {count}", "runtime.result.localArchive": "Обслуживание объёма завершено: нет доступного Пространства памяти для записи, в локальный архив перенесено записей: {archived}, затем обновлено: {target} · записей: {count}", "runtime.readOnly": "Здесь нельзя изменять память выполнения; существующие записи остаются доступны для просмотра.", "runtime.pinned": "Закреплено", "runtime.pin": "Закрепить", "runtime.unpin": "Открепить", "runtime.pinnedNotice": "Запись закреплена. Она сохраняется в горячей памяти при обслуживании объёма.", "runtime.unpinnedNotice": "Запись откреплена. Действуют обычные правила объёма.", "runtime.pinBudget": "Закреплено: {count} · символы проекции: {used} / {limit}" }, pt: { "nav.runtime": "Execução", "runtime.title": "Memória de execução", "runtime.description": "Contexto compacto carregado em cada turno.", "runtime.total": "{count} entradas", "runtime.entriesAria": "Lista da Memória de execução", "runtime.scopeAria": "Escopo da Memória de execução", "runtime.scopeAll": "Todas", "runtime.filterAria": "Filtrar Memória de execução", "runtime.filterPlaceholder": "Filtrar…", "runtime.noMatch": "Nenhuma entrada da Memória de execução corresponde ao escopo e à consulta atuais.", "runtime.hotContext": "Contexto de cada turno", "runtime.addTitle": "Adicionar Memória de execução", "runtime.addDescription": "Injetada em cada turno; use Espaços de memória para notas de longo prazo.", "runtime.content": "Conteúdo da Memória de execução", "runtime.placeholder": "Um fato ou preferência conciso e independente…", "runtime.target": "Salvar em", "runtime.importance": "Importância", "runtime.saving": "Processando…", "runtime.addButton": "Novo", "runtime.addAction": "Adicionar", "runtime.target.user": "Perfil do usuário", "runtime.target.user.description": "Identidade, hábitos e preferências (somente local)", "runtime.target.memory": "Memória de trabalho", "runtime.target.memory.description": "Fatos e convenções do projeto; arquivada automaticamente quando cheia", "runtime.importance.critical": "Crítica", "runtime.importance.normal": "Normal", "runtime.importance.low": "Baixa", "runtime.branches": "Branches", "runtime.branchesPlaceholder": "main, dev (vazio = todas)", "runtime.branchesHint": "Deixe em branco para todas as branches", "runtime.branchBadge": "Restrita à branch", "runtime.editContent": "Editar Memória de execução", "runtime.editAction": "Editar", "runtime.saveEdit": "Salvar", "runtime.removeAction": "Remover", "runtime.removeTitle": "Remover da Memória de execução?", "runtime.removeWarning": "Após a remoção, este conteúdo não será mais carregado a cada turno. Esta ação não pode ser desfeita.", "runtime.result.add": "Adicionado a {target} · {count} entradas", "runtime.result.replace": "Atualizado em {target} · {count} entradas", "runtime.result.remove": "Removido de {target} · {count} entradas", "runtime.result.maintenance": "Manutenção de capacidade concluída: arquivado em {spaces} e atualizado em {target} · {count} entradas", "runtime.result.localCompaction": "Compactação local do perfil concluída: sem gravação em Espaço de memória; atualizado em {target} · {count} entradas", "runtime.result.localArchive": "Manutenção de capacidade concluída: sem Espaço de memória disponível para gravação, {archived} entradas movidas para o arquivo local e atualizado em {target} · {count} entradas", "runtime.readOnly": "A Memória de execução não pode ser alterada aqui; as entradas existentes continuam disponíveis para inspeção.", "runtime.pinned": "Fixada", "runtime.pin": "Fixar", "runtime.unpin": "Desafixar", "runtime.pinnedNotice": "Entrada fixada. Ela permanece na memória ativa durante a manutenção de capacidade.", "runtime.unpinnedNotice": "Entrada desafixada. As regras normais de capacidade voltam a se aplicar.", "runtime.pinBudget": "Fixadas: {count} entradas · {used} / {limit} caracteres de projeção" } }; // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-runtime/src/client/presentation.ts const css$3 = { ...memoryPageStyles, ...page_module_css_default$3 }; const sidebarCss$2 = { ...memorySidebarStyles, ...sidebar_module_css_default$2 }; const SHIPPED_LOCALE_SET$2 = /* @__PURE__ */ new Set([ "en", "zh", "ja", "es", "fr", "de", "ru", "pt" ]); const useLocalePreference$2 = useLocalePreference$4; function shippedLocale$2(preference) { return (typeof preference === "string" ? [preference.trim().replaceAll("_", "-").split("-")[0]] : preference).map((id) => id.toLowerCase()).find((id) => SHIPPED_LOCALE_SET$2.has(id)) ?? "en"; } function useT$2() { const fallback = useT$4(); const preference = useLocalePreference$2(useLocale()); return (0, react.useMemo)(() => { const dictionary = locales_default$2[shippedLocale$2(preference)]; const packFirst = typeof preference === "string" ? !/^(en|zh)([-_]|$)/i.test(preference) : preference[0] !== "en" && preference[0] !== "zh"; return (key, params) => { if (packFirst) { const translated = fallback(key, params); if (translated !== key) return translated; } if (!Object.hasOwn(dictionary, key)) return fallback(key, params); const text = dictionary[key]; return params === void 0 ? text : text.replace(/\{(\w+)\}/g, (match, name) => name in params ? String(params[name]) : match); }; }, [preference, fallback]); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-runtime/src/client/pages.tsx function fold(text) { return text.replace(/\s+/gu, " ").trim(); } function entrySelector(entry) { return entry.target === "memory" ? { matchBranches: entry.branches ?? [] } : {}; } function RuntimePage(props) { const t = useT$2(); const locale = useLocale(); const runtimeAddFormId = (0, react.useId)(); const runtimeEditFormId = (0, react.useId)(); const pageSize = 10; const [snapshot, setSnapshot] = (0, react.useState)(null); const [loading, setLoading] = (0, react.useState)(true); const [error, setError] = (0, react.useState)(null); const [notice, setNotice] = (0, react.useState)(null); const [target, setTarget] = (0, react.useState)("memory"); const [importance, setImportance] = (0, react.useState)("normal"); const [content, setContent] = (0, react.useState)(""); const [saving, setSaving] = (0, react.useState)(false); const [editing, setEditing] = (0, react.useState)(null); const [editContent, setEditContent] = (0, react.useState)(""); const [editImportance, setEditImportance] = (0, react.useState)("normal"); const [branches, setBranches] = (0, react.useState)(""); const [editBranches, setEditBranches] = (0, react.useState)(""); const [editBranchesOriginal, setEditBranchesOriginal] = (0, react.useState)(""); const [removing, setRemoving] = (0, react.useState)(null); const [adding, setAdding] = (0, react.useState)(false); const [filterTarget, setFilterTarget] = (0, react.useState)("all"); const [filterQuery, setFilterQuery] = (0, react.useState)(""); const [visibleLimit, setVisibleLimit] = (0, react.useState)(pageSize); const listRef = (0, react.useRef)(null); const revealed = (0, react.useRef)(false); const focus = props.focusText === void 0 ? "" : fold(props.focusText).replace(/…$/u, ""); const focused = (entry) => focus !== "" && fold(entry.content).startsWith(focus); const load = (0, react.useCallback)(async () => { setLoading(true); setError(null); try { setSnapshot(await props.client.runtimeMemory()); } catch (reason) { setError(message(reason)); } finally { setLoading(false); } }, [props.client]); (0, react.useEffect)(() => { load(); }, [load, props.revision]); (0, react.useEffect)(() => { setVisibleLimit(pageSize); }, [filterQuery, filterTarget]); (0, react.useEffect)(() => { if (focus === "" || snapshot === null) return; const index = filteredEntries.findIndex(focused); if (index >= visibleLimit) { setVisibleLimit(Math.ceil((index + 1) / pageSize) * pageSize); return; } const element = listRef.current?.querySelector("[data-focused]"); if (element === null || element === void 0 || revealed.current) return; revealed.current = true; if (props.onRevealElement !== void 0) props.onRevealElement(element); else element.scrollIntoView?.({ block: "nearest" }); }, [snapshot, visibleLimit]); const entryKey = (entry) => JSON.stringify([ entry.target, entry.created_at, entry.content, [...entry.branches ?? []].sort() ]); const mutate = async (request) => { setNotice(null); setError(null); const result = await props.client.mutateRuntimeMemory(request); setNotice(result.maintenance === void 0 ? t(`runtime.result.${request.action}`, { target: t(`runtime.target.${request.target}`), count: result.entryCount }) : result.maintenance.kind === "local-compaction" ? t("runtime.result.localCompaction", { target: t(`runtime.target.${request.target}`), count: result.entryCount }) : result.maintenance.kind === "local-archive" ? t("runtime.result.localArchive", { target: t(`runtime.target.${request.target}`), count: result.entryCount, archived: result.archived?.entries ?? 0 }) : t("runtime.result.maintenance", { target: t(`runtime.target.${request.target}`), count: result.entryCount, spaces: result.maintenance.memoryBodyIds.join(", ") || "—" })); await load(); props.onMutate?.(); }; const add = async (event) => { event.preventDefault(); if (content.trim() === "") return; setSaving(true); try { const branchInput = target === "memory" ? parseBranchesInput(branches) : void 0; await mutate({ action: "add", target, content, importance, ...branchInput === void 0 ? {} : { branches: branchInput } }); setContent(""); setBranches(""); setAdding(false); } catch (reason) { setError(message(reason)); } finally { setSaving(false); } }; const beginEdit = (entry) => { const branchText = entry.branches?.join(", ") ?? ""; setEditing(entryKey(entry)); setEditContent(entry.content); setEditImportance(entry.importance); setEditBranches(branchText); setEditBranchesOriginal(branchText); setRemoving(null); }; const replace = async (entry) => { if (editContent.trim() === "") return; setSaving(true); try { const rawBranches = editBranches.trim(); const branchDelta = entry.target !== "memory" || rawBranches === editBranchesOriginal.trim() ? void 0 : rawBranches === "" ? [] : parseBranchesInput(editBranches); await mutate({ action: "replace", target: entry.target, old_text: entry.content, content: editContent, importance: editImportance, ...entrySelector(entry), ...branchDelta === void 0 ? {} : { branches: branchDelta } }); setEditing(null); } catch (reason) { setError(message(reason)); } finally { setSaving(false); } }; const remove = async (entry) => { setSaving(true); try { await mutate({ action: "remove", target: entry.target, old_text: entry.content, ...entrySelector(entry) }); setRemoving(null); } catch (reason) { setError(message(reason)); } finally { setSaving(false); } }; const togglePin = async (entry) => { if (props.client.pinRuntimeMemory === void 0) return; setSaving(true); setError(null); setNotice(null); try { const next = await props.client.pinRuntimeMemory({ target: entry.target, content: entry.content, pinned: entry.pinned !== true, ...entrySelector(entry) }); if (next !== void 0 && next !== null && Array.isArray(next.entries)) setSnapshot(next); else await load(); setNotice(t(entry.pinned === true ? "runtime.unpinnedNotice" : "runtime.pinnedNotice")); props.onMutate?.(); } catch (reason) { setError(message(reason)); } finally { setSaving(false); } }; const runtimeEditActionClass = appearanceClass(css$3.ghostButton, appearanceClass(sidebarCss$2.itemActionButton, sidebarCss$2.itemEditAction)); const runtimeRemoveActionClass = appearanceClass(css$3.dangerButton, appearanceClass(sidebarCss$2.itemActionButton, sidebarCss$2.itemDangerAction)); const runtimeEntry = (entry, showTarget = false) => { const key = entryKey(entry); const isRemoving = removing === key; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { className: css$3.runtimeEntry, "data-importance": entry.importance, "data-target": entry.target, "data-focused": focused(entry) || void 0, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.runtimeEntryMeta, children: [showTarget ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.runtimeEntryBadges, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$3.runtimeEntryTarget, children: entry.target === "user" ? "USER.md" : "MEMORY.md" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(`runtime.importance.${entry.importance}`) }), entry.pinned === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$3.runtimeEntryBranch, children: t("runtime.pinned") }), entry.branches !== void 0 && entry.branches.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$3.runtimeEntryBranch, title: t("runtime.branchBadge"), children: entry.branches.join(", ") }) ] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(`runtime.importance.${entry.importance}`) }), entry.pinned === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$3.runtimeEntryBranch, children: t("runtime.pinned") }), entry.branches !== void 0 && entry.branches.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$3.runtimeEntryBranch, title: t("runtime.branchBadge"), children: entry.branches.join(", ") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("time", { dateTime: entry.created_at, children: new Date(entry.created_at).toLocaleString(locale) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: entry.content }), props.writeEnabled && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", { children: [ props.client.pinRuntimeMemory !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: runtimeEditActionClass, disabled: saving, "aria-pressed": entry.pinned === true, onClick: () => void togglePin(entry), children: t(entry.pinned === true ? "runtime.unpin" : "runtime.pin") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: runtimeEditActionClass, disabled: saving && isRemoving, onClick: () => beginEdit(entry), children: t("runtime.editAction") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: runtimeRemoveActionClass, disabled: saving && isRemoving, onClick: () => { setRemoving(key); setEditing(null); }, children: t("runtime.removeAction") }) ] }) ] }, key); }; const targetSummary = (value) => { const view = snapshot?.targets[value]; const percentage = view === void 0 || view.limit === 0 ? 0 : Math.min(100, Math.round(view.used / view.limit * 100)); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$3.runtimeSummaryCard, "aria-label": t(`runtime.target.${value}`), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { className: css$3.runtimeTargetHeader, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: value === "user" ? "USER.md" : "MEMORY.md" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t(`runtime.target.${value}`) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: view?.entryCount ?? 0 })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.capacityLine, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { style: { width: `${percentage}%` } }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: view === void 0 ? "—" : `${humanBytes(view.used)} / ${humanBytes(view.limit)}` })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css$3.runtimeTargetDescription, children: t(`runtime.target.${value}.description`) }), view?.pinned !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$3.runtimePinMeta, children: t("runtime.pinBudget", { count: view.pinned.count, used: view.pinned.characters, limit: view.pinned.limit }) }) ] }); }; const normalizedQuery = filterQuery.trim().toLocaleLowerCase(); const filteredEntries = (snapshot?.entries ?? []).filter((entry) => (filterTarget === "all" || entry.target === filterTarget) && (normalizedQuery === "" || entry.content.toLocaleLowerCase().includes(normalizedQuery))).sort((left, right) => Date.parse(right.created_at) - Date.parse(left.created_at)); const visibleEntries = filteredEntries.slice(0, visibleLimit); const closeComposer = () => { setContent(""); setAdding(false); }; const importanceOptions = [ "critical", "normal", "low" ].map((value) => ({ value, label: t(`runtime.importance.${value}`) })); const composer = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { id: runtimeAddFormId, className: css$3.runtimeComposer, onSubmit: (event) => void add(event), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.runtimeComposerHeading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("runtime.addTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("runtime.addDescription") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("runtime.hotContext") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { "aria-label": t("runtime.content"), value: content, onChange: (event) => setContent(event.target.value), rows: 3, placeholder: t("runtime.placeholder") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.runtimeComposerActions, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { className: css$3.runtimeChoice, label: t("runtime.target"), value: target, options: [{ value: "memory", label: t("runtime.target.memory") }, { value: "user", label: t("runtime.target.user") }], onChange: setTarget }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { className: css$3.runtimeChoice, label: t("runtime.importance"), value: importance, options: importanceOptions, onChange: setImportance }), target === "memory" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { className: css$3.runtimeComposerBranch, children: [t("runtime.branches"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { value: branches, onChange: (event) => setBranches(event.target.value), placeholder: t("runtime.branchesPlaceholder"), "aria-label": t("runtime.branches") })] }) ] }) ] }); const editingEntry = editing === null ? void 0 : snapshot?.entries.find((entry) => entryKey(entry) === editing); const removingEntry = removing === null ? void 0 : snapshot?.entries.find((entry) => entryKey(entry) === removing); const editForm = editingEntry === void 0 ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { id: runtimeEditFormId, className: css$3.bodyEdit, onSubmit: (event) => { event.preventDefault(); replace(editingEntry); }, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("runtime.editContent"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { "aria-label": t("runtime.editContent"), value: editContent, onChange: (event) => setEditContent(event.target.value), rows: 7 })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { className: css$3.runtimeChoice, label: t("runtime.importance"), value: editImportance, options: importanceOptions, onChange: setEditImportance }), editingEntry.target === "memory" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { className: css$3.bodyEditBranch, children: [ t("runtime.branches"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { value: editBranches, onChange: (event) => setEditBranches(event.target.value), placeholder: t("runtime.branchesPlaceholder"), "aria-label": t("runtime.branches") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("runtime.branchesHint") }) ] }) ] }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.page, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageHeader, { title: t("runtime.title"), description: t("runtime.description"), meta: snapshot === null ? t("common.loading") : t("runtime.total", { count: snapshot.entries.length }), ...props.writeEnabled ? { action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$3.primaryButton, onClick: () => setAdding(true), children: t("runtime.addButton") }) } : {} }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: error === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$3.inlineError, role: "alert", children: error }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: notice === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$3.runtimeNotice, role: "status", children: notice }) }), !props.writeEnabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$3.runtimeReadOnly, children: t("runtime.readOnly") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.runtimeSummaryGrid, children: [targetSummary("user"), targetSummary("memory")] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$3.runtimeBrowser, "aria-label": t("runtime.entriesAria"), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.runtimeBrowserToolbar, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.runtimeScopeFilter, role: "group", "aria-label": t("runtime.scopeAria"), style: { "--dsh-segment-count": 3, "--dsh-segment-index": filterTarget === "all" ? 0 : filterTarget === "user" ? 1 : 2 }, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", "data-active": filterTarget === "all" || void 0, onClick: () => setFilterTarget("all"), children: [ t("runtime.scopeAll"), " ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", { children: snapshot?.entries.length ?? 0 }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", "data-active": filterTarget === "user" || void 0, onClick: () => setFilterTarget("user"), children: [ t("runtime.target.user"), " ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", { children: snapshot?.targets.user.entryCount ?? 0 }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", "data-active": filterTarget === "memory" || void 0, onClick: () => setFilterTarget("memory"), children: [ t("runtime.target.memory"), " ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", { children: snapshot?.targets.memory.entryCount ?? 0 }) ] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchField, { className: css$3.runtimeFilterQuery, label: t("runtime.filterAria"), value: filterQuery, onChange: (event) => setFilterQuery(event.target.value), placeholder: t("runtime.filterPlaceholder") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { ref: listRef, className: css$3.runtimeUnifiedList, children: [visibleEntries.map((entry) => runtimeEntry(entry, true)), !loading && filteredEntries.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.runtimeEmpty, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "○" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("runtime.noMatch") })] })] }), !loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressiveFooter, { visible: visibleEntries.length, total: filteredEntries.length, pageSize, onMore: () => setVisibleLimit((value) => value + pageSize) }) ] })] }), adding && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("runtime.addTitle"), description: t("runtime.addDescription"), busy: saving, onClose: closeComposer, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, className: css$3.secondaryButton, disabled: saving, onClick: closeComposer, children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", form: runtimeAddFormId, className: css$3.primaryButton, disabled: saving || content.trim() === "", children: saving ? t("runtime.saving") : t("runtime.addAction") })] }), children: composer }), editingEntry !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("runtime.editContent"), description: t(`runtime.target.${editingEntry.target}`), busy: saving, onClose: () => setEditing(null), footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, className: css$3.secondaryButton, disabled: saving, onClick: () => setEditing(null), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", form: runtimeEditFormId, className: css$3.primaryButton, disabled: saving || editContent.trim() === "", children: t("runtime.saveEdit") })] }), children: editForm }), removingEntry !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("runtime.removeTitle"), description: t(`runtime.target.${removingEntry.target}`), busy: saving, onClose: () => setRemoving(null), footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, "data-autofocus": true, className: css$3.secondaryButton, disabled: saving, onClick: () => setRemoving(null), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$3.dangerSolidButton, disabled: saving, onClick: () => void remove(removingEntry), children: t("runtime.removeAction") })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.bodyDeleteConfirm, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("runtime.removeWarning") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$3.bodyDeleteSummary, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css$3.bodyDeleteContent, children: removingEntry.content }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(`runtime.importance.${removingEntry.importance}`) }), removingEntry.branches !== void 0 && removingEntry.branches.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css$3.runtimeEntryBranch, title: t("runtime.branchBadge"), children: removingEntry.branches.join(", ") }) ] })] }) }) ] }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-runtime/src/client/ui.tsx function runtimePageClient(management) { const client = createMemorySourcePageClient(management); return { runtimeMemory: () => client.read("snapshot", null, { coalesce: true }), pinRuntimeMemory: (input) => client.mutate("pin", { ...input }, true), mutateRuntimeMemory: (input) => client.canAssist("mutate") ? client.assist("mutate", { ...input, ...input.old_text === void 0 ? {} : { oldText: input.old_text } }, true) : client.mutate("mutate", { ...input }, true) }; } function RuntimeSourceView(props) { const client = (0, react.useMemo)(() => props.management === void 0 ? void 0 : runtimePageClient(props.management), [props.management]); const [revision, setRevision] = (0, react.useState)(0); const lastRefreshKey = (0, react.useRef)(props.refreshKey); const suppressRefreshEcho = (0, react.useRef)(false); (0, react.useEffect)(() => { if (lastRefreshKey.current === props.refreshKey) return; lastRefreshKey.current = props.refreshKey; if (suppressRefreshEcho.current) { suppressRefreshEcho.current = false; return; } setRevision((value) => value + 1); }, [props.refreshKey]); const lastSessionId = (0, react.useRef)(props.sessionId); const lastManagement = (0, react.useRef)(props.management); (0, react.useEffect)(() => { const managementChanged = lastManagement.current !== props.management; lastManagement.current = props.management; if (lastSessionId.current === props.sessionId) return; lastSessionId.current = props.sessionId; if (!managementChanged) setRevision((value) => value + 1); }, [props.management, props.sessionId]); const handleMutate = (0, react.useCallback)(() => { if (props.onRefresh === void 0) return; suppressRefreshEcho.current = true; props.onRefresh(); setTimeout(() => { suppressRefreshEcho.current = false; }, 0); }, [props.onRefresh]); if (client === void 0) return null; const navigation = props.navigationInput; const focus = typeof navigation === "object" && navigation !== null && !Array.isArray(navigation) && typeof navigation.seed === "string" && navigation.seed !== "" ? navigation : void 0; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RuntimePage, { ...focus === void 0 ? {} : { focusText: focus.seed }, ...props.onRevealElement === void 0 ? {} : { onRevealElement: props.onRevealElement }, client, revision, writeEnabled: props.writable === true, onMutate: handleMutate }, typeof focus?.nonce === "number" ? focus.nonce : 0); } function RuntimeSourcePage(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemorySourcePageFrame, { locale: props.locale, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RuntimeSourceView, { ...props }, props.sourceInstanceKey) }); } function installRuntimeMemoryUI(ctx, t = translateEn) { return installMemorySourceUI(ctx, { sourceTypeId: "runtime", pages: [{ id: "entries", order: 100, navigation: { group: "storage", glyph: "◫" }, label: () => t("nav.runtime"), component: RuntimeSourcePage }] }); } function apply$3(ctx) { installRuntimeMemoryUI(ctx, ctx.locale.bind("mnemon")); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-documents/presentation/locales.json var locales_default$1 = { zh: { "nav.documents": "档案", "documents.title": "项目档案", "documents.description": "按需检索的工作区文档,超限时自动归档。", "documents.capacity": "{used} / {limit}", "documents.summary": "档案存储摘要", "documents.active": "活跃档案", "documents.activeHint": "近场检索范围", "documents.archivedCount": "归档", "documents.archivedHint": "不占活跃容量", "documents.activeCapacity": "活跃容量", "documents.capacityHint": "按实际 UTF-8 文件大小计算", "documents.searchAria": "检索项目档案", "documents.searchPlaceholder": "搜索档案…", "documents.search": "检索", "documents.scope": "档案范围", "documents.new": "新建", "documents.newTitle": "创建托管档案", "documents.editTitle": "编辑活跃档案", "documents.editorHint": "自动维护元数据与修订号,不修改项目源文件。", "documents.managedCopy": "托管副本", "documents.name": "标题", "documents.routing": "检索说明", "documents.sources": "来源路径", "documents.sourcesPlaceholder": "src/index.ts, docs/architecture.md", "documents.markdown": "Markdown 内容", "documents.saving": "保存中…", "documents.create": "创建", "documents.save": "保存", "documents.created": "已创建活跃档案。", "documents.createdAfterArchive": "已先迁移 {count} 份旧档案,再创建活跃档案。", "documents.updated": "已保存新的档案修订。", "documents.updatedAfterArchive": "已先迁移 {count} 份旧档案,再保存修订。", "documents.archived": "已建立 Mnemon 冷索引并归档;关联记忆空间:{spaces}", "documents.archivedLocally": "已归档到本地:原文移入归档目录,没有建立 Mnemon 冷索引。", "documents.list": "项目档案列表", "documents.activeList": "活跃目录", "documents.archiveList": "归档目录", "documents.noDescription": "暂无检索说明。", "documents.missing": "文件缺失", "documents.emptyActive": "还没有活跃档案", "documents.emptyActiveText": "复杂对话达到活动评分门槛后会自动审阅并整理档案,也可以在上方手动创建。", "documents.emptyArchived": "还没有归档", "documents.emptyArchivedText": "只有完成 Mnemon 索引的档案才会迁移到这里。", "documents.reader": "档案阅读器", "documents.selectTitle": "选择一份档案", "documents.selectText": "在左侧查看活跃项目知识或沿 Mnemon 引用打开归档原文。", "documents.coldArchive": "归档原文", "documents.edit": "编辑", "documents.delete": "删除", "documents.deleteConfirm": "永久删除这份档案?", "documents.deleteDescription": "永久移除托管副本,项目源文件与记忆空间不受影响,且无法撤销。", "documents.deleteNow": "确认删除", "documents.deleting": "删除中…", "documents.deleted": "档案已永久删除。", "documents.path": "托管路径", "documents.revision": "修订", "documents.hash": "内容哈希", "documents.size": "文件大小", "documents.archiveReceipt": "Mnemon 冷索引回执", "documents.archiveNote": "归档说明", "documents.archiveTitle": "迁入归档", "documents.archiveDescription": "生成摘要索引并移入归档,释放活跃容量。", "documents.archive": "归档", "documents.archiveConfirm": "确认归档这份档案?", "documents.archiving": "归档中…", "documents.archiveNow": "确认归档", "documents.markdown.copy": "复制", "documents.markdown.copied": "已复制", "documents.markdown.footnotes": "脚注" }, en: { "nav.documents": "Documents", "documents.title": "Project Documents", "documents.description": "Workspace documents searched on demand and archived when full.", "documents.capacity": "{used} / {limit}", "documents.summary": "Document storage summary", "documents.active": "Active", "documents.activeHint": "Near-field search scope", "documents.archivedCount": "Archive", "documents.archivedHint": "Excluded from active capacity", "documents.activeCapacity": "Active capacity", "documents.capacityHint": "Measured from actual UTF-8 files", "documents.searchAria": "Search project documents", "documents.searchPlaceholder": "Search documents…", "documents.search": "Search", "documents.scope": "Document scope", "documents.new": "New", "documents.newTitle": "Create managed document", "documents.editTitle": "Edit active document", "documents.editorHint": "Metadata and revisions are managed automatically; source files stay untouched.", "documents.managedCopy": "Managed copy", "documents.name": "Title", "documents.routing": "Retrieval description", "documents.sources": "Source paths", "documents.sourcesPlaceholder": "src/index.ts, docs/architecture.md", "documents.markdown": "Markdown content", "documents.saving": "Saving…", "documents.create": "Create", "documents.save": "Save", "documents.created": "Active document created.", "documents.createdAfterArchive": "Archived {count} older document(s), then created the active document.", "documents.updated": "New document revision saved.", "documents.updatedAfterArchive": "Archived {count} older document(s), then saved the revision.", "documents.archived": "Mnemon cold index created and document archived; Memory Spaces: {spaces}", "documents.archivedLocally": "Archived locally: the original moved to the archive, without a Mnemon cold index.", "documents.list": "Project document list", "documents.activeList": "Active directory", "documents.archiveList": "Archive directory", "documents.noDescription": "No retrieval description.", "documents.missing": "File missing", "documents.emptyActive": "No active documents yet", "documents.emptyActiveText": "Complex work is reviewed after it reaches the activity-score gate, or you can create a Document above.", "documents.emptyArchived": "No archives yet", "documents.emptyArchivedText": "Only documents with a completed Mnemon index are moved here.", "documents.reader": "Document reader", "documents.selectTitle": "Select a document", "documents.selectText": "Read active project knowledge or follow a Mnemon reference to an archived original.", "documents.coldArchive": "Archived original", "documents.edit": "Edit", "documents.delete": "Delete", "documents.deleteConfirm": "Permanently delete this document?", "documents.deleteDescription": "Permanently removes the managed copy; project files and Memory Space notes stay untouched. This cannot be undone.", "documents.deleteNow": "Confirm delete", "documents.deleting": "Deleting…", "documents.deleted": "Document permanently deleted.", "documents.path": "Managed path", "documents.revision": "Revision", "documents.hash": "Content hash", "documents.size": "File size", "documents.archiveReceipt": "Mnemon cold-index receipt", "documents.archiveNote": "Archive note", "documents.archiveTitle": "Move to archive", "documents.archiveDescription": "Index a summary in Memory Spaces and move the full text to archive.", "documents.archive": "Archive", "documents.archiveConfirm": "Archive this document?", "documents.archiving": "Archiving…", "documents.archiveNow": "Confirm archive", "documents.markdown.copy": "Copy", "documents.markdown.copied": "Copied", "documents.markdown.footnotes": "Footnotes" }, ja: { "nav.documents": "ドキュメント", "documents.title": "プロジェクトドキュメント", "documents.description": "必要に応じて検索され、容量超過時に自動アーカイブされるワークスペース文書。", "documents.capacity": "{used} / {limit}", "documents.summary": "ドキュメントストレージ概要", "documents.active": "アクティブ", "documents.activeHint": "近接検索の対象", "documents.archivedCount": "アーカイブ", "documents.archivedHint": "アクティブ容量の対象外", "documents.activeCapacity": "アクティブ容量", "documents.capacityHint": "実際の UTF-8 ファイルサイズで計測", "documents.searchAria": "プロジェクトドキュメントを検索", "documents.searchPlaceholder": "ドキュメントを検索…", "documents.search": "検索", "documents.scope": "ドキュメントの範囲", "documents.new": "新規", "documents.newTitle": "管理対象ドキュメントを作成", "documents.editTitle": "アクティブドキュメントを編集", "documents.editorHint": "メタデータとリビジョンは自動管理されます。プロジェクトの元ファイルは変更されません。", "documents.managedCopy": "管理コピー", "documents.name": "タイトル", "documents.routing": "検索用の説明", "documents.sources": "参照元パス", "documents.sourcesPlaceholder": "src/index.ts, docs/architecture.md", "documents.markdown": "Markdown 本文", "documents.saving": "保存中…", "documents.create": "作成", "documents.save": "保存", "documents.created": "アクティブドキュメントを作成しました。", "documents.createdAfterArchive": "古いドキュメント {count} 件をアーカイブしたあと、アクティブドキュメントを作成しました。", "documents.updated": "新しいドキュメントリビジョンを保存しました。", "documents.updatedAfterArchive": "古いドキュメント {count} 件をアーカイブしたあと、リビジョンを保存しました。", "documents.archived": "Mnemon コールドインデックスを作成してアーカイブしました(メモリスペース:{spaces})", "documents.archivedLocally": "ローカルにアーカイブしました:原文をアーカイブへ移動しました(Mnemon コールドインデックスなし)。", "documents.list": "プロジェクトドキュメント一覧", "documents.activeList": "アクティブディレクトリ", "documents.archiveList": "アーカイブディレクトリ", "documents.noDescription": "検索用の説明はまだありません。", "documents.missing": "ファイルが見つかりません", "documents.emptyActive": "アクティブドキュメントはまだありません", "documents.emptyActiveText": "複雑な作業は活動スコアのしきい値を超えると自動でレビュー・整理されます。上から手動作成もできます。", "documents.emptyArchived": "アーカイブはまだありません", "documents.emptyArchivedText": "Mnemon インデックスが完了したドキュメントのみここに移動されます。", "documents.reader": "ドキュメントビューアー", "documents.selectTitle": "ドキュメントを選択", "documents.selectText": "アクティブなプロジェクト知識を読むか、Mnemon の参照からアーカイブ原文を開けます。", "documents.coldArchive": "アーカイブ原文", "documents.edit": "編集", "documents.delete": "削除", "documents.deleteConfirm": "このドキュメントを完全に削除しますか?", "documents.deleteDescription": "管理コピーを完全に削除します。プロジェクトの元ファイルとメモリスペースの記録は影響を受けません。この操作は元に戻せません。", "documents.deleteNow": "削除を確定", "documents.deleting": "削除中…", "documents.deleted": "ドキュメントを完全に削除しました。", "documents.path": "管理パス", "documents.revision": "リビジョン", "documents.hash": "コンテンツハッシュ", "documents.size": "ファイルサイズ", "documents.archiveReceipt": "Mnemon コールドインデックス記録", "documents.archiveNote": "アーカイブメモ", "documents.archiveTitle": "アーカイブへ移動", "documents.archiveDescription": "要約をメモリスペースに索引付けし、本文をアーカイブへ移動します。", "documents.archive": "アーカイブ", "documents.archiveConfirm": "このドキュメントをアーカイブしますか?", "documents.archiving": "アーカイブ中…", "documents.archiveNow": "アーカイブを確定", "documents.markdown.copy": "コピー", "documents.markdown.copied": "コピーしました", "documents.markdown.footnotes": "脚注" }, es: { "nav.documents": "Documentos", "documents.title": "Documentos del proyecto", "documents.description": "Documentos del espacio de trabajo consultados bajo demanda y archivados al llenarse.", "documents.capacity": "{used} / {limit}", "documents.summary": "Resumen de almacenamiento de documentos", "documents.active": "Activos", "documents.activeHint": "Ámbito de búsqueda cercana", "documents.archivedCount": "Archivo", "documents.archivedHint": "Excluido de la capacidad activa", "documents.activeCapacity": "Capacidad activa", "documents.capacityHint": "Calculado según los archivos UTF-8 reales", "documents.searchAria": "Buscar documentos del proyecto", "documents.searchPlaceholder": "Buscar documentos…", "documents.search": "Buscar", "documents.scope": "Ámbito de documentos", "documents.new": "Nuevo", "documents.newTitle": "Crear documento gestionado", "documents.editTitle": "Editar documento activo", "documents.editorHint": "Los metadatos y las revisiones se gestionan automáticamente; los archivos fuente permanecen intactos.", "documents.managedCopy": "Copia gestionada", "documents.name": "Título", "documents.routing": "Descripción de recuperación", "documents.sources": "Rutas de origen", "documents.sourcesPlaceholder": "src/index.ts, docs/architecture.md", "documents.markdown": "Contenido Markdown", "documents.saving": "Guardando…", "documents.create": "Crear", "documents.save": "Guardar", "documents.created": "Documento activo creado.", "documents.createdAfterArchive": "Se archivaron {count} documento(s) anterior(es) y se creó el documento activo.", "documents.updated": "Nueva revisión del documento guardada.", "documents.updatedAfterArchive": "Se archivaron {count} documento(s) anterior(es) y se guardó la revisión.", "documents.archived": "Índice frío de Mnemon creado y documento archivado; Espacios de memoria: {spaces}", "documents.archivedLocally": "Archivado localmente: el original se movió al archivo, sin índice frío de Mnemon.", "documents.list": "Lista de documentos del proyecto", "documents.activeList": "Directorio activo", "documents.archiveList": "Directorio de archivo", "documents.noDescription": "Sin descripción de recuperación.", "documents.missing": "Archivo faltante", "documents.emptyActive": "Aún no hay documentos activos", "documents.emptyActiveText": "El trabajo complejo se revisa al superar el umbral de puntuación de actividad, o puedes crear un Documento arriba.", "documents.emptyArchived": "Aún no hay archivos", "documents.emptyArchivedText": "Solo los documentos con un índice de Mnemon completado se mueven aquí.", "documents.reader": "Lector de documentos", "documents.selectTitle": "Selecciona un documento", "documents.selectText": "Consulta el conocimiento activo del proyecto o sigue una referencia de Mnemon hacia un original archivado.", "documents.coldArchive": "Original archivado", "documents.edit": "Editar", "documents.delete": "Eliminar", "documents.deleteConfirm": "¿Eliminar permanentemente este documento?", "documents.deleteDescription": "Elimina permanentemente la copia gestionada; los archivos del proyecto y las notas de Espacios de memoria permanecen intactos. No se puede deshacer.", "documents.deleteNow": "Confirmar eliminación", "documents.deleting": "Eliminando…", "documents.deleted": "Documento eliminado permanentemente.", "documents.path": "Ruta gestionada", "documents.revision": "Revisión", "documents.hash": "Hash de contenido", "documents.size": "Tamaño del archivo", "documents.archiveReceipt": "Recibo de índice frío de Mnemon", "documents.archiveNote": "Nota de archivo", "documents.archiveTitle": "Mover al archivo", "documents.archiveDescription": "Indexa un resumen en Espacios de memoria y mueve el texto completo al archivo.", "documents.archive": "Archivar", "documents.archiveConfirm": "¿Archivar este documento?", "documents.archiving": "Archivando…", "documents.archiveNow": "Confirmar archivo", "documents.markdown.copy": "Copiar", "documents.markdown.copied": "Copiado", "documents.markdown.footnotes": "Notas al pie" }, fr: { "nav.documents": "Documents", "documents.title": "Documents du projet", "documents.description": "Documents d'espace de travail recherchés à la demande et archivés une fois pleins.", "documents.capacity": "{used} / {limit}", "documents.summary": "Résumé du stockage documentaire", "documents.active": "Actifs", "documents.activeHint": "Portée de recherche proche", "documents.archivedCount": "Archives", "documents.archivedHint": "Exclus de la capacité active", "documents.activeCapacity": "Capacité active", "documents.capacityHint": "Calculée sur la taille réelle des fichiers UTF-8", "documents.searchAria": "Rechercher dans les Documents du projet", "documents.searchPlaceholder": "Rechercher des documents…", "documents.search": "Rechercher", "documents.scope": "Portée des documents", "documents.new": "Nouveau", "documents.newTitle": "Créer un document géré", "documents.editTitle": "Modifier le document actif", "documents.editorHint": "Les métadonnées et révisions sont gérées automatiquement ; les fichiers sources restent intacts.", "documents.managedCopy": "Copie gérée", "documents.name": "Titre", "documents.routing": "Description de récupération", "documents.sources": "Chemins sources", "documents.sourcesPlaceholder": "src/index.ts, docs/architecture.md", "documents.markdown": "Contenu Markdown", "documents.saving": "Enregistrement…", "documents.create": "Créer", "documents.save": "Enregistrer", "documents.created": "Document actif créé.", "documents.createdAfterArchive": "{count} ancien(s) document(s) archivé(s), puis document actif créé.", "documents.updated": "Nouvelle révision du document enregistrée.", "documents.updatedAfterArchive": "{count} ancien(s) document(s) archivé(s), puis révision enregistrée.", "documents.archived": "Index froid Mnemon créé et document archivé ; Espaces de mémoire : {spaces}", "documents.archivedLocally": "Archivé localement : l'original a été déplacé vers les archives, sans index froid Mnemon.", "documents.list": "Liste des Documents du projet", "documents.activeList": "Répertoire actif", "documents.archiveList": "Répertoire d'archives", "documents.noDescription": "Aucune description de récupération.", "documents.missing": "Fichier manquant", "documents.emptyActive": "Aucun document actif", "documents.emptyActiveText": "Les tâches complexes sont révisées dès que le seuil de score d'activité est atteint, ou vous pouvez créer un document ci-dessus.", "documents.emptyArchived": "Aucune archive", "documents.emptyArchivedText": "Seuls les documents disposant d'un index Mnemon complet sont déplacés ici.", "documents.reader": "Lecteur de document", "documents.selectTitle": "Sélectionner un document", "documents.selectText": "Consultez les connaissances actives du projet ou suivez une référence Mnemon vers un original archivé.", "documents.coldArchive": "Original archivé", "documents.edit": "Modifier", "documents.delete": "Supprimer", "documents.deleteConfirm": "Supprimer définitivement ce document ?", "documents.deleteDescription": "Supprime définitivement la copie gérée ; les fichiers du projet et les notes d'Espaces de mémoire restent intacts. Cette action est irréversible.", "documents.deleteNow": "Confirmer la suppression", "documents.deleting": "Suppression…", "documents.deleted": "Document supprimé définitivement.", "documents.path": "Chemin géré", "documents.revision": "Révision", "documents.hash": "Empreinte du contenu", "documents.size": "Taille du fichier", "documents.archiveReceipt": "Reçu d'index froid Mnemon", "documents.archiveNote": "Note d'archivage", "documents.archiveTitle": "Déplacer vers les archives", "documents.archiveDescription": "Indexer un résumé dans les Espaces de mémoire et déplacer le texte complet vers les archives.", "documents.archive": "Archiver", "documents.archiveConfirm": "Archiver ce document ?", "documents.archiving": "Archivage…", "documents.archiveNow": "Confirmer l'archivage", "documents.markdown.copy": "Copier", "documents.markdown.copied": "Copié", "documents.markdown.footnotes": "Notes de bas de page" }, de: { "nav.documents": "Dokumente", "documents.title": "Projektdokumente", "documents.description": "Arbeitsbereich-Dokumente, die bei Bedarf durchsucht und bei voller Kapazität archiviert werden.", "documents.capacity": "{used} / {limit}", "documents.summary": "Übersicht der Dokumentspeicherung", "documents.active": "Aktiv", "documents.activeHint": "Nahbereichs-Suchumfang", "documents.archivedCount": "Archiv", "documents.archivedHint": "Von der aktiven Kapazität ausgenommen", "documents.activeCapacity": "Aktive Kapazität", "documents.capacityHint": "Gemessen an den tatsächlichen UTF-8-Dateien", "documents.searchAria": "Projektdokumente durchsuchen", "documents.searchPlaceholder": "Dokumente durchsuchen…", "documents.search": "Suchen", "documents.scope": "Dokumentbereich", "documents.new": "Neu", "documents.newTitle": "Verwaltetes Dokument erstellen", "documents.editTitle": "Aktives Dokument bearbeiten", "documents.editorHint": "Metadaten und Revisionen werden automatisch verwaltet; Quelldateien bleiben unverändert.", "documents.managedCopy": "Verwaltete Kopie", "documents.name": "Titel", "documents.routing": "Abrufbeschreibung", "documents.sources": "Quellpfade", "documents.sourcesPlaceholder": "src/index.ts, docs/architecture.md", "documents.markdown": "Markdown-Inhalt", "documents.saving": "Wird gespeichert…", "documents.create": "Erstellen", "documents.save": "Speichern", "documents.created": "Aktives Dokument erstellt.", "documents.createdAfterArchive": "{count} ältere Dokumente archiviert, dann aktives Dokument erstellt.", "documents.updated": "Neue Dokumentrevision gespeichert.", "documents.updatedAfterArchive": "{count} ältere Dokumente archiviert, dann Revision gespeichert.", "documents.archived": "Mnemon-Kaltindex erstellt und Dokument archiviert; Speicherbereiche: {spaces}", "documents.archivedLocally": "Lokal archiviert: Das Original wurde ohne Mnemon-Kaltindex ins Archiv verschoben.", "documents.list": "Liste der Projektdokumente", "documents.activeList": "Aktives Verzeichnis", "documents.archiveList": "Archivverzeichnis", "documents.noDescription": "Keine Abrufbeschreibung.", "documents.missing": "Datei fehlt", "documents.emptyActive": "Noch keine aktiven Dokumente", "documents.emptyActiveText": "Komplexe Arbeiten werden geprüft, sobald sie die Aktivitätsschwelle erreichen, oder Sie können oben ein Dokument erstellen.", "documents.emptyArchived": "Noch keine Archive", "documents.emptyArchivedText": "Nur Dokumente mit vollständigem Mnemon-Index werden hierher verschoben.", "documents.reader": "Dokumentanzeige", "documents.selectTitle": "Dokument auswählen", "documents.selectText": "Lesen Sie aktives Projektwissen oder folgen Sie einer Mnemon-Referenz zu einem archivierten Original.", "documents.coldArchive": "Archiviertes Original", "documents.edit": "Bearbeiten", "documents.delete": "Löschen", "documents.deleteConfirm": "Dieses Dokument dauerhaft löschen?", "documents.deleteDescription": "Entfernt die verwaltete Kopie dauerhaft; Projektdateien und Notizen in Speicherbereichen bleiben unberührt. Dies kann nicht rückgängig gemacht werden.", "documents.deleteNow": "Löschen bestätigen", "documents.deleting": "Wird gelöscht…", "documents.deleted": "Dokument dauerhaft gelöscht.", "documents.path": "Verwalteter Pfad", "documents.revision": "Revision", "documents.hash": "Inhalts-Hash", "documents.size": "Dateigröße", "documents.archiveReceipt": "Mnemon-Kaltindex-Quittung", "documents.archiveNote": "Archivnotiz", "documents.archiveTitle": "Ins Archiv verschieben", "documents.archiveDescription": "Zusammenfassung in Speicherbereichen indizieren und Volltext ins Archiv verschieben.", "documents.archive": "Archivieren", "documents.archiveConfirm": "Dieses Dokument archivieren?", "documents.archiving": "Wird archiviert…", "documents.archiveNow": "Archivierung bestätigen", "documents.markdown.copy": "Kopieren", "documents.markdown.copied": "Kopiert", "documents.markdown.footnotes": "Fußnoten" }, ru: { "nav.documents": "Документы", "documents.title": "Документы проекта", "documents.description": "Документы рабочей области с поиском по запросу и автоматической архивацией при заполнении.", "documents.capacity": "{used} / {limit}", "documents.summary": "Сводка хранилища документов", "documents.active": "Активные", "documents.activeHint": "Область быстрого поиска", "documents.archivedCount": "Архив", "documents.archivedHint": "Не учитываются в активном объёме", "documents.activeCapacity": "Активный объём", "documents.capacityHint": "Рассчитывается по фактическим файлам UTF-8", "documents.searchAria": "Поиск по документам проекта", "documents.searchPlaceholder": "Поиск документов…", "documents.search": "Поиск", "documents.scope": "Область документов", "documents.new": "Создать", "documents.newTitle": "Создать управляемый документ", "documents.editTitle": "Редактировать активный документ", "documents.editorHint": "Метаданные и ревизии ведутся автоматически; исходные файлы не затрагиваются.", "documents.managedCopy": "Управляемая копия", "documents.name": "Заголовок", "documents.routing": "Описание для поиска", "documents.sources": "Пути к источникам", "documents.sourcesPlaceholder": "src/index.ts, docs/architecture.md", "documents.markdown": "Содержимое Markdown", "documents.saving": "Сохранение…", "documents.create": "Создать", "documents.save": "Сохранить", "documents.created": "Активный документ создан.", "documents.createdAfterArchive": "Старые документы отправлены в архив ({count}), затем создан активный документ.", "documents.updated": "Сохранена новая ревизия документа.", "documents.updatedAfterArchive": "Старые документы отправлены в архив ({count}), затем сохранена ревизия.", "documents.archived": "Создан холодный индекс Mnemon, документ заархивирован; Пространства памяти: {spaces}", "documents.archivedLocally": "Заархивировано локально: оригинал перемещён в архив без холодного индекса Mnemon.", "documents.list": "Список документов проекта", "documents.activeList": "Каталог активных", "documents.archiveList": "Каталог архива", "documents.noDescription": "Нет описания для поиска.", "documents.missing": "Файл отсутствует", "documents.emptyActive": "Активных документов пока нет", "documents.emptyActiveText": "Сложная работа проверяется после достижения порога активности, либо вы можете создать Документ выше.", "documents.emptyArchived": "Архивов пока нет", "documents.emptyArchivedText": "Сюда переносятся только документы с завершённым индексом Mnemon.", "documents.reader": "Просмотр документа", "documents.selectTitle": "Выберите документ", "documents.selectText": "Читайте активные знания проекта или перейдите по ссылке Mnemon к архивному оригиналу.", "documents.coldArchive": "Архивный оригинал", "documents.edit": "Редактировать", "documents.delete": "Удалить", "documents.deleteConfirm": "Удалить этот документ навсегда?", "documents.deleteDescription": "Управляемая копия будет удалена навсегда; файлы проекта и заметки в Пространствах памяти не затронутся. Это действие нельзя отменить.", "documents.deleteNow": "Подтвердить удаление", "documents.deleting": "Удаление…", "documents.deleted": "Документ удалён навсегда.", "documents.path": "Управляемый путь", "documents.revision": "Ревизия", "documents.hash": "Хеш содержимого", "documents.size": "Размер файла", "documents.archiveReceipt": "Квитанция холодного индекса Mnemon", "documents.archiveNote": "Примечание к архиву", "documents.archiveTitle": "Переместить в архив", "documents.archiveDescription": "Проиндексировать сводку в Пространствах памяти и переместить полный текст в архив.", "documents.archive": "В архив", "documents.archiveConfirm": "Архивировать этот документ?", "documents.archiving": "Архивация…", "documents.archiveNow": "Подтвердить архивацию", "documents.markdown.copy": "Копировать", "documents.markdown.copied": "Скопировано", "documents.markdown.footnotes": "Сноски" }, pt: { "nav.documents": "Documentos", "documents.title": "Documentos do projeto", "documents.description": "Documentos do espaço de trabalho pesquisados sob demanda e arquivados quando atingem o limite.", "documents.capacity": "{used} / {limit}", "documents.summary": "Resumo do armazenamento de documentos", "documents.active": "Ativos", "documents.activeHint": "Escopo de pesquisa imediata", "documents.archivedCount": "Arquivo", "documents.archivedHint": "Fora da capacidade ativa", "documents.activeCapacity": "Capacidade ativa", "documents.capacityHint": "Medida a partir dos arquivos UTF-8 reais", "documents.searchAria": "Pesquisar documentos do projeto", "documents.searchPlaceholder": "Pesquisar documentos…", "documents.search": "Pesquisar", "documents.scope": "Escopo de documentos", "documents.new": "Novo", "documents.newTitle": "Criar documento gerenciado", "documents.editTitle": "Editar documento ativo", "documents.editorHint": "Metadados e revisões são gerenciados automaticamente; os arquivos de origem não são alterados.", "documents.managedCopy": "Cópia gerenciada", "documents.name": "Título", "documents.routing": "Descrição de recuperação", "documents.sources": "Caminhos de origem", "documents.sourcesPlaceholder": "src/index.ts, docs/architecture.md", "documents.markdown": "Conteúdo Markdown", "documents.saving": "Salvando…", "documents.create": "Criar", "documents.save": "Salvar", "documents.created": "Documento ativo criado.", "documents.createdAfterArchive": "{count} documento(s) antigo(s) arquivado(s) e documento ativo criado.", "documents.updated": "Nova revisão do documento salva.", "documents.updatedAfterArchive": "{count} documento(s) antigo(s) arquivado(s) e revisão salva.", "documents.archived": "Índice frio do Mnemon criado e documento arquivado; Espaços de memória: {spaces}", "documents.archivedLocally": "Arquivado localmente: o original foi movido para o arquivo, sem índice frio do Mnemon.", "documents.list": "Lista de documentos do projeto", "documents.activeList": "Diretório ativo", "documents.archiveList": "Diretório de arquivo", "documents.noDescription": "Sem descrição de recuperação.", "documents.missing": "Arquivo ausente", "documents.emptyActive": "Ainda não há documentos ativos", "documents.emptyActiveText": "Trabalhos complexos são revisados após atingir o limiar de atividade, ou você pode criar um Documento acima.", "documents.emptyArchived": "Ainda não há arquivos", "documents.emptyArchivedText": "Apenas documentos com índice do Mnemon concluído são movidos para cá.", "documents.reader": "Leitor de documentos", "documents.selectTitle": "Selecione um documento", "documents.selectText": "Leia o conhecimento ativo do projeto ou siga uma referência do Mnemon até o original arquivado.", "documents.coldArchive": "Original arquivado", "documents.edit": "Editar", "documents.delete": "Excluir", "documents.deleteConfirm": "Excluir este documento permanentemente?", "documents.deleteDescription": "Remove permanentemente a cópia gerenciada; os arquivos do projeto e as notas dos Espaços de memória permanecem intactos. Esta ação não pode ser desfeita.", "documents.deleteNow": "Confirmar exclusão", "documents.deleting": "Excluindo…", "documents.deleted": "Documento excluído permanentemente.", "documents.path": "Caminho gerenciado", "documents.revision": "Revisão", "documents.hash": "Hash do conteúdo", "documents.size": "Tamanho do arquivo", "documents.archiveReceipt": "Recibo do índice frio do Mnemon", "documents.archiveNote": "Nota de arquivamento", "documents.archiveTitle": "Mover para o arquivo", "documents.archiveDescription": "Indexa um resumo nos Espaços de memória e move o texto completo para o arquivo.", "documents.archive": "Arquivar", "documents.archiveConfirm": "Arquivar este documento?", "documents.archiving": "Arquivando…", "documents.archiveNow": "Confirmar arquivamento", "documents.markdown.copy": "Copiar", "documents.markdown.copied": "Copiado", "documents.markdown.footnotes": "Notas de rodapé" } }; // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-documents/src/client/presentation.ts const css$2 = { ...memoryPageStyles, ...page_module_css_default$2 }; const sidebarCss$1 = { ...memorySidebarStyles, ...sidebar_module_css_default$1 }; const SHIPPED_LOCALE_SET$1 = /* @__PURE__ */ new Set([ "en", "zh", "ja", "es", "fr", "de", "ru", "pt" ]); const useLocalePreference$1 = useLocalePreference$4; function shippedLocale$1(preference) { return (typeof preference === "string" ? [preference.trim().replaceAll("_", "-").split("-")[0]] : preference).map((id) => id.toLowerCase()).find((id) => SHIPPED_LOCALE_SET$1.has(id)) ?? "en"; } function useT$1() { const fallback = useT$4(); const preference = useLocalePreference$1(useLocale()); return (0, react.useMemo)(() => { const dictionary = locales_default$1[shippedLocale$1(preference)]; const packFirst = typeof preference === "string" ? !/^(en|zh)([-_]|$)/i.test(preference) : preference[0] !== "en" && preference[0] !== "zh"; return (key, params) => { if (packFirst) { const translated = fallback(key, params); if (translated !== key) return translated; } if (!Object.hasOwn(dictionary, key)) return fallback(key, params); const text = dictionary[key]; return params === void 0 ? text : text.replace(/\{(\w+)\}/g, (match, name) => name in params ? String(params[name]) : match); }; }, [preference, fallback]); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-documents/src/client/pages.tsx const canRenderMarkdown$1 = typeof _deepseek_ai_dsh_client_ui_primitives.MarkdownText === "function" || typeof _deepseek_ai_dsh_client_ui_primitives.MarkdownText === "object" && _deepseek_ai_dsh_client_ui_primitives.MarkdownText !== null; const canRenderPathLabel$1 = typeof _deepseek_ai_dsh_client_ui_primitives.PathLabel === "function" || typeof _deepseek_ai_dsh_client_ui_primitives.PathLabel === "object" && _deepseek_ai_dsh_client_ui_primitives.PathLabel !== null; function PathText(props) { return canRenderPathLabel$1 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.PathLabel, { path: props.path }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: props.path }); } function DocumentMarkdown(props) { const t = useT$1(); const labels = (0, react.useMemo)(() => ({ code: { copyLabel: t("documents.markdown.copy"), copiedLabel: t("documents.markdown.copied") }, footnotes: t("documents.markdown.footnotes") }), [t]); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$2.markdownBody, children: canRenderMarkdown$1 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, { text: props.content, labels }) : props.content }); } function DocumentsPage(props) { const t = useT$1(); const locale = useLocale(); const documentCreateFormId = (0, react.useId)(); const documentEditFormId = (0, react.useId)(); const pageSize = 8; const readerRef = (0, react.useRef)(null); const [snapshot, setSnapshot] = (0, react.useState)(null); const [loadedRevision, setLoadedRevision] = (0, react.useState)(props.revision); const [items, setItems] = (0, react.useState)([]); const [visibleLimit, setVisibleLimit] = (0, react.useState)(pageSize); const [selectedId, setSelectedId] = (0, react.useState)(props.documentId ?? null); const [selected, setSelected] = (0, react.useState)(null); const [failedSelectedId, setFailedSelectedId] = (0, react.useState)(null); const [status, setStatus] = (0, react.useState)("active"); const [query, setQuery] = (0, react.useState)(""); const [loading, setLoading] = (0, react.useState)(true); const [saving, setSaving] = (0, react.useState)(false); const [error, setError] = (0, react.useState)(null); const [notice, setNotice] = (0, react.useState)(null); const [composing, setComposing] = (0, react.useState)(false); const [editing, setEditing] = (0, react.useState)(false); const [confirmArchive, setConfirmArchive] = (0, react.useState)(false); const [deleteTarget, setDeleteTarget] = (0, react.useState)(null); const [deleteError, setDeleteError] = (0, react.useState)(null); const [title, setTitle] = (0, react.useState)(""); const [description, setDescription] = (0, react.useState)(""); const [content, setContent] = (0, react.useState)(""); const [sources, setSources] = (0, react.useState)(""); const displayRequests = useRequestVersion(); const snapshotRef = (0, react.useRef)(null); snapshotRef.current = snapshot; const selectedRef = (0, react.useRef)(null); selectedRef.current = selected; const revisionRef = (0, react.useRef)(props.revision); revisionRef.current = props.revision; const fetchedSignatureRef = (0, react.useRef)(null); const queryRef = (0, react.useRef)(query); queryRef.current = query; const statusRef = (0, react.useRef)(status); statusRef.current = status; const activeSearchRef = (0, react.useRef)(false); const adoptMutatedDocument = (0, react.useCallback)((candidate) => { if (typeof candidate === "object" && candidate !== null && "content" in candidate && typeof candidate.content === "string") { const view = candidate; selectedRef.current = view; if (view.fileRevision !== void 0 || props.client.deleteDocument === void 0) fetchedSignatureRef.current = `${revisionRef.current}:${view.id}:${view.revision}:${view.contentHash}`; setSelected(view); } }, [props.client.deleteDocument]); const display = (0, react.useCallback)(async (nextQuery, nextStatus, preferred, reloadIndex = false) => { const request = displayRequests.begin(); activeSearchRef.current = nextQuery.trim() !== ""; setLoading(true); setError(null); setVisibleLimit(pageSize); try { let current; let records; if (nextQuery.trim() === "") { current = await props.client.documents(); records = current.documents; } else if (snapshotRef.current !== null && !reloadIndex) { const existing = snapshotRef.current; const searchResponse = await props.client.searchDocuments(nextQuery, nextStatus === "archived"); const byId = new Map(searchResponse.results.map((item) => [item.id, item])); const mergedDocuments = existing.documents.map((document) => { const hit = byId.get(document.id); return hit === void 0 ? document : { ...document, ...hit, healthy: document.healthy }; }); for (const item of searchResponse.results) if (!existing.documents.some((document) => document.id === item.id)) mergedDocuments.push({ ...item, healthy: true }); current = { ...existing, ...typeof searchResponse.revision === "string" ? { revision: searchResponse.revision } : {}, documents: mergedDocuments }; records = searchResponse.results; } else { const [searchResponse, loadedSnapshot] = await Promise.all([props.client.searchDocuments(nextQuery, nextStatus === "archived"), props.client.documents()]); current = typeof searchResponse.revision === "string" ? { ...loadedSnapshot, revision: searchResponse.revision } : loadedSnapshot; records = searchResponse.results; } const filtered = records.filter((record) => record.status === nextStatus).sort((left, right) => Date.parse(right.createdAt) - Date.parse(left.createdAt)); if (!displayRequests.isCurrent(request)) return; const refreshStamp = revisionRef.current; snapshotRef.current = current; setSnapshot(current); setLoadedRevision(refreshStamp); setItems(filtered); if (preferred?.document !== void 0 && filtered.some((record) => record.id === preferred.id)) adoptMutatedDocument(preferred.document); setSelectedId((previous) => { const candidate = preferred?.id ?? previous; return candidate !== null && filtered.some((record) => record.id === candidate) ? candidate : filtered[0]?.id ?? null; }); } catch (reason) { if (!displayRequests.isCurrent(request)) return; snapshotRef.current = null; setError(message(reason)); setSnapshot(null); setItems([]); setSelectedId(null); } finally { if (displayRequests.isCurrent(request)) setLoading(false); } }, [ adoptMutatedDocument, displayRequests, pageSize, props.client ]); (0, react.useEffect)(() => { display(queryRef.current, statusRef.current, void 0, true); }, [display, props.revision]); (0, react.useEffect)(() => { if (selectedId === null) { setSelected(null); return; } if (snapshot === null) return; const record = snapshot.documents.find((document) => document.id === selectedId); if (record === void 0) { setSelected(null); return; } const currentSelected = selectedRef.current; const recordSignature = `${loadedRevision}:${record.id}:${record.revision}:${record.contentHash}`; if (currentSelected !== null && currentSelected.id === record.id && fetchedSignatureRef.current === recordSignature && currentSelected.revision === record.revision && currentSelected.contentHash === record.contentHash && currentSelected.updatedAt === record.updatedAt && currentSelected.status === record.status && currentSelected.title === record.title && currentSelected.description === record.description) return; let active = true; const requestRevision = loadedRevision; setFailedSelectedId(null); props.client.document(selectedId).then((value) => { if (!active) return; fetchedSignatureRef.current = `${requestRevision}:${value.id}:${value.revision}:${value.contentHash}`; selectedRef.current = value; setSelected(value); }).catch((reason) => { if (!active) return; setFailedSelectedId(selectedId); setError(message(reason)); }); return () => { active = false; }; }, [ loadedRevision, props.client, selectedId, snapshot ]); (0, react.useLayoutEffect)(() => { if (readerRef.current !== null) readerRef.current.scrollTop = 0; }, [selectedId]); (0, react.useEffect)(() => { if (selectedId === null) return; const index = items.findIndex((item) => item.id === selectedId); if (index >= visibleLimit) setVisibleLimit(Math.ceil((index + 1) / pageSize) * pageSize); }, [ items, pageSize, selectedId, visibleLimit ]); const resetComposer = () => { setTitle(""); setDescription(""); setContent(""); setSources(""); setComposing(false); }; const startComposer = () => { setTitle(""); setDescription(""); setContent(""); setSources(""); setEditing(false); setComposing(true); }; const sourcePaths = (value) => value.split(/\r?\n|,/gu).map((path) => path.trim()).filter(Boolean); const changeStatus = (nextStatus) => { if (status === nextStatus) return; setStatus(nextStatus); display(query, nextStatus); }; const create = async (event) => { event.preventDefault(); setSaving(true); setError(null); setNotice(null); try { const result = await props.client.mutateDocument({ action: "create", title, description, content, sourcePaths: sourcePaths(sources) }); setNotice(result.maintenance === void 0 ? t("documents.created") : t("documents.createdAfterArchive", { count: result.maintenance.archivedDocumentIds.length })); setStatus("active"); setQuery(""); resetComposer(); await display("", "active", { id: result.document.id, document: result.document }); props.onMutate?.(); } catch (reason) { setError(message(reason)); } finally { setSaving(false); } }; const activeSelected = selected !== null && selected.id === selectedId ? selected : null; const loadingSelected = selectedId !== null && failedSelectedId !== selectedId && (selected === null || selected.id !== selectedId) && items.some((item) => item.id === selectedId); const beginEdit = () => { if (activeSelected === null) return; setTitle(activeSelected.title); setDescription(activeSelected.description); setContent(activeSelected.content); setSources(activeSelected.sourcePaths.join("\n")); setEditing(true); setComposing(false); setConfirmArchive(false); }; const update = async (event) => { event.preventDefault(); if (activeSelected === null) return; setSaving(true); setError(null); setNotice(null); try { const result = await props.client.mutateDocument({ action: "update", id: activeSelected.id, title, description, content, sourcePaths: sourcePaths(sources) }); setNotice(result.maintenance === void 0 ? t("documents.updated") : t("documents.updatedAfterArchive", { count: result.maintenance.archivedDocumentIds.length })); setEditing(false); await display(query, status, { id: result.document.id, document: result.document }); props.onMutate?.(); } catch (reason) { setError(message(reason)); } finally { setSaving(false); } }; const archive = async () => { if (activeSelected === null) return; setSaving(true); setError(null); setNotice(null); try { const result = await props.client.archiveDocument(activeSelected.id); const spaces = result.maintenance?.memoryBodyIds ?? []; setNotice(spaces.length === 0 ? t("documents.archivedLocally") : t("documents.archived", { spaces: spaces.join(", ") })); setConfirmArchive(false); setStatus("archived"); setQuery(""); await display("", "archived", { id: result.document.id, document: result.document }); props.onMutate?.(); } catch (reason) { setError(message(reason)); } finally { setSaving(false); } }; const remove = async () => { if (!props.writeEnabled || deleteTarget?.document.fileRevision === void 0 || props.client.deleteDocument === void 0) return; setSaving(true); setDeleteError(null); setError(null); setNotice(null); try { await props.client.deleteDocument(deleteTarget.document.id, deleteTarget.revision, deleteTarget.document.fileRevision); setDeleteTarget(null); setSelected(null); setSelectedId(null); setNotice(t("documents.deleted")); await display(query, status); props.onMutate?.(); } catch (reason) { setDeleteError(message(reason)); } finally { setSaving(false); } }; const usage = snapshot === null ? 0 : Math.min(100, snapshot.activeBytes / snapshot.limitBytes * 100); const activeCount = snapshot?.activeCount ?? 0; const archivedCount = snapshot?.archivedCount ?? 0; const selectedRecord = snapshot?.documents.find((document) => document.id === activeSelected?.id); const selectedIsCurrent = activeSelected?.fileRevision !== void 0 && selectedRecord?.revision === activeSelected.revision && selectedRecord.contentHash === activeSelected.contentHash && selectedRecord.status === activeSelected.status; const composer = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { id: documentCreateFormId, className: css$2.documentEditor, onSubmit: (event) => void create(event), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("documents.newTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("documents.editorHint") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("documents.managedCopy") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.documentEditorMeta, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("documents.name"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { value: title, onChange: (event) => setTitle(event.target.value), required: true })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("documents.routing"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { value: description, onChange: (event) => setDescription(event.target.value) })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("documents.sources"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { value: sources, onChange: (event) => setSources(event.target.value), placeholder: t("documents.sourcesPlaceholder") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("documents.markdown"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { value: content, onChange: (event) => setContent(event.target.value), rows: 10, required: true })] }) ] }); const editComposer = activeSelected === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { id: documentEditFormId, className: css$2.documentEditor, onSubmit: (event) => void update(event), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("documents.editTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("documents.editorHint") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: activeSelected.id })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.documentEditorMeta, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("documents.name"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { value: title, onChange: (event) => setTitle(event.target.value), required: true })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("documents.routing"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { value: description, onChange: (event) => setDescription(event.target.value) })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("documents.sources"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { value: sources, onChange: (event) => setSources(event.target.value) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("documents.markdown"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { value: content, onChange: (event) => setContent(event.target.value), rows: 18, required: true })] }) ] }); const documentEditActionClass = appearanceClass(css$2.ghostButton, appearanceClass(sidebarCss$1.itemActionButton, sidebarCss$1.itemEditAction)); const documentArchiveActionClass = appearanceClass(css$2.dangerButton, appearanceClass(sidebarCss$1.itemActionButton, sidebarCss$1.itemDangerAction)); const visibleItems = items.slice(0, visibleLimit); const selectDocument = (documentId) => { if (selectedId === documentId) return; setSelected(null); setFailedSelectedId(null); setSelectedId(documentId); setEditing(false); setConfirmArchive(false); setDeleteTarget(null); }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.page, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageHeader, { title: t("documents.title"), description: t("documents.description"), meta: snapshot === null ? t("common.loading") : t("documents.capacity", { used: humanBytes(snapshot.activeBytes), limit: humanBytes(snapshot.limitBytes) }), ...props.writeEnabled && (props.canCreate ?? props.sessionId !== void 0) ? { action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$2.primaryButton, onClick: startComposer, children: t("documents.new") }) } : {} }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: error === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$2.inlineError, role: "alert", children: error }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: notice === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$2.runtimeNotice, role: "status", children: notice }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$2.documentSummary, "aria-label": t("documents.summary"), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("documents.active") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: activeCount }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("documents.activeHint") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("documents.archivedCount") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: archivedCount }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("documents.archivedHint") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { className: css$2.documentCapacity, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("documents.activeCapacity") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: snapshot === null ? "—" : `${usage.toFixed(1)}%` }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { style: { width: `${usage}%` } }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("documents.capacityHint") }) ] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css$2.documentToolbar, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { onSubmit: (event) => { event.preventDefault(); display(query, status); }, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchField, { className: css$2.documentSearch, label: t("documents.searchAria"), value: query, onChange: (event) => { const next = event.target.value; const hadQuery = query.trim() !== ""; setQuery(next); if (hadQuery && next === "" && activeSearchRef.current) display("", status); }, placeholder: t("documents.searchPlaceholder") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", className: css$2.secondaryButton, children: t("documents.search") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { role: "group", "aria-label": t("documents.scope"), style: { "--dsh-segment-count": 2, "--dsh-segment-index": status === "active" ? 0 : 1 }, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", "data-active": status === "active" || void 0, onClick: () => changeStatus("active"), children: [ t("documents.active"), " ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", { children: activeCount }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", "data-active": status === "archived" || void 0, onClick: () => changeStatus("archived"), children: [ t("documents.archivedCount"), " ", /* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", { children: archivedCount }) ] })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.documentWorkspace, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", { className: css$2.documentList, "aria-label": t("documents.list"), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: status === "active" ? t("documents.activeList") : t("documents.archiveList") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: items.length })] }), visibleItems.map((document) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", "aria-pressed": selectedId === document.id, "data-selected": selectedId === document.id || void 0, onClick: () => selectDocument(document.id), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: document.title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("time", { dateTime: document.createdAt, children: new Date(document.createdAt).toLocaleDateString(locale) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: document.description || document.excerpt || t("documents.noDescription") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: humanBytes(document.sizeBytes) }), document.healthy === false && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { children: t("documents.missing") })] }) ] }, document.id)), !loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ProgressiveFooter, { compact: true, visible: visibleItems.length, total: items.length, pageSize, onMore: () => setVisibleLimit((value) => value + pageSize) }), !loading && items.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.documentListEmpty, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "▤" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: status === "active" ? t("documents.emptyActive") : t("documents.emptyArchived") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: status === "active" ? t("documents.emptyActiveText") : t("documents.emptyArchivedText") }) ] }), loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$2.loading, children: t("common.loading") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", { ref: readerRef, className: css$2.documentReader, "aria-label": t("documents.reader"), "data-scroll-region": "", children: activeSelected !== null ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { className: css$2.documentDetail, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: activeSelected.status === "active" ? t("documents.active") : t("documents.coldArchive") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: activeSelected.title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: activeSelected.description || t("documents.noDescription") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.documentActions, children: [props.writeEnabled && activeSelected.status === "active" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: documentEditActionClass, onClick: beginEdit, children: t("documents.edit") }), props.writeEnabled && props.client.deleteDocument !== void 0 && snapshot !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: documentArchiveActionClass, disabled: !selectedIsCurrent, onClick: () => { setDeleteError(null); setDeleteTarget({ document: activeSelected, revision: snapshot.revision }); }, children: t("documents.delete") })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dl", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("documents.path") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PathText, { path: activeSelected.relativePath }) }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("documents.revision") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: activeSelected.revision })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("documents.hash") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: activeSelected.contentHash.slice(0, 16) }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("documents.size") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: humanBytes(activeSelected.sizeBytes) })] }) ] }), activeSelected.sourcePaths.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.documentSources, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("documents.sources") }), activeSelected.sourcePaths.map((path) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PathText, { path }) }, path))] }), activeSelected.status === "archived" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.documentArchiveReceipt, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t(activeSelected.memoryBodyIds.length === 0 ? "documents.archiveNote" : "documents.archiveReceipt") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: activeSelected.archiveSummary }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: activeSelected.memoryBodyIds.map((id) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: id }, id)) }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DocumentMarkdown, { content: activeSelected.content }), props.writeEnabled && activeSelected.status === "active" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("footer", { className: css$2.documentDanger, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("documents.archiveTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("documents.archiveDescription") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: documentArchiveActionClass, onClick: () => setConfirmArchive(true), children: t("documents.archive") })] }) }) ] }) : loadingSelected || loading && items.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.loading, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SectionSpinner, { label: t("common.loading") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("common.loading") })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: "▤", title: t("documents.selectTitle"), children: t("documents.selectText") }) })] }), composing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("documents.newTitle"), description: t("documents.editorHint"), busy: saving, onClose: resetComposer, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, className: css$2.secondaryButton, disabled: saving, onClick: resetComposer, children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", form: documentCreateFormId, className: css$2.primaryButton, disabled: saving || title.trim() === "" || content.trim() === "", children: saving ? t("documents.saving") : t("documents.create") })] }), children: composer }), editing && activeSelected !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("documents.editTitle"), description: activeSelected.title, busy: saving, onClose: () => setEditing(false), footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, className: css$2.secondaryButton, disabled: saving, onClick: () => setEditing(false), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "submit", form: documentEditFormId, className: css$2.primaryButton, disabled: saving, children: saving ? t("documents.saving") : t("documents.save") })] }), children: editComposer }), confirmArchive && activeSelected !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("documents.archiveConfirm"), description: activeSelected.title, busy: saving, onClose: () => setConfirmArchive(false), footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, "data-autofocus": true, className: css$2.secondaryButton, disabled: saving, onClick: () => setConfirmArchive(false), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$2.dangerSolidButton, disabled: saving, onClick: () => void archive(), children: saving ? t("documents.archiving") : t("documents.archiveNow") })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.bodyDeleteConfirm, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("documents.archiveDescription") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.bodyDeleteSummary, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: activeSelected.title }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [ activeSelected.relativePath, " · ", humanBytes(activeSelected.sizeBytes) ] })] })] }) }), deleteTarget !== null && props.writeEnabled && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("documents.deleteConfirm"), description: deleteTarget.document.title, busy: saving, onClose: () => setDeleteTarget(null), footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.modalFooterActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", "data-dialog-close": true, "data-autofocus": true, className: css$2.secondaryButton, disabled: saving, onClick: () => setDeleteTarget(null), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css$2.dangerSolidButton, disabled: saving, onClick: () => void remove(), children: saving ? t("documents.deleting") : t("documents.deleteNow") })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.bodyDeleteConfirm, children: [ deleteError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css$2.inlineError, role: "alert", children: deleteError }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("documents.deleteDescription") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css$2.bodyDeleteSummary, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: deleteTarget.document.title }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [ deleteTarget.document.relativePath, " · ", humanBytes(deleteTarget.document.sizeBytes) ] })] }) ] }) }) ] }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-documents/src/client/ui.tsx function documentsPageClient(management) { let latestRevision = management.revision; const client = createMemorySourcePageClient({ ...management, read: async (operation, input, options) => { const response = await management.read(operation, input, options); if (typeof response.revision === "string") latestRevision = response.revision; return response; } }); return { documents: () => client.read("snapshot", null, { coalesce: true }), document: (id) => client.read("document", { id }), searchDocuments: async (query, includeArchived = false, limit = 50) => { const result = await client.read("search", { query, includeArchived, limit }); return latestRevision === void 0 ? result : { ...result, revision: latestRevision }; }, mutateDocument: (input) => input.action === "delete" ? client.mutate("delete", { id: input.id, ...input.fileRevision === void 0 ? {} : { fileRevision: input.fileRevision } }, true) : client.canAssist("mutate") ? client.assist("mutate", { ...input }, true) : client.mutate("mutate", { ...input }, true), archiveDocument: (id) => client.canAssist("archive") ? client.assist("archive", { id }, true) : client.mutate("archive", { id }, true), deleteDocument: async (id, expectedRevision, fileRevision) => (await management.mutate("delete", { id, fileRevision }, { confirmed: true, expectedRevision })).value }; } function DocumentsSourceView(props) { const client = (0, react.useMemo)(() => props.management === void 0 ? void 0 : documentsPageClient(props.management), [props.management]); const [revision, setRevision] = (0, react.useState)(0); const lastRefreshKey = (0, react.useRef)(props.refreshKey); const suppressRefreshEcho = (0, react.useRef)(false); (0, react.useEffect)(() => { if (lastRefreshKey.current === props.refreshKey) return; lastRefreshKey.current = props.refreshKey; if (suppressRefreshEcho.current) { suppressRefreshEcho.current = false; return; } setRevision((value) => value + 1); }, [props.refreshKey]); const handleMutate = (0, react.useCallback)(() => { if (props.onRefresh === void 0) return; suppressRefreshEcho.current = true; props.onRefresh(); setTimeout(() => { suppressRefreshEcho.current = false; }, 0); }, [props.onRefresh]); if (client === void 0) return null; const navigation = props.navigationInput; const focus = typeof navigation === "object" && navigation !== null && !Array.isArray(navigation) && typeof navigation.seed === "string" && navigation.seed !== "" ? navigation : void 0; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DocumentsPage, { ...focus === void 0 ? {} : { documentId: focus.seed }, canCreate: true, client, revision, writeEnabled: props.writable === true, onMutate: handleMutate }, typeof focus?.nonce === "number" ? focus.nonce : 0); } function DocumentsSourcePage(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemorySourcePageFrame, { locale: props.locale, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DocumentsSourceView, { ...props }, props.sourceInstanceKey) }); } function installDocumentsMemoryUI(ctx, t = translateEn) { return installMemorySourceUI(ctx, { sourceTypeId: "documents", pages: [{ id: "library", order: 200, navigation: { group: "storage", glyph: "▤" }, label: () => t("nav.documents"), component: DocumentsSourcePage }] }); } function apply$2(ctx) { installDocumentsMemoryUI(ctx, ctx.locale.bind("mnemon")); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/client/api.ts function json(value) { if (value === void 0 || value === null) return null; if (typeof value === "string" || typeof value === "number" || typeof value === "boolean") return value; if (Array.isArray(value)) return value.map((item) => item === void 0 ? null : json(item)); if (typeof value === "object") { const out = {}; for (const [key, entry] of Object.entries(value)) if (entry !== void 0) out[key] = json(entry); return out; } return null; } const CONFLICT = /revision conflict|Skills Source changed since it was read; reload/u; const MAX_TRAJECTORY_CACHE = 64; function skillsPageClient(management) { let cachedRevision = typeof management.revision === "string" && management.revision !== "" ? management.revision : void 0; let preferencesPromise; const trajectoryCache = /* @__PURE__ */ new Map(); const trajectoryInFlight = /* @__PURE__ */ new Map(); let waveOverviewRevision; let waveOtherRevisions = /* @__PURE__ */ new Set(); let waveIdleObserved = false; let waveLateStaleCallback; const recordRevision = (revision) => { if (typeof revision === "string" && revision !== "") cachedRevision = revision; }; const read = async (operation, input = null, coalesce = false) => { const response = await management.read(operation, json(input), { coalesce }); recordRevision(response.revision); if (typeof response.revision === "string" && response.revision !== "") { if (operation === "overview") waveOverviewRevision = response.revision; else { waveOtherRevisions.add(response.revision); if (waveIdleObserved && waveOverviewRevision !== void 0 && response.revision !== waveOverviewRevision) { waveIdleObserved = false; const notify = waveLateStaleCallback; waveLateStaleCallback = void 0; notify?.(); } } } return response.value; }; const fresh = async () => { const response = await management.read("revision", null); recordRevision(response.revision); return response.revision; }; const retry = async (attempt) => { for (let count = 1;; count++) { const revision = cachedRevision ?? await fresh(); try { const response = await attempt(revision); recordRevision(response.revision); return response.value; } catch (error) { if (count >= 3 || !CONFLICT.test(error instanceof Error ? error.message : String(error))) throw error; cachedRevision = void 0; } } }; const mutate = (operation, input) => retry((revision) => management.mutate(operation, json(input), { confirmed: true, expectedRevision: revision })); const assist = (operation, input) => { if (management.assistance?.operations.includes(operation) !== true) return Promise.reject(/* @__PURE__ */ new Error("a task Agent is not available for this action")); return retry((revision) => management.assistance.execute(operation, json(input), { expectedRevision: revision, confirmed: true })); }; const readDraftPreferences = () => { preferencesPromise ??= read("draft-preferences").catch((error) => { preferencesPromise = void 0; throw error; }); return preferencesPromise; }; const writeDraftPreferences = (payload) => mutate("draft-preference", payload).then((next) => { preferencesPromise = Promise.resolve(next); return next; }, (error) => { preferencesPromise = void 0; throw error; }); const readTrajectory = (id) => { const cached = trajectoryCache.get(id); if (cached !== void 0) { trajectoryCache.delete(id); trajectoryCache.set(id, cached); return Promise.resolve(cached); } const existing = trajectoryInFlight.get(id); if (existing !== void 0) return existing; const request = read("trajectory", { id }).then((value) => { trajectoryInFlight.delete(id); trajectoryCache.delete(id); trajectoryCache.set(id, value); while (trajectoryCache.size > MAX_TRAJECTORY_CACHE) { const oldest = trajectoryCache.keys().next().value; if (oldest === void 0) break; trajectoryCache.delete(oldest); } return value; }, (error) => { trajectoryInFlight.delete(id); throw error; }); trajectoryInFlight.set(id, request); return request; }; const evictTrajectory = (id) => { trajectoryCache.delete(id); trajectoryInFlight.delete(id); }; const savedModel = async (slot, input) => { if (input.provider !== void 0 || input.model !== void 0) return void 0; const preferences = await readDraftPreferences(); const overrides = slot === "draft" ? preferences.suggestionModels : preferences.skillRunModels; const key = slot === "draft" ? input.suggestionId : input.skillName; return key !== void 0 && Object.hasOwn(overrides, key) ? overrides[key] : slot === "draft" ? preferences.model : preferences.runModel; }; return { overview: () => read("overview", null, true), catalog: () => read("catalog", null, true), skill: (key) => read("skill", { key }), version: (key, id) => read("version", { key, id }), suggestions: (status) => read("suggestions", status === void 0 ? {} : { status }, true), suggestion: (id) => read("suggestion", { id }), trajectories: (filter) => read("trajectories", filter ?? {}, true).then((list) => { for (const summary of list) { const cached = trajectoryCache.get(summary.id); if (cached !== void 0 && (cached.pinned !== summary.pinned || cached.suggestionIds.length !== summary.suggestionIds.length || cached.suggestionIds.some((id, index) => id !== summary.suggestionIds[index]))) trajectoryCache.delete(summary.id); } return list; }), trajectory: readTrajectory, cases: (skill) => read("cases", skill === void 0 ? {} : { skill }, true), runs: (skill) => read("runs", skill === void 0 ? {} : { skill }, true), run: (id) => read("run", { id }), draft: (id) => read("draft", { id }), reviews: (filter) => read("reviews", filter ?? {}, true), evidencePack: (input) => read("evidence-pack", input), createSkill: (input) => mutate("skill-create", input), saveSkill: (key, content, expectedHash) => mutate("skill-save", { key, content, expectedHash }), setInvocation: (key, invocation, expectedHash) => mutate("skill-invocation", { key, ...invocation, expectedHash }), deleteSkill: (key, expectedHash) => mutate("skill-delete", { key, expectedHash }), trash: () => read("trash-list"), previewTrashRestore: (input) => read("trash-restore-preview", input), restoreTrash: (input) => mutate("trash-restore", input), purgeTrash: (id) => mutate("trash-purge", { id }), emptyTrash: () => mutate("trash-empty", {}), restoreVersion: (key, versionId, expectedHash) => mutate("version-restore", { key, versionId, expectedHash }), dismissSuggestion: (id) => mutate("suggestion-dismiss", { id }), deleteSuggestion: (id) => { for (const [trajectoryId, cached] of trajectoryCache.entries()) if (cached.suggestionIds.includes(id)) trajectoryCache.delete(trajectoryId); trajectoryInFlight.clear(); return mutate("suggestion-delete", { id }); }, deleteDraft: (id) => mutate("draft-delete", { id }), pinTrajectory: (id, pinned) => { evictTrajectory(id); return mutate("trajectory-pin", { id, pinned }); }, deleteTrajectory: (id) => { evictTrajectory(id); return mutate("trajectory-delete", { id }); }, saveCase: (input) => mutate("case-save", { case: input }), deleteCase: (id) => mutate("case-delete", { id }), updateDraft: (id, content) => mutate("draft-update", { id, content }), cancelRun: (id) => mutate("run-cancel", { id }), adoptDraft: (id, root) => mutate("draft-adopt", root === void 0 ? { id } : { id, root }), discardDraft: (id) => mutate("draft-discard", { id }), linkRun: (draftId, runId) => mutate("run-link", { draftId, runId }), draftPreferences: readDraftPreferences, saveDraftModel: (model) => writeDraftPreferences({ model }), saveSuggestionModel: (id, model) => writeDraftPreferences({ suggestionId: id, model }), saveRunModel: (model) => writeDraftPreferences({ slot: "run", model }), saveSkillRunModel: (skillName, model) => writeDraftPreferences({ slot: "run", skillName, model }), models: () => management.models === void 0 ? Promise.reject(/* @__PURE__ */ new Error("model catalog is unavailable")) : management.models(), market: () => read("market"), marketPreview: (registryId, name) => read("market-preview", { registryId, name }), searchMarket: (query) => read("market-search", { query }), refreshMarket: (ids) => mutate("market-refresh", ids === void 0 ? {} : { ids }), installMarket: (input) => mutate("market-install", input), addRegistry: (location) => mutate("registry-add", { location }), removeRegistry: (id) => mutate("registry-remove", { id }), toggleRegistry: (id, enabled) => mutate("registry-toggle", { id, enabled }), canAssist: (operation) => management.assistance?.operations.includes(operation) === true, generateDraft: async (input) => assist("skill-draft", { ...await savedModel("draft", input), ...input }), backtest: async (input) => assist("skill-backtest", { ...await savedModel("run", input), ...input }), deriveCases: (input) => assist("skill-derive-cases", input), reviewNow: () => { trajectoryCache.clear(); trajectoryInFlight.clear(); return assist("skill-review-now", {}); }, invalidatePreferences: () => { preferencesPromise = void 0; }, beginReadWave: (onLateStaleRead) => { waveOverviewRevision = void 0; waveOtherRevisions = /* @__PURE__ */ new Set(); waveIdleObserved = false; waveLateStaleCallback = onLateStaleRead; }, markWaveIdleAndCheckStale: () => { const stale = waveOverviewRevision !== void 0 && [...waveOtherRevisions].some((rev) => rev !== waveOverviewRevision); waveIdleObserved = !stale; if (stale) waveLateStaleCallback = void 0; return stale; } }; } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/presentation/locales.json var locales_default = { zh: { "page.title": "技能管理", "page.description": "DSH 技能的管理与自进化", "page.readOnly": "只读", "tabs.aria": "技能管理分页", "tabs.waiting": "{count} 项待处理", "tabs.trash": "{count} 项待清理", "tab.skills": "技能", "tab.evolution": "进化", "tab.evals": "评测", "tab.market": "市场", "tab.trash": "回收站", "common.loading": "加载中", "common.retry": "重试", "common.cancel": "取消", "common.close": "关闭", "common.delete": "删除", "common.edit": "编辑", "common.save": "保存", "common.saving": "保存中", "common.more": "更多", "common.view": "查看", "common.settings": "设置", "time.justNow": "刚刚", "time.minutes": "{count} 分钟前", "time.hours": "{count} 小时前", "time.days": "{count} 天前", "root.project-dsh": "项目", "root.project-agents": "项目 · .agents", "root.user-dsh": "用户", "root.user-agents": "用户 · .agents", "skills.search": "搜索技能", "skills.new": "新建", "skills.noMatch": "没有匹配的技能", "skills.problems": "{count} 个文件无法加载", "skills.empty": "还没有技能", "skills.emptyBody": "新建一个,或从市场安装。", "skills.browseMarket": "去市场", "skills.select": "选择一个技能", "skills.selectBody": "在左侧选择后查看内容。", "skills.use": "使用", "skills.useHint": "在对话中使用 /{name}", "skills.used": "已放入输入框:/{name}", "skills.noConversation": "打开一个对话后再使用技能", "skills.toggle": "启用 {name}", "skills.linked": "链接 · 只读", "skills.linkedReadOnly": "此链接技能默认只读;可在技能设置中对可信目录开启写回,或改用本地副本。", "skills.shadowed": "被覆盖", "skills.shadowedBy": "DSH 加载的是同名的 {key},这个文件不会生效。", "skills.waitingCount": "{count} 条改进建议待处理", "skills.files": "文件", "skills.improve": "改进草案", "skills.improveTitle": "改进 {name}", "skills.improveNote": "想改什么(可选)", "skills.improvePlaceholder": "例如:发布说明按模块分组", "skills.improveStart": "起草", "skills.improveStarted": "正在生成草案,完成后在「进化」中查看", "skills.remove": "移除", "skills.removeTitle": "移除 {name}?", "skills.removeBody": "技能会移到「回收站」页,可以随时恢复,也可以在那里彻底删除。", "skills.removed": "已移除 {name}", "skills.deleted": "已删除 {name}", "invocation.label": "调用", "invocation.both": "自动 + /", "invocation.slash": "仅 /", "invocation.model": "仅自动", "invocation.off": "关闭", "invocation.slashShort": "仅 /", "invocation.modelShort": "仅自动", "editor.title": "编辑 {name}", "create.title": "新建技能", "create.name": "名称", "create.nameHint": "小写字母、数字和连字符", "create.description": "描述", "create.descriptionHint": "做什么、什么时候用;DSH 据此决定是否加载", "create.root": "位置", "create.submit": "创建", "versions.title": "版本", "versions.empty": "还没有版本", "versions.current": "当前", "versions.compare": "对比", "versions.compareTitle": "与 {time} 的版本对比", "versions.restore": "恢复", "tests.title": "测试", "tests.count": "{count} 个用例", "tests.lastScore": "上次 {score} 分", "tests.run": "回测", "tests.running": "回测中", "tests.add": "添加用例", "tests.empty": "还没有用例。复盘时会自动沉淀,也可以手动添加。", "tests.checks": "{count} 项检查", "tests.must": "必须", "tests.should": "建议", "tests.origin": "来源对话", "tests.enabled": "启用用例 {title}", "tests.progress": "回测中 {done}/{total}", "tests.score": "{score} 分", "tests.errors": "{count} 个未能运行", "tests.unmeasured": "{count} 个未测", "tests.withoutSkill": "无技能", "tests.deleteTitle": "删除这个用例?", "tests.newTitle": "添加用例", "tests.editTitle": "编辑用例", "tests.case": "用例", "tests.caseTitle": "标题", "tests.prompt": "任务", "tests.promptHint": "用户会怎么说", "tests.context": "背景(可选)", "tests.requiresVision": "依赖图片输入", "tests.requiresVisionHint": "纯文本回测无法接收图片;勾选后标为未测,不计入评分与比较。", "tests.checksLabel": "检查项", "tests.checkPlaceholder": "结果应当……", "tests.addCheck": "添加", "run.steps": "执行步骤", "run.answer": "回答", "evolution.pending": "待处理", "evolution.pendingCount": "待处理 {count}", "evolution.done": "已处理", "evolution.reviewNow": "立即复盘", "evolution.reviewFound": "复盘完成:{count} 条建议", "evolution.reviewNothing": "复盘完成:没有新的建议", "evolution.off": "自进化未开启", "evolution.offBody": "开启后,对话结束会在后台复盘,提出技能建议。", "evolution.turnOn": "开启", "evolution.empty.pending": "暂无待处理", "evolution.emptyBody.pending": "有新的建议时会出现在这里。", "evolution.empty.done": "暂无记录", "evolution.emptyBody.done": "采纳或忽略的建议会留在这里。", "evolution.empty.evidence": "暂无证据", "evolution.emptyBody.evidence": "复盘读过的对话会留在这里。", "evolution.from": "来自「{session}」", "evolution.confidence": "置信度 {value}%", "evolution.draft": "起草", "evolution.dismiss": "忽略", "evolution.dismissed": "已忽略", "evolution.noAgent": "当前没有可用的任务 Agent", "evolution.drafting": "正在生成草案", "evolution.draftFailed": "草案生成失败:{error}", "evolution.skillGone": "原技能文件已删除、移动或无法读取。请恢复文件,或在新位置打开技能并重新生成草案。", "evolution.originUnavailable": "旧记录未可靠保存原工作区。请切换到原工作区,在技能页打开该技能并重新生成草案;现有草案和证据会保留。", "evolution.currentSkill": "当前技能文件", "evolution.skillChanged": "技能在建议之后被改过,生成草案前会以当前版本为准。", "evolution.adopted": "已采纳", "evolution.openSkill": "查看技能", "evolution.evidence": "证据", "evolution.evidenceMeta": "{conversations} 段对话 · {steps} 步", "evolution.evidenceGone": "这段对话记录已删除。", "evolution.openRecord": "完整记录", "draft.title": "草案", "evolution.targetRoot": "建议位置:{root}", "draft.writeTo": "写入", "draft.adopt": "采纳", "draft.discard": "放弃", "draft.edit": "编辑草案", "draft.redraft": "重写", "draft.redraftNote": "要怎么改", "draft.redraftPlaceholder": "例如:破坏性变更放在最前面", "draft.redraftStart": "重写", "draft.adopted": "已采纳,{name} 已更新", "draft.backtest": "回测", "draft.current": "当前", "draft.withoutSkill": "无技能", "draft.candidate": "草案", "draft.same": "持平", "draft.backtesting": "回测中 {done}/{total}", "draft.noTests": "没有测试用例,未回测", "draft.notTested": "还没有回测", "draft.notComparable": "回测结果无法比较", "draft.runBacktest": "回测", "draft.rerun": "重新回测", "draft.excluded": "{count} 个用例未能运行,未计入比较", "draft.runDetail": "草案的回测详情", "draft.adoptAnyway": "仍然采纳?", "draft.regressed": "草案的回测分数低于当前版本。", "records.stats": "{turns} 回合 · {tools} 次工具调用", "records.failures": "{count} 次失败", "records.pinned": "置顶", "records.pin": "置顶", "records.unpin": "取消置顶", "records.suggested": "{count} 条建议", "records.suggestion": "建议 {index}", "records.deriveAll": "生成用例", "records.deriveChosen": "从 {count} 步生成", "records.deriveFor": "用于技能", "records.derive": "生成", "records.derived": "已为 {name} 添加 {count} 个用例", "records.deleteTitle": "删除这段记录?", "records.deleteBody": "引用它的建议和用例会失去这段依据。", "evidence.skill": "技能", "evidence.allSkills": "全部技能", "evals.empty": "还没有技能", "evals.emptyBody": "创建或安装技能后,在这里为它写测试用例、跑回测。", "evals.tested": "有用例", "evals.untested": "无用例", "evals.off": "{count} 个已停用", "evals.notCreated": "未创建", "evals.notCreatedBody": "技能尚未创建,回测衡量的是没有它时的表现。", "evals.openSuggestion": "查看建议", "timeline.turn": "第 {turn} 轮", "timeline.user": "用户", "timeline.assistant": "回复", "timeline.tool": "工具", "timeline.skill": "技能", "timeline.failed": "失败", "market.search": "搜索技能", "market.category": "分类", "market.allCategories": "全部分类", "market.refresh": "刷新", "market.empty": "没有找到技能", "market.emptyBody": "换个关键词,或在「来源」里添加仓库、网站。", "market.preview": "查看 {name}", "market.install": "安装", "market.installing": "安装中", "market.update": "更新", "market.overwrite": "覆盖安装", "market.installTo": "安装到", "market.open": "查看技能", "market.installed": "已安装 {name}", "market.updated": "已更新 {name}", "market.state.installed": "已安装", "market.state.update": "可更新", "market.state.modified": "本地已修改", "market.state.conflict": "同名已存在", "market.state.available": "可安装", "market.version": "v{version}", "market.installedVersion": "已装 v{version}", "market.upstreamLicense": "上游许可", "market.trust": "技能可能包含可执行脚本;安装前请确认来源可信并审阅 SKILL.md。", "market.overwriteHint": "这个技能在本地改过,更新会覆盖改动(旧版本移入回收区)。", "market.files": "{count} 个文件 · {size}", "market.searchPlaceholder": "搜索技能,或粘贴 GitHub 仓库 / 网址", "market.sources": "来源 · {count}", "market.addAsSource": "{kind} · {label}", "market.listed": "已添加的来源 · {count}", "market.indexed": "skills.sh · {count}", "market.searching": "正在搜索 skills.sh", "market.searchFailed": "skills.sh 暂时无法搜索:{error}", "market.indexEmpty": "skills.sh 上没有匹配的技能。", "market.installs": "{count} 次安装", "market.audits": "安全审核", "market.audit.pass": "通过", "market.audit.warn": "需留意", "market.audit.fail": "未通过", "market.viewSource": "查看源文件", "market.partial": "GitHub 暂时无法访问,这是 skills.sh 保存的文本副本;安装时会从 GitHub 取回全部文件。", "sources.title": "来源", "sources.builtin": "内置", "sources.featured": "精选", "sources.kind.catalog": "技能目录", "sources.kind.well-known": "网站", "sources.kind.github": "GitHub 仓库", "sources.kind.search": "搜索", "sources.detected.catalog": "本地技能目录", "sources.detected.json": "JSON 文件", "sources.detected.github": "GitHub 仓库", "sources.detected.well-known": "网站", "sources.entries": "{count} 个技能", "sources.updated": "{time}更新", "sources.searchMeta": "开放技能目录,输入关键词时搜索", "sources.refresh": "刷新", "sources.remove": "移除", "sources.enabled": "启用 {name}", "sources.addTitle": "添加来源", "sources.placeholder": "owner/repo、网址或 JSON 地址", "sources.hint": "支持 GitHub 仓库、发布 Agent Skills 的网站,以及技能目录 JSON。", "sources.unknown": "无法识别,请输入 owner/repo、网址或 JSON 文件地址", "sources.duplicate": "这个来源已经添加过了", "sources.add": "添加", "sources.addAs": "添加为来源", "sources.adding": "添加中", "sources.added": "已添加 {name},共 {count} 个技能", "sources.done": "完成", "sources.formats": "支持哪些来源", "sources.format.github": "GitHub 仓库(owner/repo 或链接),收录其中全部 SKILL.md。", "sources.format.well-known": "发布 /.well-known/agent-skills/ 索引的网站。", "sources.format.catalog": "带分类与双语介绍的技能目录 JSON(URL 或本地路径)。", "signal.correction": "用户纠正", "signal.directive": "以后都这样", "signal.tool-failure": "工具失败", "signal.approach-change": "中途换方法", "signal.procedure": "可复用流程", "signal.skill-gap": "技能缺口", "signal.skill-misleading": "描述不准", "signal.success": "被认可的做法", "status.pending": "待处理", "status.drafting": "生成中", "status.review": "草案待审", "status.adopted": "已采纳", "status.dismissed": "已忽略", "status.expired": "已过期", "status.invalidated": "已失效", "action.create": "新建", "action.update": "改进", "versions.reason.original": "初始", "versions.reason.edit": "编辑", "versions.reason.evolution": "进化", "versions.reason.restore": "恢复", "versions.reason.invocation": "开关", "versions.reason.create": "新建", "run.status.running": "进行中", "run.status.completed": "完成", "run.status.failed": "失败", "run.status.interrupted": "中断", "run.verdict.pass": "通过", "run.verdict.fail": "未通过", "run.verdict.error": "出错", "run.verdict.unmeasured": "未测", "run.requiresVision": "此用例依赖图片输入,纯文本回测无法判定。未调用模型,不计入评分和基线比较。", "versions.reason.install": "安装", "diff.copy": "复制", "diff.copied": "已复制", "diff.collapse": "收起", "diff.expand": "展开其余 {count} 行", "diff.code": "SKILL.md", "diff.wrap": "自动换行", "diff.unwrap": "不换行", "common.less": "收起", "common.moreCount": "另 {count} 条", "tests.history": "回测记录", "trash.title": "回收站", "trash.body": "移除的技能还在磁盘上:可以恢复,也可以在这里彻底删除。", "trash.emptyTitle": "回收站是空的", "trash.emptyBody": "在「技能」页把技能「移除」后,它会先到这里。", "trash.meta": "{time} · {size}", "trash.restore": "恢复", "trash.restoreHint": "放回它原来所在的目录", "trash.restored": "已恢复 {name}", "trash.purge": "彻底删除", "trash.purgeTitle": "彻底删除 {name}?", "trash.purgeBody": "文件会从磁盘上删除,无法恢复。", "trash.purged": "已彻底删除 {name}", "trash.empty": "清空", "trash.clearTitle": "清空回收站里的 {count} 项?", "trash.clearBody": "这些文件会从磁盘上删除,无法恢复。", "trash.emptied": "已清空 {count} 项", "trash.file": "单个 Markdown 文件", "trash.bundle": "技能目录", "trash.restoreTitle": "恢复 {name}", "trash.chooseRoot": "请选择恢复位置", "trash.original": "原位置", "trash.chooseHint": "可选择恢复位置或改名。同名替换需要明确确认,现有技能会保留在回收站。", "trash.replace": "替换同名技能,并将现有版本保留在回收站", "trash.confirmName": "输入 {name} 确认彻底删除", "evolution.model": "全局模型", "evolution.modelCard": "当前模型", "evolution.modelAuto": "跟随默认", "evolution.modelAutoHint": "使用当前任务 Agent 的模型", "evolution.deleteTitle": "删除这条建议?", "evolution.deleteBody": "它生成的草案和证据引用会一起删掉,无法恢复。", "evolution.deleted": "已删除", "evolution.missing": "该建议已删除", "evolution.missingBody": "可以在左侧选择其他建议,或返回记录查看原始内容。", "evolution.loadFailed": "无法加载这条建议", "evolution.loadFailedBody": "请重试,或在左侧选择其他建议。", "tests.model": "全局模型", "tests.modelCard": "当前模型", "tests.modelAuto": "跟随默认", "draft.baseChanged": "原技能已变更,此草案已过期。请基于当前文件重新生成并回测。", "draft.targetExists": "同名技能已存在。请重新生成为改进草案并回测,再确认采纳。", "draft.refreshGuidance": "基于当前技能文件重新生成,保留最近的修改,并重新运行回测。", "draft.regenerate": "重写并回测", "draft.cancelBacktest": "取消回测", "draft.interrupted": "回测已中断。可以重新回测,或在检查草案后手动采纳。", "evolution.auto.title": "自动采纳", "evolution.auto.history": "自动采纳活动记录", "evolution.auto.attempt": "第 {count} 轮", "evolution.auto.scores": "基线 {baseline} / 草案 {draft}", "evolution.auto.stage.queued": "等待处理", "evolution.auto.stage.drafting": "正在起草", "evolution.auto.stage.backtesting": "正在对比回测", "evolution.auto.stage.rewriting": "依据退步结果重写", "evolution.auto.stage.adopted": "已自动采纳", "evolution.auto.stage.paused": "已停止自动处理", "evolution.auto.stage.review": "需要人工审查", "evolution.auto.reason.disabled": "自动采纳或所需权限已关闭", "evolution.auto.reason.no-cases": "没有启用的回测用例", "evolution.auto.reason.case-limit": "启用的用例超过每轮上限;调整用例或上限后手动处理本建议", "evolution.auto.reason.unmeasured": "回测未完整测出所有检查项,或存在图片依赖、错误、中断", "evolution.auto.reason.regressed": "至少一个用例或原先通过的检查项出现退步", "evolution.auto.reason.changed": "建议、草案或用例已变动", "evolution.auto.reason.failed": "自动处理失败,保留人工处理入口", "evolution.auto.reason.queue-full": "自动处理队列已满", "evolution.auto.reason.model-unavailable": "无法确定起草或回测模型", "evolution.auto.reason.interrupted": "Host 已停止,不自动重启此建议", "evolution.auto.reason.daily-limit": "今日候选额度已用完,请手动处理或等待下一天的新建议", "evolution.auto.reason.duplicate-skill": "今日已自动处理过同一技能目标,请手动处理", "triage.title": "复用价值参考", "triage.durable": "可复用流程", "triage.one-off": "一次性候选", "triage.uncertain": "需要判断", "triage.fold": "一次性候选({count})", "triage.choose": "展开一次性候选以查看建议", "triage.facts": "{windows} 段证据 · {sessions} 个会话 · {steps} 个引用步骤", "triage.rules": "≥3 段证据、≥20 步且置信度 ≥0.8 为可复用;1 段且 <20 步为一次性,其余待判断(仅影响排序与折叠)。", "triage.soft": "仅影响排序与折叠,所有建议均可手动处理。", "skills.linkedWritable": "更新会写回链接技能的原始文件,影响所有共享它的 Agent。可在技能设置中关闭。", "skills.linkedEditable": "链接", "markdown.footnotes": "脚注" }, en: { "page.title": "Skills", "page.description": "Your DSH skills and how they evolve", "page.readOnly": "Read-only", "tabs.aria": "Skills pages", "tabs.waiting": "{count} waiting", "tabs.trash": "{count:item|items} removed", "tab.skills": "Skills", "tab.evolution": "Evolution", "tab.evals": "Evals", "tab.market": "Market", "tab.trash": "Trash", "common.loading": "Loading", "common.retry": "Retry", "common.cancel": "Cancel", "common.close": "Close", "common.delete": "Delete", "common.edit": "Edit", "common.save": "Save", "common.saving": "Saving", "common.more": "More", "common.view": "View", "common.settings": "Settings", "time.justNow": "just now", "time.minutes": "{count} min ago", "time.hours": "{count} h ago", "time.days": "{count} d ago", "root.project-dsh": "Project", "root.project-agents": "Project · .agents", "root.user-dsh": "User", "root.user-agents": "User · .agents", "skills.search": "Search skills", "skills.new": "New", "skills.noMatch": "No matching skill", "skills.problems": "{count} {count:file|files} cannot load", "skills.empty": "No skills yet", "skills.emptyBody": "Create one, or install one from the market.", "skills.browseMarket": "Open market", "skills.select": "Choose a skill", "skills.selectBody": "Pick one on the left to see it.", "skills.use": "Use", "skills.useHint": "Use /{name} in the conversation", "skills.used": "Put /{name} in the input", "skills.noConversation": "Open a conversation to use a skill", "skills.toggle": "Turn on {name}", "skills.linked": "Linked · read-only", "skills.linkedReadOnly": "Linked skill is read-only; enable linked updates in settings for trusted targets, or copy locally.", "skills.shadowed": "Shadowed", "skills.shadowedBy": "DSH loads {key} of the same name; this file has no effect.", "skills.waitingCount": "{count} {count:improvement|improvements} waiting", "skills.files": "Files", "skills.improve": "Improve", "skills.improveTitle": "Improve {name}", "skills.improveNote": "What to change (optional)", "skills.improvePlaceholder": "For example: group release notes by module", "skills.improveStart": "Draft", "skills.improveStarted": "Drafting; it shows under Evolution when ready", "skills.remove": "Remove", "skills.removeTitle": "Remove {name}?", "skills.removeBody": "The skill moves to the Trash tab, where you can restore it or delete it for good.", "skills.removed": "Removed {name}", "skills.deleted": "Deleted {name}", "invocation.label": "Invocation", "invocation.both": "Auto + /", "invocation.slash": "/ only", "invocation.model": "Auto only", "invocation.off": "Off", "invocation.slashShort": "/ only", "invocation.modelShort": "Auto only", "editor.title": "Edit {name}", "create.title": "New skill", "create.name": "Name", "create.nameHint": "Lowercase letters, digits and hyphens", "create.description": "Description", "create.descriptionHint": "What it does and when to use it; DSH loads it by this", "create.root": "Location", "create.submit": "Create", "versions.title": "Versions", "versions.empty": "No versions yet", "versions.current": "Current", "versions.compare": "Compare", "versions.compareTitle": "Compared with {time}", "versions.restore": "Restore", "tests.title": "Tests", "tests.count": "{count} {count:case|cases}", "tests.lastScore": "last {score}", "tests.run": "Backtest", "tests.running": "Backtesting", "tests.add": "Add case", "tests.empty": "No cases yet. Reviews add them as you work; you can add your own.", "tests.checks": "{count} {count:check|checks}", "tests.must": "Must", "tests.should": "Should", "tests.origin": "Source conversation", "tests.enabled": "Use case {title}", "tests.progress": "Backtesting {done}/{total}", "tests.score": "score {score}", "tests.errors": "{count} could not run", "tests.unmeasured": "{count} not measured", "tests.withoutSkill": "No skill", "tests.deleteTitle": "Delete this case?", "tests.newTitle": "Add case", "tests.editTitle": "Edit case", "tests.case": "Case", "tests.caseTitle": "Title", "tests.prompt": "Task", "tests.promptHint": "What the user would say", "tests.context": "Context (optional)", "tests.requiresVision": "Requires image input", "tests.requiresVisionHint": "Text backtests skip image cases; marked unmeasured and excluded from scores.", "tests.checksLabel": "Checks", "tests.checkPlaceholder": "The result should…", "tests.addCheck": "Add", "run.steps": "Steps", "run.answer": "Answer", "evolution.pending": "Pending", "evolution.pendingCount": "Pending {count}", "evolution.done": "Done", "evolution.reviewNow": "Review now", "evolution.reviewFound": "Reviewed: {count} {count:suggestion|suggestions}", "evolution.reviewNothing": "Reviewed: nothing new", "evolution.off": "Self-evolution is off", "evolution.offBody": "Once on, finished conversations are reviewed in the background for skill suggestions.", "evolution.turnOn": "Turn on", "evolution.empty.pending": "Nothing pending", "evolution.emptyBody.pending": "New suggestions show up here.", "evolution.empty.done": "Nothing yet", "evolution.emptyBody.done": "Adopted and dismissed suggestions stay here.", "evolution.empty.evidence": "No evidence yet", "evolution.emptyBody.evidence": "Conversations a review read stay here.", "evolution.from": "From “{session}”", "evolution.confidence": "confidence {value}%", "evolution.draft": "Draft", "evolution.dismiss": "Dismiss", "evolution.dismissed": "Dismissed", "evolution.noAgent": "No task Agent is available", "evolution.drafting": "Drafting", "evolution.draftFailed": "Drafting failed: {error}", "evolution.skillGone": "The original skill file was deleted, moved, or cannot be read. Restore it or open the skill at its new location and generate a new draft.", "evolution.originUnavailable": "The original workspace was not recorded reliably. Select its original workspace, open the skill on the Skills page and generate a new draft; the existing draft and evidence are kept.", "evolution.currentSkill": "Current skill file", "evolution.skillChanged": "The skill changed after this suggestion; the draft starts from its current version.", "evolution.adopted": "Adopted", "evolution.openSkill": "Open skill", "evolution.evidence": "Evidence", "evolution.evidenceMeta": "{conversations} {conversations:conversation|conversations} · {steps} {steps:step|steps}", "evolution.evidenceGone": "This conversation record was deleted.", "evolution.openRecord": "Full record", "draft.title": "Draft", "evolution.targetRoot": "Suggested destination: {root}", "draft.writeTo": "Write to", "draft.adopt": "Adopt", "draft.discard": "Discard", "draft.edit": "Edit draft", "draft.redraft": "Redraft", "draft.redraftNote": "What to change", "draft.redraftPlaceholder": "For example: put breaking changes first", "draft.redraftStart": "Redraft", "draft.adopted": "Adopted; {name} is updated", "draft.backtest": "Backtest", "draft.current": "Current", "draft.withoutSkill": "No skill", "draft.candidate": "Draft", "draft.same": "Even", "draft.backtesting": "Backtesting {done}/{total}", "draft.noTests": "No test cases; not backtested", "draft.notTested": "Not backtested yet", "draft.notComparable": "The backtests cannot be compared", "draft.runBacktest": "Backtest", "draft.rerun": "Backtest again", "draft.excluded": "{count} {count:case|cases} could not run and {count:is|are} left out", "draft.runDetail": "The draft's backtest", "draft.adoptAnyway": "Adopt anyway?", "draft.regressed": "The draft scores below the current version.", "records.stats": "{turns} {turns:turn|turns} · {tools} {tools:tool call|tool calls}", "records.failures": "{count} failed", "records.pinned": "Pinned", "records.pin": "Pin", "records.unpin": "Unpin", "records.suggested": "{count} {count:suggestion|suggestions}", "records.suggestion": "Suggestion {index}", "records.deriveAll": "Derive cases", "records.deriveChosen": "Derive ({count})", "records.deriveFor": "For skill", "records.derive": "Make", "records.derived": "Added {count} {count:case|cases} to {name}", "records.deleteTitle": "Delete this record?", "records.deleteBody": "Suggestions and cases that cite it lose this evidence.", "evidence.skill": "Skill", "evidence.allSkills": "All skills", "evals.empty": "No skills yet", "evals.emptyBody": "Once you have skills, write their test cases and backtest them here.", "evals.tested": "With cases", "evals.untested": "No cases", "evals.off": "{count} turned off", "evals.notCreated": "Not created", "evals.notCreatedBody": "Not created yet: a backtest measures how things go without it.", "evals.openSuggestion": "Open the suggestion", "timeline.turn": "Turn {turn}", "timeline.user": "User", "timeline.assistant": "Reply", "timeline.tool": "Tool", "timeline.skill": "Skill", "timeline.failed": "Failed", "market.search": "Search skills", "market.category": "Category", "market.allCategories": "All categories", "market.refresh": "Refresh", "market.empty": "No skills found", "market.emptyBody": "Try other words, or add a repository or site under Sources.", "market.preview": "Open {name}", "market.install": "Install", "market.installing": "Installing", "market.update": "Update", "market.overwrite": "Overwrite", "market.installTo": "Install to", "market.open": "Open skill", "market.installed": "Installed {name}", "market.updated": "Updated {name}", "market.state.installed": "Installed", "market.state.update": "Update", "market.state.modified": "Edited locally", "market.state.conflict": "Name taken", "market.state.available": "Available", "market.version": "v{version}", "market.installedVersion": "Installed v{version}", "market.upstreamLicense": "Upstream license", "market.trust": "Skills may run scripts; verify the source and read SKILL.md before installing.", "market.overwriteHint": "This skill was edited locally; updating replaces the edits (the old version goes to the trash).", "market.files": "{count} {count:file|files} · {size}", "market.searchPlaceholder": "Search skills, or paste a GitHub repo / URL", "market.sources": "Sources · {count}", "market.addAsSource": "{kind} · {label}", "market.listed": "Your sources · {count}", "market.indexed": "skills.sh · {count}", "market.searching": "Searching skills.sh", "market.searchFailed": "skills.sh can't search right now: {error}", "market.indexEmpty": "No matching skills on skills.sh.", "market.installs": "{count} {count:install|installs}", "market.audits": "Security review", "market.audit.pass": "Pass", "market.audit.warn": "Warning", "market.audit.fail": "Fail", "market.viewSource": "View source", "market.partial": "GitHub can't be reached right now, so this is the text copy skills.sh keeps; installing fetches every file from GitHub.", "sources.title": "Sources", "sources.builtin": "Built-in", "sources.featured": "Featured", "sources.kind.catalog": "Catalog", "sources.kind.well-known": "Website", "sources.kind.github": "GitHub repo", "sources.kind.search": "Search", "sources.detected.catalog": "Local catalog", "sources.detected.json": "JSON file", "sources.detected.github": "GitHub repo", "sources.detected.well-known": "Website", "sources.entries": "{count} {count:skill|skills}", "sources.updated": "updated {time}", "sources.searchMeta": "Open skills directory, searched as you type", "sources.refresh": "Refresh", "sources.remove": "Remove", "sources.enabled": "Use {name}", "sources.addTitle": "Add a source", "sources.placeholder": "owner/repo, a URL or a JSON file", "sources.hint": "GitHub repos, sites publishing Agent Skills, and catalog JSON files.", "sources.unknown": "Not recognized: enter owner/repo, a URL or a JSON file", "sources.duplicate": "This source is already added", "sources.add": "Add", "sources.addAs": "Add as source", "sources.adding": "Adding", "sources.added": "Added {name} with {count} {count:skill|skills}", "sources.done": "Done", "sources.formats": "What can be a source", "sources.format.github": "GitHub repository (owner/repo or URL) indexing every SKILL.md.", "sources.format.well-known": "Websites publishing a /.well-known/agent-skills/ index.", "sources.format.catalog": "Catalog JSON file (URL or local path) with bilingual descriptions.", "signal.correction": "Correction", "signal.directive": "From now on", "signal.tool-failure": "Tool failure", "signal.approach-change": "Changed approach", "signal.procedure": "Reusable procedure", "signal.skill-gap": "Skill gap", "signal.skill-misleading": "Misleading description", "signal.success": "Accepted approach", "status.pending": "Pending", "status.drafting": "Drafting", "status.review": "Draft to review", "status.adopted": "Adopted", "status.dismissed": "Dismissed", "status.expired": "Expired", "status.invalidated": "Invalidated", "action.create": "New", "action.update": "Improve", "versions.reason.original": "Original", "versions.reason.edit": "Edit", "versions.reason.evolution": "Evolution", "versions.reason.restore": "Restore", "versions.reason.invocation": "Switch", "versions.reason.create": "Created", "run.status.running": "Running", "run.status.completed": "Done", "run.status.failed": "Failed", "run.status.interrupted": "Interrupted", "run.verdict.pass": "Pass", "run.verdict.fail": "Fail", "run.verdict.error": "Error", "run.verdict.unmeasured": "Not measured", "run.requiresVision": "This case requires image input that text-only backtests cannot receive. No model was called; this case is excluded from scores and baseline comparisons.", "versions.reason.install": "Install", "diff.copy": "Copy", "diff.copied": "Copied", "diff.collapse": "Collapse", "diff.expand": "Show {count} more {count:line|lines}", "diff.code": "SKILL.md", "diff.wrap": "Wrap lines", "diff.unwrap": "Don't wrap", "common.less": "Less", "common.moreCount": "{count} more", "tests.history": "Backtests", "trash.title": "Trash", "trash.body": "Removed skills stay on disk here: restore one, or delete it for good.", "trash.emptyTitle": "The Trash is empty", "trash.emptyBody": "Removing a skill from the Skills tab puts it here first.", "trash.meta": "{time} · {size}", "trash.restore": "Restore", "trash.restoreHint": "Put it back where it came from", "trash.restored": "Restored {name}", "trash.purge": "Delete", "trash.purgeTitle": "Delete {name} for good?", "trash.purgeBody": "The files are deleted from disk and cannot be brought back.", "trash.purged": "Deleted {name} for good", "trash.empty": "Empty", "trash.clearTitle": "Empty the Trash of {count:item|items}?", "trash.clearBody": "These files are deleted from disk and cannot be brought back.", "trash.emptied": "Emptied {count:item|items}", "trash.file": "Markdown file", "trash.bundle": "Skill bundle", "trash.restoreTitle": "Restore {name}", "trash.chooseRoot": "Choose a restore location", "trash.original": "Original location", "trash.chooseHint": "Choose a location or a different name. Replacing a skill requires confirmation and keeps its current version in the Trash.", "trash.replace": "Replace the existing skill and keep its current version in the Trash", "trash.confirmName": "Type {name} to confirm permanent deletion", "evolution.model": "Global model", "evolution.modelCard": "Item model", "evolution.modelAuto": "Follow default", "evolution.modelAutoHint": "Use the model of the current task Agent", "evolution.deleteTitle": "Delete this suggestion?", "evolution.deleteBody": "Its draft and the evidence references it cites go with it, and this cannot be undone.", "evolution.deleted": "Deleted", "evolution.missing": "This suggestion has been deleted", "evolution.missingBody": "Select another suggestion on the left, or return to Evidence to read the original record.", "evolution.loadFailed": "Could not load this suggestion", "evolution.loadFailedBody": "Retry, or select another suggestion on the left.", "tests.model": "Global model", "tests.modelCard": "Item model", "tests.modelAuto": "Follow default", "draft.baseChanged": "The original skill changed. This draft is out of date; regenerate it against the current file and backtest it.", "draft.targetExists": "A skill with this name now exists. Regenerate an update and backtest it before adopting.", "draft.refreshGuidance": "Regenerate against the current skill file, preserving its latest changes, then run backtests.", "draft.regenerate": "Redraft & test", "draft.cancelBacktest": "Cancel backtests", "draft.interrupted": "Backtests were interrupted. Run them again, or review the draft before adopting manually.", "evolution.auto.title": "Automatic adoption", "evolution.auto.history": "Automatic adoption activity", "evolution.auto.attempt": "Attempt {count}", "evolution.auto.scores": "Baseline {baseline} / draft {draft}", "evolution.auto.stage.queued": "Queued", "evolution.auto.stage.drafting": "Drafting", "evolution.auto.stage.backtesting": "Backtesting a pair", "evolution.auto.stage.rewriting": "Rewriting after regression", "evolution.auto.stage.adopted": "Automatically adopted", "evolution.auto.stage.paused": "Automatic work stopped", "evolution.auto.stage.review": "Manual review required", "evolution.auto.reason.disabled": "Automatic adoption or its required permissions were disabled", "evolution.auto.reason.no-cases": "No enabled evaluation cases", "evolution.auto.reason.case-limit": "Enabled cases exceed the per-run limit; adjust cases or the limit and review this suggestion manually", "evolution.auto.reason.unmeasured": "Some checks were not fully measured, or a case needs images, failed or was interrupted", "evolution.auto.reason.regressed": "At least one case or previously passing check regressed", "evolution.auto.reason.changed": "The suggestion, draft or evaluation cases changed", "evolution.auto.reason.failed": "Automatic work failed; manual review remains available", "evolution.auto.reason.queue-full": "Automatic queue is full", "evolution.auto.reason.model-unavailable": "No resolved draft or backtest model", "evolution.auto.reason.interrupted": "Host stopped; this suggestion will not restart automatically", "evolution.auto.reason.daily-limit": "Daily candidate quota reached; review manually or wait for new suggestions on another day", "evolution.auto.reason.duplicate-skill": "This skill target was already processed today; review manually", "triage.title": "Reuse guidance", "triage.durable": "Reusable workflow", "triage.one-off": "One-off candidate", "triage.uncertain": "Needs judgment", "triage.fold": "One-off candidates ({count})", "triage.choose": "Expand one-off candidates to review suggestions", "triage.facts": "{windows} evidence windows · {sessions} sessions · {steps} cited steps", "triage.rules": "Reusable: ≥3 windows, ≥20 steps, ≥0.8 confidence; one-off: 1 window, <20 steps (affects ordering/folding only).", "triage.soft": "Only affects ordering and folding; every suggestion stays actionable.", "skills.linkedWritable": "Updates write to the original linked skill and affect every Agent sharing it. You can turn this off in Skills settings.", "skills.linkedEditable": "Linked", "markdown.footnotes": "Footnotes" }, ja: { "page.title": "スキル", "page.description": "DSH スキルの管理と自己進化", "page.readOnly": "読み取り専用", "tabs.aria": "スキルページ", "tabs.waiting": "{count} 件待機中", "tabs.trash": "{count} 件削除済み", "tab.skills": "スキル", "tab.evolution": "進化", "tab.evals": "評価", "tab.market": "マーケット", "tab.trash": "ゴミ箱", "common.loading": "読み込み中", "common.retry": "再試行", "common.cancel": "キャンセル", "common.close": "閉じる", "common.delete": "削除", "common.edit": "編集", "common.save": "保存", "common.saving": "保存中", "common.more": "その他", "common.view": "表示", "common.settings": "設定", "time.justNow": "たった今", "time.minutes": "{count} 分前", "time.hours": "{count} 時間前", "time.days": "{count} 日前", "root.project-dsh": "プロジェクト", "root.project-agents": "プロジェクト · .agents", "root.user-dsh": "ユーザー", "root.user-agents": "ユーザー · .agents", "skills.search": "スキルを検索", "skills.new": "新規", "skills.noMatch": "一致するスキルがありません", "skills.problems": "{count} 件のファイルを読み込めません", "skills.empty": "スキルはまだありません", "skills.emptyBody": "新しく作成するか、マーケットからインストールしてください。", "skills.browseMarket": "マーケットを開く", "skills.select": "スキルを選択", "skills.selectBody": "左側からスキルを選ぶと内容が表示されます。", "skills.use": "使う", "skills.useHint": "会話で /{name} を使用", "skills.used": "入力欄に /{name} を挿入しました", "skills.noConversation": "スキルを使うには会話を開いてください", "skills.toggle": "{name} を有効にする", "skills.linked": "リンク済み · 読み取り専用", "skills.linkedReadOnly": "リンク済みスキルは読み取り専用です。信頼できるリンク先の場合は設定でリンク更新を許可するか、ローカルにコピーしてください。", "skills.shadowed": "上書き済み", "skills.shadowedBy": "DSH は同名の {key} を読み込むため、このファイルは有効になりません。", "skills.waitingCount": "{count} 件の改善提案が待機中", "skills.files": "ファイル", "skills.improve": "改善", "skills.improveTitle": "{name} を改善", "skills.improveNote": "変更内容(任意)", "skills.improvePlaceholder": "例:リリースノートをモジュール別に分類する", "skills.improveStart": "ドラフト作成", "skills.improveStarted": "ドラフトを作成中です。完了すると「進化」タブに表示されます", "skills.remove": "削除", "skills.removeTitle": "{name} を削除しますか?", "skills.removeBody": "スキルは「ゴミ箱」タブへ移動します。そこから復元するか、完全に削除できます。", "skills.removed": "{name} を削除しました", "skills.deleted": "{name} を完全に削除しました", "invocation.label": "呼び出し", "invocation.both": "自動 + /", "invocation.slash": "/ のみ", "invocation.model": "自動のみ", "invocation.off": "オフ", "invocation.slashShort": "/ のみ", "invocation.modelShort": "自動のみ", "editor.title": "{name} を編集", "create.title": "新規スキル", "create.name": "名前", "create.nameHint": "英小文字、数字、ハイフンのみ", "create.description": "説明", "create.descriptionHint": "用途と使用タイミングを記述します(DSH が読み込み判断に使用)", "create.root": "保存先", "create.submit": "作成", "versions.title": "バージョン", "versions.empty": "バージョン履歴はまだありません", "versions.current": "現在", "versions.compare": "比較", "versions.compareTitle": "{time} のバージョンと比較", "versions.restore": "復元", "tests.title": "テスト", "tests.count": "{count} 件のケース", "tests.lastScore": "前回 {score}", "tests.run": "バックテスト", "tests.running": "バックテスト中", "tests.add": "ケースを追加", "tests.empty": "テストケースはまだありません。レビュー時に自動追加されるほか、手動で追加できます。", "tests.checks": "{count} 項目のチェック", "tests.must": "必須", "tests.should": "推奨", "tests.origin": "元の会話", "tests.enabled": "ケース「{title}」を有効にする", "tests.progress": "バックテスト中 {done}/{total}", "tests.score": "スコア {score}", "tests.errors": "{count} 件実行不可", "tests.unmeasured": "{count} 件未計測", "tests.withoutSkill": "スキルなし", "tests.deleteTitle": "このケースを削除しますか?", "tests.newTitle": "ケースを追加", "tests.editTitle": "ケースを編集", "tests.case": "ケース", "tests.caseTitle": "タイトル", "tests.prompt": "タスク", "tests.promptHint": "ユーザーが入力する内容", "tests.context": "コンテキスト(任意)", "tests.requiresVision": "画像入力が必要", "tests.requiresVisionHint": "テキストのみのバックテストでは画像ケースをスキップし、未計測としてスコアから除外します。", "tests.checksLabel": "チェック項目", "tests.checkPlaceholder": "満たすべき条件を入力…", "tests.addCheck": "追加", "run.steps": "実行ステップ", "run.answer": "回答", "evolution.pending": "保留中", "evolution.pendingCount": "保留中 {count}", "evolution.done": "完了", "evolution.reviewNow": "今すぐレビュー", "evolution.reviewFound": "レビュー完了:{count} 件の提案", "evolution.reviewNothing": "レビュー完了:新しい提案はありません", "evolution.off": "自己進化はオフです", "evolution.offBody": "オンにすると、終了した会話をバックグラウンドでレビューし、スキルの改善提案を作成します。", "evolution.turnOn": "オンにする", "evolution.empty.pending": "保留中の提案はありません", "evolution.emptyBody.pending": "新しい提案があるとここに表示されます。", "evolution.empty.done": "処理済みの提案はありません", "evolution.emptyBody.done": "採用または却下した提案がここに残ります。", "evolution.empty.evidence": "根拠はまだありません", "evolution.emptyBody.evidence": "レビューで参照された会話がここに残ります。", "evolution.from": "「{session}」より", "evolution.confidence": "信頼度 {value}%", "evolution.draft": "ドラフト作成", "evolution.dismiss": "却下", "evolution.dismissed": "却下済み", "evolution.noAgent": "利用可能なタスクエージェントがありません", "evolution.drafting": "ドラフト作成中", "evolution.draftFailed": "ドラフト作成に失敗しました:{error}", "evolution.skillGone": "元のスキルファイルが削除・移動されたか読み取れません。ファイルを復元するか、新しい場所でスキルを開いてドラフトを再生成してください。", "evolution.originUnavailable": "元のワークスペース情報が正確に記録されていません。元のワークスペースを選択し、スキルページで対象スキルを開いてドラフトを再生成してください(既存のドラフトと根拠は保持されます)。", "evolution.currentSkill": "現在のスキルファイル", "evolution.skillChanged": "この提案の作成後にスキルが変更されたため、ドラフトは現行バージョンを基に作成されます。", "evolution.adopted": "採用済み", "evolution.openSkill": "スキルを開く", "evolution.evidence": "根拠", "evolution.evidenceMeta": "会話 {conversations} 件 · {steps} ステップ", "evolution.evidenceGone": "この会話記録は削除されました。", "evolution.openRecord": "全記録を見る", "draft.title": "ドラフト", "evolution.targetRoot": "推奨保存先:{root}", "draft.writeTo": "書き込み先", "draft.adopt": "採用", "draft.discard": "破棄", "draft.edit": "ドラフトを編集", "draft.redraft": "書き直す", "draft.redraftNote": "修正方針", "draft.redraftPlaceholder": "例:破壊的変更を先頭にまとめる", "draft.redraftStart": "書き直す", "draft.adopted": "採用しました。{name} を更新しました", "draft.backtest": "バックテスト", "draft.current": "現在", "draft.withoutSkill": "スキルなし", "draft.candidate": "ドラフト", "draft.same": "同点", "draft.backtesting": "バックテスト中 {done}/{total}", "draft.noTests": "テストケースがないため未実施", "draft.notTested": "まだバックテストされていません", "draft.notComparable": "バックテスト結果を比較できません", "draft.runBacktest": "バックテスト", "draft.rerun": "再バックテスト", "draft.excluded": "{count} 件のケースを実行できなかったため比較から除外しました", "draft.runDetail": "ドラフトのバックテスト詳細", "draft.adoptAnyway": "このまま採用しますか?", "draft.regressed": "ドラフトのスコアが現行バージョンを下回っています。", "records.stats": "{turns} ターン · ツール呼び出し {tools} 回", "records.failures": "失敗 {count} 回", "records.pinned": "ピン留め済み", "records.pin": "ピン留め", "records.unpin": "ピン留め解除", "records.suggested": "提案 {count} 件", "records.suggestion": "提案 {index}", "records.deriveAll": "ケースを生成", "records.deriveChosen": "{count} ステップから生成", "records.deriveFor": "対象スキル", "records.derive": "生成", "records.derived": "{name} に {count} 件のケースを追加しました", "records.deleteTitle": "この記録を削除しますか?", "records.deleteBody": "この記録を参照している提案やケースは根拠を失います。", "evidence.skill": "スキル", "evidence.allSkills": "すべてのスキル", "evals.empty": "スキルはまだありません", "evals.emptyBody": "スキルを作成またはインストールすると、ここでテストケースの作成とバックテストを行えます。", "evals.tested": "ケースあり", "evals.untested": "ケースなし", "evals.off": "{count} 件無効", "evals.notCreated": "未作成", "evals.notCreatedBody": "スキルはまだ作成されていません。バックテストはスキルなしの状態の性能を計測します。", "evals.openSuggestion": "提案を開く", "timeline.turn": "ターン {turn}", "timeline.user": "ユーザー", "timeline.assistant": "返信", "timeline.tool": "ツール", "timeline.skill": "スキル", "timeline.failed": "失敗", "market.search": "スキルを検索", "market.category": "カテゴリ", "market.allCategories": "すべてのカテゴリ", "market.refresh": "更新", "market.empty": "スキルが見つかりません", "market.emptyBody": "別のキーワードを試すか、「ソース」からリポジトリやサイトを追加してください。", "market.preview": "{name} を開く", "market.install": "インストール", "market.installing": "インストール中", "market.update": "更新", "market.overwrite": "上書きインストール", "market.installTo": "インストール先", "market.open": "スキルを開く", "market.installed": "{name} をインストールしました", "market.updated": "{name} を更新しました", "market.state.installed": "インストール済み", "market.state.update": "更新あり", "market.state.modified": "ローカル編集済み", "market.state.conflict": "同名あり", "market.state.available": "利用可能", "market.version": "v{version}", "market.installedVersion": "導入済み v{version}", "market.upstreamLicense": "上流ライセンス", "market.trust": "スキルはスクリプトを実行する場合があります。インストール前に提供元を確認し、SKILL.md の内容を確認してください。", "market.overwriteHint": "このスキルはローカルで編集されています。更新すると変更が上書きされます(旧バージョンはゴミ箱に移動されます)。", "market.files": "{count} ファイル · {size}", "market.searchPlaceholder": "スキルを検索、または GitHub リポジトリ / URL を貼り付け", "market.sources": "ソース · {count}", "market.addAsSource": "{kind} · {label}", "market.listed": "追加済みソース · {count}", "market.indexed": "skills.sh · {count}", "market.searching": "skills.sh を検索中", "market.searchFailed": "現在 skills.sh を検索できません:{error}", "market.indexEmpty": "skills.sh に一致するスキルはありません。", "market.installs": "{count} 回インストール", "market.audits": "セキュリティ審査", "market.audit.pass": "合格", "market.audit.warn": "注意", "market.audit.fail": "不合格", "market.viewSource": "ソースを表示", "market.partial": "現在 GitHub に接続できないため、skills.sh が保持するテキスト版を表示しています。インストール時に GitHub から全ファイルを取得します。", "sources.title": "ソース", "sources.builtin": "組み込み", "sources.featured": "おすすめ", "sources.kind.catalog": "カタログ", "sources.kind.well-known": "ウェブサイト", "sources.kind.github": "GitHub リポジトリ", "sources.kind.search": "検索", "sources.detected.catalog": "ローカルカタログ", "sources.detected.json": "JSON ファイル", "sources.detected.github": "GitHub リポジトリ", "sources.detected.well-known": "ウェブサイト", "sources.entries": "{count} 件のスキル", "sources.updated": "{time} 更新", "sources.searchMeta": "オープンなスキルディレクトリ(入力に合わせて検索)", "sources.refresh": "更新", "sources.remove": "削除", "sources.enabled": "{name} を使用", "sources.addTitle": "ソースを追加", "sources.placeholder": "owner/repo、URL、または JSON ファイル", "sources.hint": "GitHub リポジトリ、Agent Skills を公開しているサイト、カタログ JSON ファイルに対応しています。", "sources.unknown": "形式を認識できません。owner/repo、URL、または JSON ファイルを入力してください", "sources.duplicate": "このソースはすでに追加されています", "sources.add": "追加", "sources.addAs": "ソースとして追加", "sources.adding": "追加中", "sources.added": "{name} を追加しました({count} 件のスキル)", "sources.done": "完了", "sources.formats": "対応しているソース形式", "sources.format.github": "リポジトリ内の全 SKILL.md を索引化する GitHub リポジトリ(owner/repo または URL)。", "sources.format.well-known": "/.well-known/agent-skills/ インデックスを公開しているウェブサイト。", "sources.format.catalog": "多言語説明付きのカタログ JSON ファイル(URL またはローカルパス)。", "signal.correction": "ユーザー訂正", "signal.directive": "今後の指示", "signal.tool-failure": "ツール失敗", "signal.approach-change": "方針変更", "signal.procedure": "再利用可能な手順", "signal.skill-gap": "スキル不足", "signal.skill-misleading": "誤解を招く説明", "signal.success": "承認された手法", "status.pending": "保留中", "status.drafting": "作成中", "status.review": "レビュー待ち", "status.adopted": "採用済み", "status.dismissed": "却下済み", "status.expired": "期限切れ", "status.invalidated": "無効化済み", "action.create": "新規", "action.update": "改善", "versions.reason.original": "初期版", "versions.reason.edit": "編集", "versions.reason.evolution": "進化", "versions.reason.restore": "復元", "versions.reason.invocation": "切り替え", "versions.reason.create": "作成", "run.status.running": "実行中", "run.status.completed": "完了", "run.status.failed": "失敗", "run.status.interrupted": "中断", "run.verdict.pass": "合格", "run.verdict.fail": "不合格", "run.verdict.error": "エラー", "run.verdict.unmeasured": "未計測", "run.requiresVision": "このケースは画像入力を必要とするため、テキストのみのバックテストでは判定できません。モデルは呼び出されず、スコアとベースライン比較から除外されます。", "versions.reason.install": "インストール", "diff.copy": "コピー", "diff.copied": "コピーしました", "diff.collapse": "折りたたむ", "diff.expand": "さらに {count} 行を表示", "diff.code": "SKILL.md", "diff.wrap": "行を折り返す", "diff.unwrap": "折り返さない", "common.less": "折りたたむ", "common.moreCount": "他 {count} 件", "tests.history": "バックテスト履歴", "trash.title": "ゴミ箱", "trash.body": "削除されたスキルはディスク上のここに保持されます。復元または完全削除ができます。", "trash.emptyTitle": "ゴミ箱は空です", "trash.emptyBody": "「スキル」タブでスキルを削除すると、まずここに移動します。", "trash.meta": "{time} · {size}", "trash.restore": "復元", "trash.restoreHint": "元の場所に戻します", "trash.restored": "{name} を復元しました", "trash.purge": "完全に削除", "trash.purgeTitle": "{name} を完全に削除しますか?", "trash.purgeBody": "ファイルはディスクから削除され、元に戻せません。", "trash.purged": "{name} を完全に削除しました", "trash.empty": "空にする", "trash.clearTitle": "ゴミ箱の {count} 件を空にしますか?", "trash.clearBody": "これらのファイルはディスクから削除され、元に戻せません。", "trash.emptied": "{count} 件を空にしました", "trash.file": "Markdown ファイル", "trash.bundle": "スキルバンドル", "trash.restoreTitle": "{name} を復元", "trash.chooseRoot": "復元先を選択", "trash.original": "元の場所", "trash.chooseHint": "復元先または別の名前を選択できます。既存スキルを置き換えるには確認が必要で、現行バージョンはゴミ箱に保持されます。", "trash.replace": "既存スキルを置き換え、現行バージョンをゴミ箱に残す", "trash.confirmName": "完全削除を確定するには {name} と入力してください", "evolution.model": "グローバルモデル", "evolution.modelCard": "この項目のモデル", "evolution.modelAuto": "デフォルトに従う", "evolution.modelAutoHint": "現在のタスクエージェントのモデルを使用します", "evolution.deleteTitle": "この提案を削除しますか?", "evolution.deleteBody": "生成されたドラフトと参照中の根拠リンクも同時に削除され、元に戻せません。", "evolution.deleted": "削除しました", "evolution.missing": "この提案は削除されました", "evolution.missingBody": "左側から別の提案を選ぶか、「根拠」に戻って元の記録を確認してください。", "evolution.loadFailed": "この提案を読み込めませんでした", "evolution.loadFailedBody": "再試行するか、左側から別の提案を選択してください。", "tests.model": "グローバルモデル", "tests.modelCard": "この項目のモデル", "tests.modelAuto": "デフォルトに従う", "draft.baseChanged": "元のスキルが変更されたため、このドラフトは古くなっています。現行ファイルから再生成してバックテストしてください。", "draft.targetExists": "この名前のスキルがすでに存在します。採用前に更新版ドラフトを再生成してバックテストしてください。", "draft.refreshGuidance": "最新の変更を保持したまま現在のスキルファイルから再生成し、バックテストを実行します。", "draft.regenerate": "書き直してテスト", "draft.cancelBacktest": "バックテストをキャンセル", "draft.interrupted": "バックテストが中断されました。再実行するか、ドラフトを確認してから手動で採用してください。", "evolution.auto.title": "自動採用", "evolution.auto.history": "自動採用の履歴", "evolution.auto.attempt": "試行 {count}", "evolution.auto.scores": "ベースライン {baseline} / ドラフト {draft}", "evolution.auto.stage.queued": "待機中", "evolution.auto.stage.drafting": "ドラフト作成中", "evolution.auto.stage.backtesting": "比較バックテスト中", "evolution.auto.stage.rewriting": "退行結果に基づき書き直し中", "evolution.auto.stage.adopted": "自動採用済み", "evolution.auto.stage.paused": "自動処理を停止", "evolution.auto.stage.review": "手動レビューが必要", "evolution.auto.reason.disabled": "自動採用または必要な権限が無効になっています", "evolution.auto.reason.no-cases": "有効な評価ケースがありません", "evolution.auto.reason.case-limit": "有効なケース数が 1 回の上限を超えています。ケースまたは上限を調整し、この提案を手動で確認してください", "evolution.auto.reason.unmeasured": "一部のチェックが計測できなかったか、画像が必要なケース・エラー・中断が含まれています", "evolution.auto.reason.regressed": "少なくとも 1 件のケースまたは以前合格していたチェックで退行が発生しました", "evolution.auto.reason.changed": "提案、ドラフト、または評価ケースが変更されました", "evolution.auto.reason.failed": "自動処理に失敗しました。手動レビューは引き続き利用できます", "evolution.auto.reason.queue-full": "自動処理キューが満杯です", "evolution.auto.reason.model-unavailable": "ドラフト作成またはバックテスト用のモデルを特定できませんでした", "evolution.auto.reason.interrupted": "ホストが停止したため、この提案は自動再開されません", "evolution.auto.reason.daily-limit": "本日の自動処理上限に達しました。手動で処理するか、翌日以降の新しい提案をお待ちください", "evolution.auto.reason.duplicate-skill": "この対象スキルは本日すでに自動処理済みです。手動で確認してください", "triage.title": "再利用性の目安", "triage.durable": "再利用可能なワークフロー", "triage.one-off": "単発候補", "triage.uncertain": "判断が必要", "triage.fold": "単発候補({count})", "triage.choose": "単発候補を展開して提案を確認", "triage.facts": "根拠ウィンドウ {windows} 件 · セッション {sessions} 件 · 引用ステップ {steps} 件", "triage.rules": "再利用可能:根拠 3 件以上・20 ステップ以上・信頼度 0.8 以上/単発:根拠 1 件・20 ステップ未満(並び替えと折りたたみにのみ影響)。", "triage.soft": "並び替えと折りたたみにのみ影響します。すべての提案は手動で操作できます。", "skills.linkedWritable": "更新内容はリンク元のスキルファイルに書き込まれ、共有する全エージェントに反映されます。スキル設定からオフにできます。", "skills.linkedEditable": "リンク済み", "markdown.footnotes": "脚注" }, es: { "page.title": "Habilidades", "page.description": "Tus habilidades de DSH y cómo evolucionan", "page.readOnly": "Solo lectura", "tabs.aria": "Páginas de Habilidades", "tabs.waiting": "{count} {count:pendiente|pendientes}", "tabs.trash": "{count} {count:elemento eliminado|elementos eliminados}", "tab.skills": "Habilidades", "tab.evolution": "Evolución", "tab.evals": "Evaluaciones", "tab.market": "Mercado", "tab.trash": "Papelera", "common.loading": "Cargando", "common.retry": "Reintentar", "common.cancel": "Cancelar", "common.close": "Cerrar", "common.delete": "Eliminar", "common.edit": "Editar", "common.save": "Guardar", "common.saving": "Guardando", "common.more": "Más", "common.view": "Ver", "common.settings": "Ajustes", "time.justNow": "ahora mismo", "time.minutes": "hace {count} min", "time.hours": "hace {count} h", "time.days": "hace {count} d", "root.project-dsh": "Proyecto", "root.project-agents": "Proyecto · .agents", "root.user-dsh": "Usuario", "root.user-agents": "Usuario · .agents", "skills.search": "Buscar habilidades", "skills.new": "Nueva", "skills.noMatch": "Ninguna habilidad coincide", "skills.problems": "{count} {count:archivo no se puede|archivos no se pueden} cargar", "skills.empty": "Aún no hay habilidades", "skills.emptyBody": "Crea una o instálala desde el mercado.", "skills.browseMarket": "Abrir mercado", "skills.select": "Elige una habilidad", "skills.selectBody": "Selecciona una a la izquierda para verla.", "skills.use": "Usar", "skills.useHint": "Usar /{name} en la conversación", "skills.used": "Se insertó /{name} en la entrada", "skills.noConversation": "Abre una conversación para usar una habilidad", "skills.toggle": "Activar {name}", "skills.linked": "Enlazada · solo lectura", "skills.linkedReadOnly": "La habilidad enlazada es de solo lectura; activa las actualizaciones enlazadas en los ajustes para destinos confiables o crea una copia local.", "skills.shadowed": "Anulada", "skills.shadowedBy": "DSH carga {key} con el mismo nombre; este archivo no tiene efecto.", "skills.waitingCount": "{count} {count:mejora pendiente|mejoras pendientes}", "skills.files": "Archivos", "skills.improve": "Mejorar", "skills.improveTitle": "Mejorar {name}", "skills.improveNote": "Qué cambiar (opcional)", "skills.improvePlaceholder": "Por ejemplo: agrupar las notas de la versión por módulo", "skills.improveStart": "Redactar", "skills.improveStarted": "Redactando borrador; aparecerá en Evolución cuando esté listo", "skills.remove": "Quitar", "skills.removeTitle": "¿Quitar {name}?", "skills.removeBody": "La habilidad se mueve a la pestaña Papelera, donde puedes restaurarla o eliminarla definitivamente.", "skills.removed": "Se quitó {name}", "skills.deleted": "Se eliminó {name}", "invocation.label": "Invocación", "invocation.both": "Auto + /", "invocation.slash": "Solo /", "invocation.model": "Solo auto", "invocation.off": "Desactivada", "invocation.slashShort": "Solo /", "invocation.modelShort": "Solo auto", "editor.title": "Editar {name}", "create.title": "Nueva habilidad", "create.name": "Nombre", "create.nameHint": "Letras minúsculas, dígitos y guiones", "create.description": "Descripción", "create.descriptionHint": "Qué hace y cuándo usarla; DSH la carga según esto", "create.root": "Ubicación", "create.submit": "Crear", "versions.title": "Versiones", "versions.empty": "Aún no hay versiones", "versions.current": "Actual", "versions.compare": "Comparar", "versions.compareTitle": "Comparado con {time}", "versions.restore": "Restaurar", "tests.title": "Pruebas", "tests.count": "{count} {count:caso|casos}", "tests.lastScore": "último {score}", "tests.run": "Backtest", "tests.running": "Ejecutando backtest", "tests.add": "Añadir caso", "tests.empty": "Aún no hay casos. Las revisiones los añaden mientras trabajas; también puedes añadir los tuyos.", "tests.checks": "{count} {count:comprobación|comprobaciones}", "tests.must": "Obligatorio", "tests.should": "Recomendado", "tests.origin": "Conversación de origen", "tests.enabled": "Usar caso {title}", "tests.progress": "Backtest {done}/{total}", "tests.score": "puntuación {score}", "tests.errors": "{count} no {count:pudo|pudieron} ejecutarse", "tests.unmeasured": "{count} sin medir", "tests.withoutSkill": "Sin habilidad", "tests.deleteTitle": "¿Eliminar este caso?", "tests.newTitle": "Añadir caso", "tests.editTitle": "Editar caso", "tests.case": "Caso", "tests.caseTitle": "Título", "tests.prompt": "Tarea", "tests.promptHint": "Qué diría el usuario", "tests.context": "Contexto (opcional)", "tests.requiresVision": "Requiere entrada de imágenes", "tests.requiresVisionHint": "Los backtests de texto omiten casos con imágenes; se marcan sin medir y quedan fuera de las puntuaciones.", "tests.checksLabel": "Comprobaciones", "tests.checkPlaceholder": "El resultado debería…", "tests.addCheck": "Añadir", "run.steps": "Pasos", "run.answer": "Respuesta", "evolution.pending": "Pendientes", "evolution.pendingCount": "Pendientes {count}", "evolution.done": "Resueltas", "evolution.reviewNow": "Revisar ahora", "evolution.reviewFound": "Revisado: {count} {count:sugerencia|sugerencias}", "evolution.reviewNothing": "Revisado: nada nuevo", "evolution.off": "La autoevolución está desactivada", "evolution.offBody": "Al activarla, las conversaciones finalizadas se revisan en segundo plano para proponer mejoras de habilidades.", "evolution.turnOn": "Activar", "evolution.empty.pending": "Nada pendiente", "evolution.emptyBody.pending": "Las nuevas sugerencias aparecerán aquí.", "evolution.empty.done": "Nada todavía", "evolution.emptyBody.done": "Las sugerencias adoptadas y descartadas permanecen aquí.", "evolution.empty.evidence": "Aún sin evidencia", "evolution.emptyBody.evidence": "Las conversaciones leídas por una revisión permanecen aquí.", "evolution.from": "De «{session}»", "evolution.confidence": "confianza {value}%", "evolution.draft": "Redactar", "evolution.dismiss": "Descartar", "evolution.dismissed": "Descartada", "evolution.noAgent": "No hay ningún Agente de tareas disponible", "evolution.drafting": "Redactando", "evolution.draftFailed": "Error al redactar: {error}", "evolution.skillGone": "El archivo original de la habilidad se eliminó, movió o no se puede leer. Restáuralo o abre la habilidad en su nueva ubicación y genera un nuevo borrador.", "evolution.originUnavailable": "El espacio de trabajo original no se registró de forma fiable. Selecciona el espacio de trabajo original, abre la habilidad en la página Habilidades y genera un nuevo borrador; el borrador y la evidencia existentes se conservan.", "evolution.currentSkill": "Archivo de habilidad actual", "evolution.skillChanged": "La habilidad cambió después de esta sugerencia; el borrador parte de su versión actual.", "evolution.adopted": "Adoptada", "evolution.openSkill": "Abrir habilidad", "evolution.evidence": "Evidencia", "evolution.evidenceMeta": "{conversations} {conversations:conversación|conversaciones} · {steps} {steps:paso|pasos}", "evolution.evidenceGone": "Este registro de conversación fue eliminado.", "evolution.openRecord": "Registro completo", "draft.title": "Borrador", "evolution.targetRoot": "Destino sugerido: {root}", "draft.writeTo": "Escribir en", "draft.adopt": "Adoptar", "draft.discard": "Descartar", "draft.edit": "Editar borrador", "draft.redraft": "Reescribir", "draft.redraftNote": "Qué cambiar", "draft.redraftPlaceholder": "Por ejemplo: colocar primero los cambios incompatibles", "draft.redraftStart": "Reescribir", "draft.adopted": "Adoptada; {name} se ha actualizado", "draft.backtest": "Backtest", "draft.current": "Actual", "draft.withoutSkill": "Sin habilidad", "draft.candidate": "Borrador", "draft.same": "Empate", "draft.backtesting": "Backtest {done}/{total}", "draft.noTests": "Sin casos de prueba; no se ejecutó backtest", "draft.notTested": "Aún sin backtest", "draft.notComparable": "Los backtests no se pueden comparar", "draft.runBacktest": "Backtest", "draft.rerun": "Repetir backtest", "draft.excluded": "{count} {count:caso no se pudo|casos no se pudieron} ejecutar y {count:queda excluido|quedan excluidos}", "draft.runDetail": "Backtest del borrador", "draft.adoptAnyway": "¿Adoptar de todos modos?", "draft.regressed": "El borrador obtiene menor puntuación que la versión actual.", "records.stats": "{turns} {turns:turno|turnos} · {tools} {tools:llamada a herramienta|llamadas a herramientas}", "records.failures": "{count} {count:fallo|fallos}", "records.pinned": "Fijada", "records.pin": "Fijar", "records.unpin": "Desfijar", "records.suggested": "{count} {count:sugerencia|sugerencias}", "records.suggestion": "Sugerencia {index}", "records.deriveAll": "Derivar casos", "records.deriveChosen": "Derivar ({count})", "records.deriveFor": "Para habilidad", "records.derive": "Generar", "records.derived": "Se {count:añadió|añadieron} {count} {count:caso|casos} a {name}", "records.deleteTitle": "¿Eliminar este registro?", "records.deleteBody": "Las sugerencias y casos que lo citan perderán esta evidencia.", "evidence.skill": "Habilidad", "evidence.allSkills": "Todas las habilidades", "evals.empty": "Aún no hay habilidades", "evals.emptyBody": "Cuando tengas habilidades, escribe aquí sus casos de prueba y ejecuta sus backtests.", "evals.tested": "Con casos", "evals.untested": "Sin casos", "evals.off": "{count} {count:desactivado|desactivados}", "evals.notCreated": "Sin crear", "evals.notCreatedBody": "Aún sin crear: un backtest mide el rendimiento sin esta habilidad.", "evals.openSuggestion": "Abrir la sugerencia", "timeline.turn": "Turno {turn}", "timeline.user": "Usuario", "timeline.assistant": "Respuesta", "timeline.tool": "Herramienta", "timeline.skill": "Habilidad", "timeline.failed": "Falló", "market.search": "Buscar habilidades", "market.category": "Categoría", "market.allCategories": "Todas las categorías", "market.refresh": "Actualizar", "market.empty": "No se encontraron habilidades", "market.emptyBody": "Prueba con otras palabras o añade un repositorio o sitio en Fuentes.", "market.preview": "Abrir {name}", "market.install": "Instalar", "market.installing": "Instalando", "market.update": "Actualizar", "market.overwrite": "Sobrescribir", "market.installTo": "Instalar en", "market.open": "Abrir habilidad", "market.installed": "Se instaló {name}", "market.updated": "Se actualizó {name}", "market.state.installed": "Instalada", "market.state.update": "Actualizar", "market.state.modified": "Editada localmente", "market.state.conflict": "Nombre ocupado", "market.state.available": "Disponible", "market.version": "v{version}", "market.installedVersion": "Instalada v{version}", "market.upstreamLicense": "Licencia original", "market.trust": "Las habilidades pueden ejecutar scripts; verifica la fuente y revisa SKILL.md antes de instalar.", "market.overwriteHint": "Esta habilidad fue editada localmente; actualizar reemplazará los cambios (la versión anterior pasará a la Papelera).", "market.files": "{count} {count:archivo|archivos} · {size}", "market.searchPlaceholder": "Buscar habilidades o pegar un repo de GitHub / URL", "market.sources": "Fuentes · {count}", "market.addAsSource": "{kind} · {label}", "market.listed": "Tus fuentes · {count}", "market.indexed": "skills.sh · {count}", "market.searching": "Buscando en skills.sh", "market.searchFailed": "skills.sh no puede buscar ahora: {error}", "market.indexEmpty": "No hay habilidades coincidentes en skills.sh.", "market.installs": "{count} {count:instalación|instalaciones}", "market.audits": "Revisión de seguridad", "market.audit.pass": "Aprobada", "market.audit.warn": "Advertencia", "market.audit.fail": "Fallida", "market.viewSource": "Ver código fuente", "market.partial": "No se puede acceder a GitHub en este momento, así que esta es la copia de texto guardada por skills.sh; la instalación obtendrá todos los archivos desde GitHub.", "sources.title": "Fuentes", "sources.builtin": "Integrada", "sources.featured": "Destacadas", "sources.kind.catalog": "Catálogo", "sources.kind.well-known": "Sitio web", "sources.kind.github": "Repo de GitHub", "sources.kind.search": "Búsqueda", "sources.detected.catalog": "Catálogo local", "sources.detected.json": "Archivo JSON", "sources.detected.github": "Repo de GitHub", "sources.detected.well-known": "Sitio web", "sources.entries": "{count} {count:habilidad|habilidades}", "sources.updated": "actualizado {time}", "sources.searchMeta": "Directorio abierto de habilidades, búsqueda al escribir", "sources.refresh": "Actualizar", "sources.remove": "Quitar", "sources.enabled": "Usar {name}", "sources.addTitle": "Añadir una fuente", "sources.placeholder": "owner/repo, una URL o un archivo JSON", "sources.hint": "Repositorios de GitHub, sitios que publican Agent Skills y archivos JSON de catálogo.", "sources.unknown": "No reconocido: introduce owner/repo, una URL o un archivo JSON", "sources.duplicate": "Esta fuente ya está añadida", "sources.add": "Añadir", "sources.addAs": "Añadir como fuente", "sources.adding": "Añadiendo", "sources.added": "Se añadió {name} con {count} {count:habilidad|habilidades}", "sources.done": "Listo", "sources.formats": "Qué puede ser una fuente", "sources.format.github": "Repositorio de GitHub (owner/repo o URL) que indexa cada SKILL.md.", "sources.format.well-known": "Sitios web que publican un índice /.well-known/agent-skills/.", "sources.format.catalog": "Archivo JSON de catálogo (URL o ruta local) con descripciones bilingües.", "signal.correction": "Corrección", "signal.directive": "De ahora en adelante", "signal.tool-failure": "Fallo de herramienta", "signal.approach-change": "Cambio de enfoque", "signal.procedure": "Procedimiento reutilizable", "signal.skill-gap": "Brecha de habilidad", "signal.skill-misleading": "Descripción confusa", "signal.success": "Enfoque aceptado", "status.pending": "Pendiente", "status.drafting": "Redactando", "status.review": "Borrador por revisar", "status.adopted": "Adoptada", "status.dismissed": "Descartada", "status.expired": "Caducada", "status.invalidated": "Invalidada", "action.create": "Nueva", "action.update": "Mejorar", "versions.reason.original": "Original", "versions.reason.edit": "Edición", "versions.reason.evolution": "Evolución", "versions.reason.restore": "Restauración", "versions.reason.invocation": "Interruptor", "versions.reason.create": "Creación", "run.status.running": "En ejecución", "run.status.completed": "Completado", "run.status.failed": "Fallido", "run.status.interrupted": "Interrumpido", "run.verdict.pass": "Aprobado", "run.verdict.fail": "Fallido", "run.verdict.error": "Error", "run.verdict.unmeasured": "Sin medir", "run.requiresVision": "Este caso requiere entrada de imágenes que los backtests solo de texto no pueden recibir. No se llamó a ningún modelo; este caso queda excluido de las puntuaciones y comparaciones con la línea base.", "versions.reason.install": "Instalación", "diff.copy": "Copiar", "diff.copied": "Copiado", "diff.collapse": "Contraer", "diff.expand": "Mostrar {count} {count:línea|líneas} más", "diff.code": "SKILL.md", "diff.wrap": "Ajustar líneas", "diff.unwrap": "No ajustar", "common.less": "Menos", "common.moreCount": "{count} más", "tests.history": "Backtests", "trash.title": "Papelera", "trash.body": "Las habilidades quitadas permanecen en disco aquí: restaura una o elimínala definitivamente.", "trash.emptyTitle": "La Papelera está vacía", "trash.emptyBody": "Al quitar una habilidad desde la pestaña Habilidades, pasa primero aquí.", "trash.meta": "{time} · {size}", "trash.restore": "Restaurar", "trash.restoreHint": "Devolverla a su ubicación original", "trash.restored": "Se restauró {name}", "trash.purge": "Eliminar", "trash.purgeTitle": "¿Eliminar {name} definitivamente?", "trash.purgeBody": "Los archivos se eliminarán del disco y no podrán recuperarse.", "trash.purged": "Se eliminó {name} definitivamente", "trash.empty": "Vaciar", "trash.clearTitle": "¿Vaciar {count} {count:elemento|elementos} de la Papelera?", "trash.clearBody": "Estos archivos se eliminarán del disco y no podrán recuperarse.", "trash.emptied": "Se {count:vació|vaciaron} {count} {count:elemento|elementos}", "trash.file": "Archivo Markdown", "trash.bundle": "Paquete de habilidad", "trash.restoreTitle": "Restaurar {name}", "trash.chooseRoot": "Elige una ubicación de restauración", "trash.original": "Ubicación original", "trash.chooseHint": "Elige una ubicación o un nombre distinto. Reemplazar una habilidad requiere confirmación y conserva su versión actual en la Papelera.", "trash.replace": "Reemplazar la habilidad existente y conservar su versión actual en la Papelera", "trash.confirmName": "Escribe {name} para confirmar la eliminación permanente", "evolution.model": "Modelo global", "evolution.modelCard": "Modelo del elemento", "evolution.modelAuto": "Seguir predeterminado", "evolution.modelAutoHint": "Usar el modelo del Agente de tareas actual", "evolution.deleteTitle": "¿Eliminar esta sugerencia?", "evolution.deleteBody": "Su borrador y las referencias de evidencia que cita también se eliminarán; esto no se puede deshacer.", "evolution.deleted": "Eliminada", "evolution.missing": "Esta sugerencia fue eliminada", "evolution.missingBody": "Selecciona otra sugerencia a la izquierda o vuelve a Evidencia para leer el registro original.", "evolution.loadFailed": "No se pudo cargar esta sugerencia", "evolution.loadFailedBody": "Reintenta o selecciona otra sugerencia a la izquierda.", "tests.model": "Modelo global", "tests.modelCard": "Modelo del elemento", "tests.modelAuto": "Seguir predeterminado", "draft.baseChanged": "La habilidad original cambió. Este borrador está desactualizado; regenéralo sobre el archivo actual y ejecútale un backtest.", "draft.targetExists": "Ya existe una habilidad con este nombre. Regenera una actualización y ejecútale un backtest antes de adoptarla.", "draft.refreshGuidance": "Regenera sobre el archivo de habilidad actual, conservando sus últimos cambios, y ejecuta los backtests.", "draft.regenerate": "Reescribir y probar", "draft.cancelBacktest": "Cancelar backtests", "draft.interrupted": "Los backtests se interrumpieron. Ejecútalos de nuevo o revisa el borrador antes de adoptarlo manualmente.", "evolution.auto.title": "Adopción automática", "evolution.auto.history": "Actividad de adopción automática", "evolution.auto.attempt": "Intento {count}", "evolution.auto.scores": "Línea base {baseline} / borrador {draft}", "evolution.auto.stage.queued": "En cola", "evolution.auto.stage.drafting": "Redactando", "evolution.auto.stage.backtesting": "Comparando en backtest", "evolution.auto.stage.rewriting": "Reescribiendo tras regresión", "evolution.auto.stage.adopted": "Adoptada automáticamente", "evolution.auto.stage.paused": "Proceso automático detenido", "evolution.auto.stage.review": "Requiere revisión manual", "evolution.auto.reason.disabled": "La adopción automática o los permisos necesarios fueron desactivados", "evolution.auto.reason.no-cases": "No hay casos de evaluación habilitados", "evolution.auto.reason.case-limit": "Los casos habilitados superan el límite por ejecución; ajusta los casos o el límite y revisa esta sugerencia manualmente", "evolution.auto.reason.unmeasured": "Algunas comprobaciones no se midieron por completo, o un caso necesita imágenes, falló o se interrumpió", "evolution.auto.reason.regressed": "Al menos un caso o una comprobación que antes pasaba sufrió una regresión", "evolution.auto.reason.changed": "La sugerencia, el borrador o los casos de evaluación cambiaron", "evolution.auto.reason.failed": "Falló el proceso automático; la revisión manual sigue disponible", "evolution.auto.reason.queue-full": "La cola automática está llena", "evolution.auto.reason.model-unavailable": "No se determinó el modelo de borrador o de backtest", "evolution.auto.reason.interrupted": "El Host se detuvo; esta sugerencia no se reiniciará automáticamente", "evolution.auto.reason.daily-limit": "Se alcanzó la cuota diaria de candidatos; revísalo manualmente o espera nuevas sugerencias otro día", "evolution.auto.reason.duplicate-skill": "Esta habilidad objetivo ya se procesó hoy; revísala manualmente", "triage.title": "Guía de reutilización", "triage.durable": "Flujo reutilizable", "triage.one-off": "Candidato puntual", "triage.uncertain": "Requiere criterio", "triage.fold": "Candidatos puntuales ({count})", "triage.choose": "Expande los candidatos puntuales para revisar sugerencias", "triage.facts": "{windows} {windows:ventana|ventanas} de evidencia · {sessions} {sessions:sesión|sesiones} · {steps} {steps:paso citado|pasos citados}", "triage.rules": "Reutilizable: ≥3 ventanas, ≥20 pasos, confianza ≥0.8; puntual: 1 ventana, <20 pasos (solo afecta al orden y plegado).", "triage.soft": "Solo afecta al orden y plegado; todas las sugerencias siguen siendo accionables.", "skills.linkedWritable": "Las actualizaciones escriben en la habilidad enlazada original y afectan a cada Agente que la comparte. Puedes desactivarlo en los ajustes de Habilidades.", "skills.linkedEditable": "Enlazada", "markdown.footnotes": "Notas al pie" }, fr: { "page.title": "Compétences", "page.description": "Vos compétences DSH et leur évolution", "page.readOnly": "Lecture seule", "tabs.aria": "Pages Compétences", "tabs.waiting": "{count} en attente", "tabs.trash": "{count} {count:élément supprimé|éléments supprimés}", "tab.skills": "Compétences", "tab.evolution": "Évolution", "tab.evals": "Évaluations", "tab.market": "Marché", "tab.trash": "Corbeille", "common.loading": "Chargement…", "common.retry": "Réessayer", "common.cancel": "Annuler", "common.close": "Fermer", "common.delete": "Supprimer", "common.edit": "Modifier", "common.save": "Enregistrer", "common.saving": "Enregistrement…", "common.more": "Plus", "common.view": "Afficher", "common.settings": "Paramètres", "time.justNow": "à l'instant", "time.minutes": "il y a {count} min", "time.hours": "il y a {count} h", "time.days": "il y a {count} j", "root.project-dsh": "Projet", "root.project-agents": "Projet · .agents", "root.user-dsh": "Utilisateur", "root.user-agents": "Utilisateur · .agents", "skills.search": "Rechercher des compétences", "skills.new": "Nouvelle", "skills.noMatch": "Aucune compétence correspondante", "skills.problems": "{count} {count:fichier ne peut pas être chargé|fichiers ne peuvent pas être chargés}", "skills.empty": "Aucune compétence pour le moment", "skills.emptyBody": "Créez-en une ou installez-en une depuis le marché.", "skills.browseMarket": "Ouvrir le marché", "skills.select": "Choisir une compétence", "skills.selectBody": "Sélectionnez-en une à gauche pour l'afficher.", "skills.use": "Utiliser", "skills.useHint": "Utiliser /{name} dans la conversation", "skills.used": "/{name} inséré dans la saisie", "skills.noConversation": "Ouvrez une conversation pour utiliser une compétence", "skills.toggle": "Activer {name}", "skills.linked": "Liée · lecture seule", "skills.linkedReadOnly": "Cette compétence liée est en lecture seule ; activez les mises à jour liées dans les paramètres pour les cibles de confiance, ou copiez-la localement.", "skills.shadowed": "Masquée", "skills.shadowedBy": "DSH charge {key} du même nom ; ce fichier est sans effet.", "skills.waitingCount": "{count} {count:amélioration|améliorations} en attente", "skills.files": "Fichiers", "skills.improve": "Améliorer", "skills.improveTitle": "Améliorer {name}", "skills.improveNote": "Ce qu'il faut modifier (facultatif)", "skills.improvePlaceholder": "Par exemple : regrouper les notes de version par module", "skills.improveStart": "Rédiger un brouillon", "skills.improveStarted": "Rédaction en cours ; le brouillon apparaîtra dans Évolution dès qu'il sera prêt", "skills.remove": "Retirer", "skills.removeTitle": "Retirer {name} ?", "skills.removeBody": "La compétence est déplacée dans l'onglet Corbeille, où vous pouvez la restaurer ou la supprimer définitivement.", "skills.removed": "{name} retirée", "skills.deleted": "{name} supprimée", "invocation.label": "Invocation", "invocation.both": "Auto + /", "invocation.slash": "/ uniquement", "invocation.model": "Auto uniquement", "invocation.off": "Désactivée", "invocation.slashShort": "/ uniquement", "invocation.modelShort": "Auto uniquement", "editor.title": "Modifier {name}", "create.title": "Nouvelle compétence", "create.name": "Nom", "create.nameHint": "Lettres minuscules, chiffres et tirets", "create.description": "Description", "create.descriptionHint": "Ce qu'elle fait et quand l'utiliser ; DSH s'en sert pour la charger", "create.root": "Emplacement", "create.submit": "Créer", "versions.title": "Versions", "versions.empty": "Aucune version pour le moment", "versions.current": "Actuelle", "versions.compare": "Comparer", "versions.compareTitle": "Comparé avec {time}", "versions.restore": "Restaurer", "tests.title": "Tests", "tests.count": "{count} cas", "tests.lastScore": "dernier {score}", "tests.run": "Backtester", "tests.running": "Backtest en cours", "tests.add": "Ajouter un cas", "tests.empty": "Aucun cas pour le moment. Les bilans en ajoutent au fil du travail ; vous pouvez aussi ajouter les vôtres.", "tests.checks": "{count} {count:vérification|vérifications}", "tests.must": "Obligatoire", "tests.should": "Recommandé", "tests.origin": "Conversation source", "tests.enabled": "Utiliser le cas {title}", "tests.progress": "Backtest {done}/{total}", "tests.score": "score {score}", "tests.errors": "{count} non {count:exécuté|exécutés}", "tests.unmeasured": "{count} non {count:mesuré|mesurés}", "tests.withoutSkill": "Sans compétence", "tests.deleteTitle": "Supprimer ce cas ?", "tests.newTitle": "Ajouter un cas", "tests.editTitle": "Modifier le cas", "tests.case": "Cas", "tests.caseTitle": "Titre", "tests.prompt": "Tâche", "tests.promptHint": "Ce que dirait l'utilisateur", "tests.context": "Contexte (facultatif)", "tests.requiresVision": "Requiert une entrée image", "tests.requiresVisionHint": "Les backtests texte ignorent les cas image ; marqués non mesurés et exclus des scores.", "tests.checksLabel": "Vérifications", "tests.checkPlaceholder": "Le résultat devrait…", "tests.addCheck": "Ajouter", "run.steps": "Étapes", "run.answer": "Réponse", "evolution.pending": "En attente", "evolution.pendingCount": "En attente ({count})", "evolution.done": "Traitées", "evolution.reviewNow": "Analyser maintenant", "evolution.reviewFound": "Bilan terminé : {count} {count:suggestion|suggestions}", "evolution.reviewNothing": "Bilan terminé : rien de nouveau", "evolution.off": "L'auto-évolution est désactivée", "evolution.offBody": "Une fois activée, les conversations terminées sont analysées en arrière-plan pour suggérer des compétences.", "evolution.turnOn": "Activer", "evolution.empty.pending": "Rien en attente", "evolution.emptyBody.pending": "Les nouvelles suggestions apparaissent ici.", "evolution.empty.done": "Aucun historique", "evolution.emptyBody.done": "Les suggestions adoptées et ignorées restent ici.", "evolution.empty.evidence": "Aucune preuve pour le moment", "evolution.emptyBody.evidence": "Les conversations analysées lors d'un bilan restent ici.", "evolution.from": "De « {session} »", "evolution.confidence": "confiance {value} %", "evolution.draft": "Brouillon", "evolution.dismiss": "Ignorer", "evolution.dismissed": "Ignorée", "evolution.noAgent": "Aucun Agent de tâches disponible", "evolution.drafting": "Rédaction en cours", "evolution.draftFailed": "Échec de rédaction du brouillon : {error}", "evolution.skillGone": "Le fichier de compétence d'origine a été supprimé, déplacé ou est illisible. Restaurez-le ou ouvrez la compétence à son nouvel emplacement et générez un nouveau brouillon.", "evolution.originUnavailable": "L'espace de travail d'origine n'a pas été enregistré de manière fiable. Sélectionnez son espace de travail d'origine, ouvrez la compétence sur la page Compétences et générez un nouveau brouillon ; le brouillon et les preuves existants sont conservés.", "evolution.currentSkill": "Fichier de compétence actuel", "evolution.skillChanged": "La compétence a changé après cette suggestion ; le brouillon part de sa version actuelle.", "evolution.adopted": "Adoptée", "evolution.openSkill": "Ouvrir la compétence", "evolution.evidence": "Preuves", "evolution.evidenceMeta": "{conversations} {conversations:conversation|conversations} · {steps} {steps:étape|étapes}", "evolution.evidenceGone": "Cet enregistrement de conversation a été supprimé.", "evolution.openRecord": "Enregistrement complet", "draft.title": "Brouillon", "evolution.targetRoot": "Destination suggérée : {root}", "draft.writeTo": "Écrire dans", "draft.adopt": "Adopter", "draft.discard": "Abandonner", "draft.edit": "Modifier le brouillon", "draft.redraft": "Réécrire", "draft.redraftNote": "Ce qu'il faut modifier", "draft.redraftPlaceholder": "Par exemple : placer les changements incompatibles en premier", "draft.redraftStart": "Réécrire", "draft.adopted": "Adopté ; {name} a été mise à jour", "draft.backtest": "Backtest", "draft.current": "Actuelle", "draft.withoutSkill": "Sans compétence", "draft.candidate": "Brouillon", "draft.same": "Égal", "draft.backtesting": "Backtest {done}/{total}", "draft.noTests": "Aucun cas de test ; non backtesté", "draft.notTested": "Pas encore backtesté", "draft.notComparable": "Les backtests ne sont pas comparables", "draft.runBacktest": "Backtester", "draft.rerun": "Relancer le backtest", "draft.excluded": "{count} {count:cas n'a pas pu s'exécuter et est exclu|cas n'ont pas pu s'exécuter et sont exclus}", "draft.runDetail": "Backtest du brouillon", "draft.adoptAnyway": "Adopter quand même ?", "draft.regressed": "Le brouillon obtient un score inférieur à la version actuelle.", "records.stats": "{turns} {turns:tour|tours} · {tools} {tools:appel d'outil|appels d'outils}", "records.failures": "{count} {count:échec|échecs}", "records.pinned": "Épinglé", "records.pin": "Épingler", "records.unpin": "Désépingler", "records.suggested": "{count} {count:suggestion|suggestions}", "records.suggestion": "Suggestion {index}", "records.deriveAll": "Dériver des cas", "records.deriveChosen": "Dériver ({count})", "records.deriveFor": "Pour la compétence", "records.derive": "Créer", "records.derived": "{count} cas {count:ajouté|ajoutés} à {name}", "records.deleteTitle": "Supprimer cet enregistrement ?", "records.deleteBody": "Les suggestions et cas qui le citent perdront cette preuve.", "evidence.skill": "Compétence", "evidence.allSkills": "Toutes les compétences", "evals.empty": "Aucune compétence pour le moment", "evals.emptyBody": "Une fois que vous avez des compétences, rédigez leurs cas de test et backtestez-les ici.", "evals.tested": "Avec cas", "evals.untested": "Sans cas", "evals.off": "{count} {count:désactivé|désactivés}", "evals.notCreated": "Non créée", "evals.notCreatedBody": "Pas encore créée : un backtest mesure les résultats sans elle.", "evals.openSuggestion": "Ouvrir la suggestion", "timeline.turn": "Tour {turn}", "timeline.user": "Utilisateur", "timeline.assistant": "Réponse", "timeline.tool": "Outil", "timeline.skill": "Compétence", "timeline.failed": "Échec", "market.search": "Rechercher des compétences", "market.category": "Catégorie", "market.allCategories": "Toutes les catégories", "market.refresh": "Actualiser", "market.empty": "Aucune compétence trouvée", "market.emptyBody": "Essayez d'autres mots-clés ou ajoutez un dépôt ou un site dans Sources.", "market.preview": "Ouvrir {name}", "market.install": "Installer", "market.installing": "Installation", "market.update": "Mettre à jour", "market.overwrite": "Écraser", "market.installTo": "Installer dans", "market.open": "Ouvrir la compétence", "market.installed": "{name} installée", "market.updated": "{name} mise à jour", "market.state.installed": "Installée", "market.state.update": "Mise à jour", "market.state.modified": "Modifiée localement", "market.state.conflict": "Nom déjà pris", "market.state.available": "Disponible", "market.version": "v{version}", "market.installedVersion": "Installée v{version}", "market.upstreamLicense": "Licence amont", "market.trust": "Les compétences peuvent exécuter des scripts ; vérifiez la source et lisez SKILL.md avant d'installer.", "market.overwriteHint": "Cette compétence a été modifiée localement ; la mise à jour remplace les modifications (l'ancienne version est déplacée dans la corbeille).", "market.files": "{count} {count:fichier|fichiers} · {size}", "market.searchPlaceholder": "Rechercher des compétences ou coller un dépôt GitHub / une URL", "market.sources": "Sources · {count}", "market.addAsSource": "{kind} · {label}", "market.listed": "Vos sources · {count}", "market.indexed": "skills.sh · {count}", "market.searching": "Recherche sur skills.sh", "market.searchFailed": "Impossible de rechercher sur skills.sh pour le moment : {error}", "market.indexEmpty": "Aucune compétence correspondante sur skills.sh.", "market.installs": "{count} {count:installation|installations}", "market.audits": "Audit de sécurité", "market.audit.pass": "Réussi", "market.audit.warn": "Avertissement", "market.audit.fail": "Échec", "market.viewSource": "Voir la source", "market.partial": "GitHub est inaccessible pour le moment ; voici la copie texte conservée par skills.sh. L'installation récupère tous les fichiers depuis GitHub.", "sources.title": "Sources", "sources.builtin": "Intégrée", "sources.featured": "Sélection", "sources.kind.catalog": "Catalogue", "sources.kind.well-known": "Site Web", "sources.kind.github": "Dépôt GitHub", "sources.kind.search": "Recherche", "sources.detected.catalog": "Catalogue local", "sources.detected.json": "Fichier JSON", "sources.detected.github": "Dépôt GitHub", "sources.detected.well-known": "Site Web", "sources.entries": "{count} {count:compétence|compétences}", "sources.updated": "mis à jour {time}", "sources.searchMeta": "Annuaire ouvert de compétences, recherché à la saisie", "sources.refresh": "Actualiser", "sources.remove": "Retirer", "sources.enabled": "Utiliser {name}", "sources.addTitle": "Ajouter une source", "sources.placeholder": "owner/repo, une URL ou un fichier JSON", "sources.hint": "Dépôts GitHub, sites publiant des Agent Skills et fichiers JSON de catalogue.", "sources.unknown": "Non reconnu : saisissez owner/repo, une URL ou un fichier JSON", "sources.duplicate": "Cette source est déjà ajoutée", "sources.add": "Ajouter", "sources.addAs": "Ajouter comme source", "sources.adding": "Ajout", "sources.added": "{name} ajoutée avec {count} {count:compétence|compétences}", "sources.done": "Terminé", "sources.formats": "Formats de sources pris en charge", "sources.format.github": "Dépôt GitHub (owner/repo ou URL) indexant chaque SKILL.md.", "sources.format.well-known": "Sites Web publiant un index /.well-known/agent-skills/.", "sources.format.catalog": "Fichier JSON de catalogue (URL ou chemin local) avec descriptions bilingues.", "signal.correction": "Correction", "signal.directive": "Dorénavant", "signal.tool-failure": "Échec d'outil", "signal.approach-change": "Changement d'approche", "signal.procedure": "Procédure réutilisable", "signal.skill-gap": "Lacune de compétence", "signal.skill-misleading": "Description trompeuse", "signal.success": "Approche validée", "status.pending": "En attente", "status.drafting": "Rédaction", "status.review": "Brouillon à réviser", "status.adopted": "Adoptée", "status.dismissed": "Ignorée", "status.expired": "Expirée", "status.invalidated": "Invalidée", "action.create": "Nouvelle", "action.update": "Améliorer", "versions.reason.original": "Originale", "versions.reason.edit": "Modification", "versions.reason.evolution": "Évolution", "versions.reason.restore": "Restauration", "versions.reason.invocation": "Commutation", "versions.reason.create": "Créée", "run.status.running": "En cours", "run.status.completed": "Terminé", "run.status.failed": "Échoué", "run.status.interrupted": "Interrompu", "run.verdict.pass": "Réussi", "run.verdict.fail": "Échoué", "run.verdict.error": "Erreur", "run.verdict.unmeasured": "Non mesuré", "run.requiresVision": "Ce cas requiert une entrée image que les backtests texte seuls ne peuvent pas recevoir. Aucun modèle n'a été appelé ; ce cas est exclu des scores et des comparaisons de référence.", "versions.reason.install": "Installation", "diff.copy": "Copier", "diff.copied": "Copié", "diff.collapse": "Réduire", "diff.expand": "Afficher {count} {count:ligne supplémentaire|lignes supplémentaires}", "diff.code": "SKILL.md", "diff.wrap": "Retour à la ligne", "diff.unwrap": "Sans retour à la ligne", "common.less": "Moins", "common.moreCount": "{count} de plus", "tests.history": "Backtests", "trash.title": "Corbeille", "trash.body": "Les compétences retirées restent sur le disque ici : restaurez-en une ou supprimez-la définitivement.", "trash.emptyTitle": "La corbeille est vide", "trash.emptyBody": "Retirer une compétence depuis l'onglet Compétences la place d'abord ici.", "trash.meta": "{time} · {size}", "trash.restore": "Restaurer", "trash.restoreHint": "La remettre à son emplacement d'origine", "trash.restored": "{name} restaurée", "trash.purge": "Supprimer", "trash.purgeTitle": "Supprimer définitivement {name} ?", "trash.purgeBody": "Les fichiers sont supprimés du disque et ne peuvent pas être récupérés.", "trash.purged": "{name} supprimée définitivement", "trash.empty": "Vider", "trash.clearTitle": "Vider la corbeille ({count} {count:élément|éléments}) ?", "trash.clearBody": "Ces fichiers sont supprimés du disque et ne peuvent pas être récupérés.", "trash.emptied": "Corbeille vidée ({count} {count:élément|éléments})", "trash.file": "Fichier Markdown", "trash.bundle": "Paquet de compétence", "trash.restoreTitle": "Restaurer {name}", "trash.chooseRoot": "Choisir un emplacement de restauration", "trash.original": "Emplacement d'origine", "trash.chooseHint": "Choisissez un emplacement ou un autre nom. Remplacer une compétence exige une confirmation et conserve sa version actuelle dans la corbeille.", "trash.replace": "Remplacer la compétence existante et conserver sa version actuelle dans la corbeille", "trash.confirmName": "Saisissez {name} pour confirmer la suppression définitive", "evolution.model": "Modèle global", "evolution.modelCard": "Modèle de l'élément", "evolution.modelAuto": "Suivre par défaut", "evolution.modelAutoHint": "Utiliser le modèle de l'Agent de tâches actuel", "evolution.deleteTitle": "Supprimer cette suggestion ?", "evolution.deleteBody": "Son brouillon et les références de preuves qu'elle cite seront également supprimés ; cette action est irréversible.", "evolution.deleted": "Supprimée", "evolution.missing": "Cette suggestion a été supprimée", "evolution.missingBody": "Sélectionnez une autre suggestion à gauche ou revenez à Preuves pour lire l'enregistrement d'origine.", "evolution.loadFailed": "Impossible de charger cette suggestion", "evolution.loadFailedBody": "Réessayez ou sélectionnez une autre suggestion à gauche.", "tests.model": "Modèle global", "tests.modelCard": "Modèle de l'élément", "tests.modelAuto": "Suivre par défaut", "draft.baseChanged": "La compétence d'origine a changé. Ce brouillon est obsolète ; régénérez-le à partir du fichier actuel et backtestez-le.", "draft.targetExists": "Une compétence portant ce nom existe déjà. Régénérez une mise à jour et backtestez-la avant adoption.", "draft.refreshGuidance": "Régénérez à partir du fichier de compétence actuel en préservant ses dernières modifications, puis lancez les backtests.", "draft.regenerate": "Réécrire et tester", "draft.cancelBacktest": "Annuler les backtests", "draft.interrupted": "Les backtests ont été interrompus. Relancez-les ou vérifiez le brouillon avant une adoption manuelle.", "evolution.auto.title": "Adoption automatique", "evolution.auto.history": "Activité d'adoption automatique", "evolution.auto.attempt": "Tentative {count}", "evolution.auto.scores": "Référence {baseline} / brouillon {draft}", "evolution.auto.stage.queued": "En file d'attente", "evolution.auto.stage.drafting": "Rédaction", "evolution.auto.stage.backtesting": "Backtest comparatif", "evolution.auto.stage.rewriting": "Réécriture après régression", "evolution.auto.stage.adopted": "Adoptée automatiquement", "evolution.auto.stage.paused": "Traitement automatique arrêté", "evolution.auto.stage.review": "Révision manuelle requise", "evolution.auto.reason.disabled": "L'adoption automatique ou ses autorisations requises ont été désactivées", "evolution.auto.reason.no-cases": "Aucun cas d'évaluation activé", "evolution.auto.reason.case-limit": "Les cas activés dépassent la limite par exécution ; ajustez les cas ou la limite et examinez cette suggestion manuellement", "evolution.auto.reason.unmeasured": "Certaines vérifications n'ont pas été entièrement mesurées, ou un cas requiert des images, a échoué ou a été interrompu", "evolution.auto.reason.regressed": "Au moins un cas ou une vérification précédemment réussie a régressé", "evolution.auto.reason.changed": "La suggestion, le brouillon ou les cas d'évaluation ont changé", "evolution.auto.reason.failed": "Le traitement automatique a échoué ; la révision manuelle reste disponible", "evolution.auto.reason.queue-full": "La file de traitement automatique est pleine", "evolution.auto.reason.model-unavailable": "Aucun modèle de brouillon ou de backtest résolu", "evolution.auto.reason.interrupted": "Hôte arrêté ; cette suggestion ne redémarrera pas automatiquement", "evolution.auto.reason.daily-limit": "Quota quotidien de candidats atteint ; examinez manuellement ou attendez de nouvelles suggestions un autre jour", "evolution.auto.reason.duplicate-skill": "Cette compétence cible a déjà été traitée aujourd'hui ; examinez manuellement", "triage.title": "Indice de réutilisation", "triage.durable": "Flux réutilisable", "triage.one-off": "Candidat ponctuel", "triage.uncertain": "À évaluer", "triage.fold": "Candidats ponctuels ({count})", "triage.choose": "Développer les candidats ponctuels pour examiner les suggestions", "triage.facts": "{windows} {windows:fenêtre|fenêtres} de preuves · {sessions} {sessions:session|sessions} · {steps} {steps:étape citée|étapes citées}", "triage.rules": "Réutilisable : ≥ 3 fenêtres, ≥ 20 étapes, confiance ≥ 0,8 ; ponctuel : 1 fenêtre, < 20 étapes (n'affecte que le tri et le repliement).", "triage.soft": "N'affecte que le tri et le repliement ; chaque suggestion reste exploitable.", "skills.linkedWritable": "Les mises à jour écrivent dans la compétence liée d'origine et affectent tous les Agents qui la partagent. Vous pouvez désactiver cela dans les paramètres Compétences.", "skills.linkedEditable": "Liée", "markdown.footnotes": "Notes de bas de page" }, de: { "page.title": "Skills", "page.description": "Ihre DSH-Skills und wie sie sich weiterentwickeln", "page.readOnly": "Schreibgeschützt", "tabs.aria": "Skills-Seiten", "tabs.waiting": "{count} ausstehend", "tabs.trash": "{count} {count:Eintrag|Einträge} entfernt", "tab.skills": "Skills", "tab.evolution": "Evolution", "tab.evals": "Evals", "tab.market": "Markt", "tab.trash": "Papierkorb", "common.loading": "Wird geladen", "common.retry": "Erneut versuchen", "common.cancel": "Abbrechen", "common.close": "Schließen", "common.delete": "Löschen", "common.edit": "Bearbeiten", "common.save": "Speichern", "common.saving": "Wird gespeichert", "common.more": "Mehr", "common.view": "Ansehen", "common.settings": "Einstellungen", "time.justNow": "gerade eben", "time.minutes": "vor {count} Min.", "time.hours": "vor {count} Std.", "time.days": "vor {count} T.", "root.project-dsh": "Projekt", "root.project-agents": "Projekt · .agents", "root.user-dsh": "Benutzer", "root.user-agents": "Benutzer · .agents", "skills.search": "Skills durchsuchen", "skills.new": "Neu", "skills.noMatch": "Kein passender Skill", "skills.problems": "{count} {count:Datei kann|Dateien können} nicht geladen werden", "skills.empty": "Noch keine Skills", "skills.emptyBody": "Erstellen Sie einen neuen Skill oder installieren Sie einen aus dem Markt.", "skills.browseMarket": "Markt öffnen", "skills.select": "Skill auswählen", "skills.selectBody": "Wählen Sie links einen Skill aus, um ihn anzuzeigen.", "skills.use": "Verwenden", "skills.useHint": "/{name} in der Unterhaltung verwenden", "skills.used": "/{name} in die Eingabe übernommen", "skills.noConversation": "Öffnen Sie eine Unterhaltung, um einen Skill zu verwenden", "skills.toggle": "{name} aktivieren", "skills.linked": "Verknüpft · schreibgeschützt", "skills.linkedReadOnly": "Verknüpfter Skill ist schreibgeschützt; aktivieren Sie verknüpfte Aktualisierungen in den Einstellungen für vertrauenswürdige Ziele oder erstellen Sie eine lokale Kopie.", "skills.shadowed": "Überschattet", "skills.shadowedBy": "DSH lädt {key} mit demselben Namen; diese Datei hat keine Wirkung.", "skills.waitingCount": "{count} {count:Verbesserung|Verbesserungen} ausstehend", "skills.files": "Dateien", "skills.improve": "Verbessern", "skills.improveTitle": "{name} verbessern", "skills.improveNote": "Was soll geändert werden (optional)", "skills.improvePlaceholder": "Zum Beispiel: Versionshinweise nach Modulen gruppieren", "skills.improveStart": "Entwerfen", "skills.improveStarted": "Entwurf wird erstellt; erscheint nach Fertigstellung unter Evolution", "skills.remove": "Entfernen", "skills.removeTitle": "{name} entfernen?", "skills.removeBody": "Der Skill wird in den Papierkorb verschoben, wo Sie ihn wiederherstellen oder endgültig löschen können.", "skills.removed": "{name} entfernt", "skills.deleted": "{name} gelöscht", "invocation.label": "Aufruf", "invocation.both": "Auto + /", "invocation.slash": "Nur /", "invocation.model": "Nur Auto", "invocation.off": "Aus", "invocation.slashShort": "Nur /", "invocation.modelShort": "Nur Auto", "editor.title": "{name} bearbeiten", "create.title": "Neuer Skill", "create.name": "Name", "create.nameHint": "Kleinbuchstaben, Ziffern und Bindestriche", "create.description": "Beschreibung", "create.descriptionHint": "Was der Skill tut und wann er eingesetzt wird; DSH lädt ihn anhand dieser Angabe", "create.root": "Speicherort", "create.submit": "Erstellen", "versions.title": "Versionen", "versions.empty": "Noch keine Versionen", "versions.current": "Aktuell", "versions.compare": "Vergleichen", "versions.compareTitle": "Verglichen mit {time}", "versions.restore": "Wiederherstellen", "tests.title": "Tests", "tests.count": "{count} {count:Testfall|Testfälle}", "tests.lastScore": "zuletzt {score}", "tests.run": "Backtest", "tests.running": "Backtest läuft", "tests.add": "Testfall hinzufügen", "tests.empty": "Noch keine Testfälle. Prüfungen fügen sie während der Arbeit hinzu; Sie können auch eigene anlegen.", "tests.checks": "{count} {count:Prüfung|Prüfungen}", "tests.must": "Muss", "tests.should": "Soll", "tests.origin": "Quellunterhaltung", "tests.enabled": "Testfall {title} aktivieren", "tests.progress": "Backtest {done}/{total}", "tests.score": "Punktzahl {score}", "tests.errors": "{count} nicht ausführbar", "tests.unmeasured": "{count} nicht gemessen", "tests.withoutSkill": "Ohne Skill", "tests.deleteTitle": "Diesen Testfall löschen?", "tests.newTitle": "Testfall hinzufügen", "tests.editTitle": "Testfall bearbeiten", "tests.case": "Testfall", "tests.caseTitle": "Titel", "tests.prompt": "Aufgabe", "tests.promptHint": "Was der Benutzer sagen würde", "tests.context": "Kontext (optional)", "tests.requiresVision": "Erfordert Bildeingabe", "tests.requiresVisionHint": "Text-Backtests überspringen Bildfälle; sie werden als nicht gemessen markiert und von der Bewertung ausgenommen.", "tests.checksLabel": "Prüfungen", "tests.checkPlaceholder": "Das Ergebnis sollte…", "tests.addCheck": "Hinzufügen", "run.steps": "Schritte", "run.answer": "Antwort", "evolution.pending": "Ausstehend", "evolution.pendingCount": "Ausstehend {count}", "evolution.done": "Erledigt", "evolution.reviewNow": "Jetzt prüfen", "evolution.reviewFound": "Geprüft: {count} {count:Vorschlag|Vorschläge}", "evolution.reviewNothing": "Geprüft: nichts Neues", "evolution.off": "Selbstevolution ist deaktiviert", "evolution.offBody": "Sobald aktiviert, werden abgeschlossene Unterhaltungen im Hintergrund auf Skill-Vorschläge geprüft.", "evolution.turnOn": "Aktivieren", "evolution.empty.pending": "Nichts ausstehend", "evolution.emptyBody.pending": "Neue Vorschläge erscheinen hier.", "evolution.empty.done": "Noch nichts erledigt", "evolution.emptyBody.done": "Übernommene und verworfene Vorschläge bleiben hier erhalten.", "evolution.empty.evidence": "Noch keine Belege", "evolution.emptyBody.evidence": "Unterhaltungen, die von einer Prüfung ausgewertet wurden, bleiben hier gespeichert.", "evolution.from": "Aus „{session}“", "evolution.confidence": "Konfidenz {value}%", "evolution.draft": "Entwerfen", "evolution.dismiss": "Verwerfen", "evolution.dismissed": "Verworfen", "evolution.noAgent": "Kein Task-Agent verfügbar", "evolution.drafting": "Entwurf wird erstellt", "evolution.draftFailed": "Entwurf fehlgeschlagen: {error}", "evolution.skillGone": "Die ursprüngliche Skill-Datei wurde gelöscht, verschoben oder ist nicht lesbar. Stellen Sie sie wieder her oder öffnen Sie den Skill am neuen Ort und erstellen Sie einen neuen Entwurf.", "evolution.originUnavailable": "Der ursprüngliche Arbeitsbereich wurde nicht zuverlässig aufgezeichnet. Wählen Sie den ursprünglichen Arbeitsbereich aus, öffnen Sie den Skill auf der Seite Skills und erstellen Sie einen neuen Entwurf; der vorhandene Entwurf und die Belege bleiben erhalten.", "evolution.currentSkill": "Aktuelle Skill-Datei", "evolution.skillChanged": "Der Skill wurde nach diesem Vorschlag geändert; der Entwurf basiert auf der aktuellen Version.", "evolution.adopted": "Übernommen", "evolution.openSkill": "Skill öffnen", "evolution.evidence": "Belege", "evolution.evidenceMeta": "{conversations} {conversations:Unterhaltung|Unterhaltungen} · {steps} {steps:Schritt|Schritte}", "evolution.evidenceGone": "Diese Unterhaltungsaufzeichnung wurde gelöscht.", "evolution.openRecord": "Vollständiges Protokoll", "draft.title": "Entwurf", "evolution.targetRoot": "Vorgeschlagenes Ziel: {root}", "draft.writeTo": "Schreiben nach", "draft.adopt": "Übernehmen", "draft.discard": "Verwerfen", "draft.edit": "Entwurf bearbeiten", "draft.redraft": "Neu entwerfen", "draft.redraftNote": "Was soll geändert werden", "draft.redraftPlaceholder": "Zum Beispiel: Breaking Changes zuerst aufführen", "draft.redraftStart": "Neu entwerfen", "draft.adopted": "Übernommen; {name} wurde aktualisiert", "draft.backtest": "Backtest", "draft.current": "Aktuell", "draft.withoutSkill": "Ohne Skill", "draft.candidate": "Entwurf", "draft.same": "Gleich", "draft.backtesting": "Backtest {done}/{total}", "draft.noTests": "Keine Testfälle; kein Backtest ausgeführt", "draft.notTested": "Noch kein Backtest ausgeführt", "draft.notComparable": "Die Backtests sind nicht vergleichbar", "draft.runBacktest": "Backtest", "draft.rerun": "Backtest wiederholen", "draft.excluded": "{count} {count:Testfall konnte|Testfälle konnten} nicht ausgeführt werden und {count:wurde|wurden} ausgeschlossen", "draft.runDetail": "Backtest des Entwurfs", "draft.adoptAnyway": "Trotzdem übernehmen?", "draft.regressed": "Der Entwurf schneidet schlechter ab als die aktuelle Version.", "records.stats": "{turns} {turns:Runde|Runden} · {tools} {tools:Tool-Aufruf|Tool-Aufrufe}", "records.failures": "{count} fehlgeschlagen", "records.pinned": "Angeheftet", "records.pin": "Anheften", "records.unpin": "Lösen", "records.suggested": "{count} {count:Vorschlag|Vorschläge}", "records.suggestion": "Vorschlag {index}", "records.deriveAll": "Testfälle ableiten", "records.deriveChosen": "Ableiten ({count})", "records.deriveFor": "Für Skill", "records.derive": "Erstellen", "records.derived": "{count} {count:Testfall|Testfälle} zu {name} hinzugefügt", "records.deleteTitle": "Dieses Protokoll löschen?", "records.deleteBody": "Vorschläge und Testfälle, die darauf verweisen, verlieren diesen Beleg.", "evidence.skill": "Skill", "evidence.allSkills": "Alle Skills", "evals.empty": "Noch keine Skills", "evals.emptyBody": "Sobald Sie Skills haben, können Sie hier Testfälle erstellen und Backtests ausführen.", "evals.tested": "Mit Testfällen", "evals.untested": "Ohne Testfälle", "evals.off": "{count} deaktiviert", "evals.notCreated": "Nicht erstellt", "evals.notCreatedBody": "Noch nicht erstellt: Ein Backtest misst die Leistung ohne diesen Skill.", "evals.openSuggestion": "Vorschlag öffnen", "timeline.turn": "Runde {turn}", "timeline.user": "Benutzer", "timeline.assistant": "Antwort", "timeline.tool": "Tool", "timeline.skill": "Skill", "timeline.failed": "Fehlgeschlagen", "market.search": "Skills durchsuchen", "market.category": "Kategorie", "market.allCategories": "Alle Kategorien", "market.refresh": "Aktualisieren", "market.empty": "Keine Skills gefunden", "market.emptyBody": "Versuchen Sie andere Begriffe oder fügen Sie unter Quellen ein Repository oder eine Website hinzu.", "market.preview": "{name} öffnen", "market.install": "Installieren", "market.installing": "Wird installiert", "market.update": "Aktualisieren", "market.overwrite": "Überschreiben", "market.installTo": "Installieren in", "market.open": "Skill öffnen", "market.installed": "{name} installiert", "market.updated": "{name} aktualisiert", "market.state.installed": "Installiert", "market.state.update": "Update verfügbar", "market.state.modified": "Lokal bearbeitet", "market.state.conflict": "Name vergeben", "market.state.available": "Verfügbar", "market.version": "v{version}", "market.installedVersion": "Installiert v{version}", "market.upstreamLicense": "Upstream-Lizenz", "market.trust": "Skills können Skripte ausführen; prüfen Sie vor der Installation die Quelle und lesen Sie SKILL.md.", "market.overwriteHint": "Dieser Skill wurde lokal bearbeitet; ein Update ersetzt Ihre Änderungen (die alte Version wandert in den Papierkorb).", "market.files": "{count} {count:Datei|Dateien} · {size}", "market.searchPlaceholder": "Skills suchen oder GitHub-Repo / URL einfügen", "market.sources": "Quellen · {count}", "market.addAsSource": "{kind} · {label}", "market.listed": "Ihre Quellen · {count}", "market.indexed": "skills.sh · {count}", "market.searching": "skills.sh wird durchsucht", "market.searchFailed": "skills.sh kann derzeit nicht durchsucht werden: {error}", "market.indexEmpty": "Keine passenden Skills auf skills.sh.", "market.installs": "{count} {count:Installation|Installationen}", "market.audits": "Sicherheitsprüfung", "market.audit.pass": "Bestanden", "market.audit.warn": "Warnung", "market.audit.fail": "Fehlgeschlagen", "market.viewSource": "Quelle anzeigen", "market.partial": "GitHub ist derzeit nicht erreichbar, daher wird die Textkopie von skills.sh angezeigt; bei der Installation werden alle Dateien von GitHub abgerufen.", "sources.title": "Quellen", "sources.builtin": "Integriert", "sources.featured": "Empfohlen", "sources.kind.catalog": "Katalog", "sources.kind.well-known": "Website", "sources.kind.github": "GitHub-Repo", "sources.kind.search": "Suche", "sources.detected.catalog": "Lokaler Katalog", "sources.detected.json": "JSON-Datei", "sources.detected.github": "GitHub-Repo", "sources.detected.well-known": "Website", "sources.entries": "{count} {count:Skill|Skills}", "sources.updated": "aktualisiert {time}", "sources.searchMeta": "Offenes Skill-Verzeichnis, Suche während der Eingabe", "sources.refresh": "Aktualisieren", "sources.remove": "Entfernen", "sources.enabled": "{name} verwenden", "sources.addTitle": "Quelle hinzufügen", "sources.placeholder": "owner/repo, eine URL oder eine JSON-Datei", "sources.hint": "GitHub-Repos, Websites mit Agent-Skills und Katalog-JSON-Dateien.", "sources.unknown": "Nicht erkannt: Geben Sie owner/repo, eine URL oder eine JSON-Datei ein", "sources.duplicate": "Diese Quelle wurde bereits hinzugefügt", "sources.add": "Hinzufügen", "sources.addAs": "Als Quelle hinzufügen", "sources.adding": "Wird hinzugefügt", "sources.added": "{name} mit {count} {count:Skill|Skills} hinzugefügt", "sources.done": "Fertig", "sources.formats": "Unterstützte Quellen", "sources.format.github": "GitHub-Repository (owner/repo oder URL), das jede SKILL.md indiziert.", "sources.format.well-known": "Websites, die einen Index unter /.well-known/agent-skills/ veröffentlichen.", "sources.format.catalog": "Katalog-JSON-Datei (URL oder lokaler Pfad) mit zweisprachigen Beschreibungen.", "signal.correction": "Korrektur", "signal.directive": "Künftig immer so", "signal.tool-failure": "Tool-Fehler", "signal.approach-change": "Ansatz geändert", "signal.procedure": "Wiederverwendbarer Ablauf", "signal.skill-gap": "Skill-Lücke", "signal.skill-misleading": "Irreführende Beschreibung", "signal.success": "Bewährter Ansatz", "status.pending": "Ausstehend", "status.drafting": "Entwurf läuft", "status.review": "Entwurf zur Prüfung", "status.adopted": "Übernommen", "status.dismissed": "Verworfen", "status.expired": "Abgelaufen", "status.invalidated": "Ungültig geworden", "action.create": "Neu", "action.update": "Verbessern", "versions.reason.original": "Original", "versions.reason.edit": "Bearbeitet", "versions.reason.evolution": "Evolution", "versions.reason.restore": "Wiederhergestellt", "versions.reason.invocation": "Umschaltung", "versions.reason.create": "Erstellt", "run.status.running": "Läuft", "run.status.completed": "Fertig", "run.status.failed": "Fehlgeschlagen", "run.status.interrupted": "Unterbrochen", "run.verdict.pass": "Bestanden", "run.verdict.fail": "Nicht bestanden", "run.verdict.error": "Fehler", "run.verdict.unmeasured": "Nicht gemessen", "run.requiresVision": "Dieser Testfall erfordert eine Bildeingabe, die reine Text-Backtests nicht verarbeiten können. Es wurde kein Modell aufgerufen; der Fall wird aus Bewertungen und Basisvergleichen ausgeschlossen.", "versions.reason.install": "Installiert", "diff.copy": "Kopieren", "diff.copied": "Kopiert", "diff.collapse": "Einklappen", "diff.expand": "{count} weitere {count:Zeile|Zeilen} anzeigen", "diff.code": "SKILL.md", "diff.wrap": "Zeilen umbrechen", "diff.unwrap": "Nicht umbrechen", "common.less": "Weniger", "common.moreCount": "{count} weitere", "tests.history": "Backtests", "trash.title": "Papierkorb", "trash.body": "Entfernte Skills bleiben hier auf der Festplatte: Stellen Sie sie wieder her oder löschen Sie sie endgültig.", "trash.emptyTitle": "Der Papierkorb ist leer", "trash.emptyBody": "Wenn Sie einen Skill im Tab „Skills“ entfernen, landet er zunächst hier.", "trash.meta": "{time} · {size}", "trash.restore": "Wiederherstellen", "trash.restoreHint": "Am ursprünglichen Speicherort wiederherstellen", "trash.restored": "{name} wiederhergestellt", "trash.purge": "Löschen", "trash.purgeTitle": "{name} endgültig löschen?", "trash.purgeBody": "Die Dateien werden von der Festplatte gelöscht und können nicht wiederhergestellt werden.", "trash.purged": "{name} endgültig gelöscht", "trash.empty": "Leeren", "trash.clearTitle": "Papierkorb mit {count} {count:Eintrag|Einträgen} leeren?", "trash.clearBody": "Diese Dateien werden von der Festplatte gelöscht und können nicht wiederhergestellt werden.", "trash.emptied": "Papierkorb geleert ({count} {count:Eintrag|Einträge})", "trash.file": "Markdown-Datei", "trash.bundle": "Skill-Paket", "trash.restoreTitle": "{name} wiederherstellen", "trash.chooseRoot": "Speicherort zur Wiederherstellung wählen", "trash.original": "Ursprünglicher Speicherort", "trash.chooseHint": "Wählen Sie einen Speicherort oder einen anderen Namen. Das Ersetzen eines vorhandenen Skills erfordert eine Bestätigung und behält dessen aktuelle Version im Papierkorb.", "trash.replace": "Vorhandenen Skill ersetzen und aktuelle Version im Papierkorb behalten", "trash.confirmName": "Geben Sie {name} ein, um das endgültige Löschen zu bestätigen", "evolution.model": "Globales Modell", "evolution.modelCard": "Element-Modell", "evolution.modelAuto": "Standard folgen", "evolution.modelAutoHint": "Das Modell des aktuellen Task-Agent verwenden", "evolution.deleteTitle": "Diesen Vorschlag löschen?", "evolution.deleteBody": "Der zugehörige Entwurf und die zitierten Belegverweise werden ebenfalls entfernt. Dies kann nicht rückgängig gemacht werden.", "evolution.deleted": "Gelöscht", "evolution.missing": "Dieser Vorschlag wurde gelöscht", "evolution.missingBody": "Wählen Sie links einen anderen Vorschlag aus oder kehren Sie zu Belege zurück, um das Originalprotokoll zu lesen.", "evolution.loadFailed": "Dieser Vorschlag konnte nicht geladen werden", "evolution.loadFailedBody": "Versuchen Sie es erneut oder wählen Sie links einen anderen Vorschlag aus.", "tests.model": "Globales Modell", "tests.modelCard": "Element-Modell", "tests.modelAuto": "Standard folgen", "draft.baseChanged": "Der ursprüngliche Skill wurde geändert. Dieser Entwurf ist veraltet; erstellen Sie ihn auf Basis der aktuellen Datei neu und führen Sie einen Backtest aus.", "draft.targetExists": "Ein Skill mit diesem Namen existiert bereits. Erstellen Sie einen Verbesserungsentwurf neu und testen Sie ihn vor der Übernahme.", "draft.refreshGuidance": "Auf Basis der aktuellen Skill-Datei neu erstellen, die jüngsten Änderungen beibehalten und anschließend Backtests ausführen.", "draft.regenerate": "Neu entwerfen & testen", "draft.cancelBacktest": "Backtests abbrechen", "draft.interrupted": "Backtests wurden unterbrochen. Führen Sie sie erneut aus oder prüfen Sie den Entwurf vor der manuellen Übernahme.", "evolution.auto.title": "Automatische Übernahme", "evolution.auto.history": "Aktivität der automatischen Übernahme", "evolution.auto.attempt": "Versuch {count}", "evolution.auto.scores": "Basis {baseline} / Entwurf {draft}", "evolution.auto.stage.queued": "In Warteschlange", "evolution.auto.stage.drafting": "Entwurf wird erstellt", "evolution.auto.stage.backtesting": "Paarweiser Backtest läuft", "evolution.auto.stage.rewriting": "Überarbeitung nach Regression", "evolution.auto.stage.adopted": "Automatisch übernommen", "evolution.auto.stage.paused": "Automatische Verarbeitung gestoppt", "evolution.auto.stage.review": "Manuelle Prüfung erforderlich", "evolution.auto.reason.disabled": "Automatische Übernahme oder erforderliche Berechtigungen wurden deaktiviert", "evolution.auto.reason.no-cases": "Keine aktivierten Testfälle", "evolution.auto.reason.case-limit": "Aktivierte Testfälle überschreiten das Limit pro Durchlauf; passen Sie Testfälle oder Limit an und prüfen Sie diesen Vorschlag manuell", "evolution.auto.reason.unmeasured": "Einige Prüfungen wurden nicht vollständig gemessen, oder ein Testfall erfordert Bilder, ist fehlgeschlagen oder wurde unterbrochen", "evolution.auto.reason.regressed": "Mindestens ein Testfall oder eine zuvor bestandene Prüfung hat sich verschlechtert", "evolution.auto.reason.changed": "Vorschlag, Entwurf oder Testfälle wurden geändert", "evolution.auto.reason.failed": "Automatische Verarbeitung fehlgeschlagen; manuelle Prüfung bleibt verfügbar", "evolution.auto.reason.queue-full": "Automatische Warteschlange ist voll", "evolution.auto.reason.model-unavailable": "Kein aufgelöstes Entwurfs- oder Backtest-Modell", "evolution.auto.reason.interrupted": "Host wurde gestoppt; dieser Vorschlag wird nicht automatisch neu gestartet", "evolution.auto.reason.daily-limit": "Tägliches Kandidatenkontingent erreicht; prüfen Sie manuell oder warten Sie an einem anderen Tag auf neue Vorschläge", "evolution.auto.reason.duplicate-skill": "Dieses Skill-Ziel wurde heute bereits verarbeitet; bitte manuell prüfen", "triage.title": "Wiederverwendungs-Hinweis", "triage.durable": "Wiederverwendbarer Workflow", "triage.one-off": "Einmalkandidat", "triage.uncertain": "Beurteilung erforderlich", "triage.fold": "Einmalkandidaten ({count})", "triage.choose": "Einmalkandidaten ausklappen, um Vorschläge zu prüfen", "triage.facts": "{windows} Belegfenster · {sessions} Sitzungen · {steps} zitierte Schritte", "triage.rules": "Wiederverwendbar: ≥3 Fenster, ≥20 Schritte, ≥0,8 Konfidenz; Einmalig: 1 Fenster, <20 Schritte (wirkt sich nur auf Sortierung/Einklappen aus).", "triage.soft": "Wirkt sich nur auf Sortierung und Einklappen aus; jeder Vorschlag bleibt bearbeitbar.", "skills.linkedWritable": "Aktualisierungen werden in den ursprünglichen verknüpften Skill geschrieben und betreffen jeden Agent, der ihn nutzt. Sie können dies in den Skill-Einstellungen deaktivieren.", "skills.linkedEditable": "Verknüpft", "markdown.footnotes": "Fußnoten" }, ru: { "page.title": "Навыки", "page.description": "Ваши навыки DSH и их эволюция", "page.readOnly": "Только чтение", "tabs.aria": "Страницы навыков", "tabs.waiting": "Ожидает: {count}", "tabs.trash": "{count} {count:удалённый элемент|удалённых элемента|удалённых элементов}", "tab.skills": "Навыки", "tab.evolution": "Эволюция", "tab.evals": "Оценка", "tab.market": "Маркет", "tab.trash": "Корзина", "common.loading": "Загрузка", "common.retry": "Повторить", "common.cancel": "Отмена", "common.close": "Закрыть", "common.delete": "Удалить", "common.edit": "Редактировать", "common.save": "Сохранить", "common.saving": "Сохранение", "common.more": "Ещё", "common.view": "Просмотр", "common.settings": "Настройки", "time.justNow": "только что", "time.minutes": "{count} мин назад", "time.hours": "{count} ч назад", "time.days": "{count} дн назад", "root.project-dsh": "Проект", "root.project-agents": "Проект · .agents", "root.user-dsh": "Пользователь", "root.user-agents": "Пользователь · .agents", "skills.search": "Поиск навыков", "skills.new": "Создать", "skills.noMatch": "Подходящих навыков не найдено", "skills.problems": "Не удалось загрузить {count} {count:файл|файла|файлов}", "skills.empty": "Навыков пока нет", "skills.emptyBody": "Создайте новый или установите из маркета.", "skills.browseMarket": "Открыть маркет", "skills.select": "Выберите навык", "skills.selectBody": "Выберите навык слева, чтобы просмотреть его.", "skills.use": "Использовать", "skills.useHint": "Использовать /{name} в диалоге", "skills.used": "Вставлено /{name} в поле ввода", "skills.noConversation": "Откройте диалог, чтобы использовать навык", "skills.toggle": "Включить {name}", "skills.linked": "Связанный · только чтение", "skills.linkedReadOnly": "Связанный навык открыт только для чтения; включите обновление связанных навыков в настройках для доверенных целей или скопируйте его локально.", "skills.shadowed": "Перекрыт", "skills.shadowedBy": "DSH загружает одноимённый {key}; этот файл не действует.", "skills.waitingCount": "{count} {count:улучшение|улучшения|улучшений} в ожидании", "skills.files": "Файлы", "skills.improve": "Улучшить", "skills.improveTitle": "Улучшить {name}", "skills.improveNote": "Что изменить (необязательно)", "skills.improvePlaceholder": "Например: группировать примечания к релизу по модулям", "skills.improveStart": "Создать черновик", "skills.improveStarted": "Черновик создаётся; после готовности он появится во вкладке «Эволюция»", "skills.remove": "Удалить", "skills.removeTitle": "Удалить {name}?", "skills.removeBody": "Навык переместится во вкладку «Корзина», откуда его можно восстановить или удалить навсегда.", "skills.removed": "Навык {name} перемещён в корзину", "skills.deleted": "Навык {name} удалён", "invocation.label": "Вызов", "invocation.both": "Авто + /", "invocation.slash": "Только /", "invocation.model": "Только авто", "invocation.off": "Выкл.", "invocation.slashShort": "Только /", "invocation.modelShort": "Только авто", "editor.title": "Редактировать {name}", "create.title": "Новый навык", "create.name": "Имя", "create.nameHint": "Строчные буквы, цифры и дефисы", "create.description": "Описание", "create.descriptionHint": "Что делает и когда использовать; DSH ориентируется на это при загрузке", "create.root": "Расположение", "create.submit": "Создать", "versions.title": "Версии", "versions.empty": "Версий пока нет", "versions.current": "Текущая", "versions.compare": "Сравнить", "versions.compareTitle": "Сравнение с версией от {time}", "versions.restore": "Восстановить", "tests.title": "Тесты", "tests.count": "{count} {count:кейс|кейса|кейсов}", "tests.lastScore": "последний: {score}", "tests.run": "Бэктест", "tests.running": "Бэктест…", "tests.add": "Добавить кейс", "tests.empty": "Кейсов пока нет. Анализы добавляют их в процессе работы; вы также можете добавить свои.", "tests.checks": "{count} {count:проверка|проверки|проверок}", "tests.must": "Обязательно", "tests.should": "Желательно", "tests.origin": "Исходный диалог", "tests.enabled": "Использовать кейс {title}", "tests.progress": "Бэктест {done}/{total}", "tests.score": "оценка {score}", "tests.errors": "Не удалось запустить: {count}", "tests.unmeasured": "Не оценено: {count}", "tests.withoutSkill": "Без навыка", "tests.deleteTitle": "Удалить этот кейс?", "tests.newTitle": "Добавить кейс", "tests.editTitle": "Редактировать кейс", "tests.case": "Кейс", "tests.caseTitle": "Название", "tests.prompt": "Задача", "tests.promptHint": "Что сказал бы пользователь", "tests.context": "Контекст (необязательно)", "tests.requiresVision": "Требует ввод изображений", "tests.requiresVisionHint": "Текстовые бэктесты пропускают кейсы с изображениями; они помечаются как неоценённые и исключаются из оценок.", "tests.checksLabel": "Проверки", "tests.checkPlaceholder": "Результат должен…", "tests.addCheck": "Добавить", "run.steps": "Шаги", "run.answer": "Ответ", "evolution.pending": "Ожидающие", "evolution.pendingCount": "Ожидающие ({count})", "evolution.done": "Завершённые", "evolution.reviewNow": "Проанализировать сейчас", "evolution.reviewFound": "Анализ завершён: {count} {count:предложение|предложения|предложений}", "evolution.reviewNothing": "Анализ завершён: ничего нового", "evolution.off": "Самоэволюция выключена", "evolution.offBody": "После включения завершённые диалоги анализируются в фоне для предложений по навыкам.", "evolution.turnOn": "Включить", "evolution.empty.pending": "Нет ожидающих предложений", "evolution.emptyBody.pending": "Новые предложения появятся здесь.", "evolution.empty.done": "Пока пусто", "evolution.emptyBody.done": "Принятые и отклонённые предложения сохраняются здесь.", "evolution.empty.evidence": "Оснований пока нет", "evolution.emptyBody.evidence": "Проанализированные диалоги сохраняются здесь.", "evolution.from": "Из «{session}»", "evolution.confidence": "уверенность {value}%", "evolution.draft": "Черновик", "evolution.dismiss": "Отклонить", "evolution.dismissed": "Отклонено", "evolution.noAgent": "Нет доступного агента задач", "evolution.drafting": "Создание черновика", "evolution.draftFailed": "Не удалось создать черновик: {error}", "evolution.skillGone": "Исходный файл навыка удалён, перемещён или недоступен для чтения. Восстановите его или откройте навык в новом расположении и создайте новый черновик.", "evolution.originUnavailable": "Исходная рабочая область не была надёжно сохранена. Выберите исходную рабочую область, откройте навык на странице «Навыки» и создайте новый черновик; текущий черновик и основания сохранятся.", "evolution.currentSkill": "Текущий файл навыка", "evolution.skillChanged": "Навык изменился после этого предложения; черновик будет строиться на основе текущей версии.", "evolution.adopted": "Принято", "evolution.openSkill": "Открыть навык", "evolution.evidence": "Основания", "evolution.evidenceMeta": "{conversations} {conversations:диалог|диалога|диалогов} · {steps} {steps:шаг|шага|шагов}", "evolution.evidenceGone": "Эта запись диалога была удалена.", "evolution.openRecord": "Полная запись", "draft.title": "Черновик", "evolution.targetRoot": "Рекомендуемое расположение: {root}", "draft.writeTo": "Записать в", "draft.adopt": "Принять", "draft.discard": "Сбросить", "draft.edit": "Редактировать черновик", "draft.redraft": "Переписать", "draft.redraftNote": "Что изменить", "draft.redraftPlaceholder": "Например: вынести критические изменения в начало", "draft.redraftStart": "Переписать", "draft.adopted": "Принято; навык {name} обновлён", "draft.backtest": "Бэктест", "draft.current": "Текущий", "draft.withoutSkill": "Без навыка", "draft.candidate": "Черновик", "draft.same": "Без изменений", "draft.backtesting": "Бэктест {done}/{total}", "draft.noTests": "Нет тестовых кейсов; бэктест не проводился", "draft.notTested": "Бэктест ещё не проводился", "draft.notComparable": "Результаты бэктестов невозможно сравнить", "draft.runBacktest": "Бэктест", "draft.rerun": "Повторить бэктест", "draft.excluded": "Не удалось запустить {count} {count:кейс|кейса|кейсов} — {count:исключён|исключены|исключены} из сравнения", "draft.runDetail": "Бэктест черновика", "draft.adoptAnyway": "Всё равно принять?", "draft.regressed": "Оценка черновика ниже текущей версии.", "records.stats": "{turns} {turns:ход|хода|ходов} · {tools} {tools:вызов инструмента|вызова инструмента|вызовов инструментов}", "records.failures": "Ошибок: {count}", "records.pinned": "Закреплено", "records.pin": "Закрепить", "records.unpin": "Открепить", "records.suggested": "{count} {count:предложение|предложения|предложений}", "records.suggestion": "Предложение {index}", "records.deriveAll": "Создать кейсы", "records.deriveChosen": "Создать ({count})", "records.deriveFor": "Для навыка", "records.derive": "Создать", "records.derived": "В {name} {count:добавлен|добавлено|добавлено} {count} {count:кейс|кейса|кейсов}", "records.deleteTitle": "Удалить эту запись?", "records.deleteBody": "Предложения и кейсы, ссылающиеся на неё, потеряют это основание.", "evidence.skill": "Навык", "evidence.allSkills": "Все навыки", "evals.empty": "Навыков пока нет", "evals.emptyBody": "Когда появятся навыки, пишите для них тестовые кейсы и проводите бэктест здесь.", "evals.tested": "С кейсами", "evals.untested": "Без кейсов", "evals.off": "Отключено: {count}", "evals.notCreated": "Не создан", "evals.notCreatedBody": "Навык ещё не создан: бэктест измеряет результаты без него.", "evals.openSuggestion": "Открыть предложение", "timeline.turn": "Ход {turn}", "timeline.user": "Пользователь", "timeline.assistant": "Ответ", "timeline.tool": "Инструмент", "timeline.skill": "Навык", "timeline.failed": "Ошибка", "market.search": "Поиск навыков", "market.category": "Категория", "market.allCategories": "Все категории", "market.refresh": "Обновить", "market.empty": "Навыки не найдены", "market.emptyBody": "Попробуйте другие слова или добавьте репозиторий либо сайт в разделе «Источники».", "market.preview": "Открыть {name}", "market.install": "Установить", "market.installing": "Установка", "market.update": "Обновить", "market.overwrite": "Перезаписать", "market.installTo": "Установить в", "market.open": "Открыть навык", "market.installed": "Установлен {name}", "market.updated": "Обновлён {name}", "market.state.installed": "Установлен", "market.state.update": "Обновление", "market.state.modified": "Изменён локально", "market.state.conflict": "Имя занято", "market.state.available": "Доступен", "market.version": "v{version}", "market.installedVersion": "Установлена v{version}", "market.upstreamLicense": "Лицензия источника", "market.trust": "Навыки могут выполнять скрипты; перед установкой проверьте источник и прочитайте SKILL.md.", "market.overwriteHint": "Этот навык был изменён локально; обновление заменит правки (старая версия переместится в корзину).", "market.files": "{count} {count:файл|файла|файлов} · {size}", "market.searchPlaceholder": "Поиск навыков или вставьте репозиторий GitHub / URL", "market.sources": "Источники · {count}", "market.addAsSource": "{kind} · {label}", "market.listed": "Ваши источники · {count}", "market.indexed": "skills.sh · {count}", "market.searching": "Поиск на skills.sh", "market.searchFailed": "Поиск на skills.sh сейчас недоступен: {error}", "market.indexEmpty": "На skills.sh нет подходящих навыков.", "market.installs": "{count} {count:установка|установки|установок}", "market.audits": "Проверка безопасности", "market.audit.pass": "Пройдено", "market.audit.warn": "Предупреждение", "market.audit.fail": "Не пройдено", "market.viewSource": "Открыть исходник", "market.partial": "GitHub сейчас недоступен, поэтому показана текстовая копия из skills.sh; при установке все файлы будут загружены с GitHub.", "sources.title": "Источники", "sources.builtin": "Встроенный", "sources.featured": "Избранные", "sources.kind.catalog": "Каталог", "sources.kind.well-known": "Веб-сайт", "sources.kind.github": "Репозиторий GitHub", "sources.kind.search": "Поиск", "sources.detected.catalog": "Локальный каталог", "sources.detected.json": "Файл JSON", "sources.detected.github": "Репозиторий GitHub", "sources.detected.well-known": "Веб-сайт", "sources.entries": "{count} {count:навык|навыка|навыков}", "sources.updated": "обновлено {time}", "sources.searchMeta": "Открытый каталог навыков, поиск по мере ввода", "sources.refresh": "Обновить", "sources.remove": "Удалить", "sources.enabled": "Использовать {name}", "sources.addTitle": "Добавить источник", "sources.placeholder": "owner/repo, URL или файл JSON", "sources.hint": "Репозитории GitHub, сайты с публикацией Agent Skills и каталоги в формате JSON.", "sources.unknown": "Не распознано: введите owner/repo, URL или файл JSON", "sources.duplicate": "Этот источник уже добавлен", "sources.add": "Добавить", "sources.addAs": "Добавить как источник", "sources.adding": "Добавление", "sources.added": "Добавлен источник {name} ({count} {count:навык|навыка|навыков})", "sources.done": "Готово", "sources.formats": "Какие источники поддерживаются", "sources.format.github": "Репозиторий GitHub (owner/repo или URL) с индексацией всех SKILL.md.", "sources.format.well-known": "Сайты с опубликованным индексом /.well-known/agent-skills/.", "sources.format.catalog": "Файл каталога JSON (URL или локальный путь) с двуязычными описаниями.", "signal.correction": "Исправление", "signal.directive": "На будущее", "signal.tool-failure": "Сбой инструмента", "signal.approach-change": "Смена подхода", "signal.procedure": "Повторяемая процедура", "signal.skill-gap": "Нехватка навыка", "signal.skill-misleading": "Неточное описание", "signal.success": "Одобренный подход", "status.pending": "Ожидает", "status.drafting": "Черновик", "status.review": "Черновик на проверку", "status.adopted": "Принято", "status.dismissed": "Отклонено", "status.expired": "Истекло", "status.invalidated": "Недействительно", "action.create": "Новый", "action.update": "Улучшить", "versions.reason.original": "Исходная", "versions.reason.edit": "Правка", "versions.reason.evolution": "Эволюция", "versions.reason.restore": "Восстановление", "versions.reason.invocation": "Переключение", "versions.reason.create": "Создано", "run.status.running": "Выполняется", "run.status.completed": "Готово", "run.status.failed": "Ошибка", "run.status.interrupted": "Прервано", "run.verdict.pass": "Пройдено", "run.verdict.fail": "Не пройдено", "run.verdict.error": "Ошибка", "run.verdict.unmeasured": "Не оценено", "run.requiresVision": "Этот кейс требует ввод изображений, который недоступен в чисто текстовых бэктестах. Модель не вызывалась; кейс исключён из оценок и сравнения с базовой линией.", "versions.reason.install": "Установка", "diff.copy": "Копировать", "diff.copied": "Скопировано", "diff.collapse": "Свернуть", "diff.expand": "Показать ещё {count} {count:строку|строки|строк}", "diff.code": "SKILL.md", "diff.wrap": "Переносить строки", "diff.unwrap": "Не переносить", "common.less": "Меньше", "common.moreCount": "ещё {count}", "tests.history": "Бэктесты", "trash.title": "Корзина", "trash.body": "Удалённые навыки остаются здесь на диске: их можно восстановить или удалить навсегда.", "trash.emptyTitle": "Корзина пуста", "trash.emptyBody": "При удалении навыка во вкладке «Навыки» он сначала попадает сюда.", "trash.meta": "{time} · {size}", "trash.restore": "Восстановить", "trash.restoreHint": "Вернуть в исходный каталог", "trash.restored": "Восстановлен {name}", "trash.purge": "Удалить", "trash.purgeTitle": "Удалить {name} навсегда?", "trash.purgeBody": "Файлы будут удалены с диска без возможности восстановления.", "trash.purged": "Навык {name} удалён навсегда", "trash.empty": "Очистить", "trash.clearTitle": "Очистить корзину ({count} {count:элемент|элемента|элементов})?", "trash.clearBody": "Эти файлы будут удалены с диска без возможности восстановления.", "trash.emptied": "Очищено: {count} {count:элемент|элемента|элементов}", "trash.file": "Файл Markdown", "trash.bundle": "Пакет навыка", "trash.restoreTitle": "Восстановить {name}", "trash.chooseRoot": "Выберите место восстановления", "trash.original": "Исходное расположение", "trash.chooseHint": "Выберите расположение или другое имя. Замена существующего навыка требует подтверждения, а его текущая версия останется в корзине.", "trash.replace": "Заменить существующий навык и сохранить его текущую версию в корзине", "trash.confirmName": "Введите {name} для подтверждения безвозвратного удаления", "evolution.model": "Глобальная модель", "evolution.modelCard": "Модель элемента", "evolution.modelAuto": "По умолчанию", "evolution.modelAutoHint": "Использовать модель текущего агента задач", "evolution.deleteTitle": "Удалить это предложение?", "evolution.deleteBody": "Его черновик и ссылки на основания также будут удалены без возможности восстановления.", "evolution.deleted": "Удалено", "evolution.missing": "Это предложение было удалено", "evolution.missingBody": "Выберите другое предложение слева или вернитесь в «Основания», чтобы прочитать исходную запись.", "evolution.loadFailed": "Не удалось загрузить это предложение", "evolution.loadFailedBody": "Повторите попытку или выберите другое предложение слева.", "tests.model": "Глобальная модель", "tests.modelCard": "Модель элемента", "tests.modelAuto": "По умолчанию", "draft.baseChanged": "Исходный навык изменился. Этот черновик устарел; пересоздайте его на основе текущего файла и проведите бэктест.", "draft.targetExists": "Навык с таким именем уже существует. Перед принятием пересоздайте черновик как обновление и проведите бэктест.", "draft.refreshGuidance": "Пересоздать на основе текущего файла навыка с сохранением его последних правок и запустить бэктесты.", "draft.regenerate": "Переписать и проверить", "draft.cancelBacktest": "Отменить бэктесты", "draft.interrupted": "Бэктесты были прерваны. Запустите их снова или проверьте черновик перед ручным принятием.", "evolution.auto.title": "Автопринятие", "evolution.auto.history": "Журнал автопринятия", "evolution.auto.attempt": "Попытка {count}", "evolution.auto.scores": "База {baseline} / черновик {draft}", "evolution.auto.stage.queued": "В очереди", "evolution.auto.stage.drafting": "Создание черновика", "evolution.auto.stage.backtesting": "Сравнительный бэктест", "evolution.auto.stage.rewriting": "Доработка после регрессии", "evolution.auto.stage.adopted": "Принято автоматически", "evolution.auto.stage.paused": "Автообработка остановлена", "evolution.auto.stage.review": "Требуется ручная проверка", "evolution.auto.reason.disabled": "Автопринятие или необходимые для него права отключены", "evolution.auto.reason.no-cases": "Нет включённых оценочных кейсов", "evolution.auto.reason.case-limit": "Число включённых кейсов превышает лимит за прогон; скорректируйте кейсы или лимит и проверьте это предложение вручную", "evolution.auto.reason.unmeasured": "Не все проверки удалось оценить, либо кейс требует изображения, завершился с ошибкой или был прерван", "evolution.auto.reason.regressed": "Как минимум один кейс или ранее пройденная проверка ухудшились", "evolution.auto.reason.changed": "Предложение, черновик или оценочные кейсы изменились", "evolution.auto.reason.failed": "Автообработка завершилась ошибкой; доступна ручная проверка", "evolution.auto.reason.queue-full": "Очередь автообработки переполнена", "evolution.auto.reason.model-unavailable": "Не удалось определить модель для черновика или бэктеста", "evolution.auto.reason.interrupted": "Хост остановлен; это предложение не перезапустится автоматически", "evolution.auto.reason.daily-limit": "Достигнута дневная квота кандидатов; проверьте вручную или дождитесь новых предложений завтра", "evolution.auto.reason.duplicate-skill": "Этот целевой навык уже обрабатывался сегодня; проверьте вручную", "triage.title": "Оценка переиспользования", "triage.durable": "Повторяемый процесс", "triage.one-off": "Разовый кандидат", "triage.uncertain": "Требует решения", "triage.fold": "Разовые кандидаты ({count})", "triage.choose": "Разверните разовых кандидатов, чтобы просмотреть предложения", "triage.facts": "{windows} {windows:фрагмент|фрагмента|фрагментов} оснований · {sessions} {sessions:сессия|сессии|сессий} · {steps} {steps:цитируемый шаг|цитируемых шага|цитируемых шагов}", "triage.rules": "Повторяемый: ≥3 фрагмента, ≥20 шагов, уверенность ≥0.8; разовый: 1 фрагмент, <20 шагов (влияет только на порядок и сворачивание).", "triage.soft": "Влияет только на порядок и сворачивание; любое предложение остаётся доступным для обработки.", "skills.linkedWritable": "Обновления записываются в исходный связанный навык и затрагивают каждого Агента, использующего его. Это можно отключить в настройках «Навыков».", "skills.linkedEditable": "Связанный", "markdown.footnotes": "Сноски" }, pt: { "page.title": "Habilidades", "page.description": "Suas habilidades do DSH e como elas evoluem", "page.readOnly": "Somente leitura", "tabs.aria": "Páginas de Habilidades", "tabs.waiting": "{count} aguardando", "tabs.trash": "{count} {count:item removido|itens removidos}", "tab.skills": "Habilidades", "tab.evolution": "Evolução", "tab.evals": "Avaliações", "tab.market": "Mercado", "tab.trash": "Lixeira", "common.loading": "Carregando…", "common.retry": "Tentar novamente", "common.cancel": "Cancelar", "common.close": "Fechar", "common.delete": "Excluir", "common.edit": "Editar", "common.save": "Salvar", "common.saving": "Salvando", "common.more": "Mais", "common.view": "Ver", "common.settings": "Configurações", "time.justNow": "agora mesmo", "time.minutes": "há {count} min", "time.hours": "há {count} h", "time.days": "há {count} d", "root.project-dsh": "Projeto", "root.project-agents": "Projeto · .agents", "root.user-dsh": "Usuário", "root.user-agents": "Usuário · .agents", "skills.search": "Pesquisar habilidades", "skills.new": "Nova", "skills.noMatch": "Nenhuma habilidade correspondente", "skills.problems": "{count} {count:arquivo não pôde ser carregado|arquivos não puderam ser carregados}", "skills.empty": "Ainda não há habilidades", "skills.emptyBody": "Crie uma nova ou instale pelo mercado.", "skills.browseMarket": "Abrir mercado", "skills.select": "Escolha uma habilidade", "skills.selectBody": "Selecione uma à esquerda para visualizar.", "skills.use": "Usar", "skills.useHint": "Usar /{name} na conversa", "skills.used": "/{name} inserido no campo de entrada", "skills.noConversation": "Abra uma conversa para usar uma habilidade", "skills.toggle": "Ativar {name}", "skills.linked": "Vinculada · somente leitura", "skills.linkedReadOnly": "A habilidade vinculada é somente leitura; ative atualizações vinculadas nas configurações para destinos confiáveis ou faça uma cópia local.", "skills.shadowed": "Sobreposta", "skills.shadowedBy": "O DSH carrega {key} com o mesmo nome; este arquivo não tem efeito.", "skills.waitingCount": "{count} {count:melhoria aguardando|melhorias aguardando}", "skills.files": "Arquivos", "skills.improve": "Melhorar", "skills.improveTitle": "Melhorar {name}", "skills.improveNote": "O que alterar (opcional)", "skills.improvePlaceholder": "Por exemplo: agrupar notas de versão por módulo", "skills.improveStart": "Gerar rascunho", "skills.improveStarted": "Gerando rascunho; ele aparecerá em Evolução quando estiver pronto", "skills.remove": "Remover", "skills.removeTitle": "Remover {name}?", "skills.removeBody": "A habilidade vai para a aba Lixeira, onde você pode restaurá-la ou excluí-la permanentemente.", "skills.removed": "{name} removida", "skills.deleted": "{name} excluída", "invocation.label": "Invocação", "invocation.both": "Auto + /", "invocation.slash": "Apenas /", "invocation.model": "Apenas automático", "invocation.off": "Desativado", "invocation.slashShort": "Apenas /", "invocation.modelShort": "Apenas auto", "editor.title": "Editar {name}", "create.title": "Nova habilidade", "create.name": "Nome", "create.nameHint": "Letras minúsculas, dígitos e hifens", "create.description": "Descrição", "create.descriptionHint": "O que ela faz e quando usá-la; o DSH a carrega com base nisto", "create.root": "Local", "create.submit": "Criar", "versions.title": "Versões", "versions.empty": "Ainda não há versões", "versions.current": "Atual", "versions.compare": "Comparar", "versions.compareTitle": "Comparado com {time}", "versions.restore": "Restaurar", "tests.title": "Testes", "tests.count": "{count} {count:caso|casos}", "tests.lastScore": "última {score}", "tests.run": "Backtest", "tests.running": "Executando backtest", "tests.add": "Adicionar caso", "tests.empty": "Ainda não há casos. As revisões os adicionam conforme você trabalha; você também pode criar os seus.", "tests.checks": "{count} {count:verificação|verificações}", "tests.must": "Obrigatório", "tests.should": "Recomendado", "tests.origin": "Conversa de origem", "tests.enabled": "Usar caso {title}", "tests.progress": "Executando backtest {done}/{total}", "tests.score": "nota {score}", "tests.errors": "{count} {count:não pôde ser executado|não puderam ser executados}", "tests.unmeasured": "{count} {count:não medido|não medidos}", "tests.withoutSkill": "Sem habilidade", "tests.deleteTitle": "Excluir este caso?", "tests.newTitle": "Adicionar caso", "tests.editTitle": "Editar caso", "tests.case": "Caso", "tests.caseTitle": "Título", "tests.prompt": "Tarefa", "tests.promptHint": "O que o usuário diria", "tests.context": "Contexto (opcional)", "tests.requiresVision": "Requer entrada de imagem", "tests.requiresVisionHint": "Backtests de texto pulam casos com imagem; marcados como não medidos e excluídos das notas.", "tests.checksLabel": "Verificações", "tests.checkPlaceholder": "O resultado deve…", "tests.addCheck": "Adicionar", "run.steps": "Passos", "run.answer": "Resposta", "evolution.pending": "Pendentes", "evolution.pendingCount": "Pendentes {count}", "evolution.done": "Concluídas", "evolution.reviewNow": "Revisar agora", "evolution.reviewFound": "Revisado: {count} {count:sugestão|sugestões}", "evolution.reviewNothing": "Revisado: nada de novo", "evolution.off": "A autoevolução está desativada", "evolution.offBody": "Quando ativada, conversas concluídas são revisadas em segundo plano em busca de sugestões de habilidades.", "evolution.turnOn": "Ativar", "evolution.empty.pending": "Nada pendente", "evolution.emptyBody.pending": "Novas sugestões aparecem aqui.", "evolution.empty.done": "Nada por enquanto", "evolution.emptyBody.done": "Sugestões adotadas e dispensadas ficam aqui.", "evolution.empty.evidence": "Ainda sem evidências", "evolution.emptyBody.evidence": "Conversas lidas por uma revisão ficam aqui.", "evolution.from": "De “{session}”", "evolution.confidence": "confiança {value}%", "evolution.draft": "Gerar rascunho", "evolution.dismiss": "Dispensar", "evolution.dismissed": "Dispensada", "evolution.noAgent": "Nenhum Agente de tarefas disponível", "evolution.drafting": "Gerando rascunho", "evolution.draftFailed": "Falha ao gerar rascunho: {error}", "evolution.skillGone": "O arquivo original da habilidade foi excluído, movido ou não pôde ser lido. Restaure-o ou abra a habilidade no novo local e gere um novo rascunho.", "evolution.originUnavailable": "O espaço de trabalho original não foi registrado com segurança. Selecione o espaço de trabalho original, abra a habilidade na página Habilidades e gere um novo rascunho; o rascunho e as evidências atuais são mantidos.", "evolution.currentSkill": "Arquivo atual da habilidade", "evolution.skillChanged": "A habilidade mudou após esta sugestão; o rascunho parte da versão atual.", "evolution.adopted": "Adotada", "evolution.openSkill": "Abrir habilidade", "evolution.evidence": "Evidências", "evolution.evidenceMeta": "{conversations} {conversations:conversa|conversas} · {steps} {steps:passo|passos}", "evolution.evidenceGone": "Este registro de conversa foi excluído.", "evolution.openRecord": "Registro completo", "draft.title": "Rascunho", "evolution.targetRoot": "Destino sugerido: {root}", "draft.writeTo": "Gravar em", "draft.adopt": "Adotar", "draft.discard": "Descartar", "draft.edit": "Editar rascunho", "draft.redraft": "Reescrever", "draft.redraftNote": "O que alterar", "draft.redraftPlaceholder": "Por exemplo: colocar alterações incompatíveis primeiro", "draft.redraftStart": "Reescrever", "draft.adopted": "Adotado; {name} foi atualizada", "draft.backtest": "Backtest", "draft.current": "Atual", "draft.withoutSkill": "Sem habilidade", "draft.candidate": "Rascunho", "draft.same": "Empate", "draft.backtesting": "Executando backtest {done}/{total}", "draft.noTests": "Sem casos de teste; não testado", "draft.notTested": "Ainda sem backtest", "draft.notComparable": "Os backtests não podem ser comparados", "draft.runBacktest": "Backtest", "draft.rerun": "Refazer backtest", "draft.excluded": "{count} {count:caso não pôde ser executado e foi deixado|casos não puderam ser executados e foram deixados} de fora", "draft.runDetail": "Backtest do rascunho", "draft.adoptAnyway": "Adotar mesmo assim?", "draft.regressed": "O rascunho obteve nota menor que a versão atual.", "records.stats": "{turns} {turns:turno|turnos} · {tools} {tools:chamada de ferramenta|chamadas de ferramenta}", "records.failures": "{count} {count:falha|falhas}", "records.pinned": "Fixado", "records.pin": "Fixar", "records.unpin": "Desafixar", "records.suggested": "{count} {count:sugestão|sugestões}", "records.suggestion": "Sugestão {index}", "records.deriveAll": "Derivar casos", "records.deriveChosen": "Derivar ({count})", "records.deriveFor": "Para a habilidade", "records.derive": "Gerar", "records.derived": "{count} {count:caso adicionado|casos adicionados} a {name}", "records.deleteTitle": "Excluir este registro?", "records.deleteBody": "Sugestões e casos que o citam perderão esta evidência.", "evidence.skill": "Habilidade", "evidence.allSkills": "Todas as habilidades", "evals.empty": "Ainda não há habilidades", "evals.emptyBody": "Quando tiver habilidades, escreva seus casos de teste e execute backtests aqui.", "evals.tested": "Com casos", "evals.untested": "Sem casos", "evals.off": "{count} {count:desativado|desativados}", "evals.notCreated": "Não criada", "evals.notCreatedBody": "Ainda não criada: o backtest mede o desempenho sem ela.", "evals.openSuggestion": "Abrir a sugestão", "timeline.turn": "Turno {turn}", "timeline.user": "Usuário", "timeline.assistant": "Resposta", "timeline.tool": "Ferramenta", "timeline.skill": "Habilidade", "timeline.failed": "Falhou", "market.search": "Pesquisar habilidades", "market.category": "Categoria", "market.allCategories": "Todas as categorias", "market.refresh": "Atualizar", "market.empty": "Nenhuma habilidade encontrada", "market.emptyBody": "Tente outras palavras ou adicione um repositório ou site em Fontes.", "market.preview": "Abrir {name}", "market.install": "Instalar", "market.installing": "Instalando", "market.update": "Atualizar", "market.overwrite": "Sobrescrever", "market.installTo": "Instalar em", "market.open": "Abrir habilidade", "market.installed": "{name} instalada", "market.updated": "{name} atualizada", "market.state.installed": "Instalada", "market.state.update": "Atualização", "market.state.modified": "Editada localmente", "market.state.conflict": "Nome em uso", "market.state.available": "Disponível", "market.version": "v{version}", "market.installedVersion": "Instalada v{version}", "market.upstreamLicense": "Licença upstream", "market.trust": "Habilidades podem executar scripts; verifique a fonte e leia SKILL.md antes de instalar.", "market.overwriteHint": "Esta habilidade foi editada localmente; atualizar substitui as edições (a versão antiga vai para a Lixeira).", "market.files": "{count} {count:arquivo|arquivos} · {size}", "market.searchPlaceholder": "Pesquisar habilidades ou colar um repositório GitHub / URL", "market.sources": "Fontes · {count}", "market.addAsSource": "{kind} · {label}", "market.listed": "Suas fontes · {count}", "market.indexed": "skills.sh · {count}", "market.searching": "Pesquisando em skills.sh", "market.searchFailed": "Não é possível pesquisar em skills.sh agora: {error}", "market.indexEmpty": "Nenhuma habilidade correspondente em skills.sh.", "market.installs": "{count} {count:instalação|instalações}", "market.audits": "Revisão de segurança", "market.audit.pass": "Aprovado", "market.audit.warn": "Aviso", "market.audit.fail": "Reprovado", "market.viewSource": "Ver origem", "market.partial": "Não foi possível acessar o GitHub agora, portanto esta é a cópia em texto mantida por skills.sh; a instalação busca todos os arquivos no GitHub.", "sources.title": "Fontes", "sources.builtin": "Integrada", "sources.featured": "Destaque", "sources.kind.catalog": "Catálogo", "sources.kind.well-known": "Site", "sources.kind.github": "Repositório GitHub", "sources.kind.search": "Pesquisa", "sources.detected.catalog": "Catálogo local", "sources.detected.json": "Arquivo JSON", "sources.detected.github": "Repositório GitHub", "sources.detected.well-known": "Site", "sources.entries": "{count} {count:habilidade|habilidades}", "sources.updated": "atualizado {time}", "sources.searchMeta": "Diretório aberto de habilidades, pesquisado conforme você digita", "sources.refresh": "Atualizar", "sources.remove": "Remover", "sources.enabled": "Usar {name}", "sources.addTitle": "Adicionar uma fonte", "sources.placeholder": "owner/repo, uma URL ou um arquivo JSON", "sources.hint": "Repositórios GitHub, sites que publicam Agent Skills e arquivos JSON de catálogo.", "sources.unknown": "Não reconhecido: informe owner/repo, uma URL ou um arquivo JSON", "sources.duplicate": "Esta fonte já foi adicionada", "sources.add": "Adicionar", "sources.addAs": "Adicionar como fonte", "sources.adding": "Adicionando", "sources.added": "{name} adicionada com {count} {count:habilidade|habilidades}", "sources.done": "Concluído", "sources.formats": "O que pode ser uma fonte", "sources.format.github": "Repositório GitHub (owner/repo ou URL) indexando cada SKILL.md.", "sources.format.well-known": "Sites que publicam um índice /.well-known/agent-skills/.", "sources.format.catalog": "Arquivo JSON de catálogo (URL ou caminho local) com descrições bilíngues.", "signal.correction": "Correção", "signal.directive": "Daqui em diante", "signal.tool-failure": "Falha de ferramenta", "signal.approach-change": "Mudança de abordagem", "signal.procedure": "Procedimento reutilizável", "signal.skill-gap": "Lacuna de habilidade", "signal.skill-misleading": "Descrição imprecisa", "signal.success": "Abordagem aceita", "status.pending": "Pendente", "status.drafting": "Gerando rascunho", "status.review": "Rascunho para revisão", "status.adopted": "Adotada", "status.dismissed": "Dispensada", "status.expired": "Expirada", "status.invalidated": "Invalidada", "action.create": "Nova", "action.update": "Melhorar", "versions.reason.original": "Original", "versions.reason.edit": "Edição", "versions.reason.evolution": "Evolução", "versions.reason.restore": "Restauração", "versions.reason.invocation": "Alternância", "versions.reason.create": "Criada", "run.status.running": "Em execução", "run.status.completed": "Concluído", "run.status.failed": "Falhou", "run.status.interrupted": "Interrompido", "run.verdict.pass": "Aprovado", "run.verdict.fail": "Reprovado", "run.verdict.error": "Erro", "run.verdict.unmeasured": "Não medido", "run.requiresVision": "Este caso requer entrada de imagem, que backtests somente de texto não recebem. Nenhum modelo foi chamado; este caso fica excluído das notas e das comparações de linha de base.", "versions.reason.install": "Instalação", "diff.copy": "Copiar", "diff.copied": "Copiado", "diff.collapse": "Recolher", "diff.expand": "Mostrar mais {count} {count:linha|linhas}", "diff.code": "SKILL.md", "diff.wrap": "Quebrar linhas", "diff.unwrap": "Não quebrar linhas", "common.less": "Menos", "common.moreCount": "mais {count}", "tests.history": "Backtests", "trash.title": "Lixeira", "trash.body": "Habilidades removidas permanecem em disco aqui: restaure uma ou exclua permanentemente.", "trash.emptyTitle": "A Lixeira está vazia", "trash.emptyBody": "Ao remover uma habilidade na aba Habilidades, ela vem para cá primeiro.", "trash.meta": "{time} · {size}", "trash.restore": "Restaurar", "trash.restoreHint": "Devolver ao local de origem", "trash.restored": "{name} restaurada", "trash.purge": "Excluir", "trash.purgeTitle": "Excluir {name} permanentemente?", "trash.purgeBody": "Os arquivos são excluídos do disco e não podem ser recuperados.", "trash.purged": "{name} excluída permanentemente", "trash.empty": "Esvaziar", "trash.clearTitle": "Esvaziar {count} {count:item|itens} da Lixeira?", "trash.clearBody": "Estes arquivos são excluídos do disco e não podem ser recuperados.", "trash.emptied": "Lixeira esvaziada ({count} {count:item|itens})", "trash.file": "Arquivo Markdown", "trash.bundle": "Pacote de habilidade", "trash.restoreTitle": "Restaurar {name}", "trash.chooseRoot": "Escolha um local de restauração", "trash.original": "Local original", "trash.chooseHint": "Escolha um local ou outro nome. Substituir uma habilidade exige confirmação e mantém a versão atual na Lixeira.", "trash.replace": "Substituir a habilidade existente e manter a versão atual na Lixeira", "trash.confirmName": "Digite {name} para confirmar a exclusão permanente", "evolution.model": "Modelo global", "evolution.modelCard": "Modelo do item", "evolution.modelAuto": "Seguir padrão", "evolution.modelAutoHint": "Usar o modelo do Agente de tarefas atual", "evolution.deleteTitle": "Excluir esta sugestão?", "evolution.deleteBody": "O rascunho e as referências de evidência que ela cita também serão removidos, sem possibilidade de desfazer.", "evolution.deleted": "Excluída", "evolution.missing": "Esta sugestão foi excluída", "evolution.missingBody": "Selecione outra sugestão à esquerda ou volte para Evidências para ler o registro original.", "evolution.loadFailed": "Não foi possível carregar esta sugestão", "evolution.loadFailedBody": "Tente novamente ou selecione outra sugestão à esquerda.", "tests.model": "Modelo global", "tests.modelCard": "Modelo do item", "tests.modelAuto": "Seguir padrão", "draft.baseChanged": "A habilidade original foi alterada. Este rascunho está desatualizado; gere-o novamente a partir do arquivo atual e execute o backtest.", "draft.targetExists": "Já existe uma habilidade com este nome. Gere novamente como atualização e execute o backtest antes de adotar.", "draft.refreshGuidance": "Gere novamente com base no arquivo atual da habilidade, preservando as alterações recentes, e execute os backtests.", "draft.regenerate": "Reescrever e testar", "draft.cancelBacktest": "Cancelar backtests", "draft.interrupted": "Os backtests foram interrompidos. Execute-os novamente ou revise o rascunho antes de adotar manualmente.", "evolution.auto.title": "Adoção automática", "evolution.auto.history": "Atividade de adoção automática", "evolution.auto.attempt": "Tentativa {count}", "evolution.auto.scores": "Linha de base {baseline} / rascunho {draft}", "evolution.auto.stage.queued": "Na fila", "evolution.auto.stage.drafting": "Gerando rascunho", "evolution.auto.stage.backtesting": "Executando backtest comparativo", "evolution.auto.stage.rewriting": "Reescrevendo após regressão", "evolution.auto.stage.adopted": "Adotada automaticamente", "evolution.auto.stage.paused": "Processamento automático interrompido", "evolution.auto.stage.review": "Revisão manual necessária", "evolution.auto.reason.disabled": "A adoção automática ou as permissões necessárias foram desativadas", "evolution.auto.reason.no-cases": "Nenhum caso de avaliação ativado", "evolution.auto.reason.case-limit": "Os casos ativados excedem o limite por execução; ajuste os casos ou o limite e revise esta sugestão manualmente", "evolution.auto.reason.unmeasured": "Algumas verificações não foram totalmente medidas, ou um caso exige imagens, falhou ou foi interrompido", "evolution.auto.reason.regressed": "Pelo menos um caso ou uma verificação antes aprovada sofreu regressão", "evolution.auto.reason.changed": "A sugestão, o rascunho ou os casos de avaliação foram alterados", "evolution.auto.reason.failed": "O processamento automático falhou; a revisão manual continua disponível", "evolution.auto.reason.queue-full": "A fila automática está cheia", "evolution.auto.reason.model-unavailable": "Nenhum modelo resolvido para rascunho ou backtest", "evolution.auto.reason.interrupted": "O Host foi encerrado; esta sugestão não será reiniciada automaticamente", "evolution.auto.reason.daily-limit": "Cota diária de candidatos atingida; revise manualmente ou aguarde novas sugestões em outro dia", "evolution.auto.reason.duplicate-skill": "Esta habilidade de destino já foi processada hoje; revise manualmente", "triage.title": "Orientação de reutilização", "triage.durable": "Fluxo reutilizável", "triage.one-off": "Candidato pontual", "triage.uncertain": "Requer julgamento", "triage.fold": "Candidatos pontuais ({count})", "triage.choose": "Expanda os candidatos pontuais para revisar sugestões", "triage.facts": "{windows} {windows:janela|janelas} de evidência · {sessions} {sessions:sessão|sessões} · {steps} {steps:passo citado|passos citados}", "triage.rules": "Reutilizável: ≥3 janelas, ≥20 passos, confiança ≥0,8; pontual: 1 janela, <20 passos (afeta apenas ordenação e recolhimento).", "triage.soft": "Afeta apenas a ordenação e o recolhimento; toda sugestão continua acionável.", "skills.linkedWritable": "As atualizações gravam no arquivo original da habilidade vinculada e afetam todos os Agentes que a compartilham. Você pode desativar isso nas configurações de Habilidades.", "skills.linkedEditable": "Vinculada", "markdown.footnotes": "Notas de rodapé" } }; const css$1 = ".IIa07q_skPage{flex-direction:column;gap:12px;min-width:0;animation:.22s cubic-bezier(.2,0,0,1) IIa07q_sk-arrive;display:flex}@keyframes IIa07q_sk-arrive{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}@keyframes IIa07q_sk-pop{0%{opacity:0;transform:scale(.6)}70%{transform:scale(1.08)}to{opacity:1;transform:none}}@keyframes IIa07q_sk-spin{to{transform:rotate(360deg)}}@keyframes IIa07q_sk-breathe{50%{opacity:.35}}.IIa07q_skMuted{color:var(--mn-faint);margin:0;font-size:12px;line-height:18px}.IIa07q_skProse{color:var(--mn-muted);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;font-size:13px;line-height:21px}.IIa07q_skBusy{color:var(--mn-muted);align-items:center;gap:8px;padding:6px 0;font-size:12px;line-height:18px;display:inline-flex}.IIa07q_skPage>.IIa07q_skBusy,.IIa07q_skPane>.IIa07q_skBusy{justify-content:center;align-items:center;min-height:360px;display:flex}.IIa07q_skLink{border-radius:var(--dsw-radius-xs,4px);color:var(--dsw-alias-link,var(--mn-accent));font:inherit;cursor:pointer;background:0 0;border:0;padding:0 2px;font-size:12px;line-height:18px;text-decoration:none;transition:color .12s,background-color .12s}.IIa07q_skLink:hover{background:color-mix(in srgb, var(--mn-accent) 8%, transparent)}.IIa07q_skAlert,.IIa07q_skNotice{border-radius:var(--dsw-radius-md);color:var(--mn-text);align-items:center;gap:8px;margin-bottom:12px;padding:8px 10px 8px 12px;font-size:12px;line-height:18px;display:flex}.IIa07q_skAlert{background:color-mix(in srgb, var(--mn-danger) 9%, transparent)}.IIa07q_skNotice{background:color-mix(in srgb, var(--mn-success) 9%, transparent)}.IIa07q_skAlert>span,.IIa07q_skNotice>span{overflow-wrap:anywhere;flex:1;min-width:0}.IIa07q_skDismiss{border-radius:var(--dsw-radius-xs,4px);width:20px;height:20px;color:inherit;opacity:.55;cursor:pointer;background:0 0;border:0;flex:none;place-items:center;padding:0;font-size:15px;line-height:1;transition:opacity .12s,background-color .12s;display:grid}.IIa07q_skDismiss:hover{background:var(--mn-hover);opacity:1}.IIa07q_skWarn,.IIa07q_skSuccess{border-radius:var(--dsw-radius-md);color:var(--mn-text);margin:0;padding:8px 12px;font-size:12px;line-height:18px}.IIa07q_skWarn{background:color-mix(in srgb, var(--mn-warn) 11%, transparent)}.IIa07q_skSuccess{background:color-mix(in srgb, var(--mn-success) 9%, transparent)}.IIa07q_skDangerButton{color:var(--dsw-static-neutral-00,#fff)!important;background:var(--mn-danger)!important;border-color:#0000!important}.IIa07q_skDangerButton:hover:not(:disabled){background:color-mix(in srgb, var(--mn-danger) 88%, #000)!important}.IIa07q_skClamp{justify-items:start;gap:2px;display:grid}.IIa07q_skClamp>.IIa07q_skProse[data-clamped]{-webkit-line-clamp:var(--sk-lines,3);-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.IIa07q_skClamp>.IIa07q_skChanges{width:100%}.IIa07q_skCaption{color:var(--mn-faint);letter-spacing:.02em;margin:4px 0 0;font-size:11px;font-weight:500;line-height:16px}.IIa07q_skCallout{border-radius:var(--dsw-radius-md);width:100%;color:var(--mn-text);background:color-mix(in srgb, var(--mn-accent) 8%, transparent);font:inherit;text-align:left;cursor:pointer;border:0;justify-content:space-between;align-items:center;gap:12px;padding:8px 12px;font-size:12px;line-height:18px;transition:background-color .14s;display:flex}.IIa07q_skCallout:hover{background:color-mix(in srgb, var(--mn-accent) 13%, transparent)}.IIa07q_skCallout>b{color:var(--dsw-alias-link,var(--mn-accent));flex:none;font-weight:500;transition:transform .16s cubic-bezier(.2,0,0,1)}.IIa07q_skCallout:hover>b{transform:translate(2px)}.IIa07q_skTabBadge{corner-shape:round;min-width:16px;height:16px;color:var(--dsw-alias-label-primary-foreground,#fff);background:var(--dsw-alias-button-primary-fill,var(--dsw-alias-brand-primary,var(--mn-accent)));text-align:center;font-variant-numeric:tabular-nums;border-radius:999px;justify-content:center;align-items:center;margin-left:6px;padding:0 5px;font-size:11px;font-weight:500;line-height:1;animation:.26s cubic-bezier(.2,0,0,1) IIa07q_sk-pop;display:inline-flex}.IIa07q_skIconButton{border-radius:var(--dsw-radius-sm);width:28px;height:28px;color:var(--mn-muted);cursor:pointer;background:0 0;border:0;flex:none;place-items:center;padding:0;transition:color .12s,background-color .12s;display:grid}.IIa07q_skIconButton:hover:not(:disabled),.IIa07q_skIconButton[aria-expanded=true]{color:var(--mn-text);background:var(--mn-hover)}.IIa07q_skIconButton:disabled{cursor:default;opacity:.45}.IIa07q_skIconButton[data-busy]>svg{animation:.9s linear infinite IIa07q_sk-spin}.IIa07q_skIconButton[data-pulse]>svg{color:var(--mn-accent);animation:1.2s ease-in-out infinite IIa07q_sk-breathe}.IIa07q_skIconButton:focus-visible,.IIa07q_skCallout:focus-visible,.IIa07q_skLink:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--mn-accent));outline:none}.IIa07q_skEmpty{place-content:center;justify-items:center;gap:4px;min-height:280px;animation:.26s cubic-bezier(.2,0,0,1) IIa07q_sk-arrive;display:grid}.IIa07q_skEmptyActions{flex-wrap:wrap;justify-content:center;gap:8px;display:flex}.IIa07q_skSplit{grid-template-columns:minmax(268px,340px) minmax(0,1fr);gap:12px;min-height:560px;display:grid}.IIa07q_skList,.IIa07q_skPane{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);min-width:0}.IIa07q_skList{flex-direction:column;padding-bottom:6px;display:flex;overflow:hidden}.IIa07q_skPane{--sk-pane-pad:clamp(16px, 2vw, 24px);padding:var(--sk-pane-pad);overflow:hidden}.IIa07q_skSkillsSplit,.IIa07q_skEvolutionSplit{height:clamp(420px, calc(100dvh - var(--dsh-frame-top-clearance,0px) - 248px), 780px);min-height:0}.IIa07q_skSkillsSplit>.IIa07q_skList,.IIa07q_skSkillsSplit>.IIa07q_skPane,.IIa07q_skEvolutionSplit>.IIa07q_skList,.IIa07q_skEvolutionSplit>.IIa07q_skPane{overscroll-behavior-y:contain;min-height:0;overflow-y:auto}.IIa07q_skSkillsSplit>.IIa07q_skList>*,.IIa07q_skEvolutionSplit>.IIa07q_skList>*{flex-shrink:0}.IIa07q_skSkillsSplit>.IIa07q_skList,.IIa07q_skEvolutionSplit>.IIa07q_skList{box-sizing:border-box;height:100%}.IIa07q_skPaneBar{min-height:56px;margin:calc(-1 * var(--sk-pane-pad)) calc(-1 * var(--sk-pane-pad)) 16px;padding:10px var(--sk-pane-pad);border-bottom:.5px solid var(--mn-line);flex-wrap:wrap;align-items:center;gap:8px 16px;display:flex}.IIa07q_skPaneBar>.IIa07q_skIconButton{margin-left:auto}.IIa07q_skListBar{border-bottom:.5px solid var(--mn-line);align-items:center;gap:8px;min-height:56px;padding:10px 12px;display:flex}.IIa07q_skListBar>:first-child{flex:1;min-width:0}.IIa07q_skListBar>button:not(.IIa07q_skIconButton){min-height:36px}.IIa07q_skListNote{color:var(--mn-faint);text-align:center;margin:0;padding:18px 16px;font-size:12px;line-height:18px}.IIa07q_skListFilter{padding:8px 10px 2px}.IIa07q_skListGroup h5{color:var(--mn-faint);letter-spacing:.02em;margin:10px 6px 2px;font-size:11px;font-weight:500;line-height:16px;overflow:visible}.IIa07q_skGroupHeading{text-overflow:ellipsis;white-space:nowrap;padding:4px 10px;overflow:hidden}.IIa07q_skGroupToggle{border-radius:var(--dsw-radius-sm,6px);width:100%;min-width:0;color:inherit;text-align:start;font:inherit;cursor:pointer;background:0 0;border:0;align-items:center;gap:8px;padding:5px 10px;transition:color .12s,background-color .12s;display:flex}.IIa07q_skGroupToggle:hover:not(:disabled){color:var(--mn-muted);background:var(--mn-hover)}.IIa07q_skGroupToggle:disabled{cursor:default}.IIa07q_skGroupChevron{color:var(--mn-faint);flex:none;transition:transform .16s cubic-bezier(.2,0,0,1),color .12s}.IIa07q_skGroupToggle[aria-expanded=false] .IIa07q_skGroupChevron{transform:rotate(-90deg)}.IIa07q_skGroupToggle:hover:not(:disabled) .IIa07q_skGroupChevron{color:var(--mn-text)}.IIa07q_skGroupLabel{min-width:0;color:var(--mn-muted);flex:1;gap:1px;font-size:12px;font-weight:500;line-height:16px;display:grid}.IIa07q_skGroupLabel small{min-width:0;color:var(--mn-faint);text-overflow:ellipsis;white-space:nowrap;font-size:11px;font-weight:400;line-height:15px;display:block;overflow:hidden}.IIa07q_skGroupLabel [data-path-label]{font-size:11px;line-height:15px}.IIa07q_skGroupCount{corner-shape:round;min-width:20px;height:18px;color:var(--mn-muted);background:var(--mn-fill);text-align:center;font-variant-numeric:tabular-nums;border-radius:999px;flex:none;justify-content:center;align-items:center;padding:0 6px;font-size:11px;font-weight:500;line-height:1;display:inline-flex}.IIa07q_skGroupToggle:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--mn-accent));outline:none}.IIa07q_skListItem{border-radius:var(--dsw-radius-md);width:calc(100% - 12px);color:var(--mn-text);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;margin:4px 6px 0;padding:9px 10px;transition:background-color .14s;display:block}.IIa07q_skListItem:hover{background:var(--mn-hover)}.IIa07q_skListItem[data-selected]{background:var(--mn-fill)}.IIa07q_skListItem>div{align-items:center;gap:6px;min-width:0;display:flex}.IIa07q_skListItem>div strong{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.IIa07q_skListItem p{color:var(--mn-muted);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:3px 0 4px;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.IIa07q_skListItem footer{min-width:0;color:var(--mn-faint);align-items:center;gap:8px;font-size:11px;line-height:16px;display:flex}.IIa07q_skListItem footer time{font-variant-numeric:tabular-nums;flex:none}.IIa07q_skListItem footer span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.IIa07q_skIcon{border-radius:var(--dsw-radius-md);width:30px;height:30px;color:var(--mn-muted);background:var(--mn-fill);flex:none;place-items:center;font-size:13px;font-weight:500;line-height:1;transition:color .14s,background-color .14s;display:grid}.IIa07q_skRow{border-radius:var(--dsw-radius-md);align-items:center;gap:6px;margin:2px 6px 0;padding-right:8px;transition:background-color .14s;display:flex;position:relative}.IIa07q_skRow:hover{background:var(--mn-hover)}.IIa07q_skRow[data-selected]{background:var(--mn-fill)}.IIa07q_skRow[data-selected] .IIa07q_skIcon{color:var(--mn-text);background:var(--mn-layer-1,var(--mn-hover))}.IIa07q_skRow[data-off] .IIa07q_skRowText,.IIa07q_skRow[data-shadowed] .IIa07q_skRowText{opacity:.55}.IIa07q_skRowMain{min-width:0;color:var(--mn-text);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;flex:1;align-items:center;gap:10px;padding:8px 0 8px 8px;display:flex}.IIa07q_skRowMain:focus-visible{box-shadow:inset 0 0 0 2px var(--dsw-focus-ring-color,var(--mn-accent));border-radius:var(--dsw-radius-md);outline:none}.IIa07q_skRowText{gap:1px;min-width:0;transition:opacity .14s;display:grid}.IIa07q_skRowText strong{white-space:nowrap;align-items:center;gap:6px;min-width:0;font-size:13px;font-weight:500;line-height:20px;display:flex}.IIa07q_skRowText strong>span{text-overflow:ellipsis;min-width:0;overflow:hidden}.IIa07q_skRowText small{color:var(--mn-faint);text-overflow:ellipsis;white-space:nowrap;font-size:12px;line-height:18px;overflow:hidden}.IIa07q_skScore{corner-shape:round;min-width:24px;color:var(--mn-muted);font-variant-numeric:tabular-nums;text-align:right;border-radius:999px;flex:none;font-size:13px;font-weight:500;line-height:20px;animation:.26s cubic-bezier(.2,0,0,1) IIa07q_sk-pop}.IIa07q_skScore[data-tone=good]{color:var(--mn-success)}.IIa07q_skScore[data-tone=bad]{color:var(--mn-danger)}.IIa07q_skDot{corner-shape:round;background:var(--mn-accent);border-radius:999px;flex:none;width:6px;height:6px;animation:.26s cubic-bezier(.2,0,0,1) IIa07q_sk-pop}.IIa07q_skRowActions{flex:none;align-items:center;gap:8px;display:flex}.IIa07q_skUse{opacity:0;pointer-events:none;transition:opacity .14s,transform .18s cubic-bezier(.2,0,0,1);transform:translate(4px)}.IIa07q_skRow:hover .IIa07q_skUse,.IIa07q_skRow:focus-within .IIa07q_skUse{opacity:1;pointer-events:auto;transform:none}@media (hover:none){.IIa07q_skUse{opacity:1;pointer-events:auto;transform:none}}.IIa07q_skProblems{color:var(--mn-faint);margin:12px 12px 4px;font-size:12px;line-height:18px}.IIa07q_skProblems summary{border-radius:var(--dsw-radius-xs,4px);cursor:pointer;width:fit-content;padding:0 2px}.IIa07q_skProblems summary:hover{color:var(--mn-muted)}.IIa07q_skProblems ul{gap:6px;margin:8px 0 0;padding:0;list-style:none;display:grid}.IIa07q_skProblems li{gap:2px;display:grid}.IIa07q_skProblems code{color:var(--mn-muted);font:11px/16px var(--mn-code)}.IIa07q_skDetail{grid-template-columns:minmax(0,1fr);gap:14px;min-width:0;animation:.2s cubic-bezier(.2,0,0,1) IIa07q_sk-arrive;display:grid}.IIa07q_skDetailHead{justify-content:space-between;align-items:flex-start;gap:16px;display:flex}.IIa07q_skDetailHead>div:first-child{gap:4px;min-width:0;display:grid}.IIa07q_skDetailHead h3{overflow-wrap:anywhere;margin:0;font-size:16px;font-weight:500;line-height:24px}.IIa07q_skDetailHead p{color:var(--mn-muted);margin:0;font-size:13px;line-height:20px}.IIa07q_skDetailActions{flex-wrap:wrap;flex:none;justify-content:flex-end;align-items:center;gap:6px;display:flex}.IIa07q_skKicker{flex-wrap:wrap;align-items:center;gap:6px;display:inline-flex}.IIa07q_skTitleLink{color:inherit;font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;padding:0}.IIa07q_skTitleLink:hover{color:var(--dsw-alias-link,var(--mn-accent))}.IIa07q_skMeta{min-width:0;color:var(--mn-faint);flex-wrap:wrap;align-items:center;gap:2px 6px;font-size:12px;line-height:18px;display:flex}.IIa07q_skMeta>*{min-width:0}.IIa07q_skMeta>span{flex:none}.IIa07q_skMeta>*+:before{content:\"·\";color:var(--mn-line-strong,var(--mn-faint));margin-right:6px}.IIa07q_skMeta code{min-width:0;max-width:100%;font:11px/18px var(--mn-code);text-overflow:ellipsis;white-space:nowrap;flex:200px;align-items:center;display:inline-flex;overflow:hidden}.IIa07q_skMeta [data-path-label]{font-size:inherit;line-height:inherit}.IIa07q_skInvocation{align-items:center;gap:8px;display:flex}.IIa07q_skWhen{color:var(--mn-muted);margin:0;font-size:12px;line-height:18px}.IIa07q_skDoc{overflow-wrap:anywhere;min-width:0;color:var(--mn-text);font-size:13px;line-height:1.75}.IIa07q_skDoc>:first-child{margin-top:0}.IIa07q_skDoc>:last-child{margin-bottom:0}.IIa07q_skDoc h1,.IIa07q_skDoc h2,.IIa07q_skDoc h3,.IIa07q_skDoc h4{color:var(--mn-text);margin:1.4em 0 .5em;font-weight:500;line-height:1.4}.IIa07q_skDoc h1{font-size:1.25em}.IIa07q_skDoc h2{font-size:1.1em}.IIa07q_skDoc h3,.IIa07q_skDoc h4{font-size:1em}.IIa07q_skDoc p,.IIa07q_skDoc ul,.IIa07q_skDoc ol,.IIa07q_skDoc blockquote,.IIa07q_skDoc table,.IIa07q_skDoc pre{margin:.7em 0}.IIa07q_skDoc ul,.IIa07q_skDoc ol{padding-left:1.5em}.IIa07q_skDoc li+li{margin-top:.25em}.IIa07q_skDoc li::marker{color:var(--mn-faint)}.IIa07q_skDoc blockquote{border-left:2px solid var(--mn-line-strong,var(--mn-line));color:var(--mn-muted);margin-inline:0;padding:.1em 1em}.IIa07q_skDoc code{border-radius:var(--dsw-radius-xs,4px);color:var(--mn-text);background:var(--dsw-alias-markdown-inline-code,var(--mn-fill));font:.9em/1.55 var(--mn-code);padding:.12em .38em}.IIa07q_skDoc pre{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-markdown-code-block,var(--mn-fill));max-width:100%;padding:10px 14px;overflow:auto}.IIa07q_skDoc pre code{background:0 0;padding:0;font-size:12px}.IIa07q_skDoc a{color:var(--dsw-alias-link,var(--mn-accent));text-underline-offset:3px;text-decoration-thickness:1px}.IIa07q_skDoc hr{border:0;border-top:.5px solid var(--mn-line);margin:1.6em 0}.IIa07q_skDoc table{border-collapse:collapse;max-width:100%;font-size:12px;display:block;overflow-x:auto}.IIa07q_skDoc th,.IIa07q_skDoc td{border:.5px solid var(--mn-line);text-align:left;vertical-align:top;padding:6px 10px}.IIa07q_skDoc th{background:var(--mn-fill);font-weight:500}.IIa07q_skDoc img{border-radius:var(--dsw-radius-sm);max-width:100%;height:auto}.IIa07q_skFolds{border-top:.5px solid var(--mn-line);grid-template-columns:minmax(0,1fr);min-width:0;margin-top:4px;display:grid}.IIa07q_skFold{border-bottom:.5px solid var(--mn-line);min-width:0}.IIa07q_skFold>header{justify-content:space-between;align-items:center;gap:12px;min-height:40px;display:flex}.IIa07q_skFold>header>button{border-radius:var(--dsw-radius-sm);min-width:0;color:var(--mn-text);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;flex:1;align-items:center;gap:8px;margin-left:-4px;padding:8px 4px;font-size:13px;font-weight:500;line-height:20px;display:flex}.IIa07q_skFold>header>button>svg{color:var(--mn-faint);flex:none;order:2;margin-left:auto;transition:transform .18s cubic-bezier(.2,0,0,1),color .12s;transform:rotate(-90deg)}.IIa07q_skFold[data-open]>header>button>svg{transform:none}.IIa07q_skFold>header>button:hover>svg{color:var(--mn-text)}.IIa07q_skFold>header>button>small{min-width:0;color:var(--mn-faint);text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:400;overflow:hidden}.IIa07q_skFold>header>button:focus-visible{box-shadow:0 0 0 2px var(--dsw-focus-ring-color,var(--mn-accent));outline:none}.IIa07q_skFold>header>div{align-items:center;gap:6px;display:flex}.IIa07q_skFoldBody{grid-template-columns:minmax(0,1fr);gap:10px;min-width:0;padding:2px 0 14px;display:grid}.IIa07q_skFold[data-link]>header>button{padding-left:4px}.IIa07q_skFold[data-link]>header>button>b{color:var(--mn-faint);margin-left:auto;font-weight:400;line-height:1;transition:transform .16s cubic-bezier(.2,0,0,1),color .12s}.IIa07q_skFold[data-link]>header>button:hover>b{color:var(--dsw-alias-link,var(--mn-accent));transform:translate(2px)}.IIa07q_skList>.IIa07q_skFold{padding:0 12px}.IIa07q_skList>.IIa07q_skFold>header>button{margin-left:0;padding:8px 0}.IIa07q_skList>.IIa07q_skFold .IIa07q_skFoldBody{gap:0;margin:0 -12px;padding:0 0 6px}.IIa07q_skVersions{grid-template-columns:minmax(0,1fr);gap:1px;margin:0;padding:0;list-style:none;display:grid}.IIa07q_skVersions li{border-radius:var(--dsw-radius-md);align-items:center;gap:10px;min-height:34px;padding:3px 6px;transition:background-color .12s;display:flex}.IIa07q_skVersions li:hover{background:var(--mn-hover)}.IIa07q_skVersions time{color:var(--mn-muted);font-variant-numeric:tabular-nums;font-size:12px}.IIa07q_skVersions li>span{flex:1}.IIa07q_skTrash{width:100%;max-width:960px;margin-inline:auto}.IIa07q_skTrashList li{flex-wrap:wrap;padding-block:10px}.IIa07q_skTrashList li>span{flex:none}.IIa07q_skTrashList li>.IIa07q_skRowText{flex:220px}.IIa07q_skTrashTags{flex-wrap:wrap;gap:6px;display:flex}.IIa07q_skTrashList li>.IIa07q_skTrashActions{flex:none;gap:6px;margin-left:auto;display:flex}.IIa07q_skResources{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.IIa07q_skResources code{max-width:100%;height:20px;color:var(--mn-muted);background:var(--mn-fill);font:11px/1 var(--mn-code);border-radius:999px;align-items:center;padding:0 8px;display:inline-flex}.IIa07q_skEditor{resize:vertical;border:.5px solid var(--mn-field-line);border-radius:var(--dsw-radius-md);width:100%;min-height:420px;color:var(--mn-text);background:var(--mn-input);font:12px/1.6 var(--mn-code);tab-size:2;outline:0;padding:10px 12px;transition:border-color .12s}.IIa07q_skEditor:focus{border-color:var(--mn-accent)}.IIa07q_skTimeline{grid-template-columns:minmax(0,1fr);gap:0;min-width:0;margin:0;padding:0;list-style:none;display:grid}.IIa07q_skTimeline>li{min-width:0}.IIa07q_skTurn{color:var(--mn-faint);letter-spacing:.02em;margin:12px 0 4px;font-size:11px;font-weight:500;line-height:16px}.IIa07q_skTimeline>li:first-child>.IIa07q_skTurn{margin-top:0}.IIa07q_skStep{border-radius:0 var(--dsw-radius-sm) var(--dsw-radius-sm) 0;border-left:2px solid #0000;align-items:flex-start;gap:8px;padding:5px 8px;transition:background-color .14s;display:flex}.IIa07q_skTimeline>li[data-annotated] .IIa07q_skStep{border-left-color:color-mix(in srgb, var(--mn-warn) 70%, transparent);background:color-mix(in srgb, var(--mn-warn) 5%, transparent)}.IIa07q_skTimeline>li[data-highlight] .IIa07q_skStep{border-left-color:var(--mn-accent);background:color-mix(in srgb, var(--mn-accent) 6%, transparent)}.IIa07q_skStepIndex{width:22px;color:var(--mn-faint);text-align:right;font-variant-numeric:tabular-nums;flex:none;font-size:11px;line-height:20px}.IIa07q_skStepGlyph{width:14px;color:var(--mn-faint);text-align:center;flex:none;font-size:12px;line-height:20px}.IIa07q_skTimeline>li[data-kind=skill] .IIa07q_skStepGlyph{color:var(--mn-accent)}.IIa07q_skTimeline>li[data-failed] .IIa07q_skStepGlyph{color:var(--mn-danger)}.IIa07q_skStepBody{flex:1;min-width:0}.IIa07q_skStepHead{flex-wrap:wrap;align-items:center;gap:6px;min-width:0;display:flex}.IIa07q_skStepHead strong{font-size:12px;font-weight:500;line-height:20px}.IIa07q_skStepHead code{min-width:0;max-width:100%;color:var(--mn-faint);font:11px/18px var(--mn-code);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.IIa07q_skStepBody>p{overflow-wrap:anywhere;color:var(--mn-muted);white-space:pre-wrap;margin:1px 0 0;font-size:12px;line-height:18px}.IIa07q_skTimeline[data-compact] .IIa07q_skStepBody>p{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.IIa07q_skAnnotation{color:var(--mn-text);align-items:flex-start;gap:6px;margin-top:6px;font-size:12px;line-height:18px;display:flex}.IIa07q_skEvidence+.IIa07q_skEvidence{margin-top:14px}.IIa07q_skEvidence>header{align-items:center;gap:8px;min-width:0;margin-bottom:6px;display:flex}.IIa07q_skEvidence>header strong{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:12px;font-weight:500;overflow:hidden}.IIa07q_skEvidence>header span{color:var(--mn-faint);flex:none;font-size:11px}.IIa07q_skEvidence>header button{margin-left:auto}.IIa07q_skChips{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.IIa07q_skDeriveBar{border-radius:var(--dsw-radius-md);background:var(--mn-fill);color:var(--mn-muted);flex-wrap:wrap;align-items:center;gap:8px;padding:8px 10px;font-size:12px;line-height:18px;display:flex}.IIa07q_skDeriveBar>span{min-width:0;margin-right:auto}.IIa07q_skDraft{border-top:.5px solid var(--mn-line);grid-template-columns:minmax(0,1fr);gap:12px;min-width:0;padding-top:14px;display:grid}.IIa07q_skSectionHead{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 12px;display:flex}.IIa07q_skSectionHead h4{align-items:baseline;gap:8px;margin:0;font-size:14px;font-weight:500;line-height:22px;display:flex}.IIa07q_skSectionHead h4 small{color:var(--mn-faint);font-size:12px;font-weight:400}.IIa07q_skSectionHead>div{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.IIa07q_skChanges{color:var(--mn-muted);gap:3px;margin:0;padding-left:18px;font-size:12px;line-height:18px;display:grid}.IIa07q_skChanges li::marker{color:var(--mn-faint)}.IIa07q_skGuidance{color:var(--mn-faint);gap:2px;margin:0;padding-left:18px;font-size:12px;line-height:18px;display:grid}.IIa07q_skBacktest{border-radius:var(--dsw-radius-md);background:var(--mn-fill);flex-wrap:wrap;align-items:center;gap:6px 10px;min-height:36px;padding:4px 6px 4px 12px;display:flex}.IIa07q_skBacktestLine{min-width:0;color:var(--mn-text);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;flex:1;align-items:center;gap:10px;padding:4px 0;font-size:12px;line-height:18px;display:flex}.IIa07q_skBacktestLine>span{color:var(--mn-faint);flex:none}.IIa07q_skBacktestLine>strong{text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums;min-width:0;font-weight:500;overflow:hidden}.IIa07q_skBacktestLine>em{color:var(--mn-muted);background:var(--mn-hover);font-variant-numeric:tabular-nums;border-radius:999px;flex:none;padding:0 7px;font-style:normal;font-weight:500}.IIa07q_skBacktest[data-tone=good] .IIa07q_skBacktestLine>em{color:var(--mn-success);background:color-mix(in srgb, var(--mn-success) 12%, transparent)}.IIa07q_skBacktest[data-tone=bad] .IIa07q_skBacktestLine>em{color:var(--mn-danger);background:color-mix(in srgb, var(--mn-danger) 12%, transparent)}.IIa07q_skBacktestLine:hover>strong{text-underline-offset:3px;text-decoration:underline;text-decoration-color:var(--mn-line-strong,var(--mn-faint))}.IIa07q_skTable{border-collapse:collapse;width:100%;font-size:12px;line-height:18px;animation:.18s cubic-bezier(.2,0,0,1) IIa07q_sk-arrive}.IIa07q_skTable th{border-bottom:.5px solid var(--mn-line);color:var(--mn-faint);text-align:left;padding:6px 8px;font-weight:500}.IIa07q_skTable td{border-bottom:.5px solid var(--mn-line);vertical-align:top;padding:7px 8px}.IIa07q_skTable td small{color:var(--mn-faint);margin-top:3px;display:block}.IIa07q_skComposer{border-radius:var(--dsw-radius-lg);background:var(--mn-fill);grid-template-columns:minmax(0,1fr);gap:8px;padding:12px;animation:.18s cubic-bezier(.2,0,0,1) IIa07q_sk-arrive;display:grid}.IIa07q_skComposer label{color:var(--mn-muted);gap:6px;font-size:12px;font-weight:500;line-height:18px;display:grid}.IIa07q_skComposer textarea{resize:vertical;border:.5px solid var(--mn-field-line);border-radius:var(--dsw-radius-md);width:100%;color:var(--mn-text);background:var(--mn-input);font:inherit;outline:0;padding:6px 10px;font-size:13px;line-height:20px;transition:border-color .12s}.IIa07q_skComposer textarea:focus{border-color:var(--mn-accent)}.IIa07q_skComposer>footer{flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px;display:flex}.IIa07q_skTests{grid-template-columns:minmax(0,1fr);gap:10px;min-width:0;display:grid}.IIa07q_skTestsBar{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.IIa07q_skCases{grid-template-columns:minmax(0,1fr);gap:1px;margin:0;padding:0;list-style:none;display:grid}.IIa07q_skCases>li{border-radius:var(--dsw-radius-md);align-items:flex-start;gap:8px;padding:2px 4px 2px 0;transition:background-color .12s,opacity .14s;display:flex}.IIa07q_skCases>li:hover{background:var(--mn-hover)}.IIa07q_skCases>li[data-off]>details{opacity:.5}.IIa07q_skCases>li>details{flex:1;min-width:0}.IIa07q_skCases>li>:not(details){margin-top:6px}.IIa07q_skCases summary{border-radius:var(--dsw-radius-md);cursor:pointer;align-items:baseline;gap:8px;min-width:0;padding:7px 8px;list-style:none;display:flex}.IIa07q_skCases summary::-webkit-details-marker{display:none}.IIa07q_skCases summary strong{text-overflow:ellipsis;white-space:nowrap;min-width:0;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.IIa07q_skCases summary small{color:var(--mn-faint);flex:none;font-size:11px}.IIa07q_skCases details[open] summary strong{white-space:normal}.IIa07q_skCases details>p{color:var(--mn-muted);white-space:pre-wrap;overflow-wrap:anywhere;margin:0 8px 8px;font-size:12px;line-height:18px}.IIa07q_skCases details>ul{gap:4px;margin:0 8px 8px;padding:0;list-style:none;display:grid}.IIa07q_skCases details>ul li{color:var(--mn-text);align-items:flex-start;gap:6px;font-size:12px;line-height:18px;display:flex}.IIa07q_skCases details>.IIa07q_skLink{margin:0 6px 8px}.IIa07q_skRuns{grid-template-columns:minmax(0,1fr);gap:1px;margin:0;padding:0;list-style:none;display:grid}.IIa07q_skRuns>li>button{border-radius:var(--dsw-radius-md);width:100%;min-width:0;color:var(--mn-text);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;align-items:center;gap:8px;padding:7px 8px;font-size:12px;line-height:18px;transition:background-color .12s;display:flex}.IIa07q_skRuns>li>button:hover,.IIa07q_skRuns>li>button[aria-expanded=true]{background:var(--mn-hover)}.IIa07q_skRuns>li>button>:first-child{flex:none}.IIa07q_skRuns>li>button span{min-width:0;color:var(--mn-muted);text-overflow:ellipsis;white-space:nowrap;font-variant-numeric:tabular-nums;flex:1;overflow:hidden}.IIa07q_skRuns>li>button time{color:var(--mn-faint);flex:none;font-size:11px}.IIa07q_skRunDetail{border-left:.5px solid var(--mn-line);grid-template-columns:minmax(0,1fr);gap:2px;margin:4px 0 8px 12px;padding-left:10px;animation:.18s cubic-bezier(.2,0,0,1) IIa07q_sk-arrive;display:grid}.IIa07q_skRunDetail details{padding:4px 0}.IIa07q_skRunDetail summary{cursor:pointer;align-items:center;gap:8px;min-width:0;font-size:12px;line-height:18px;display:flex}.IIa07q_skRunDetail summary strong{text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0;font-weight:500;overflow:hidden}.IIa07q_skRunDetail summary span{color:var(--mn-faint);font-variant-numeric:tabular-nums}.IIa07q_skRunDetail h6{color:var(--mn-faint);margin:8px 0 4px;font-size:11px;font-weight:500}.IIa07q_skVerdicts{grid-template-columns:minmax(0,1fr);gap:2px;margin:6px 0;padding:0;font-size:12px;line-height:18px;list-style:none;display:grid}.IIa07q_skVerdicts li{color:var(--mn-muted);gap:6px;display:flex}.IIa07q_skVerdicts li b{color:var(--mn-danger)}.IIa07q_skVerdicts li[data-pass] b{color:var(--mn-success)}.IIa07q_skRunSteps{color:var(--mn-muted);margin:0;padding-left:18px;font-size:12px;line-height:18px}.IIa07q_skAnswer{border-radius:var(--dsw-radius-md);max-height:240px;color:var(--mn-text);background:var(--mn-fill);font:12px/1.55 var(--mn-code);white-space:pre-wrap;overflow-wrap:anywhere;margin:0;padding:8px 10px;overflow:auto}.IIa07q_skForm{gap:14px;display:grid}.IIa07q_skField{gap:6px;display:grid}.IIa07q_skField>label{color:var(--mn-muted);font-size:12px;font-weight:500;line-height:18px}.IIa07q_skForm input:not([type=checkbox]):not([type=radio]),.IIa07q_skForm textarea{border:.5px solid var(--mn-field-line);border-radius:var(--dsw-radius-md);width:100%;color:var(--mn-text);background:var(--mn-input);font:inherit;outline:0;padding:7px 10px;font-size:13px;line-height:20px;transition:border-color .12s}.IIa07q_skForm input:not([type=checkbox]):not([type=radio]):focus,.IIa07q_skForm textarea:focus{border-color:var(--mn-accent)}.IIa07q_skForm textarea{resize:vertical}.IIa07q_skForm small{color:var(--mn-faint);font-size:11px;line-height:16px}.IIa07q_skFormRow{display:flex}.IIa07q_skFormError{color:var(--mn-danger);margin-right:auto;font-size:12px}.IIa07q_skChecks{border:0;gap:6px;margin:0;padding:0;display:grid}.IIa07q_skChecks legend{color:var(--mn-muted);margin-bottom:6px;font-size:12px;font-weight:500}.IIa07q_skChecks>div{align-items:center;gap:10px;display:flex}.IIa07q_skChecks>div>input{flex:1;min-width:0}.IIa07q_skMust{color:var(--mn-muted);white-space:nowrap;flex:none;font-size:12px}.IIa07q_skChecks>button{justify-self:start}.IIa07q_skMarket{gap:14px;display:grid}.IIa07q_skMarketBar{flex-wrap:wrap;align-items:center;gap:8px;display:flex}.IIa07q_skMarketBar>:first-child{flex:1;min-width:220px}.IIa07q_skMarketBar>button:not(.IIa07q_skIconButton){min-height:34px}.IIa07q_skMarketGrid{grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:12px;display:grid}.IIa07q_skMarketCard{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);background:0 0;flex-direction:column;min-width:0;transition:border-color .16s,box-shadow .2s,transform .2s cubic-bezier(.2,0,0,1);animation:.24s cubic-bezier(.2,0,0,1) backwards IIa07q_sk-arrive;display:flex}.IIa07q_skMarketCard:hover{border-color:var(--mn-line-strong,var(--mn-card-line));box-shadow:var(--dsw-elevation-soft,0 4px 16px #0000000f);transform:translateY(-1px)}.IIa07q_skMarketCard:hover .IIa07q_skIcon{color:var(--mn-text)}.IIa07q_skMarketOpen{color:var(--mn-text);font:inherit;text-align:left;cursor:pointer;background:0 0;border:0;flex:1;align-content:start;gap:10px;padding:14px 14px 6px;display:grid}.IIa07q_skMarketOpen:focus-visible{box-shadow:inset 0 0 0 2px var(--dsw-focus-ring-color,var(--mn-accent));border-radius:var(--dsw-radius-lg);outline:none}.IIa07q_skMarketOpen>header{align-items:center;gap:10px;min-width:0;display:flex}.IIa07q_skMarketOpen>header>div{min-width:0;display:grid}.IIa07q_skMarketOpen strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.IIa07q_skMarketOpen code{color:var(--mn-faint);font:11px/16px var(--mn-code);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.IIa07q_skMarketOpen p{color:var(--mn-muted);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:0;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.IIa07q_skMarketCard>footer{justify-content:space-between;align-items:center;gap:8px;min-height:42px;padding:0 12px 10px 14px;display:flex}.IIa07q_skMarketCard>footer>span{min-width:0;color:var(--mn-faint);text-overflow:ellipsis;white-space:nowrap;font-size:11px;overflow:hidden}.IIa07q_skMarketDetail{gap:12px;display:grid}.IIa07q_skInline{align-items:center;gap:8px;display:flex}.IIa07q_skInline>:first-child{flex:1;min-width:0}.IIa07q_skMarketSection{gap:8px;animation:.2s cubic-bezier(.2,0,0,1) IIa07q_sk-arrive;display:grid}.IIa07q_skMarketGrid{transition:opacity .16s}.IIa07q_skMarketGrid[data-busy]{opacity:.55}.IIa07q_skMarketAdd{border-radius:var(--dsw-radius-md);background:color-mix(in srgb, var(--mn-accent) 7%, transparent);align-items:center;gap:10px;min-width:0;padding:6px 6px 6px 8px;font-size:12px;line-height:18px;animation:.2s cubic-bezier(.2,0,0,1) IIa07q_sk-arrive;display:flex}.IIa07q_skMarketAdd>span:nth-child(2){min-width:0;color:var(--mn-text);text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.IIa07q_skMarketAdd .IIa07q_skSourceIcon{background:var(--mn-layer-1,var(--mn-fill));width:26px;height:26px}.IIa07q_skMarketStat{font-variant-numeric:tabular-nums;align-items:center;gap:4px;display:inline-flex}.IIa07q_skMarketCard[data-indexed] .IIa07q_skMarketOpen{padding-bottom:4px}.IIa07q_skMarketMeta{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:6px 12px;display:flex}.IIa07q_skAudits{gap:6px;display:grid}.IIa07q_skAudits>div{flex-wrap:wrap;align-items:center;gap:6px;display:flex}.IIa07q_skAuditsLabel{color:var(--mn-faint);margin-right:2px;font-size:12px;line-height:18px}.IIa07q_skAudit{height:22px;color:var(--mn-text);background:var(--mn-fill);border-radius:999px;align-items:center;gap:6px;padding:0 9px 0 8px;font-size:12px;line-height:1;animation:.26s cubic-bezier(.2,0,0,1) IIa07q_sk-pop;display:inline-flex}.IIa07q_skAudit:before{content:\"\";background:var(--mn-success);border-radius:999px;flex:none;width:6px;height:6px}.IIa07q_skAudit[data-status=warn]:before{background:var(--mn-warn)}.IIa07q_skAudit[data-status=fail]:before{background:var(--mn-danger)}.IIa07q_skAudit small{color:var(--mn-faint);font-size:11px}.IIa07q_skSources{gap:18px;display:grid}.IIa07q_skSourceList{gap:2px;margin:0 -6px;padding:0;list-style:none;display:grid}.IIa07q_skSourceList>li{border-radius:var(--dsw-radius-md);align-items:center;gap:12px;min-width:0;padding:8px 8px 8px 6px;transition:background-color .14s;animation:.2s cubic-bezier(.2,0,0,1) IIa07q_sk-arrive;display:flex}.IIa07q_skSourceList>li:hover{background:var(--mn-hover)}.IIa07q_skSourceIcon{border-radius:var(--dsw-radius-md);width:32px;height:32px;color:var(--mn-muted);background:var(--mn-fill);flex:none;place-items:center;transition:opacity .14s;display:grid}.IIa07q_skSourceText{flex:1;gap:1px;min-width:0;transition:opacity .14s;display:grid}.IIa07q_skSourceText>strong{align-items:center;gap:6px;min-width:0;font-size:13px;font-weight:500;line-height:20px;display:flex}.IIa07q_skSourceText>strong>span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.IIa07q_skSourceText>small,.IIa07q_skSourceText>em{text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-style:normal;line-height:18px;overflow:hidden}.IIa07q_skSourceText>small{color:var(--mn-faint)}.IIa07q_skSourceText>em{color:var(--mn-danger)}.IIa07q_skSourceList>li[data-off] .IIa07q_skSourceText,.IIa07q_skSourceList>li[data-off] .IIa07q_skSourceIcon{opacity:.5}.IIa07q_skSourceActions{flex:none;align-items:center;gap:6px;display:flex}.IIa07q_skSourceAdd{border-top:.5px solid var(--mn-line);gap:6px;padding-top:16px;display:grid}.IIa07q_skSourceAdd>label{font-size:13px;font-weight:500;line-height:20px}.IIa07q_skSourceHint{min-height:18px;color:var(--mn-faint);text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:12px;line-height:18px;transition:color .14s;overflow:hidden}.IIa07q_skSourceHint[data-state=ok]{color:var(--mn-muted)}.IIa07q_skSourceHint[data-state=warn]{color:var(--mn-warn)}.IIa07q_skFormat summary{border-radius:var(--dsw-radius-xs,4px);width:fit-content;color:var(--mn-muted);cursor:pointer;padding:0 2px;font-size:12px;line-height:18px}.IIa07q_skFormat summary:hover{color:var(--mn-text)}.IIa07q_skFormat ul{gap:12px;margin:12px 0 0;padding:0;list-style:none;display:grid}.IIa07q_skFormat li{align-items:flex-start;gap:10px;display:flex}.IIa07q_skFormat li .IIa07q_skSourceIcon{width:26px;height:26px}.IIa07q_skFormat li>div{gap:1px;font-size:12px;line-height:18px;display:grid}.IIa07q_skFormat li strong{font-weight:500}.IIa07q_skFormat li span{color:var(--mn-muted)}@container IIa07q_mnemon-workbench (width<=880px){.IIa07q_skSplit{grid-template-columns:minmax(236px,280px) minmax(0,1fr)}}@container IIa07q_mnemon-workbench (width<=640px){.IIa07q_skSplit{grid-template-columns:minmax(0,1fr)}.IIa07q_skList{max-height:360px;overflow-y:auto}.IIa07q_skSkillsSplit,.IIa07q_skEvolutionSplit,.IIa07q_skSkillsSplit>.IIa07q_skList,.IIa07q_skEvolutionSplit>.IIa07q_skList{height:auto}.IIa07q_skSkillsSplit>.IIa07q_skPane,.IIa07q_skEvolutionSplit>.IIa07q_skPane{overscroll-behavior-y:auto;overflow:visible}}@media (width<=760px){.IIa07q_skSplit{grid-template-columns:minmax(0,1fr)}.IIa07q_skList{max-height:360px;overflow-y:auto}.IIa07q_skSkillsSplit,.IIa07q_skEvolutionSplit,.IIa07q_skSkillsSplit>.IIa07q_skList,.IIa07q_skEvolutionSplit>.IIa07q_skList{height:auto}.IIa07q_skSkillsSplit>.IIa07q_skPane,.IIa07q_skEvolutionSplit>.IIa07q_skPane{overscroll-behavior-y:auto;overflow:visible}}@container IIa07q_mnemon-workbench (width<=560px){.IIa07q_skDetailHead{flex-direction:column}.IIa07q_skDetailActions{justify-content:flex-start}}@media (width<=560px){.IIa07q_skDetailHead{flex-direction:column}.IIa07q_skDetailActions{justify-content:flex-start}}.IIa07q_skGroupBody{animation:IIa07q_sk-arrive .16s var(--dsw-ease-out,cubic-bezier(.2, 0, 0, 1));grid-template-columns:minmax(0,1fr);display:grid}@media (prefers-reduced-motion:reduce){.IIa07q_skPage,.IIa07q_skDetail,.IIa07q_skEmpty,.IIa07q_skTable,.IIa07q_skComposer,.IIa07q_skRunDetail,.IIa07q_skMarketCard,.IIa07q_skMarketSection,.IIa07q_skMarketAdd,.IIa07q_skAudit,.IIa07q_skSourceList>li,.IIa07q_skTabBadge,.IIa07q_skDot,.IIa07q_skScore,.IIa07q_skGroupBody{animation:none}.IIa07q_skUse,.IIa07q_skGroupChevron,.IIa07q_skGroupToggle,.IIa07q_skFold>header>button>svg,.IIa07q_skFold[data-link]>header>button>b,.IIa07q_skCallout>b,.IIa07q_skMarketCard,.IIa07q_skLink,.IIa07q_skDismiss,.IIa07q_skIconButton,.IIa07q_skListItem,.IIa07q_skRow,.IIa07q_skRowText,.IIa07q_skIcon{transition:none}.IIa07q_skIconButton[data-busy]>svg,.IIa07q_skIconButton[data-pulse]>svg{animation:none}}"; const tagId = "dsh-brain-mnemon-source-skills/presentation/page.module.css"; if (typeof document !== "undefined") { let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]"); if (!tag) { tag = document.createElement("style"); tag.dataset.pluginCss = tagId; document.head.appendChild(tag); } if (tag.textContent !== css$1) tag.textContent = css$1; } var page_module_css_default = { "mnemon-workbench": "IIa07q_mnemon-workbench", "sk-arrive": "IIa07q_sk-arrive", "sk-breathe": "IIa07q_sk-breathe", "sk-pop": "IIa07q_sk-pop", "sk-spin": "IIa07q_sk-spin", "skAlert": "IIa07q_skAlert", "skAnnotation": "IIa07q_skAnnotation", "skAnswer": "IIa07q_skAnswer", "skAudit": "IIa07q_skAudit", "skAudits": "IIa07q_skAudits", "skAuditsLabel": "IIa07q_skAuditsLabel", "skBacktest": "IIa07q_skBacktest", "skBacktestLine": "IIa07q_skBacktestLine", "skBusy": "IIa07q_skBusy", "skCallout": "IIa07q_skCallout", "skCaption": "IIa07q_skCaption", "skCases": "IIa07q_skCases", "skChanges": "IIa07q_skChanges", "skChecks": "IIa07q_skChecks", "skChips": "IIa07q_skChips", "skClamp": "IIa07q_skClamp", "skComposer": "IIa07q_skComposer", "skDangerButton": "IIa07q_skDangerButton", "skDeriveBar": "IIa07q_skDeriveBar", "skDetail": "IIa07q_skDetail", "skDetailActions": "IIa07q_skDetailActions", "skDetailHead": "IIa07q_skDetailHead", "skDismiss": "IIa07q_skDismiss", "skDoc": "IIa07q_skDoc", "skDot": "IIa07q_skDot", "skDraft": "IIa07q_skDraft", "skEditor": "IIa07q_skEditor", "skEmpty": "IIa07q_skEmpty", "skEmptyActions": "IIa07q_skEmptyActions", "skEvidence": "IIa07q_skEvidence", "skEvolutionSplit": "IIa07q_skEvolutionSplit", "skField": "IIa07q_skField", "skFold": "IIa07q_skFold", "skFoldBody": "IIa07q_skFoldBody", "skFolds": "IIa07q_skFolds", "skForm": "IIa07q_skForm", "skFormError": "IIa07q_skFormError", "skFormRow": "IIa07q_skFormRow", "skFormat": "IIa07q_skFormat", "skGroupBody": "IIa07q_skGroupBody", "skGroupChevron": "IIa07q_skGroupChevron", "skGroupCount": "IIa07q_skGroupCount", "skGroupHeading": "IIa07q_skGroupHeading", "skGroupLabel": "IIa07q_skGroupLabel", "skGroupToggle": "IIa07q_skGroupToggle", "skGuidance": "IIa07q_skGuidance", "skIcon": "IIa07q_skIcon", "skIconButton": "IIa07q_skIconButton", "skInline": "IIa07q_skInline", "skInvocation": "IIa07q_skInvocation", "skKicker": "IIa07q_skKicker", "skLink": "IIa07q_skLink", "skList": "IIa07q_skList", "skListBar": "IIa07q_skListBar", "skListFilter": "IIa07q_skListFilter", "skListGroup": "IIa07q_skListGroup", "skListItem": "IIa07q_skListItem", "skListNote": "IIa07q_skListNote", "skMarket": "IIa07q_skMarket", "skMarketAdd": "IIa07q_skMarketAdd", "skMarketBar": "IIa07q_skMarketBar", "skMarketCard": "IIa07q_skMarketCard", "skMarketDetail": "IIa07q_skMarketDetail", "skMarketGrid": "IIa07q_skMarketGrid", "skMarketMeta": "IIa07q_skMarketMeta", "skMarketOpen": "IIa07q_skMarketOpen", "skMarketSection": "IIa07q_skMarketSection", "skMarketStat": "IIa07q_skMarketStat", "skMeta": "IIa07q_skMeta", "skMust": "IIa07q_skMust", "skMuted": "IIa07q_skMuted", "skNotice": "IIa07q_skNotice", "skPage": "IIa07q_skPage", "skPane": "IIa07q_skPane", "skPaneBar": "IIa07q_skPaneBar", "skProblems": "IIa07q_skProblems", "skProse": "IIa07q_skProse", "skResources": "IIa07q_skResources", "skRow": "IIa07q_skRow", "skRowActions": "IIa07q_skRowActions", "skRowMain": "IIa07q_skRowMain", "skRowText": "IIa07q_skRowText", "skRunDetail": "IIa07q_skRunDetail", "skRunSteps": "IIa07q_skRunSteps", "skRuns": "IIa07q_skRuns", "skScore": "IIa07q_skScore", "skSectionHead": "IIa07q_skSectionHead", "skSkillsSplit": "IIa07q_skSkillsSplit", "skSourceActions": "IIa07q_skSourceActions", "skSourceAdd": "IIa07q_skSourceAdd", "skSourceHint": "IIa07q_skSourceHint", "skSourceIcon": "IIa07q_skSourceIcon", "skSourceList": "IIa07q_skSourceList", "skSourceText": "IIa07q_skSourceText", "skSources": "IIa07q_skSources", "skSplit": "IIa07q_skSplit", "skStep": "IIa07q_skStep", "skStepBody": "IIa07q_skStepBody", "skStepGlyph": "IIa07q_skStepGlyph", "skStepHead": "IIa07q_skStepHead", "skStepIndex": "IIa07q_skStepIndex", "skSuccess": "IIa07q_skSuccess", "skTabBadge": "IIa07q_skTabBadge", "skTable": "IIa07q_skTable", "skTests": "IIa07q_skTests", "skTestsBar": "IIa07q_skTestsBar", "skTimeline": "IIa07q_skTimeline", "skTitleLink": "IIa07q_skTitleLink", "skTrash": "IIa07q_skTrash", "skTrashActions": "IIa07q_skTrashActions", "skTrashList": "IIa07q_skTrashList", "skTrashTags": "IIa07q_skTrashTags", "skTurn": "IIa07q_skTurn", "skUse": "IIa07q_skUse", "skVerdicts": "IIa07q_skVerdicts", "skVersions": "IIa07q_skVersions", "skWarn": "IIa07q_skWarn", "skWhen": "IIa07q_skWhen" }; // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/client/presentation.ts const css = { ...memoryPageStyles, ...page_module_css_default }; const sidebarCss = memorySidebarStyles; function supportsSettingsSection(section) { const supports = supportsMemoryComponentSettingsSection; return typeof supports === "function" && supports("dsh-brain-mnemon-source-skills", section); } const SHIPPED_LOCALE_SET = /* @__PURE__ */ new Set([ "en", "zh", "ja", "es", "fr", "de", "ru", "pt" ]); const useLocalePreference = useLocalePreference$4; function shippedLocale(preference) { return (typeof preference === "string" ? [preference.trim().replaceAll("_", "-").split("-")[0]] : preference).map((id) => id.toLowerCase()).find((id) => SHIPPED_LOCALE_SET.has(id)) ?? "en"; } function selectPlural(locale, count, forms) { if (forms.length === 3) { const category = new Intl.PluralRules(locale).select(count); return category === "one" ? forms[0] : category === "few" ? forms[1] : forms[2]; } return count === 1 ? forms[0] : forms[1]; } function translate(preference) { const resolved = shippedLocale(preference); const dictionary = locales_default[resolved] ?? locales_default.en; return (key, params) => { const text = dictionary[key] ?? locales_default.en[key] ?? key; if (params === void 0) return text; return text.replace(/\{(\w+):([^{}]+)\}/gu, (match, name, spec) => { if (!(name in params)) return match; const forms = spec.split("|"); if (forms.length !== 2 && forms.length !== 3) return match; return selectPlural(resolved, Number(params[name]), forms); }).replace(/\{(\w+)\}/gu, (match, name) => name in params ? String(params[name]) : match); }; } function useT() { const preference = useLocalePreference(useLocale()); const shared = useT$4(); return (0, react.useMemo)(() => { const fallback = translate(preference); if (!(typeof preference === "string" ? !/^(en|zh)([-_]|$)/i.test(preference) : preference[0] !== "en" && preference[0] !== "zh")) return fallback; return (key, params) => { const text = shared(key, params); return text === key ? fallback(key, params) : text; }; }, [preference, shared]); } function compactCount(count, language) { const normalized = language.trim().replaceAll("_", "-"); const tag = normalized.toLowerCase().startsWith("zh") ? "zh-CN" : normalized || "en"; try { return new Intl.NumberFormat(tag, { notation: "compact", maximumSignificantDigits: 3 }).format(count); } catch { return new Intl.NumberFormat("en", { notation: "compact", maximumSignificantDigits: 3 }).format(count); } } function points(value) { return value === void 0 ? "—" : String(Math.round(value * 100)); } function relative(t, iso, now = Date.now()) { if (iso === void 0) return "—"; const time = Date.parse(iso); if (!Number.isFinite(time)) return "—"; const seconds = Math.max(0, Math.round((now - time) / 1e3)); if (seconds < 60) return t("time.justNow"); if (seconds < 3600) return t("time.minutes", { count: Math.floor(seconds / 60) }); if (seconds < 86400) return t("time.hours", { count: Math.floor(seconds / 3600) }); if (seconds < 604800) return t("time.days", { count: Math.floor(seconds / 86400) }); return new Date(time).toLocaleDateString(); } function stamp(iso) { if (iso === void 0) return ""; const date = new Date(iso); return Number.isNaN(date.getTime()) ? "" : date.toLocaleString(void 0, { month: "numeric", day: "numeric", hour: "2-digit", minute: "2-digit" }); } function errorText(error) { return error instanceof Error ? error.message : String(error); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/client/model-choice.tsx function modelOptionValue(model) { if (model === null || model === void 0) return "auto"; return `${model.provider}|${model.model}`; } function modelOptionPick(value) { const at = value.indexOf("|"); if (at <= 0) return null; return { provider: value.slice(0, at), model: value.slice(at + 1) }; } function modelOptionsFrom(models, t, autoKey) { const options = [{ value: "auto", label: models?.effective?.model ?? models?.inherited?.model ?? models?.defaultSelection?.model ?? t(autoKey), detail: t("evolution.modelAutoHint") }]; if (models === null) return options; for (const group of models.groups) for (const entry of group.models) options.push({ value: `${group.id}|${entry.id}`, label: entry.name, detail: group.name }); return options; } function modelCardOptionsFrom(modelOptions, t, autoKey, defaultModel) { const autoLabel = t(autoKey); let detail; if (defaultModel !== null && defaultModel !== void 0) { const target = `${defaultModel.provider}|${defaultModel.model}`; detail = modelOptions.slice(1).find((option) => option.value === target)?.label ?? defaultModel.model; } else if (modelOptions[0] !== void 0 && modelOptions[0].label !== autoLabel) detail = modelOptions[0].label; else detail = t("evolution.modelAutoHint"); return [{ value: "auto", label: autoLabel, detail }, ...modelOptions.slice(1)]; } const NO_PREFERENCES = { suggestionModels: {}, skillRunModels: {} }; function useModelChoice(context, autoKey) { const t = useT(); const [models, setModels] = (0, react.useState)(null); const [preferences, setPreferences] = (0, react.useState)(NO_PREFERENCES); (0, react.useEffect)(() => { let active = true; context.client.models().then((value) => { if (active) setModels(value); }).catch(() => void 0); return () => { active = false; }; }, [context.client]); const configRevision = context.configRevision ?? 0; (0, react.useEffect)(() => { let active = true; context.client.draftPreferences().then((value) => { if (active) setPreferences(value); }).catch(() => void 0); return () => { active = false; }; }, [context.client, configRevision]); const write = (0, react.useCallback)((apply, operation) => { setPreferences((current) => apply(current)); operation().then((next) => { setPreferences(next); }).catch((error) => { context.fail(error); context.client.invalidatePreferences?.(); context.client.draftPreferences().then(setPreferences).catch(() => void 0); }); }, [context]); const defaultModel = autoKey === "tests.modelAuto" ? preferences.runModel : preferences.model; const options = (0, react.useMemo)(() => modelOptionsFrom(models, t, autoKey), [ models, t, autoKey ]); return { models, preferences, options, cardOptions: (0, react.useMemo)(() => modelCardOptionsFrom(options, t, autoKey, defaultModel), [ options, t, autoKey, defaultModel ]), saveDraftModel: (model) => write((current) => model === null ? omit(current, "model") : { ...current, model }, () => context.client.saveDraftModel(model)), saveSuggestionModel: (id, model) => write((current) => { const suggestionModels = { ...current.suggestionModels }; if (model === null) delete suggestionModels[id]; else suggestionModels[id] = model; return { ...current, suggestionModels }; }, () => context.client.saveSuggestionModel(id, model)), saveRunModel: (model) => write((current) => model === null ? omit(current, "runModel") : { ...current, runModel: model }, () => context.client.saveRunModel(model)), saveSkillRunModel: (skillName, model) => write((current) => { const skillRunModels = { ...current.skillRunModels }; if (model === null) delete skillRunModels[skillName]; else skillRunModels[skillName] = model; return { ...current, skillRunModels }; }, () => context.client.saveSkillRunModel(skillName, model)) }; } function omit(preferences, key) { if (preferences[key] === void 0) return preferences; const next = { ...preferences }; delete next[key]; return next; } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/client/shared.tsx const canRenderMarkdown = typeof _deepseek_ai_dsh_client_ui_primitives.MarkdownText === "function" || typeof _deepseek_ai_dsh_client_ui_primitives.MarkdownText === "object" && _deepseek_ai_dsh_client_ui_primitives.MarkdownText !== null; const canRenderPathLabel = typeof _deepseek_ai_dsh_client_ui_primitives.PathLabel === "function" || typeof _deepseek_ai_dsh_client_ui_primitives.PathLabel === "object" && _deepseek_ai_dsh_client_ui_primitives.PathLabel !== null; function SkillPath(props) { return canRenderPathLabel ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.PathLabel, { path: props.path }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children: props.path }); } const SIGNAL_TONE = { correction: "warning", directive: "info", "tool-failure": "danger", "approach-change": "warning", procedure: "info", "skill-gap": "warning", "skill-misleading": "warning", success: "success" }; function SignalTag(props) { const t = useT(); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: SIGNAL_TONE[props.signal], children: t(`signal.${props.signal}`) }); } const STATUS_TONE = { pending: "info", drafting: "info", review: "warning", adopted: "success", dismissed: "quiet", expired: "quiet", invalidated: "quiet" }; function StatusTag(props) { const t = useT(); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: STATUS_TONE[props.status], children: t(`status.${props.status}`) }); } function ActionTag(props) { const t = useT(); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: props.action === "create" ? "success" : "info", children: t(`action.${props.action}`) }); } function RunStatusDot(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: { running: "ongoing", completed: "done", failed: "error", interrupted: "warning" }[props.status] }); } function useLink(nonce, ready, follow) { const followed = (0, react.useRef)(void 0); (0, react.useEffect)(() => { if (nonce === void 0 || followed.current === nonce || !ready) return; followed.current = nonce; follow(); }); } function Busy(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.skBusy, role: "status", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.StateDot, { state: "ongoing" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.TextShimmer, { active: true, children: props.label })] }); } function Empty(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skEmpty, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(EmptyState, { glyph: props.glyph, title: props.title, children: props.children }), props.action !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skEmptyActions, children: props.action })] }); } function Confirm(props) { const t = useT(); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: props.title, ...props.busy === void 0 ? {} : { busy: props.busy }, onClose: props.onClose, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", onClick: props.onClose, children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", className: props.danger === true ? css.skDangerButton : void 0, disabled: props.busy === true, onClick: props.onConfirm, children: props.confirmLabel })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skProse, children: props.body }) }); } function Fold(props) { const [open, setOpen] = (0, react.useState)(props.defaultOpen === true); const id = (0, react.useId)(); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css.skFold, "data-open": open ? "" : void 0, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", "aria-expanded": open, "aria-controls": id, onClick: () => setOpen((value) => !value), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 12 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.title }), props.meta !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: props.meta }) ] }), open && props.actions !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { children: props.actions })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: open ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { id, className: css.skFoldBody, children: props.children }) : null })] }); } function FoldLink(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", { className: css.skFold, "data-link": "", children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", onClick: props.onOpen, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.title }), props.meta !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: props.meta }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", { "aria-hidden": "true", children: "›" }) ] }) }) }); } function Clamp(props) { const t = useT(); const [open, setOpen] = (0, react.useState)(false); const lines = props.lines ?? 3; const long = props.text.length > lines * 60 || props.text.split("\n").length > lines; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skClamp, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skProse, "data-clamped": long && !open ? "" : void 0, style: { ["--sk-lines"]: lines }, children: props.text }), long && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css.skLink, onClick: () => setOpen((value) => !value), children: open ? t("common.less") : t("common.more") })] }); } function MoreList(props) { const t = useT(); const [open, setOpen] = (0, react.useState)(false); const hidden = props.items.length - props.shown; const items = open || hidden <= 0 ? props.items : props.items.slice(0, props.shown); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skClamp, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { className: css.skChanges, children: items.map((item, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: item }, index)) }), hidden > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css.skLink, onClick: () => setOpen((value) => !value), children: open ? t("common.less") : t("common.moreCount", { count: hidden }) })] }); } function MoreMenu(props) { const [open, setOpen] = (0, react.useState)(false); if (props.items.length === 0) return null; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, { open, autoFocus: true, onClose: () => setOpen(false), align: "end", portal: true, items: props.items.map((item) => ({ id: item.id, label: item.label, ...item.danger === true ? { danger: true } : {}, ...item.disabled === true ? { disabled: true } : {} })), onSelect: (id) => { setOpen(false); props.onSelect(id); }, anchor: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css.skIconButton, "aria-label": props.label, title: props.label, "aria-haspopup": "menu", "aria-expanded": open, disabled: props.disabled, onClick: () => setOpen((value) => !value), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconEllipsisOutlineRegular, { size: 16 }) }) }); } const STEP_GLYPH = { user: "›", assistant: "‹", tool: "⚙", skill: "✦" }; function StepTimeline(props) { const t = useT(); const notes = /* @__PURE__ */ new Map(); for (const annotation of props.annotations ?? []) notes.set(annotation.step, [...notes.get(annotation.step) ?? [], annotation]); let lastTurn; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", { className: css.skTimeline, "data-compact": props.compact === true ? "" : void 0, children: props.steps.map((step) => { const annotated = notes.get(step.index) ?? []; const turnLabel = step.turn !== lastTurn ? t("timeline.turn", { turn: step.turn }) : void 0; lastTurn = step.turn; const failed = step.kind === "tool" && step.tool?.ok === false; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { "data-kind": step.kind, "data-failed": failed ? "" : void 0, "data-annotated": annotated.length > 0 ? "" : void 0, "data-highlight": props.highlight?.has(step.index) === true ? "" : void 0, children: [turnLabel !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skTurn, children: turnLabel }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skStep, children: [ props.onToggle !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, { checked: props.selected?.has(step.index) === true, label: `#${step.index}`, onChange: () => props.onToggle(step.index) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skStepIndex, children: step.index }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skStepGlyph, "aria-hidden": "true", children: STEP_GLYPH[step.kind] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skStepBody, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skStepHead, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: step.kind === "tool" ? step.tool?.name ?? t("timeline.tool") : t(`timeline.${step.kind}`) }), step.kind === "skill" && step.skill !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: step.skill.by === "user" ? `/${step.skill.name}` : step.skill.name }), step.kind === "tool" && step.tool?.input !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { title: step.tool.input, children: step.tool.input }), failed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "danger", children: t("timeline.failed") }) ] }), step.kind !== "skill" && step.text !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: step.text }), annotated.map((annotation, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skAnnotation, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SignalTag, { signal: annotation.signal }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: annotation.note })] }, index)) ] }) ] })] }, step.index); }) }); } function Field(props) { const id = (0, react.useId)(); const hintId = (0, react.useId)(); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skField, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", { htmlFor: id, children: props.label }), props.children({ id, ...props.hint === void 0 ? {} : { "aria-describedby": hintId } }), props.hint !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { id: hintId, children: props.hint }) ] }); } function diffLabels(t) { return { codeLabel: t("diff.code"), wrapLabel: t("diff.wrap"), unwrapLabel: t("diff.unwrap"), copy: t("diff.copy"), copied: t("diff.copied"), collapseAria: t("diff.collapse"), expandAria: (hidden) => t("diff.expand", { count: hidden }), collapse: t("diff.collapse"), expand: (hidden) => t("diff.expand", { count: hidden }) }; } function SkillMarkdown(props) { const t = useT(); const labels = (0, react.useMemo)(() => ({ code: { copyLabel: t("diff.copy"), copiedLabel: t("diff.copied") }, footnotes: t("markdown.footnotes") }), [t]); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skDoc, children: canRenderMarkdown ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MarkdownText, { text: props.body, labels }) : props.body }); } const CATEGORY_GLYPH = { "docs-writing": "✎", "content-creation": "✦", "design-ui": "◐", development: "⌘", devops: "⇪", "research-analysis": "⌕", productivity: "✓", marketing: "◎" }; function SkillIcon(props) { const glyph = props.category === void 0 ? void 0 : CATEGORY_GLYPH[props.category]; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skIcon, "aria-hidden": "true", children: glyph ?? props.name.slice(0, 1).toUpperCase() }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/client/skill-tests.tsx const HISTORY = 6; function completedRunSummary(run, t) { const unmeasured = run.results.filter((result) => result.unmeasuredReason === "requires-vision").length; const errors = run.results.filter((result) => result.verdict === "error" && result.unmeasuredReason === void 0).length; return [ ...run.score === void 0 && unmeasured > 0 ? [] : [t("tests.score", { score: points(run.score) })], ...unmeasured > 0 ? [t("tests.unmeasured", { count: unmeasured })] : [], ...errors > 0 ? [t("tests.errors", { count: errors })] : [] ].join(" · "); } function SkillTests(props) { const t = useT(); const { context, skillName } = props; const runModel = props.runModel ?? null; const hasProvidedCases = props.cases !== void 0; const hasProvidedFile = props.hasFile !== void 0; const [fetchedCases, setFetchedCases] = (0, react.useState)(null); const [runs, setRuns] = (0, react.useState)(null); const [loadedSkill, setLoadedSkill] = (0, react.useState)(null); const [fetchedHasFile, setFetchedHasFile] = (0, react.useState)(true); const [editing, setEditing] = (0, react.useState)(null); const [deleting, setDeleting] = (0, react.useState)(null); const [openRun, setOpenRun] = (0, react.useState)(); const [busy, setBusy] = (0, react.useState)(false); (0, react.useEffect)(() => { let active = true; Promise.all([ hasProvidedCases ? Promise.resolve(null) : context.client.cases(skillName), context.client.runs(skillName), hasProvidedFile ? Promise.resolve(null) : context.client.evidencePack({ skill: skillName }) ]).then(([list, history, pack]) => { if (!active) return; if (list !== null) setFetchedCases(list); setRuns(history.filter((run) => run.target.kind !== "draft")); if (pack !== null) setFetchedHasFile(pack.skill !== void 0); setLoadedSkill(skillName); }).catch(context.fail); return () => { active = false; }; }, [ context.client, skillName, context.revision, hasProvidedCases, hasProvidedFile ]); const cases = props.cases ?? fetchedCases; const hasFile = props.hasFile ?? fetchedHasFile; if (cases === null || runs === null || loadedSkill !== skillName) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }); const enabled = cases.filter((entry) => entry.enabled); const running = runs.some((entry) => entry.status === "running"); const run = async () => { setBusy(true); try { const started = await context.client.backtest({ skillName, target: { kind: hasFile ? "current" : "none" }, ...runModel === null ? {} : { provider: runModel.provider, model: runModel.model } }); setOpenRun(started.runId); context.refresh(); } catch (error) { context.fail(error); } finally { setBusy(false); } }; const save = async (input) => { setBusy(true); try { await context.client.saveCase(input); setEditing(null); context.refresh(); } catch (error) { context.fail(error); } finally { setBusy(false); } }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skTests, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skTestsBar, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: !context.writable || busy || running || enabled.length === 0 || !context.client.canAssist("skill-backtest"), onClick: () => void run(), children: running ? t("tests.running") : t("tests.run") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: !context.writable, onClick: () => setEditing({ skillName, title: "", prompt: "", checks: [{ text: "", must: true }] }), children: t("tests.add") })] }), cases.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skMuted, children: t("tests.empty") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { className: css.skCases, children: cases.map((entry) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { "data-off": entry.enabled ? void 0 : "", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("summary", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: entry.title }), entry.requiresVision === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "quiet", children: t("tests.requiresVision") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("tests.checks", { count: entry.checks.length }) }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: entry.prompt }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { children: entry.checks.map((check) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: check.must ? "neutral" : "quiet", children: check.must ? t("tests.must") : t("tests.should") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: check.text })] }, check.id)) }), entry.origin.trajectoryId !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css.skLink, onClick: () => context.navigate({ tab: "evolution", filter: "evidence", trajectoryId: entry.origin.trajectoryId, ...entry.origin.steps === void 0 ? {} : { steps: entry.origin.steps } }), children: [t("tests.origin"), " ›"] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, { checked: entry.enabled, label: t("tests.enabled", { title: entry.title }), disabled: !context.writable || busy, onChange: (next) => void save({ ...entry, enabled: next }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MoreMenu, { label: t("common.more"), disabled: !context.writable, onSelect: (id) => id === "edit" ? setEditing({ ...entry }) : setDeleting(entry), items: [{ id: "edit", label: t("common.edit") }, { id: "delete", label: t("common.delete"), danger: true }] }) ] }, entry.id)) }), runs.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h6", { className: css.skCaption, children: t("tests.history") }), runs.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { className: css.skRuns, children: runs.slice(0, HISTORY).map((entry) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", "aria-expanded": openRun === entry.id, onClick: () => setOpenRun(openRun === entry.id ? void 0 : entry.id), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RunStatusDot, { status: entry.status }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: entry.status === "running" ? t("tests.progress", { done: entry.progress.done, total: entry.progress.total }) : entry.status === "completed" ? completedRunSummary(entry, t) : t(`run.status.${entry.status}`) }), entry.target.kind === "none" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "quiet", children: t("tests.withoutSkill") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("time", { children: relative(t, entry.startedAt) }) ] }), openRun === entry.id && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RunDetail, { run: entry })] }, entry.id)) }), editing !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CaseEditor, { initial: editing, busy, onClose: () => setEditing(null), onSave: (input) => void save(input) }), deleting !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Confirm, { danger: true, title: t("tests.deleteTitle"), body: deleting.title, confirmLabel: t("common.delete"), busy, onClose: () => setDeleting(null), onConfirm: () => void (async () => { setBusy(true); try { await context.client.deleteCase(deleting.id); setDeleting(null); context.refresh(); } catch (error) { context.fail(error); } finally { setBusy(false); } })() }) ] }); } function RunDetail(props) { const t = useT(); if (props.run.error !== void 0 && props.run.results.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.inlineError, children: props.run.error }); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skRunDetail, children: props.run.results.map((result) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("summary", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: result.unmeasuredReason === "requires-vision" ? "quiet" : result.verdict === "pass" ? "success" : result.verdict === "error" ? "danger" : "warning", children: t(`run.verdict.${result.unmeasuredReason === "requires-vision" ? "unmeasured" : result.verdict}`) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: result.title }), result.verdict !== "error" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: points(result.score) }) ] }), result.unmeasuredReason === "requires-vision" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skMuted, children: t("run.requiresVision") }) : result.error !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.inlineError, children: result.error }), result.checks.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { className: css.skVerdicts, children: result.checks.map((check) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { "data-pass": check.pass ? "" : void 0, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", { "aria-hidden": "true", children: check.pass ? "✓" : "✕" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: check.note })] }, check.checkId)) }), result.steps.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h6", { children: t("run.steps") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", { className: css.skRunSteps, children: result.steps.map((step, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: step }, index)) })] }), result.answer !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h6", { children: t("run.answer") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("pre", { className: css.skAnswer, children: result.answer })] }) ] }, result.caseId)) }); } function CaseEditor(props) { const t = useT(); const nextRowIdRef = (0, react.useRef)(props.initial.checks.length); const [value, setValue] = (0, react.useState)(props.initial); const [checkRows, setCheckRows] = (0, react.useState)(() => props.initial.checks.map((check, index) => ({ ...check, rowId: index }))); const [error, setError] = (0, react.useState)(null); const checks = checkRows.filter((check) => check.text.trim() !== "").map(({ rowId: _rowId, ...check }) => check); const valid = value.title.trim() !== "" && value.prompt.trim() !== "" && checks.length > 0; const setCheck = (rowId, patch) => setCheckRows((current) => current.map((check) => check.rowId === rowId ? { ...check, ...patch } : check)); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { wide: true, title: props.initial.id === void 0 ? t("tests.newTitle") : t("tests.editTitle"), busy: props.busy, onClose: props.onClose, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skFormError, children: error }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", onClick: props.onClose, children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", disabled: !valid || props.busy, onClick: () => { try { props.onSave({ ...value, checks }); } catch (reason) { setError(errorText(reason)); } }, children: t("common.save") }) ] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skForm, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, { label: t("tests.caseTitle"), children: (control) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { ...control, value: value.title, onChange: (event) => setValue({ ...value, title: event.target.value }) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, { label: t("tests.prompt"), hint: t("tests.promptHint"), children: (control) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { ...control, rows: 4, value: value.prompt, onChange: (event) => setValue({ ...value, prompt: event.target.value }) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, { label: t("tests.context"), children: (control) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { ...control, rows: 3, value: value.context ?? "", onChange: (event) => setValue({ ...value, context: event.target.value }) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, { checked: value.requiresVision ?? false, label: t("tests.requiresVision"), disabled: props.busy, onChange: (requiresVision) => setValue({ ...value, requiresVision }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skMuted, children: t("tests.requiresVisionHint") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("fieldset", { className: css.skChecks, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("legend", { children: t("tests.checksLabel") }), checkRows.map((check) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, { className: css.skMust, checked: check.must, label: t("tests.must"), onChange: (must) => setCheck(check.rowId, { must }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { value: check.text, placeholder: t("tests.checkPlaceholder"), onChange: (event) => setCheck(check.rowId, { text: event.target.value }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css.skDismiss, "aria-label": t("common.delete"), onClick: () => setCheckRows((current) => current.filter((row) => row.rowId !== check.rowId)), children: "×" }) ] }, check.rowId)), checkRows.length < 8 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", onClick: () => { const rowId = nextRowIdRef.current++; setCheckRows((current) => [...current, { rowId, text: "", must: false }]); }, children: t("tests.addCheck") }) ] }) ] }) }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/client/evals-page.tsx function scoreTone(score) { return score === void 0 ? void 0 : score >= .8 ? "good" : score < .5 ? "bad" : void 0; } function EvalsPage(props) { const t = useT(); const { context, location } = props; const [catalog, setCatalog] = (0, react.useState)(null); const [cases, setCases] = (0, react.useState)([]); const [proposed, setProposed] = (0, react.useState)(/* @__PURE__ */ new Set()); const [query, setQuery] = (0, react.useState)(""); const [selected, setSelected] = (0, react.useState)(location.skillName); const choice = useModelChoice(context, "tests.modelAuto"); (0, react.useEffect)(() => { if (location.skillName !== void 0) setSelected(location.skillName); }, [location.skillName, location.nonce]); (0, react.useEffect)(() => { let active = true; Promise.all([ context.client.catalog(), context.client.cases(), context.client.suggestions([ "pending", "drafting", "review" ]) ]).then(([view, list, waiting]) => { if (!active) return; setCatalog(view); setCases(list); setProposed(new Set(waiting.filter((entry) => entry.action === "create").map((entry) => entry.skillName))); }).catch(context.fail); return () => { active = false; }; }, [context.client, context.revision]); const rows = (0, react.useMemo)(() => { if (catalog === null) return []; const loaded = new Map(catalog.skills.filter((skill) => skill.shadowedBy === void 0).map((skill) => [skill.name, skill.description])); return [.../* @__PURE__ */ new Set([...loaded.keys(), ...cases.map((entry) => entry.skillName)])].map((name) => { const stats = catalog.stats[name]; const own = cases.filter((entry) => entry.skillName === name); const description = loaded.get(name); return { name, exists: loaded.has(name), cases: own.filter((entry) => entry.enabled).length, off: own.filter((entry) => !entry.enabled).length, ...description === void 0 ? {} : { description }, ...stats?.lastScore === void 0 ? {} : { lastScore: stats.lastScore }, ...stats?.lastRunAt === void 0 ? {} : { lastRunAt: stats.lastRunAt } }; }).sort((a, b) => Number(b.exists) - Number(a.exists) || a.name.localeCompare(b.name)); }, [catalog, cases]); const paneRef = (0, react.useRef)(null); const needle = query.trim().toLowerCase(); const visible = rows.filter((row) => needle === "" || row.name.includes(needle)); const groups = [{ key: "tested", title: t("evals.tested"), rows: visible.filter((row) => row.cases > 0) }, { key: "untested", title: t("evals.untested"), rows: visible.filter((row) => row.cases === 0) }].filter((group) => group.rows.length > 0); const activeRow = rows.find((row) => row.name === selected) ?? groups[0]?.rows[0] ?? rows[0]; (0, react.useLayoutEffect)(() => { if (paneRef.current !== null) paneRef.current.scrollTop = 0; }, [activeRow?.name]); if (catalog === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }); if (rows.length === 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Empty, { glyph: "✓", title: t("evals.empty"), children: t("evals.emptyBody") }); const current = activeRow; const currentCases = cases.filter((entry) => entry.skillName === current.name); const runOverride = Object.hasOwn(choice.preferences.skillRunModels, current.name) ? choice.preferences.skillRunModels[current.name] : null; const effectiveRunModel = runOverride ?? choice.preferences.runModel ?? null; const saveSkillRun = (value) => choice.saveSkillRunModel(current.name, modelOptionPick(value)); const modelSettingsAvailable = context.openSettings !== void 0 && supportsSettingsSection("models"); const modelBar = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skPaneBar, children: [ !modelSettingsAvailable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { label: t("tests.model"), triggerDetail: true, inline: true, size: "sm", value: modelOptionValue(choice.preferences.runModel), disabled: !context.writable || choice.models === null, onChange: (value) => choice.saveRunModel(modelOptionPick(value)), options: choice.options }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { label: t("tests.modelCard"), triggerDetail: true, inline: true, size: "sm", value: modelOptionValue(runOverride), disabled: !context.writable || choice.models === null, onChange: saveSkillRun, options: choice.cardOptions }), modelSettingsAvailable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css.skIconButton, onClick: () => context.openSettings("models"), "aria-label": t("common.settings"), title: t("common.settings"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSettingsOutlineRegular, { size: 15 }) }) ] }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: `${css.skSplit} ${css.skSkillsSplit}`, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", { className: css.skList, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", { className: css.skListBar, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchField, { label: t("skills.search"), placeholder: t("skills.search"), value: query, onChange: (event) => setQuery(event.target.value) }) }), visible.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skListNote, children: t("skills.noMatch") }), groups.map((group) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css.skListGroup, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h5", { className: css.skGroupHeading, children: group.title }), group.rows.map((row) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skRow, "data-selected": row.name === current.name ? "" : void 0, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css.skRowMain, onClick: () => setSelected(row.name), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillIcon, { name: row.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.skRowText, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: row.name }), !row.exists && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "quiet", children: t("evals.notCreated") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: row.cases > 0 ? [t("tests.count", { count: row.cases }), ...row.lastRunAt === void 0 ? [] : [relative(t, row.lastRunAt)]].join(" · ") : row.off > 0 ? t("evals.off", { count: row.off }) : row.description })] })] }), row.lastScore !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", { className: css.skScore, "data-tone": scoreTone(row.lastScore), title: t("tests.lastScore", { score: points(row.lastScore) }), children: points(row.lastScore) })] }, row.name))] }, group.key)) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { ref: paneRef, className: css.skPane, children: [modelBar, /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { className: css.skDetail, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", { className: css.skDetailHead, children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: current.exists ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css.skTitleLink, onClick: () => context.navigate({ tab: "skills", skillName: current.name }), children: current.name }) : current.name }), !current.exists && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { children: [t("evals.notCreatedBody"), proposed.has(current.name) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [" ", /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css.skLink, onClick: () => context.navigate({ tab: "evolution", skillName: current.name }), children: [t("evals.openSuggestion"), " ›"] })] })] })] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillTests, { context, skillName: current.name, cases: currentCases, hasFile: current.exists, runModel: effectiveRunModel })] }, current.name)] })] }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/client/evidence-page.tsx function EvidenceView(props) { const t = useT(); const { context, location } = props; const [records, setRecords] = (0, react.useState)(null); const [skill, setSkill] = (0, react.useState)(location.filter === "evidence" && location.trajectoryId === void 0 ? location.skillName ?? "" : ""); const [selected, setSelected] = (0, react.useState)(location.trajectoryId); const paneRef = (0, react.useRef)(null); (0, react.useEffect)(() => { if (location.trajectoryId !== void 0) setSelected(location.trajectoryId); }, [location.trajectoryId, location.nonce]); (0, react.useEffect)(() => { let active = true; context.client.trajectories().then((list) => { if (active) setRecords(list); }).catch(context.fail); return () => { active = false; }; }, [context.client, context.revision]); const skills = (0, react.useMemo)(() => [...new Set((records ?? []).flatMap((record) => record.stats.skills))].sort(), [records]); const shown = (0, react.useMemo)(() => (records ?? []).filter((record) => skill === "" || record.stats.skills.includes(skill)).sort((a, b) => Number(b.pinned) - Number(a.pinned) || Date.parse(b.createdAt) - Date.parse(a.createdAt)), [records, skill]); const current = shown.find((record) => record.id === selected) ?? shown[0]; (0, react.useLayoutEffect)(() => { if (paneRef.current !== null) paneRef.current.scrollTop = 0; }, [current?.id]); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: appearanceClass(css.skSplit, css.skEvolutionSplit), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", { className: css.skList, children: [props.listHeader, records === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skListNote, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }) }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [(skills.length > 1 || skill !== "") && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skListFilter, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { size: "sm", hideLabel: true, label: t("evidence.skill"), value: skill, onChange: (value) => { setSkill(value); setSelected(void 0); }, options: [{ value: "", label: t("evidence.allSkills") }, ...skills.map((name) => ({ value: name, label: name }))] }) }), shown.map((record) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css.skListItem, "data-selected": current?.id === record.id ? "" : void 0, onClick: () => setSelected(record.id), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: record.sessionTitle ?? record.sessionId.slice(0, 8) }), record.pinned && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "neutral", children: t("records.pinned") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { children: [t("records.stats", { turns: record.stats.turns, tools: record.stats.toolCalls }), record.stats.skills.length > 0 ? ` · ${record.stats.skills.join(", ")}` : ""] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("time", { children: relative(t, record.createdAt) }), record.suggestionIds.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("records.suggested", { count: record.suggestionIds.length }) })] }) ] }, record.id))] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { ref: paneRef, className: css.skPane, children: records === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }) : current === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Empty, { glyph: "✧", title: t("evolution.empty.evidence"), children: t("evolution.emptyBody.evidence") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RecordDetail, { context, id: current.id, focus: current.id === location.trajectoryId ? location.steps : void 0, onDeleted: () => setSelected(void 0) }, current.id) })] }); } function RecordDetail(props) { const t = useT(); const { context } = props; const [loadedTrajectory, setLoadedTrajectory] = (0, react.useState)(null); const [chosen, setChosen] = (0, react.useState)(() => /* @__PURE__ */ new Set()); const [target, setTarget] = (0, react.useState)(""); const [names, setNames] = (0, react.useState)([]); const [busy, setBusy] = (0, react.useState)(false); const [deleting, setDeleting] = (0, react.useState)(false); const configRevision = context.configRevision ?? 0; (0, react.useEffect)(() => { setChosen(/* @__PURE__ */ new Set()); setTarget(""); setDeleting(false); }, [props.id]); (0, react.useEffect)(() => { let active = true; context.client.trajectory(props.id).then((value) => { if (!active) return; setLoadedTrajectory(value); setTarget((current) => current !== "" ? current : value.stats.skills[0] ?? ""); }).catch(context.fail); return () => { active = false; }; }, [ context.client, props.id, context.revision ]); (0, react.useEffect)(() => { let active = true; context.client.catalog().then((catalog) => { if (active) setNames([...new Set(catalog.skills.map((skill) => skill.name))]); }).catch(() => void 0); return () => { active = false; }; }, [context.client, configRevision]); const trajectory = loadedTrajectory !== null && loadedTrajectory.id === props.id ? loadedTrajectory : null; if (trajectory === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }); const targets = [.../* @__PURE__ */ new Set([...trajectory.stats.skills, ...names])]; const skillName = target !== "" ? target : targets[0] ?? ""; const toggle = (index) => setChosen((current) => { const next = new Set(current); if (next.has(index)) next.delete(index); else next.add(index); return next; }); const act = async (operation) => { setBusy(true); try { await operation(); context.refresh(); } catch (error) { context.fail(error); } finally { setBusy(false); } }; const derive = () => act(async () => { const result = await context.client.deriveCases({ trajectoryId: trajectory.id, skillName, ...chosen.size === 0 ? {} : { steps: [...chosen].sort((a, b) => a - b) } }); context.notice(t("records.derived", { count: result.added.length, name: skillName })); setChosen(/* @__PURE__ */ new Set()); }); const meta = [ stamp(trajectory.createdAt), t("records.stats", { turns: trajectory.stats.turns, tools: trajectory.stats.toolCalls }), ...trajectory.stats.toolFailures > 0 ? [t("records.failures", { count: trajectory.stats.toolFailures })] : [] ]; const canDerive = context.client.canAssist("skill-derive-cases") && context.writable; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { className: css.skDetail, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { className: css.skDetailHead, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: trajectory.sessionTitle ?? trajectory.sessionId }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skMeta, children: meta.map((part) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: part }, part)) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skDetailActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: !context.writable || busy, onClick: () => void act(() => context.client.pinTrajectory(trajectory.id, !trajectory.pinned)), children: trajectory.pinned ? t("records.unpin") : t("records.pin") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MoreMenu, { label: t("common.more"), disabled: !context.writable, items: [{ id: "delete", label: t("common.delete"), danger: true }], onSelect: () => setDeleting(true) })] })] }), trajectory.reviewSummary !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Clamp, { text: trajectory.reviewSummary }), trajectory.signals.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skChips, children: trajectory.signals.map((signal) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SignalTag, { signal }, signal)) }), trajectory.suggestionIds.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skChips, children: trajectory.suggestionIds.map((id, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css.skLink, onClick: () => context.navigate({ tab: "evolution", suggestionId: id }), children: [t("records.suggestion", { index: index + 1 }), " ›"] }, id)) }), canDerive && targets.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skDeriveBar, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: chosen.size === 0 ? t("records.deriveAll") : t("records.deriveChosen", { count: chosen.size }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { size: "sm", inline: true, hideLabel: true, label: t("records.deriveFor"), value: skillName, onChange: setTarget, options: targets.map((name) => ({ value: name, label: name })) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: busy || skillName === "", onClick: () => void derive(), children: t("records.derive") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StepTimeline, { steps: trajectory.steps, annotations: trajectory.annotations, highlight: new Set(props.focus ?? []), selected: chosen, ...canDerive ? { onToggle: toggle } : {} }), deleting && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Confirm, { danger: true, title: t("records.deleteTitle"), body: t("records.deleteBody"), confirmLabel: t("common.delete"), busy, onClose: () => setDeleting(false), onConfirm: () => void (async () => { setBusy(true); try { await context.client.deleteTrajectory(trajectory.id); setDeleting(false); props.onDeleted(); context.refresh(); } catch (error) { context.fail(error); } finally { setBusy(false); } })() }) ] }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/client/evolution-page.tsx const PENDING = [ "pending", "drafting", "review" ]; const DONE = [ "adopted", "dismissed", "expired", "invalidated" ]; function EvolutionPage(props) { const t = useT(); const { context, location } = props; const [filter, setFilter] = (0, react.useState)(location.filter ?? "pending"); const [suggestions, setSuggestions] = (0, react.useState)(null); const [drafts, setDrafts] = (0, react.useState)([]); const [selected, setSelected] = (0, react.useState)(location.suggestionId ?? location.draftId); const [reviewing, setReviewing] = (0, react.useState)(false); const [deleting, setDeleting] = (0, react.useState)(void 0); const choice = useModelChoice(context, "evolution.modelAuto"); const draftCacheRef = (0, react.useRef)({ revision: -1, client: context.client, entries: /* @__PURE__ */ new Map() }); if (draftCacheRef.current.revision !== context.revision || draftCacheRef.current.client !== context.client) draftCacheRef.current = { revision: context.revision, client: context.client, entries: /* @__PURE__ */ new Map() }; const readDraft = (0, react.useCallback)((draftId) => { let bucket = draftCacheRef.current; if (bucket.revision !== context.revision || bucket.client !== context.client) { bucket = { revision: context.revision, client: context.client, entries: /* @__PURE__ */ new Map() }; draftCacheRef.current = bucket; } const existing = bucket.entries.get(draftId); if (existing !== void 0) return existing; const request = context.client.draft(draftId).catch((error) => { bucket.entries.delete(draftId); throw error; }); bucket.entries.set(draftId, request); return request; }, [context.client, context.revision]); const hasSharedOverview = "overview" in context; (0, react.useEffect)(() => { let active = true; context.client.suggestions().then((list) => { if (active) setSuggestions(list); }).catch(context.fail); return () => { active = false; }; }, [ context.client, context.fail, context.revision ]); (0, react.useEffect)(() => { if (suggestions === null) return; if (hasSharedOverview && context.overview === null) return; let active = true; const linkedDraftIds = new Set(suggestions.flatMap((entry) => entry.draftId === void 0 ? [] : [entry.draftId])); const loadStandaloneDrafts = async () => { const ids = (hasSharedOverview ? context.overview : await context.client.overview()).attention.filter((item) => item.kind === "draft" && !linkedDraftIds.has(item.id)).map((item) => item.id); if (ids.length === 0) { if (active) setDrafts([]); return; } const views = await Promise.all(ids.map((id) => readDraft(id).then((view) => view.draft).catch(() => void 0))); if (active) setDrafts(views.filter((draft) => draft !== void 0 && draft.suggestionId === void 0)); }; loadStandaloneDrafts().catch(() => void 0); return () => { active = false; }; }, [ context.client, context.overview, context.revision, hasSharedOverview, readDraft, suggestions ]); useLink(location.nonce, location.filter === "evidence" || suggestions !== null, () => { if (location.filter === "evidence" || suggestions === null) { setFilter("evidence"); return; } const target = location.suggestionId !== void 0 ? suggestions.find((entry) => entry.id === location.suggestionId) : location.draftId !== void 0 ? suggestions.find((entry) => entry.draftId === location.draftId) : location.skillName !== void 0 ? suggestions.find((entry) => entry.skillName === location.skillName && PENDING.includes(entry.status)) : void 0; if (target !== void 0) { setFilter(PENDING.includes(target.status) ? "pending" : "done"); setSelected(target.id); return; } if (location.draftId !== void 0) { setFilter("pending"); setSelected(location.draftId); return; } if (location.filter !== void 0) setFilter(location.filter); }); const items = (0, react.useMemo)(() => { const statuses = filter === "pending" ? PENDING : DONE; return [...filter === "pending" ? drafts.map((draft) => ({ kind: "draft", id: draft.id, draft })) : [], ...(suggestions ?? []).filter((entry) => statuses.includes(entry.status)).map((suggestion) => ({ kind: "suggestion", id: suggestion.id, suggestion }))]; }, [ filter, suggestions, drafts ]); const paneRef = (0, react.useRef)(null); const oneOff = filter === "pending" ? items.filter((item) => item.kind === "suggestion" && item.suggestion.status === "pending" && item.suggestion.triage?.classification === "one-off") : []; const folded = new Set(oneOff.map((item) => item.id)); const prominent = items.filter((item) => !folded.has(item.id)).sort((a, b) => Number(b.kind === "suggestion" && b.suggestion.triage?.classification === "durable") - Number(a.kind === "suggestion" && a.suggestion.triage?.classification === "durable")); const current = items.find((item) => item.id === selected) ?? prominent[0]; (0, react.useLayoutEffect)(() => { if (paneRef.current !== null) paneRef.current.scrollTop = 0; }, [current?.id, filter]); if (suggestions === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }); const pendingCount = suggestions.filter((entry) => PENDING.includes(entry.status)).length + drafts.length; const selectedOneOff = selected !== void 0 && folded.has(selected); const canReview = context.sessionId !== void 0 && context.client.canAssist("skill-review-now"); const reviewNow = async () => { setReviewing(true); try { const result = await context.client.reviewNow(); const found = result.inserted + result.updated; context.notice(found > 0 ? t("evolution.reviewFound", { count: found }) : t("evolution.reviewNothing")); if (result.suggestionIds[0] !== void 0) { setFilter("pending"); setSelected(result.suggestionIds[0]); } context.refresh(); } catch (error) { context.fail(error); } finally { setReviewing(false); } }; const evolutionOff = context.evolution !== void 0 && !context.evolution.on; const listHeader = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { className: css.skListBar, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.SegmentedControl, { id: "skill-evolution-filter", label: t("tab.evolution"), value: filter, onChange: (value) => { setFilter(value); setSelected(void 0); }, options: [ { value: "pending", label: pendingCount > 0 ? t("evolution.pendingCount", { count: pendingCount }) : t("evolution.pending") }, { value: "done", label: t("evolution.done") }, { value: "evidence", label: t("evolution.evidence") } ] }), canReview && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css.skIconButton, disabled: reviewing || !context.writable, onClick: () => void reviewNow(), "aria-label": t("evolution.reviewNow"), title: t("evolution.reviewNow"), "data-pulse": reviewing ? "" : void 0, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSparkleRegular, { size: 16 }) })] }); if (filter === "evidence") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EvidenceView, { context, location, listHeader }); const currentId = current?.kind === "suggestion" ? current.id : void 0; const canOverride = currentId !== void 0 && current?.kind === "suggestion" && PENDING.includes(current.suggestion.status); const currentOverride = currentId === void 0 ? null : Object.hasOwn(choice.preferences.suggestionModels, currentId) ? choice.preferences.suggestionModels[currentId] : null; const currentModel = currentOverride ?? choice.preferences.model ?? null; const saveSuggestionModel = (value) => { if (canOverride && currentId !== void 0) choice.saveSuggestionModel(currentId, modelOptionPick(value)); }; const removeItem = async (item) => { try { if (item.kind === "draft") await context.client.deleteDraft(item.id); else await context.client.deleteSuggestion(item.id); setDeleting(void 0); if (selected === item.id) setSelected(void 0); context.notice(t("evolution.deleted")); context.refresh(); } catch (error) { context.fail(error); } }; const showOffEmpty = current === void 0 && filter === "pending" && evolutionOff; const modelSettingsAvailable = context.openSettings !== void 0 && supportsSettingsSection("models"); const modelBar = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skPaneBar, children: [ !modelSettingsAvailable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { label: t("evolution.model"), triggerDetail: true, inline: true, size: "sm", value: modelOptionValue(choice.preferences.model), disabled: !context.writable || choice.models === null, onChange: (value) => choice.saveDraftModel(modelOptionPick(value)), options: choice.options }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { label: t("evolution.modelCard"), triggerDetail: true, inline: true, size: "sm", value: modelOptionValue(currentOverride), disabled: !context.writable || !canOverride || choice.models === null, onChange: saveSuggestionModel, options: choice.cardOptions }), modelSettingsAvailable && !showOffEmpty && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css.skIconButton, onClick: () => context.openSettings("models"), "aria-label": t("common.settings"), title: t("common.settings"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSettingsOutlineRegular, { size: 15 }) }) ] }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: appearanceClass(css.skSplit, css.skEvolutionSplit), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", { className: css.skList, children: [ listHeader, prominent.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ListItem, { item, selected: current?.id === item.id, onSelect: () => setSelected(item.id) }, item.id)), oneOff.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Fold, { defaultOpen: selectedOneOff, title: t("triage.fold", { count: oneOff.length }), children: oneOff.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ListItem, { item, selected: current?.id === item.id, onSelect: () => setSelected(item.id) }, item.id)) }, selectedOneOff ? selected : "one-off") ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { ref: paneRef, className: css.skPane, children: [modelBar, current === void 0 ? showOffEmpty ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Empty, { glyph: "✧", title: t("evolution.off"), action: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [context.evolution?.enable !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: !context.writable, onClick: () => void context.evolution.enable().then(context.refresh, context.fail), children: t("evolution.turnOn") }), context.openSettings !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", onClick: () => context.openSettings?.(), children: t("common.settings") })] }), children: t("evolution.offBody") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Empty, { glyph: "✧", title: t(oneOff.length > 0 ? "triage.choose" : `evolution.empty.${filter}`), children: t(oneOff.length > 0 ? "triage.soft" : `evolution.emptyBody.${filter}`) }) : current.kind === "suggestion" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SuggestionDetail, { context, id: current.id, model: currentModel, readDraft }, current.id) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { className: css.skDetail, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { className: css.skDetailHead, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skKicker, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ActionTag, { action: "update" }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: current.draft.skillName })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skDetailActions, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: !context.writable, onClick: () => setDeleting(current.id), children: t("common.delete") }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DraftReview, { context, draftId: current.id, model: currentModel, readDraft }, current.id), deleting === current.id && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Confirm, { danger: true, title: t("evolution.deleteTitle"), body: t("evolution.deleteBody"), confirmLabel: t("common.delete"), onClose: () => setDeleting(void 0), onConfirm: () => void removeItem(current) }) ] })] })] }); } function ListItem(props) { const t = useT(); const { item } = props; const common = { type: "button", className: css.skListItem, "data-selected": props.selected ? "" : void 0, onClick: props.onSelect }; if (item.kind === "draft") return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { ...common, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ActionTag, { action: "update" }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: item.draft.skillName }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "warning", children: t("status.review") }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: item.draft.notes }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("footer", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("time", { children: relative(t, item.draft.updatedAt) }) }) ] }); const { suggestion } = item; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { ...common, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ActionTag, { action: suggestion.action }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: suggestion.skillName }), suggestion.status !== "pending" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusTag, { status: suggestion.status }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: suggestion.summary }), suggestion.triage !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("small", { children: [ t(`triage.${suggestion.triage.classification}`), " · ", t("triage.facts", suggestion.triage) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("time", { children: relative(t, suggestion.updatedAt) }), suggestion.sourceSessionTitle !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { title: suggestion.sourceSessionTitle, children: suggestion.sourceSessionTitle })] }) ] }); } function SuggestionDetail(props) { const t = useT(); const { context } = props; const route = props.model === null || props.model === void 0 ? {} : { provider: props.model.provider, model: props.model.model }; const [loadedView, setLoadedView] = (0, react.useState)(null); const [loadError, setLoadError] = (0, react.useState)(null); const [reload, setReload] = (0, react.useState)(0); const [trajectories, setTrajectories] = (0, react.useState)(/* @__PURE__ */ new Map()); const [busy, setBusy] = (0, react.useState)(false); const [deleting, setDeleting] = (0, react.useState)(false); (0, react.useEffect)(() => { setDeleting(false); setTrajectories(/* @__PURE__ */ new Map()); }, [props.id]); (0, react.useEffect)(() => { let active = true; setLoadError(null); context.client.suggestion(props.id).then(async (value) => { if (!active) return; setLoadedView(value); const uniqueIds = [...new Set(value.suggestion.evidence.slice(-4).map((reference) => reference.trajectoryId))]; const entries = await Promise.all(uniqueIds.map(async (trajectoryId) => [trajectoryId, await context.client.trajectory(trajectoryId).catch(() => null)])); if (active) setTrajectories(new Map(entries)); }).catch((error) => { if (!active) return; setLoadedView(null); if ((error instanceof Error ? error.message : String(error)) === "suggestion not found: " + props.id) setLoadError("missing"); else { setLoadError("failed"); context.fail(error); } }); return () => { active = false; }; }, [ context.client, props.id, context.revision, reload ]); if (loadError !== null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Empty, { glyph: "?", title: t(loadError === "missing" ? "evolution.missing" : "evolution.loadFailed"), action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", onClick: () => setReload((value) => value + 1), children: t("common.retry") }), children: t(loadError === "missing" ? "evolution.missingBody" : "evolution.loadFailedBody") }); const view = loadedView !== null && loadedView.suggestion.id === props.id ? loadedView : null; if (view === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }); const { suggestion } = view; const canDraft = context.client.canAssist("skill-draft") && !(suggestion.action === "update" && view.skill === void 0); const act = async (operation) => { setBusy(true); try { await operation(); context.refresh(); } catch (error) { context.fail(error); context.refresh(); } finally { setBusy(false); } }; const references = suggestion.evidence.slice(-4); const cited = references.reduce((sum, reference) => sum + reference.steps.length, 0); const meta = [ ...suggestion.sourceSessionTitle === void 0 ? [] : [t("evolution.from", { session: suggestion.sourceSessionTitle })], relative(t, suggestion.createdAt), t("evolution.confidence", { value: Math.round(suggestion.confidence * 100) }), ...suggestion.action === "create" && suggestion.targetRoot !== void 0 ? [t("evolution.targetRoot", { root: t(`root.${suggestion.targetRoot}`) })] : [] ]; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { className: css.skDetail, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { className: css.skDetailHead, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.skKicker, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(ActionTag, { action: suggestion.action }), suggestion.status !== "pending" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StatusTag, { status: suggestion.status })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: view.skill === void 0 || view.skillInCatalog === false ? suggestion.skillName : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css.skTitleLink, onClick: () => context.navigate({ tab: "skills", skillKey: view.skill.key }), children: suggestion.skillName }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: suggestion.summary }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skMeta, children: meta.map((part) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: part }, part)) }) ] }), suggestion.status === "pending" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skDetailActions, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: !context.writable || busy || !canDraft || view.skill?.readOnly === true, title: canDraft ? void 0 : t("evolution.noAgent"), onClick: () => void act(() => context.client.generateDraft({ suggestionId: suggestion.id, ...route })), children: t("evolution.draft") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: !context.writable || busy, onClick: () => void act(async () => { await context.client.dismissSuggestion(suggestion.id); context.notice(t("evolution.dismissed")); }), children: t("evolution.dismiss") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: !context.writable || busy, onClick: () => setDeleting(true), children: t("common.delete") }) ] })] }), deleting && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Confirm, { danger: true, title: t("evolution.deleteTitle"), body: t("evolution.deleteBody"), confirmLabel: t("common.delete"), onClose: () => setDeleting(false), onConfirm: () => void act(async () => { await context.client.deleteSuggestion(suggestion.id); setDeleting(false); context.notice(t("evolution.deleted")); }) }), suggestion.triage !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", { "aria-label": t("triage.title"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, { label: t("triage.rules"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { tabIndex: 0, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: suggestion.triage.classification === "durable" ? "info" : "neutral", children: t(`triage.${suggestion.triage.classification}`) }) }) }), " · ", t("triage.facts", suggestion.triage) ] }) }), suggestion.rationale !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Clamp, { text: suggestion.rationale }), view.skill?.readOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skWarn, children: t("skills.linkedReadOnly") }), suggestion.action === "update" && view.skill === void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skWarn, children: t(view.resolution === "origin-unavailable" ? "evolution.originUnavailable" : "evolution.skillGone") }), suggestion.action === "update" && view.skill !== void 0 && !view.hashCurrent && suggestion.status === "pending" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skWarn, children: t("evolution.skillChanged") }), suggestion.autoAdoption !== void 0 && suggestion.autoAdoption.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AutoAdoptionHistory, { events: suggestion.autoAdoption }), suggestion.status === "drafting" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("evolution.drafting") }), suggestion.lastError !== void 0 && suggestion.status === "pending" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.inlineError, children: t("evolution.draftFailed", { error: suggestion.lastError }) }), suggestion.status === "review" && suggestion.draftId !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DraftReview, { context, draftId: suggestion.draftId, model: props.model ?? null, readDraft: props.readDraft }, suggestion.draftId), suggestion.status === "adopted" && view.skill !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { className: css.skSuccess, children: [ t("evolution.adopted"), " ", view.skillInCatalog !== false && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css.skLink, onClick: () => context.navigate({ tab: "skills", skillKey: view.skill.key }), children: [t("evolution.openSkill"), " ›"] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skFolds, children: [view.skill !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(Fold, { title: t("evolution.currentSkill"), meta: t(`root.${view.skill.root}`), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skMuted, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillPath, { path: view.skill.path }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillMarkdown, { body: view.skill.body })] }, `${suggestion.id}:skill`), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Fold, { title: t("evolution.evidence"), meta: t("evolution.evidenceMeta", { conversations: references.length, steps: cited }), children: references.map((reference, index) => { const trajectory = trajectories.get(reference.trajectoryId); if (trajectory === void 0) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }, index); if (trajectory === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skMuted, children: t("evolution.evidenceGone") }, index); const marked = new Set(reference.steps); const steps = trajectory.steps.filter((step) => [...marked].some((value) => Math.abs(value - step.index) <= 1)); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skEvidence, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: trajectory.sessionTitle ?? trajectory.sessionId.slice(0, 8) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: relative(t, trajectory.createdAt) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css.skLink, onClick: () => context.navigate({ tab: "evolution", filter: "evidence", trajectoryId: trajectory.id, steps: reference.steps }), children: [t("evolution.openRecord"), " ›"] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StepTimeline, { compact: true, steps, annotations: trajectory.annotations, highlight: marked })] }, index); }) }, `${suggestion.id}:evidence`)] }) ] }); } function compareRuns(baseline, candidate) { if (baseline?.status !== "completed" || candidate?.status !== "completed") return { excluded: 0 }; const graded = (run) => new Map(run.results.filter((result) => result.verdict !== "error").map((result) => [result.caseId, result.score])); const base = graded(baseline); const next = graded(candidate); const shared = [...next.keys()].filter((id) => base.has(id)); const excluded = new Set([...baseline.results, ...candidate.results].map((result) => result.caseId)).size - shared.length; if (shared.length === 0) return { excluded }; const mean = (scores) => shared.reduce((sum, id) => sum + scores.get(id), 0) / shared.length; return { baseline: mean(base), candidate: mean(next), excluded }; } const NEW_SKILL_ROOTS = ["user-dsh", "project-dsh"]; function DraftReview(props) { const t = useT(); const { context } = props; const route = props.model === null || props.model === void 0 ? {} : { provider: props.model.provider, model: props.model.model }; const [loadedView, setLoadedView] = (0, react.useState)(null); const [cases, setCases] = (0, react.useState)(void 0); const [editing, setEditing] = (0, react.useState)(null); const [redrafting, setRedrafting] = (0, react.useState)(null); const [root, setRoot] = (0, react.useState)("user-dsh"); const [roots, setRoots] = (0, react.useState)([]); const [details, setDetails] = (0, react.useState)(false); const [busy, setBusy] = (0, react.useState)(false); const [confirmAdopt, setConfirmAdopt] = (0, react.useState)(false); const configRevision = context.configRevision ?? 0; const loadDraft = props.readDraft ?? context.client.draft; const view = loadedView !== null && loadedView.draft.id === props.draftId ? loadedView : null; (0, react.useEffect)(() => { setEditing(null); setRedrafting(null); setDetails(false); setConfirmAdopt(false); setCases(void 0); }, [props.draftId]); (0, react.useEffect)(() => { let active = true; loadDraft(props.draftId).then((value) => { if (!active) return; setLoadedView(value); if (value.draft.targetRoot !== void 0) setRoot(value.draft.targetRoot); context.client.cases(value.draft.skillName).then((list) => { if (active) setCases(list.filter((entry) => entry.enabled).length); }).catch(() => void 0); }).catch(context.fail); return () => { active = false; }; }, [ context.client, context.fail, context.revision, loadDraft, props.draftId ]); (0, react.useEffect)(() => { if (view?.draft.action !== "create") return; let active = true; setRoots([]); context.client.catalog().then((catalog) => { if (!active) return; const selected = view.draft.targetRoot ?? catalog.creation?.default ?? "user-dsh"; const choices = catalog.creation?.roots ?? NEW_SKILL_ROOTS.filter((kind) => catalog.roots.some((entry) => entry.kind === kind)); setRoots(choices.includes(selected) ? choices : [...choices, selected]); setRoot(selected); }).catch(context.fail); return () => { active = false; }; }, [ configRevision, context.client, context.fail, view?.draft.id, view?.draft.action, view?.draft.targetRoot ]); if (view === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }); const { draft } = view; const latest = [...view.runs].reverse(); const candidate = latest.find((run) => run.target.kind === "draft" && run.target.draftId === draft.id); const baseline = latest.find((run) => run.target.kind !== "draft"); const { baseline: baselineScore, candidate: candidateScore, excluded } = compareRuns(baseline, candidate); const regressed = candidateScore !== void 0 && baselineScore !== void 0 && candidateScore < baselineScore; const running = view.runs.some((run) => run.status === "running"); const act = async (operation, after) => { setBusy(true); try { await operation(); after?.(); context.refresh(); } catch (error) { context.fail(error); context.refresh(); } finally { setBusy(false); } }; const adopt = () => act(async () => { const result = await context.client.adoptDraft(draft.id, draft.action === "create" ? root : void 0); context.notice(t("draft.adopted", { name: result.skill.name })); }, () => setConfirmAdopt(false)); const backtest = () => act(async () => { await context.client.backtest({ skillName: draft.skillName, target: { kind: "draft", draftId: draft.id } }); const started = await context.client.backtest({ skillName: draft.skillName, target: { kind: draft.action === "update" ? "current" : "none", ...draft.action === "update" ? { draftId: draft.id } : {} } }); await context.client.linkRun(draft.id, started.runId); }); const redraft = (note, backtest = false) => act(() => context.client.generateDraft({ ...backtest ? { backtest: true } : {}, draftId: draft.id, ...draft.suggestionId === void 0 ? {} : { suggestionId: draft.suggestionId }, guidance: note, ...route }), () => setRedrafting(null)); const ready = draft.status === "ready"; const originalAvailable = draft.action !== "update" || view.base !== void 0; const progress = (run) => run === void 0 ? 0 : run.progress.done; const total = (candidate?.progress.total ?? 0) + (baseline?.progress.total ?? 0); const results = /* @__PURE__ */ new Map(); for (const result of baseline?.results ?? []) results.set(result.caseId, { title: result.title, base: result }); for (const result of candidate?.results ?? []) results.set(result.caseId, { ...results.get(result.caseId), title: result.title, next: result }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css.skDraft, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { className: css.skSectionHead, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("h4", { children: [t("draft.title"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: stamp(draft.updatedAt) })] }), ready && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ draft.action === "create" && roots.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { inline: true, size: "sm", label: t("draft.writeTo"), value: root, disabled: busy, onChange: setRoot, options: roots.map((kind) => ({ value: kind, label: t(`root.${kind}`) })) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: !context.writable || busy || draft.action === "create" && roots.length === 0 || editing !== null || running || view.conflict !== void 0 || !originalAvailable || view.base?.readOnly === true, onClick: () => regressed ? setConfirmAdopt(true) : void adopt(), children: t("draft.adopt") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: !context.writable || busy, onClick: () => void act(() => context.client.discardDraft(draft.id)), children: t("draft.discard") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MoreMenu, { label: t("common.more"), disabled: !context.writable || busy, onSelect: (id) => id === "edit" ? setEditing(draft.content) : setRedrafting(""), items: [{ id: "edit", label: t("draft.edit") }, ...originalAvailable && !view.base?.readOnly && context.client.canAssist("skill-draft") ? [{ id: "redraft", label: t("draft.redraft") }] : []] }) ] })] }), view.base?.readOnly && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skWarn, children: t("skills.linkedReadOnly") }), !originalAvailable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skWarn, children: t(view.resolution === "origin-unavailable" ? "evolution.originUnavailable" : "evolution.skillGone") }), view.conflict !== void 0 && ready && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skWarn, role: "status", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t(view.conflict === "target-exists" ? "draft.targetExists" : "draft.baseChanged") }), originalAvailable && !view.base?.readOnly && context.client.canAssist("skill-draft") && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { size: "sm", disabled: !context.writable || busy || running, onClick: () => void redraft(t("draft.refreshGuidance"), true), children: t("draft.regenerate") })] }), draft.notes !== "" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Clamp, { text: draft.notes }), draft.changes.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MoreList, { items: draft.changes, shown: 3 }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skBacktest, "data-tone": regressed ? "bad" : candidateScore !== void 0 && baselineScore !== void 0 && candidateScore > baselineScore ? "good" : void 0, children: [ running ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("draft.backtesting", { done: progress(candidate) + progress(baseline), total }) }) : candidateScore !== void 0 && baselineScore !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css.skBacktestLine, "aria-expanded": details, onClick: () => setDetails((value) => !value), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("draft.backtest") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", { children: [ baseline?.target.kind === "none" ? t("draft.withoutSkill") : t("draft.current"), " ", points(baselineScore), " → ", t("draft.candidate"), " ", points(candidateScore) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { children: candidateScore === baselineScore ? t("draft.same") : `${candidateScore > baselineScore ? "+" : "−"}${Math.round(Math.abs(candidateScore - baselineScore) * 100)}` }) ] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skMuted, children: cases === 0 ? t("draft.noTests") : view.runs.length === 0 ? t("draft.notTested") : t("draft.notComparable") }), running && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: !context.writable || busy, onClick: () => void act(async () => { for (const run of view.runs.filter((item) => item.status === "running")) await context.client.cancelRun(run.id); }), children: t("draft.cancelBacktest") }), !running && (candidate?.status === "interrupted" || baseline?.status === "interrupted") && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { role: "status", children: t("draft.interrupted") }), !running && (cases ?? 0) > 0 && context.client.canAssist("skill-backtest") && ready && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: !context.writable || busy || !originalAvailable, onClick: () => void backtest(), children: view.runs.length === 0 ? t("draft.runBacktest") : t("draft.rerun") }) ] }), excluded > 0 && !running && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skMuted, children: t("draft.excluded", { count: excluded }) }), details && results.size > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("table", { className: css.skTable, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("thead", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("tests.case") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: baseline?.target.kind === "none" ? t("draft.withoutSkill") : t("draft.current") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("th", { children: t("draft.candidate") }) ] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("tbody", { children: [...results.entries()].map(([id, row]) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("tr", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: row.title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: row.base === void 0 ? "—" : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: row.base.verdict === "pass" ? "success" : row.base.verdict === "error" ? "danger" : "warning", children: t(`run.verdict.${row.base.verdict}`) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("td", { children: [row.next === void 0 ? "—" : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: row.next.verdict === "pass" ? "success" : row.next.verdict === "error" ? "danger" : "warning", children: t(`run.verdict.${row.next.verdict}`) }), row.next?.checks.filter((check) => !check.pass).slice(0, 1).map((check) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: check.note }, check.checkId))] }) ] }, id)) })] }), details && candidate !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Fold, { title: t("draft.runDetail"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RunDetail, { run: candidate }) }), redrafting !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skComposer, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("draft.redraftNote") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { rows: 2, value: redrafting, autoFocus: true, placeholder: t("draft.redraftPlaceholder"), onChange: (event) => setRedrafting(event.target.value) })] }), draft.guidance.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { className: css.skGuidance, children: draft.guidance.map((text, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("li", { children: text }, index)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", onClick: () => setRedrafting(null), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: busy || redrafting.trim() === "", onClick: () => void redraft(redrafting.trim()), children: t("draft.redraftStart") })] }) ] }), editing === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.DiffBlock, { maxLines: 40, labels: diffLabels(t), diffs: [{ path: `${draft.skillName}/SKILL.md`, oldText: view.base?.content ?? null, newText: draft.content }, ...(draft.files ?? []).map((file) => ({ path: `${draft.skillName}/${file.path}`, oldText: view.baseFileContents?.[file.path] ?? null, newText: file.action === "delete" ? "" : file.content ?? "" }))] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skComposer, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { className: css.skEditor, spellCheck: false, value: editing, onChange: (event) => setEditing(event.target.value), "aria-label": t("diff.code") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", onClick: () => setEditing(null), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: busy || editing === draft.content, onClick: () => void act(() => context.client.updateDraft(draft.id, editing), () => setEditing(null)), children: t("common.save") })] })] }), confirmAdopt && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Confirm, { title: t("draft.adoptAnyway"), body: t("draft.regressed"), confirmLabel: t("draft.adopt"), busy, onClose: () => setConfirmAdopt(false), onConfirm: () => void adopt() }) ] }); } function AutoAdoptionHistory(props) { const t = useT(); const latest = props.events[props.events.length - 1]; const describe = (event) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ t(`evolution.auto.stage.${event.stage}`), event.attempt > 0 ? ` · ${t("evolution.auto.attempt", { count: event.attempt })}` : "", event.reason === void 0 ? "" : ` · ${t(`evolution.auto.reason.${event.reason}`)}`, event.baselineScore === void 0 || event.draftScore === void 0 ? "" : ` · ${t("evolution.auto.scores", { baseline: points(event.baselineScore), draft: points(event.draftScore) })}`, event.detail === void 0 ? "" : ` · ${event.detail}` ] }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { "aria-label": t("evolution.auto.title"), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("evolution.auto.title") }), " · ", describe(latest) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Fold, { title: t("evolution.auto.history"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ol", { children: props.events.map((event, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { children: [ stamp(event.at), " · ", describe(event) ] }, index)) }) })] }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/fence.ts function splitFrontmatter(raw) { const firstLineEnd = raw.indexOf("\n"); if (firstLineEnd < 0 || raw.slice(0, firstLineEnd).replace(/\r$/u, "") !== "---") return void 0; const start = firstLineEnd + 1; let lineStart = start; while (lineStart <= raw.length) { const next = raw.indexOf("\n", lineStart); const lineEnd = next < 0 ? raw.length : next; if (raw.slice(lineStart, lineEnd).replace(/\r$/u, "") === "---") return { frontmatter: raw.slice(start, lineStart), body: raw.slice(next < 0 ? raw.length : next + 1), frontmatterStart: start, frontmatterEnd: lineStart }; if (next < 0) return void 0; lineStart = next + 1; } } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/market-localization.ts function localeKey(id) { return id.trim().toLowerCase().replaceAll("_", "-"); } function localized(value, preference) { if (value === void 0) return ""; if (typeof value === "string") return value; const entries = Object.entries(value); const findKey = (target) => { const exact = value[target]; if (typeof exact === "string" && exact !== "") return exact; return entries.find(([key, item]) => localeKey(key) === target && typeof item === "string" && item !== "")?.[1]; }; const candidates = typeof preference === "string" ? [localeKey(preference), localeKey(preference).split("-")[0]] : preference.map(localeKey); for (const id of candidates) { if (id === "") continue; const translated = findKey(id) ?? (id === "zh" ? findKey("zh-cn") : void 0); if (translated !== void 0) return translated; } return findKey("en") ?? entries.find(([, item]) => typeof item === "string" && item !== "")?.[1] ?? ""; } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/source-kind.ts const OWNER = /^[A-Za-z0-9](?:[A-Za-z0-9-]{0,38})$/u; const NAME = /^[A-Za-z0-9_.-]+$/u; const REF = /^[A-Za-z0-9_./-]{1,200}$/u; function githubUrl(location) { const base = `https://github.com/${location.repo}`; if (location.ref === void 0 && location.path === "") return base; return `${base}/tree/${location.ref ?? "HEAD"}${location.path === "" ? "" : "/" + location.path}`; } function parseGithub(input) { const text = input.trim().replace(/\.git$/u, "").replace(/\/+$/u, ""); const short = /^([^/\s]+)\/([^/\s]+)$/u.exec(text); if (short !== null && !/^https?:/iu.test(text)) return OWNER.test(short[1]) && NAME.test(short[2]) && !/\.json$/iu.test(short[2]) ? { repo: `${short[1]}/${short[2]}`, path: "" } : void 0; let url; try { url = new URL(text); } catch { return; } if (url.hostname !== "github.com" && url.hostname !== "www.github.com") return void 0; const [owner, repo, mode, ref, ...rest] = url.pathname.split("/").filter(Boolean); if (owner === void 0 || repo === void 0 || !OWNER.test(owner) || !NAME.test(repo)) return void 0; if (mode === void 0) return { repo: `${owner}/${repo}`, path: "" }; if (mode !== "tree" && mode !== "blob" || ref === void 0 || !REF.test(ref)) return { repo: `${owner}/${repo}`, path: "" }; const parts = mode === "blob" ? rest.slice(0, -1) : rest; if (parts.some((part) => part === ".." || part === ".")) return void 0; return { repo: `${owner}/${repo}`, ref, path: parts.join("/") }; } function isAbsolutePath(text) { return text.startsWith("/") || /^[A-Za-z]:[\\/]/u.test(text) || text.startsWith("file://"); } function detectSource(input) { const text = input.trim(); if (text === "") return void 0; if (isAbsolutePath(text)) return /\.json$/iu.test(text) ? { kind: "catalog", location: text, label: text.split(/[\\/]/u).at(-1) } : void 0; const github = parseGithub(text); if (github !== void 0) return { kind: "github", location: githubUrl(github), label: github.path === "" ? github.repo : `${github.repo}/${github.path}` }; let url; try { url = new URL(/^https?:\/\//iu.test(text) ? text : `https://${text}`); } catch { return; } if (url.protocol !== "https:" && url.protocol !== "http:") return void 0; if (!url.hostname.includes(".")) return void 0; if (url.hostname === "skills.sh" || url.hostname === "www.skills.sh") { const [owner, repo] = url.pathname.split("/").filter(Boolean); if (owner !== void 0 && repo !== void 0 && OWNER.test(owner) && NAME.test(repo)) return { kind: "github", location: `https://github.com/${owner}/${repo}`, label: `${owner}/${repo}` }; return; } const location = url.toString().replace(/\/$/u, ""); if (/\.json$/iu.test(url.pathname)) return { kind: "json", location, label: url.pathname.split("/").at(-1) }; return { kind: "well-known", location, label: url.host + url.pathname.replace(/\/$/u, "") }; } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/client/market-page.tsx function size$1(bytes) { return bytes < 1024 ? `${bytes} B` : bytes < 1048576 ? `${(bytes / 1024).toFixed(1)} KB` : `${(bytes / 1024 / 1024).toFixed(1)} MB`; } function frontmatterField(content, key) { const split = splitFrontmatter(content); if (split === void 0) return void 0; const lines = split.frontmatter.split(/\r?\n/u); const index = lines.findIndex((line) => line.startsWith(`${key}:`)); if (index === -1) return void 0; const first = lines[index].slice(key.length + 1).trim(); if (/^[>|][+-]?$/u.test(first)) { const block = []; for (const line of lines.slice(index + 1)) { if (!/^\s/u.test(line)) break; block.push(line.trim()); } return block.join(" ").trim() || void 0; } return first.replace(/^(['"])(.*)\1$/u, "$2").trim() || void 0; } const STATE_TONE = { installed: "success", update: "info", modified: "warning", conflict: "quiet", available: "outline" }; const SEARCH_DELAY_MS = 300; function itemKey(item) { return item.source.type === "indexed" ? item.source.id : item.name; } function MarketPage(props) { const t = useT(); const language = useLocale(); const localePreference = useLocalePreference(language); const { context } = props; const [view, setView] = (0, react.useState)(null); const [query, setQuery] = (0, react.useState)(""); const [category, setCategory] = (0, react.useState)(""); const [refreshing, setRefreshing] = (0, react.useState)(false); const [sourcesOpen, setSourcesOpen] = (0, react.useState)(false); const [open, setOpen] = (0, react.useState)(null); const [remote, setRemote] = (0, react.useState)({ query: "", loading: false }); const [adding, setAdding] = (0, react.useState)(false); const refreshed = (0, react.useRef)(false); (0, react.useEffect)(() => { let active = true; context.client.market().then((value) => { if (!active) return; setView(value); if (!refreshed.current && value.stale.length > 0 && context.writable) { refreshed.current = true; setRefreshing(true); context.client.refreshMarket(value.stale).then(() => context.client.market()).then((next) => { if (active) setView(next); }).catch(() => void 0).finally(() => { if (active) setRefreshing(false); }); } }).catch(context.fail); return () => { active = false; }; }, [context.client, context.revision]); const needle = query.trim(); const index = view?.registries.find((registry) => registry.kind === "search" && registry.enabled); (0, react.useEffect)(() => { if (needle.length < 2 || index === void 0) { setRemote({ query: "", loading: false }); return; } let active = true; setRemote((current) => ({ ...current, loading: true })); const timer = setTimeout(() => { context.client.searchMarket(needle).then((result) => { if (active) setRemote({ query: needle, result, loading: false }); }).catch((reason) => { if (active) setRemote({ query: needle, result: { query: needle, items: [], error: errorText(reason) }, loading: false }); }); }, SEARCH_DELAY_MS); return () => { active = false; clearTimeout(timer); }; }, [ needle, index?.id, context.client, context.revision ]); const items = (0, react.useMemo)(() => { const lower = needle.toLowerCase(); return (view?.items ?? []).filter((item) => (category === "" || item.category === category) && (lower === "" || [ item.name, localized(item.title, localePreference), localized(item.description, localePreference), item.author ?? "" ].some((value) => value.toLowerCase().includes(lower)))); }, [ view, needle, category, localePreference ]); const detected = (0, react.useMemo)(() => { const found = detectSource(query); if (found === void 0 || found.kind !== "github" && !/^(?:https?:\/\/|\/|[A-Za-z]:[\\/])/u.test(needle)) return void 0; return view?.registries.some((registry) => registry.location === found.location) === true ? void 0 : found; }, [ query, needle, view ]); if (view === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }); const registryName = (id) => sourceName(view.registries.find((registry) => registry.id === id), localePreference, t) || id; const refresh = async () => { setRefreshing(true); try { await context.client.refreshMarket(); context.refresh(); } catch (error) { context.fail(error); } finally { setRefreshing(false); } }; const addDetected = async (source) => { setAdding(true); try { const added = await context.client.addRegistry(source.location); context.notice(t("sources.added", { name: sourceName(added, localePreference, t), count: added.entries })); setQuery(""); context.refresh(); } catch (error) { context.fail(error); } finally { setAdding(false); } }; const searching = needle.length >= 2 && index !== void 0; const remoteItems = remote.result?.items ?? []; const card = (item, position) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MarketCard, { item, position, language, writable: context.writable, footnote: item.source.type === "indexed" ? void 0 : item.author ?? registryName(item.registryId), onOpen: () => setOpen(item) }, `${item.registryId}/${itemKey(item)}`); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skMarket, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { className: css.skMarketBar, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchField, { label: t("market.search"), placeholder: t("market.searchPlaceholder"), value: query, onChange: (event) => setQuery(event.target.value) }), view.categories.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { size: "sm", hideLabel: true, label: t("market.category"), value: category, onChange: setCategory, options: [{ value: "", label: t("market.allCategories") }, ...view.categories.map((entry) => ({ value: entry.id, label: localized(entry.label, localePreference) }))] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", onClick: () => { if (context.openSettings !== void 0 && supportsSettingsSection("market")) context.openSettings("market"); else setSourcesOpen(true); }, children: t("market.sources", { count: view.registries.filter((registry) => registry.enabled).length }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css.skIconButton, disabled: refreshing || !context.writable, "data-busy": refreshing ? "" : void 0, onClick: () => void refresh(), "aria-label": t("market.refresh"), title: t("market.refresh"), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, { size: 16 }) }) ] }), detected !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skMarketAdd, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SourceIcon, { kind: detected.kind }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("market.addAsSource", { kind: t(`sources.detected.${detected.kind}`), label: detected.label }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: adding || !context.writable, onClick: () => void addDetected(detected), children: adding ? t("sources.adding") : t("sources.addAs") }) ] }), searching ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [items.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css.skMarketSection, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h6", { className: css.skCaption, children: t("market.listed", { count: items.length }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skMarketGrid, children: items.map(card) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css.skMarketSection, "aria-busy": remote.loading || void 0, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h6", { className: css.skCaption, children: t("market.indexed", { count: remoteItems.length }) }), remote.result === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("market.searching") }) : remote.result.error !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skMuted, children: t("market.searchFailed", { error: remote.result.error }) }) : remoteItems.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skMuted, children: t("market.indexEmpty") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skMarketGrid, "data-busy": remote.loading ? "" : void 0, children: remoteItems.map(card) })] })] }) : items.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Empty, { glyph: "⌕", title: t("market.empty"), children: t("market.emptyBody") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skMarketGrid, children: items.map(card) }), open !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MarketDetail, { context, item: open, registryName: registryName(open.registryId), onClose: () => setOpen(null) }), sourcesOpen && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SourcesDialog, { context, view, onClose: () => setSourcesOpen(false) }) ] }); } function MarketCard(props) { const t = useT(); const { item } = props; const indexed = item.source.type === "indexed"; const localePreference = useLocalePreference(props.language); const title = localized(item.title, localePreference) || item.name; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { className: css.skMarketCard, "data-state": item.state, "data-indexed": indexed ? "" : void 0, style: { animationDelay: `${Math.min(props.position, 12) * 18}ms` }, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css.skMarketOpen, onClick: props.onOpen, "aria-label": t("market.preview", { name: item.name }), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillIcon, { name: item.name, category: item.category }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: title }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: indexed ? item.origin : item.name })] })] }), !indexed && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: localized(item.description, localePreference) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", { children: [indexed ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.skMarketStat, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconDownloadOutlineRegular, { size: 12 }), t("market.installs", { count: compactCount(item.installs ?? 0, props.language) })] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: props.footnote }), item.state === "available" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: !props.writable, onClick: props.onOpen, children: t("market.install") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: STATE_TONE[item.state], children: t(`market.state.${item.state}`) })] })] }); } function Audits(props) { const t = useT(); if (props.audits.length === 0) return null; const rank = { fail: 0, warn: 1, pass: 2 }; const sorted = [...props.audits].sort((a, b) => rank[a.status] - rank[b.status]); const concern = sorted.find((audit) => audit.status !== "pass" && audit.summary !== void 0); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skAudits, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skAuditsLabel, children: t("market.audits") }), sorted.map((audit) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.skAudit, "data-status": audit.status, title: audit.summary, children: [t(`market.audit.${audit.status}`), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: audit.provider })] }, audit.provider))] }), concern?.summary !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Clamp, { text: concern.summary, lines: 2 })] }); } function MarketDetail(props) { const t = useT(); const language = useLocale(); const localePreference = useLocalePreference(language); const { context, item } = props; const indexed = item.source.type === "indexed"; const [preview, setPreview] = (0, react.useState)(null); const [previewError, setPreviewError] = (0, react.useState)(null); const [root, setRoot] = (0, react.useState)("user-dsh"); const [roots, setRoots] = (0, react.useState)([]); const [busy, setBusy] = (0, react.useState)(false); const [error, setError] = (0, react.useState)(null); (0, react.useEffect)(() => { let active = true; setRoots([]); context.client.catalog().then((catalog) => { if (!active) return; setRoots(catalog.creation?.roots ?? catalog.roots.map((entry) => entry.kind)); setRoot(catalog.creation?.default ?? "user-dsh"); }).catch((reason) => { if (active) setError(errorText(reason)); }); context.client.marketPreview(item.registryId, itemKey(item)).then((value) => { if (active) setPreview(value); }).catch((reason) => { if (active) setPreviewError(errorText(reason)); }); return () => { active = false; }; }, [ context.client, context.configRevision, item.registryId, item.name ]); const install = async () => { setBusy(true); setError(null); try { const result = await context.client.installMarket({ registryId: item.registryId, name: itemKey(item), root, ...item.state === "modified" ? { overwrite: true } : {} }); context.notice(t(result.updated ? "market.updated" : "market.installed", { name: result.skill.name })); context.refresh(); props.onClose(); } catch (reason) { setError(errorText(reason)); } finally { setBusy(false); } }; const canInstall = item.state === "available" || item.state === "update" || item.state === "modified"; const body = preview === null ? void 0 : splitFrontmatter(preview.content)?.body ?? preview.content; const description = localized(item.description, localePreference) || (preview === null ? "" : frontmatterField(preview.content, "description") ?? ""); const license = item.license ?? (preview === null ? void 0 : frontmatterField(preview.content, "license")); const meta = [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: indexed ? item.origin : props.registryName }, "from"), ...item.version === void 0 ? [] : [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("market.version", { version: item.version }) }, "version")], ...item.installedVersion === void 0 ? [] : [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("market.installedVersion", { version: item.installedVersion }) }, "installed")], /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: license ?? t("market.upstreamLicense") }, "license"), ...item.installs === void 0 ? [] : [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("market.installs", { count: compactCount(item.installs, language) }) }, "installs")] ]; const homepage = preview?.homepage ?? item.homepage; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { wide: true, title: localized(item.title, localePreference) || item.name, description, busy, onClose: props.onClose, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skFormError, children: error }), item.state === "available" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { size: "sm", inline: true, label: t("market.installTo"), value: root, onChange: setRoot, disabled: busy || roots.length === 0, options: roots.map((kind) => ({ value: kind, label: t(`root.${kind}`) })) }), item.skillKey !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", onClick: () => { props.onClose(); context.navigate({ tab: "skills", skillKey: item.skillKey }); }, children: t("market.open") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", onClick: props.onClose, children: t("common.close") }), canInstall && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", disabled: busy || !context.writable || item.state === "available" && roots.length === 0 || preview === null && previewError === null, onClick: () => void install(), children: busy ? t("market.installing") : t(item.state === "modified" ? "market.overwrite" : item.state === "update" ? "market.update" : "market.install") }) ] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skMarketDetail, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skMarketMeta, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skMeta, children: meta }), homepage !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("a", { className: css.skLink, href: homepage, target: "_blank", rel: "noreferrer", children: [t("market.viewSource"), " ↗"] })] }), preview?.audits !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Audits, { audits: preview.audits }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skWarn, children: item.state === "modified" ? t("market.overwriteHint") : t("market.trust") }), previewError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.inlineError, children: previewError }), preview === null && previewError === null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }), preview !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ preview.partial === true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skMuted, children: t("market.partial") }), preview.files.length > 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", { className: css.skProblems, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t("market.files", { count: preview.files.length, size: size$1(preview.totalBytes) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skResources, children: preview.files.slice(0, 40).map((file) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: file.path }, file.path)) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillMarkdown, { body: body ?? "" }) ] }) ] }) }); } const KIND_ICON = { catalog: (size) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChecklistOutlineRegular, { size }), json: (size) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconFolderOpenOutlineRegular, { size }), github: (size) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCodeOutlineRegular, { size }), "well-known": (size) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconGlobeOutlineRegular, { size }), search: (size) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconSearchOutlineRegular, { size }) }; function SourceIcon(props) { return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skSourceIcon, "aria-hidden": "true", children: KIND_ICON[props.kind](16) }); } function sourceName(registry, preference, t) { if (registry === void 0) return ""; if (registry.kind === "search") return "skills.sh"; if (registry.builtin) return t("sources.featured"); return localized(registry.name, preference) || registry.location.replace(/^https?:\/\/(?:github\.com\/)?/u, ""); } function sourceMeta(t, registry) { if (registry.kind === "search") return t("sources.searchMeta"); return [ t(`sources.kind.${registry.kind}`), t("sources.entries", { count: registry.entries }), ...registry.fetchedAt === void 0 ? [] : [t("sources.updated", { time: relative(t, registry.fetchedAt) })] ].join(" · "); } function SourcesDialog(props) { const t = useT(); const localePreference = useLocalePreference(useLocale()); const { context } = props; const [input, setInput] = (0, react.useState)(""); const [busy, setBusy] = (0, react.useState)(null); const [error, setError] = (0, react.useState)(null); const detected = (0, react.useMemo)(() => detectSource(input), [input]); const duplicate = detected !== void 0 && props.view.registries.some((registry) => registry.location === detected.location); const act = async (key, operation, after) => { setBusy(key); setError(null); try { await operation(); after?.(); context.refresh(); } catch (reason) { setError(errorText(reason)); } finally { setBusy(null); } }; const add = (event) => { event.preventDefault(); if (detected === void 0 || duplicate) return; act("add", async () => { const added = await context.client.addRegistry(detected.location); context.notice(t("sources.added", { name: sourceName(added, localePreference, t), count: added.entries })); }, () => setInput("")); }; const hint = input.trim() === "" ? t("sources.hint") : detected === void 0 ? t("sources.unknown") : duplicate ? t("sources.duplicate") : `${t(`sources.detected.${detected.kind}`)} · ${detected.label}`; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { wide: true, title: t("sources.title"), busy: busy !== null, onClose: props.onClose, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skFormError, children: error }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", onClick: props.onClose, children: t("sources.done") })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skSources, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { className: css.skSourceList, children: props.view.registries.map((registry) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { "data-off": registry.enabled ? void 0 : "", children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SourceIcon, { kind: registry.kind }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skSourceText, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", { title: registry.location, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: sourceName(registry, localePreference, t) }), registry.builtin && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "quiet", children: t("sources.builtin") })] }), registry.error !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { title: registry.error, children: registry.error }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: sourceMeta(t, registry) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skSourceActions, children: [registry.kind !== "search" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MoreMenu, { label: t("common.more"), disabled: busy !== null || !context.writable, items: [{ id: "refresh", label: t("sources.refresh") }, ...registry.builtin ? [] : [{ id: "remove", label: t("sources.remove"), danger: true }]], onSelect: (id) => void act(registry.id, () => id === "refresh" ? context.client.refreshMarket([registry.id]) : context.client.removeRegistry(registry.id)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, { checked: registry.enabled, label: t("sources.enabled", { name: sourceName(registry, localePreference, t) }), disabled: busy !== null || !context.writable, onChange: (next) => void act(registry.id, () => context.client.toggleRegistry(registry.id, next)) })] }) ] }, registry.id)) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", { className: css.skSourceAdd, onSubmit: add, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", { htmlFor: "skills-source-input", children: t("sources.addTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skInline, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Input, { id: "skills-source-input", value: input, placeholder: t("sources.placeholder"), autoComplete: "off", spellCheck: false, disabled: !context.writable, ...detected === void 0 ? {} : { icon: KIND_ICON[detected.kind](16) }, onChange: (event) => setInput(event.target.value) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { type: "submit", variant: "primary", size: "sm", disabled: detected === void 0 || duplicate || busy !== null || !context.writable, children: busy === "add" ? t("sources.adding") : t("sources.add") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skSourceHint, "data-state": input.trim() === "" ? void 0 : detected === void 0 || duplicate ? "warn" : "ok", "aria-live": "polite", children: hint }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", { className: css.skFormat, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t("sources.formats") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { children: [ "github", "well-known", "catalog" ].map((kind) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SourceIcon, { kind }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t(`sources.kind.${kind}`) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(`sources.format.${kind}`) })] })] }, kind)) })] }) ] }) }); } Object.freeze({ allowCreate: true, allowUpdate: true, minConfidence: .6, expiryDays: 7, maxPendingPerSession: 5 }); // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/client/skills-page.tsx function SkillsPage(props) { const t = useT(); const { context, location } = props; const [catalog, setCatalog] = (0, react.useState)(null); const [query, setQuery] = (0, react.useState)(""); const [selected, setSelected] = (0, react.useState)(location.skillKey); const [creating, setCreating] = (0, react.useState)(false); const [collapsed, setCollapsed] = (0, react.useState)(() => /* @__PURE__ */ new Set()); const selectedRoot = catalog?.skills.find((skill) => skill.key === selected)?.root; (0, react.useEffect)(() => { if (selectedRoot !== void 0) setCollapsed((current) => { if (!current.has(selectedRoot)) return current; const next = new Set(current); next.delete(selectedRoot); return next; }); }, [ selectedRoot, selected, location.nonce ]); (0, react.useEffect)(() => { let active = true; context.client.catalog().then((value) => { if (!active) return; setCatalog(value); setSelected((current) => current !== void 0 && value.skills.some((skill) => skill.key === current) ? current : value.skills.find((skill) => skill.shadowedBy === void 0)?.key); }).catch(context.fail); return () => { active = false; }; }, [context.client, context.revision]); useLink(location.nonce, catalog !== null, () => { if (location.skillKey !== void 0) setSelected(location.skillKey); else if (location.skillName !== void 0) { const named = catalog?.skills.find((skill) => skill.name === location.skillName && skill.shadowedBy === void 0); if (named !== void 0) setSelected(named.key); } }); const visible = (0, react.useMemo)(() => { const needle = query.trim().toLowerCase(); return (catalog?.skills ?? []).filter((skill) => needle === "" || skill.name.includes(needle) || skill.description.toLowerCase().includes(needle)); }, [catalog, query]); const paneRef = (0, react.useRef)(null); const current = catalog?.skills.find((skill) => skill.key === selected); (0, react.useLayoutEffect)(() => { if (paneRef.current !== null) paneRef.current.scrollTop = 0; }, [current?.key]); if (catalog === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }); const groups = catalog.roots.map((root) => ({ root, skills: visible.filter((skill) => skill.root === root.kind) })); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: `${css.skSplit} ${css.skSkillsSplit}`, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", { className: css.skList, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { className: css.skListBar, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SearchField, { label: t("skills.search"), placeholder: t("skills.search"), value: query, onChange: (event) => setQuery(event.target.value) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: !context.writable, onClick: () => setCreating(true), children: t("skills.new") })] }), catalog.skills.length > 0 && visible.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skListNote, children: t("skills.noMatch") }), groups.filter((group) => group.skills.length > 0).map((group) => { const expanded = query.trim() !== "" || !collapsed.has(group.root.kind); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: css.skListGroup, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h5", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css.skGroupToggle, "aria-expanded": expanded, disabled: query.trim() !== "", title: group.root.path, onClick: () => setCollapsed((current) => { const next = new Set(current); if (next.has(group.root.kind)) next.delete(group.root.kind); else next.add(group.root.kind); return next; }), children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, { size: 12, className: css.skGroupChevron, "aria-hidden": "true" }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.skGroupLabel, children: [t(`root.${group.root.kind}`), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillPath, { path: group.root.path }) })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skGroupCount, children: group.skills.length }) ] }) }), expanded && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skGroupBody, children: group.skills.map((skill) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillRow, { context, skill, stats: catalog.stats[skill.name], selected: selected === skill.key, onSelect: () => setSelected(skill.key) }, skill.key)) })] }, group.root.kind); }), catalog.problems.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("details", { className: css.skProblems, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("summary", { children: t("skills.problems", { count: catalog.problems.length }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { children: catalog.problems.map((problem) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { title: problem.path, children: problem.path.split(/[\\/]/u).slice(-2).join("/") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: problem.reason })] }, problem.path)) })] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { ref: paneRef, className: css.skPane, children: catalog.skills.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Empty, { glyph: "✦", title: t("skills.empty"), action: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", size: "sm", disabled: !context.writable, onClick: () => setCreating(true), children: t("skills.new") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", onClick: () => context.navigate({ tab: "market" }), children: t("skills.browseMarket") })] }), children: t("skills.emptyBody") }) : current === void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Empty, { glyph: "✦", title: t("skills.select"), children: t("skills.selectBody") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillDetail, { context, skillKey: current.key, stats: catalog.stats[current.name], onDeleted: () => setSelected(void 0) }, current.key) }), creating && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CreateDialog, { context, roots: catalog.creation?.roots ?? catalog.roots.map((root) => root.kind), defaultRoot: catalog.creation?.default, onClose: () => setCreating(false), onCreated: (skill) => { setCreating(false); setSelected(skill.key); context.refresh(); } }) ] }); } function invocationOf(value) { return value.modelInvocable && value.userInvocable ? "both" : value.userInvocable ? "slash" : value.modelInvocable ? "model" : "off"; } function switchesOf(value) { return { modelInvocable: value === "both" || value === "model", userInvocable: value === "both" || value === "slash" }; } function SkillRow(props) { const t = useT(); const { skill, stats, context } = props; const [busy, setBusy] = (0, react.useState)(false); const invocation = invocationOf(skill.invocation); const on = invocation !== "off"; const toggle = async (next) => { setBusy(true); try { await context.client.setInvocation(skill.key, switchesOf(next ? "both" : "off"), skill.hash); context.refresh(); } catch (error) { context.fail(error); } finally { setBusy(false); } }; const usable = on && skill.shadowedBy === void 0 && skill.invocation.userInvocable; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skRow, "data-selected": props.selected ? "" : void 0, "data-shadowed": skill.shadowedBy === void 0 ? void 0 : "", "data-off": on ? void 0 : "", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css.skRowMain, onClick: props.onSelect, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillIcon, { name: skill.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.skRowText, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("strong", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: skill.name }), skill.shadowedBy === void 0 && (stats?.open ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("i", { className: css.skDot, title: t("skills.waitingCount", { count: stats.open }) }), (skill.linked || skill.readOnly) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "quiet", children: t(skill.readOnly ? "skills.linked" : "skills.linkedEditable") }), skill.shadowedBy !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "quiet", children: t("skills.shadowed") }) : on && invocation !== "both" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "outline", children: t(`invocation.${invocation}Short`) }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: skill.description })] })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skRowActions, children: [usable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", className: css.skUse, title: t("skills.useHint", { name: skill.name }), onClick: () => context.useSkill(skill.name), children: t("skills.use") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, { checked: on, label: t("skills.toggle", { name: skill.name }), disabled: busy || !context.writable || skill.readOnly === true, onChange: (next) => void toggle(next) })] })] }); } function SkillDetail(props) { const t = useT(); const { context, stats } = props; const [loadedSkill, setLoadedSkill] = (0, react.useState)(null); const [editing, setEditing] = (0, react.useState)(null); const [improving, setImproving] = (0, react.useState)(false); const [busy, setBusy] = (0, react.useState)(false); const [deleting, setDeleting] = (0, react.useState)(false); const [comparing, setComparing] = (0, react.useState)(null); const [reload, setReload] = (0, react.useState)(0); (0, react.useEffect)(() => { setEditing(null); setImproving(false); setDeleting(false); setComparing(null); }, [props.skillKey]); (0, react.useEffect)(() => { let active = true; context.client.skill(props.skillKey).then((value) => { if (active) setLoadedSkill(value); }).catch(context.fail); return () => { active = false; }; }, [ context.client, props.skillKey, context.revision, reload ]); const skill = loadedSkill?.key === props.skillKey ? loadedSkill : null; if (skill === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }); const activeEditing = editing?.key === skill.key ? editing : null; const write = async (operation) => { setBusy(true); try { await operation(); setReload((value) => value + 1); context.refresh(); } catch (error) { context.fail(error); } finally { setBusy(false); } }; const invocation = invocationOf(skill.invocation); const usable = invocation !== "off" && skill.shadowedBy === void 0 && skill.invocation.userInvocable; const testsMeta = [t("tests.count", { count: stats?.cases ?? 0 }), ...stats?.lastScore === void 0 ? [] : [t("tests.lastScore", { score: points(stats.lastScore) })]].join(" · "); const more = [...context.client.canAssist("skill-draft") ? [{ id: "improve", label: t("skills.improve"), disabled: !context.writable || skill.readOnly === true }] : [], { id: "remove", label: t("skills.remove"), danger: true, disabled: !context.writable }]; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { className: css.skDetail, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { className: css.skDetailHead, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: skill.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: skill.description }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.skMeta, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(`root.${skill.root}`) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { title: skill.path, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillPath, { path: skill.path }) })] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skDetailActions, children: [ usable && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", onClick: () => context.useSkill(skill.name), children: t("skills.use") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: !context.writable || busy || skill.readOnly === true, onClick: () => setEditing({ key: skill.key, name: skill.name, hash: skill.hash, original: skill.content, text: skill.content }), children: t("common.edit") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MoreMenu, { label: t("common.more"), items: more, onSelect: (id) => id === "improve" ? setImproving(true) : setDeleting(true) }) ] })] }), (skill.linked || skill.readOnly) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skWarn, children: t(skill.readOnly ? "skills.linkedReadOnly" : "skills.linkedWritable") }), skill.shadowedBy === void 0 && (stats?.open ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", className: css.skCallout, onClick: () => context.navigate({ tab: "evolution", filter: "pending", skillName: skill.name }), children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("skills.waitingCount", { count: stats.open }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("b", { children: [t("common.view"), " ›"] })] }), skill.shadowedBy !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skWarn, children: t("skills.shadowedBy", { key: skill.shadowedBy }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skInvocation, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { inline: true, size: "sm", label: t("invocation.label"), value: invocation, disabled: !context.writable || busy || skill.readOnly === true, options: [ "both", "slash", "model", "off" ].map((value) => ({ value, label: t(`invocation.${value}`) })), onChange: (value) => void write(() => context.client.setInvocation(skill.key, switchesOf(value), skill.hash)) }) }), skill.whenToUse !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skWhen, children: skill.whenToUse }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillMarkdown, { body: skill.body }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skFolds, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FoldLink, { title: t("tests.title"), meta: testsMeta, onOpen: () => context.navigate({ tab: "evals", skillName: skill.name }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Fold, { title: t("versions.title"), meta: String(skill.versions.length), children: skill.versions.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { className: css.skMuted, children: t("versions.empty") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { className: css.skVersions, children: skill.versions.map((version) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: version.reason === "evolution" ? "success" : "outline", children: t(`versions.reason.${version.reason}`) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("time", { title: version.createdAt, children: stamp(version.createdAt) }), version.hash === skill.hash && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "neutral", children: t("versions.current") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {}), version.hash !== skill.hash && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", onClick: () => void context.client.version(skill.key, version.id).then(setComparing).catch(context.fail), children: t("versions.compare") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: !context.writable || busy || skill.readOnly === true, onClick: () => void write(() => context.client.restoreVersion(skill.key, version.id, skill.hash)), children: t("versions.restore") })] }) ] }, version.id)) }) }, `${skill.key}:versions`), (skill.resources?.length ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Fold, { title: t("skills.files"), meta: String(skill.resources.length), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skResources, children: skill.resources.map((file) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillPath, { path: file }) }, file)) }) }, `${skill.key}:files`) ] }), activeEditing !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { wide: true, title: t("editor.title", { name: activeEditing.name }), busy, onClose: () => setEditing(null), footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", onClick: () => setEditing(null), children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", disabled: busy || activeEditing.text === activeEditing.original, onClick: () => void write(async () => { await context.client.saveSkill(activeEditing.key, activeEditing.text, activeEditing.hash); setEditing(null); }), children: busy ? t("common.saving") : t("common.save") })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { className: css.skEditor, spellCheck: false, value: activeEditing.text, onChange: (event) => setEditing((current) => current === null ? null : { ...current, text: event.target.value }), "aria-label": t("diff.code") }) }), improving && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ImproveDialog, { context, name: skill.name, onClose: () => setImproving(false) }), comparing !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { wide: true, title: t("versions.compareTitle", { time: stamp(comparing.version.createdAt) }), onClose: () => setComparing(null), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.DiffBlock, { maxLines: 400, labels: diffLabels(t), diffs: [{ path: `${skill.name}/SKILL.md`, oldText: comparing.content, newText: skill.content }] }) }), deleting && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Confirm, { danger: true, title: t("skills.removeTitle", { name: skill.name }), body: t("skills.removeBody"), confirmLabel: t("skills.remove"), busy, onClose: () => setDeleting(false), onConfirm: () => void (async () => { setBusy(true); try { await context.client.deleteSkill(skill.key, skill.hash); context.notice(t("skills.removed", { name: skill.name })); setDeleting(false); props.onDeleted(); context.refresh(); } catch (error) { context.fail(error); } finally { setBusy(false); } })() }) ] }); } function ImproveDialog(props) { const t = useT(); const [note, setNote] = (0, react.useState)(""); const [busy, setBusy] = (0, react.useState)(false); const [error, setError] = (0, react.useState)(null); const start = async () => { setBusy(true); setError(null); try { await props.context.client.generateDraft({ skill: props.name, ...note.trim() === "" ? {} : { guidance: note.trim() } }); props.context.notice(t("skills.improveStarted")); props.onClose(); props.context.refresh(); } catch (reason) { setError(errorText(reason)); } finally { setBusy(false); } }; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("skills.improveTitle", { name: props.name }), busy, onClose: props.onClose, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skFormError, children: error }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", onClick: props.onClose, children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", disabled: busy, onClick: () => void start(), children: t("skills.improveStart") }) ] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skForm, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, { label: t("skills.improveNote"), children: (control) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { ...control, rows: 3, value: note, placeholder: t("skills.improvePlaceholder"), onChange: (event) => setNote(event.target.value) }) }) }) }); } function CreateDialog(props) { const t = useT(); const [name, setName] = (0, react.useState)(""); const [description, setDescription] = (0, react.useState)(""); const [root, setRoot] = (0, react.useState)(props.defaultRoot ?? (props.roots.includes("user-dsh") ? "user-dsh" : props.roots[0] ?? "user-dsh")); const [busy, setBusy] = (0, react.useState)(false); const [error, setError] = (0, react.useState)(null); const valid = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(name) && name.length <= 64 && description.trim() !== ""; const submit = async () => { setBusy(true); setError(null); try { props.onCreated(await props.context.client.createSkill({ name, description: description.trim(), root })); } catch (reason) { setError(errorText(reason)); } finally { setBusy(false); } }; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("create.title"), busy, onClose: props.onClose, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skFormError, children: error }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", onClick: props.onClose, children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", disabled: !valid || busy, onClick: () => void submit(), children: t("create.submit") }) ] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skForm, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, { label: t("create.name"), hint: t("create.nameHint"), children: (control) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { ...control, value: name, placeholder: "release-notes", onChange: (event) => setName(event.target.value.trim().toLowerCase()) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, { label: t("create.description"), hint: t("create.descriptionHint"), children: (control) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("textarea", { ...control, rows: 3, value: description, onChange: (event) => setDescription(event.target.value) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skFormRow, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { label: t("create.root"), value: root, options: props.roots.map((kind) => ({ value: kind, label: t(`root.${kind}`) })), onChange: setRoot }) }) ] }) }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/client/trash-page.tsx function size(bytes) { if (bytes < 1024) return `${bytes} B`; return bytes < 1048576 ? `${Math.round(bytes / 1024)} KiB` : `${(bytes / 1048576).toFixed(1)} MiB`; } function TrashPage(props) { const t = useT(); const { context } = props; const [entries, setEntries] = (0, react.useState)(null); const [busy, setBusy] = (0, react.useState)(false); const [purging, setPurging] = (0, react.useState)(null); const [restoring, setRestoring] = (0, react.useState)(null); const [emptying, setEmptying] = (0, react.useState)(false); (0, react.useEffect)(() => { let active = true; context.client.trash().then((value) => { if (active) setEntries(value); }).catch((error) => { if (active) context.fail(error); }); return () => { active = false; }; }, [context.client, context.revision]); if (entries === null) return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Busy, { label: t("common.loading") }); const run = async (operation, done) => { setBusy(true); try { await operation(); done(); setEntries(await context.client.trash()); context.refresh(); } catch (error) { context.fail(error); } finally { setBusy(false); } }; const restore = async (entry) => { setBusy(true); try { const preview = await context.client.previewTrashRestore({ id: entry.id }); if (preview.needsRoot || preview.conflict !== void 0) setRestoring({ entry, preview }); else await run(() => context.client.restoreTrash({ id: entry.id }), () => context.notice(t("trash.restored", { name: entry.name }))); } catch { setRestoring({ entry, preview: null }); } finally { setBusy(false); } }; return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { className: `${css.skDetail} ${css.skTrash}`, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { className: css.skDetailHead, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("trash.title") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("trash.body") }), entries.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skMeta, children: t("tabs.trash", { count: entries.length }) }) ] }), entries.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: css.skDetailActions, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: !context.writable || busy, onClick: () => setEmptying(true), children: t("trash.empty") }) })] }), entries.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Empty, { glyph: "×", title: t("trash.emptyTitle"), children: t("trash.emptyBody") }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("ul", { className: `${css.skVersions} ${css.skTrashList}`, children: entries.map((entry) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("li", { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillIcon, { name: entry.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.skRowText, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: entry.name }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("trash.meta", { time: stamp(entry.trashedAt), size: size(entry.bytes) }) }), entry.originalPath !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { title: entry.originalPath, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillPath, { path: entry.originalPath }) }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.skTrashTags, children: [entry.root !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "quiet", children: t(`root.${entry.root}`) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, { tone: "quiet", children: t(entry.kind === "file" ? "trash.file" : "trash.bundle") })] }) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { className: css.skTrashActions, children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "outline", size: "sm", disabled: !context.writable || busy, title: t("trash.restoreHint"), onClick: () => void restore(entry), children: t("trash.restore") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", size: "sm", disabled: !context.writable || busy, onClick: () => setPurging(entry), children: t("trash.purge") })] }) ] }, entry.id)) }), restoring !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RestoreDialog, { context, entry: restoring.entry, initial: restoring.preview, onClose: () => setRestoring(null), onRestored: () => { setRestoring(null); context.client.trash().then(setEntries).catch(context.fail); context.refresh(); } }), purging !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PurgeDialog, { entry: purging, busy, writable: context.writable, onClose: () => setPurging(null), onConfirm: () => void run(() => context.client.purgeTrash(purging.id), () => { context.notice(t("trash.purged", { name: purging.name })); setPurging(null); }) }), emptying && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Confirm, { danger: true, title: t("trash.clearTitle", { count: entries.length }), body: t("trash.clearBody"), confirmLabel: t("trash.empty"), busy, onClose: () => setEmptying(false), onConfirm: () => void run(() => context.client.emptyTrash(), () => { context.notice(t("trash.emptied", { count: entries.length })); setEmptying(false); }) }) ] }); } const RESTORE_PREVIEW_DEBOUNCE_MS = 200; function RestoreDialog(props) { const t = useT(); const [name, setName] = (0, react.useState)(props.entry.name); const [root, setRoot] = (0, react.useState)(props.initial?.needsRoot === true ? "" : "original"); const [preview, setPreview] = (0, react.useState)(props.initial); const [previewing, setPreviewing] = (0, react.useState)(false); const [roots, setRoots] = (0, react.useState)(props.initial?.roots ?? []); const [replace, setReplace] = (0, react.useState)(false); const [busy, setBusy] = (0, react.useState)(false); const [error, setError] = (0, react.useState)(null); const mountedRef = (0, react.useRef)(false); const lastRootRef = (0, react.useRef)(root); const hasInitialRoots = (props.initial?.roots.length ?? 0) > 0; const initialMatchedKey = props.initial !== null && !props.initial.needsRoot ? `${props.entry.id}|original|${props.entry.name}` : null; const validName = /^[a-z0-9]+(?:-[a-z0-9]+)*$/u.test(name) && name.length <= 64; (0, react.useEffect)(() => { if (hasInitialRoots) return; let active = true; props.context.client.catalog().then((catalog) => { if (active) setRoots(catalog.roots.map((item) => item.kind)); }).catch(props.context.fail); return () => { active = false; }; }, [props.context.client, hasInitialRoots]); (0, react.useEffect)(() => { let active = true; const initialMount = !mountedRef.current; const rootChanged = lastRootRef.current !== root; mountedRef.current = true; lastRootRef.current = root; if (!initialMount) { setReplace(false); setError(null); } if (root === "") { setPreview(initialMount ? props.initial : null); setPreviewing(false); return () => { active = false; }; } if (!validName) { setPreviewing(false); return () => { active = false; }; } const requestKey = `${props.entry.id}|${root}|${name}`; if (initialMount && initialMatchedKey === requestKey) { setPreviewing(false); return () => { active = false; }; } const input = { id: props.entry.id, name, ...root === "original" ? {} : { root } }; const runPreview = () => { props.context.client.previewTrashRestore(input).then((value) => { if (!active) return; setPreview(value); setPreviewing(false); }).catch((reason) => { if (!active) return; setError(errorText(reason)); setPreviewing(false); }); }; setPreviewing(true); if (initialMount || rootChanged) { runPreview(); return () => { active = false; }; } const timer = window.setTimeout(runPreview, RESTORE_PREVIEW_DEBOUNCE_MS); return () => { active = false; window.clearTimeout(timer); }; }, [ props.context.client, props.entry.id, props.initial, initialMatchedKey, root, name, validName ]); const submit = async () => { if (preview === null || previewing || preview.needsRoot || !props.context.writable) return; setBusy(true); setError(null); const input = { id: props.entry.id, name, ...root === "original" ? {} : { root }, ...preview.conflict === void 0 ? {} : { replace, expectedHash: preview.conflict.hash } }; try { await props.context.client.restoreTrash(input); props.context.notice(t("trash.restored", { name })); props.onRestored(); } catch (reason) { setError(errorText(reason)); } finally { setBusy(false); } }; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("trash.restoreTitle", { name: props.entry.name }), busy, onClose: props.onClose, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", disabled: busy, onClick: props.onClose, children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", disabled: busy || previewing || !props.context.writable || !validName || preview === null || preview.needsRoot || preview.conflict !== void 0 && !replace, onClick: () => void submit(), children: t("trash.restore") })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skForm, "aria-busy": previewing || void 0, children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("trash.chooseHint") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SelectField, { label: t("create.root"), value: root, onChange: setRoot, options: [ { value: "", label: t("trash.chooseRoot") }, ...props.initial?.needsRoot === true ? [] : [{ value: "original", label: t("trash.original") }], ...roots.map((kind) => ({ value: kind, label: t(`root.${kind}`) })) ] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, { label: t("create.name"), hint: t("create.nameHint"), children: (control) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { ...control, value: name, disabled: busy, onChange: (event) => setName(event.target.value.trim().toLowerCase()) }) }), preview?.path !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { style: previewing ? { opacity: .6 } : void 0, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillPath, { path: preview.path }) }), preview === null && previewing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { className: css.skMuted, role: "status", children: t("common.loading") }), preview?.conflict !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, { checked: replace, disabled: busy || previewing, label: t("trash.replace"), onChange: setReplace }), error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { role: "alert", className: css.skFormError, children: error }) ] }) }); } function PurgeDialog(props) { const t = useT(); const [name, setName] = (0, react.useState)(""); return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidebarModal, { title: t("trash.purgeTitle", { name: props.entry.name }), description: t("trash.purgeBody"), busy: props.busy, onClose: props.onClose, footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "ghost", disabled: props.busy, onClick: props.onClose, children: t("common.cancel") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, { variant: "primary", className: css.skDangerButton, disabled: props.busy || !props.writable || name !== props.entry.name, onClick: props.onConfirm, children: t("trash.purge") })] }), children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Field, { label: t("trash.confirmName", { name: props.entry.name }), children: (control) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", { ...control, value: name, onChange: (event) => setName(event.target.value) }) }) }); } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/client/use-skill.tsx const SKILL_USE_EVENT = "dsh-brain-mnemon:skill-use"; let directHandler; let directModeActive = false; let pending; const PENDING_MS = 1e4; function isDirectSkillUseActive() { return directModeActive; } function requestSkillUse(name, sessionId) { if (directHandler !== void 0) return directHandler(name, sessionId); const detail = { name, ...sessionId === void 0 ? {} : { sessionId }, handled: false }; window.dispatchEvent(new CustomEvent(SKILL_USE_EVENT, { detail })); pending = detail.handled ? void 0 : { detail, at: Date.now() }; return detail.handled; } function draftWithSkill(draft, name) { const token = `/${name}`; if (new RegExp(`(^|\\s)${token.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&")}(\\s|$)`, "u").test(draft)) return draft; const rest = draft.trimStart(); return rest === "" ? `${token} ` : `${token} ${rest}`; } const noDraft = (selector) => selector({ draft: "" }); function SkillUseBridge(props) { const draft = (props.useInput ?? noDraft)((state) => state.draft); const latest = (0, react.useRef)(draft); latest.current = draft; (0, react.useEffect)(() => { const take = (detail) => { if (detail === void 0 || detail.handled || props.inputActions === void 0) return; if (detail.sessionId !== void 0 && props.sessionId !== void 0 && detail.sessionId !== props.sessionId) return; props.inputActions.setDraft(draftWithSkill(latest.current ?? "", detail.name)); detail.handled = true; if (pending?.detail === detail) pending = void 0; }; if (pending !== void 0 && Date.now() - pending.at < PENDING_MS) take(pending.detail); const listener = (event) => take(event.detail); window.addEventListener(SKILL_USE_EVENT, listener); return () => window.removeEventListener(SKILL_USE_EVENT, listener); }, [props.inputActions, props.sessionId]); return null; } const SKILL_USE_SLOT = "conversation.input.left"; function readOptionalService(ctx, key) { const getter = ctx.get; if (typeof getter === "function") try { const resolved = getter.call(ctx, key); if (resolved !== void 0) return resolved; } catch {} try { return ctx[key]; } catch { return; } } function readMainSessionId(ctx, sessions) { const currentKey = readOptionalService(ctx, "uiSession")?.adapter?.current?.getSnapshot?.()?.key; if (typeof currentKey === "string" && currentKey !== "") return currentKey; const byId = sessions?.list?.getSnapshot?.()?.byId; if (byId !== void 0) { for (const candidate of Object.values(byId)) if (candidate !== void 0 && (candidate.retainedBy?.mainView ?? 0) > 0 && candidate.id !== "") return candidate.id; } } function applyDirectSkillUse(ctx, input, name, sessionId) { const layout = readOptionalService(ctx, "layout"); const sessions = readOptionalService(ctx, "sessions"); const uiWorkspace = readOptionalService(ctx, "uiWorkspace"); const mainSessionId = readMainSessionId(ctx, sessions); const requestedSessionId = typeof sessionId === "string" && sessionId !== "" ? sessionId : void 0; const targetSessionId = requestedSessionId ?? mainSessionId; if (targetSessionId === void 0) { if (typeof uiWorkspace?.startSession === "function") try { uiWorkspace.startSession(void 0, { prompt: draftWithSkill("", name), whenDraftExists: "replace" }); return true; } catch { return false; } return false; } let binding = sessions?.binding?.(targetSessionId); if (requestedSessionId !== void 0 && requestedSessionId !== mainSessionId || binding === void 0) try { uiWorkspace?.openSession?.(targetSessionId); binding = sessions?.binding?.(targetSessionId); } catch {} const actx = sessions?.scope?.(targetSessionId) ?? binding?.ctx; if (actx !== void 0 && typeof input.for === "function") try { const controller = input.for(actx); if (controller !== void 0) { const currentDraft = controller.state.getSnapshot().draft; controller.setDraft(draftWithSkill(currentDraft, name)); try { layout?.selectPanel?.(null); } catch {} controller.focus?.(); return true; } } catch {} if (binding !== void 0 && typeof input.requestDraftInitialization === "function") try { if (input.requestDraftInitialization(binding, { prompt: draftWithSkill("", name), whenDraftExists: "replace" }) === "blocked") return false; try { layout?.selectPanel?.(null); } catch {} return true; } catch { return false; } return false; } function installSkillUseBridge(ctx) { const tryDirect = (name, sessionId) => { const input = readOptionalService(ctx, "conversation")?.input; if (input === void 0) return void 0; directModeActive = true; return applyDirectSkillUse(ctx, input, name, sessionId); }; const initialInput = readOptionalService(ctx, "conversation")?.input; if (initialInput !== void 0) { const handler = (name, sessionId) => { return applyDirectSkillUse(ctx, readOptionalService(ctx, "conversation")?.input ?? initialInput, name, sessionId); }; directHandler = handler; directModeActive = true; pending = void 0; return () => { if (directHandler === handler) { directHandler = void 0; directModeActive = false; } }; } const handler = (name, sessionId) => { const result = tryDirect(name, sessionId); if (result !== void 0) return result; directModeActive = false; const detail = { name, ...sessionId === void 0 ? {} : { sessionId }, handled: false }; window.dispatchEvent(new CustomEvent(SKILL_USE_EVENT, { detail })); pending = detail.handled ? void 0 : { detail, at: Date.now() }; return detail.handled; }; directHandler = handler; directModeActive = false; const slots = ctx.slots; let disposeSlot; try { disposeSlot = slots.inject(SKILL_USE_SLOT, () => { if (readOptionalService(ctx, "conversation")?.input !== void 0) return () => void 0; return slots.register({ name: SKILL_USE_SLOT, id: "dsh-brain-mnemon-skills/use", order: 1e3 }, SkillUseBridge); }); } catch { disposeSlot = void 0; } return () => { if (directHandler === handler) { directHandler = void 0; directModeActive = false; } disposeSlot?.(); }; } // vendor/dsh-mnemon/plugins/dsh-brain-mnemon-source-skills/src/client/ui.tsx const TABS = [ "skills", "evolution", "evals", "market", "trash" ]; const POLL_MS = 3e3; const FOCUS_COOLDOWN_MS = 500; const NOTICE_MS = 5e3; const FILTERS = [ "pending", "done", "evidence" ]; function seedLocation(input) { if (typeof input !== "object" || input === null || Array.isArray(input) || typeof input.seed !== "string") return void 0; const nonce = typeof input.nonce === "number" ? input.nonce : Date.now(); const [kind, ...rest] = input.seed.split(":"); const value = rest.join(":"); if (kind === "evolution") return { tab: "evolution", filter: FILTERS.includes(value) ? value : "pending", nonce }; if (kind === "evals") return { tab: "evals", ...value === "" ? {} : { skillName: value }, nonce }; if (value === "") return void 0; if (kind === "skill") return { tab: "skills", skillKey: value, nonce }; if (kind === "name") return { tab: "skills", skillName: value, nonce }; if (kind === "suggestion") return { tab: "evolution", suggestionId: value, nonce }; if (kind === "draft") return { tab: "evolution", draftId: value, nonce }; if (kind === "trajectory") return { tab: "evolution", filter: "evidence", trajectoryId: value, nonce }; } let rememberedTab = "skills"; function SkillsView(props) { const t = useT(); const client = (0, react.useMemo)(() => skillsPageClient(props.management), [props.management]); const [location, setLocation] = (0, react.useState)(() => seedLocation(props.navigationInput) ?? { tab: rememberedTab }); const [revision, setRevision] = (0, react.useState)(0); const [configRevision, setConfigRevision] = (0, react.useState)(0); const [overview, setOverview] = (0, react.useState)(null); const [error, setError] = (0, react.useState)(null); const [notice, setNotice] = (0, react.useState)(null); const pollRefresh = (0, react.useCallback)(() => { client.beginReadWave?.(() => setRevision((value) => value + 1)); setRevision((value) => value + 1); }, [client]); const refresh = (0, react.useCallback)(() => { client.beginReadWave?.(() => setRevision((value) => value + 1)); setRevision((value) => value + 1); setConfigRevision((value) => value + 1); }, [client]); const refreshKey = (0, react.useRef)(props.refreshKey); (0, react.useEffect)(() => { if (refreshKey.current === props.refreshKey) return; refreshKey.current = props.refreshKey; client.invalidatePreferences?.(); refresh(); }, [ client, props.refreshKey, refresh ]); (0, react.useEffect)(() => { const seeded = seedLocation(props.navigationInput); if (seeded !== void 0) setLocation(seeded); }, [props.navigationInput]); (0, react.useEffect)(() => { rememberedTab = location.tab; }, [location.tab]); (0, react.useLayoutEffect)(() => { props.onResetScroll?.(); }, [location.tab, props.onResetScroll]); (0, react.useEffect)(() => { let active = true; client.overview().then((value) => { if (active) setOverview(value); }).catch((reason) => { if (active) setError(errorText(reason)); }); return () => { active = false; }; }, [client, revision]); const busy = overview !== null && (overview.counts.runsRunning > 0 || overview.counts.drafting > 0); const wasBusy = (0, react.useRef)(false); (0, react.useEffect)(() => { if (props.active === false) return; if (wasBusy.current && !busy && client.markWaveIdleAndCheckStale?.() === true) pollRefresh(); wasBusy.current = busy; if (!busy) return; const timer = setInterval(pollRefresh, POLL_MS); return () => clearInterval(timer); }, [ busy, client, pollRefresh, props.active ]); const lastFocusRefreshAt = (0, react.useRef)(0); (0, react.useEffect)(() => { if (props.active === false) return; const resume = () => { if (document.visibilityState === "hidden") return; const now = Date.now(); if (now - lastFocusRefreshAt.current < FOCUS_COOLDOWN_MS) return; lastFocusRefreshAt.current = now; client.invalidatePreferences?.(); refresh(); }; window.addEventListener("focus", resume); document.addEventListener("visibilitychange", resume); return () => { window.removeEventListener("focus", resume); document.removeEventListener("visibilitychange", resume); }; }, [ client, refresh, props.active ]); (0, react.useEffect)(() => { if (notice === null) return; const timer = setTimeout(() => setNotice(null), NOTICE_MS); return () => clearTimeout(timer); }, [notice]); const preferences = props.preferences; const evolution = (0, react.useMemo)(() => { const value = preferences?.value; if (typeof value !== "object" || value === null || Array.isArray(value) || typeof value.evolution !== "boolean") return void 0; return { on: value.evolution, ...preferences.writable ? { enable: () => preferences.replace({ evolution: true }) } : {} }; }, [preferences]); const tRef = (0, react.useRef)(t); tRef.current = t; const returnToConversationRef = (0, react.useRef)(props.onReturnToConversation); returnToConversationRef.current = props.onReturnToConversation; const sessionIdRef = (0, react.useRef)(props.sessionId); sessionIdRef.current = props.sessionId; const navigate = (0, react.useCallback)((next) => setLocation({ ...next, nonce: Date.now() }), []); const showNotice = (0, react.useCallback)((text) => { setNotice(text); setError(null); }, []); const fail = (0, react.useCallback)((reason) => { setError(errorText(reason)); setNotice(null); }, []); const useSkill = (0, react.useCallback)((name) => { const taken = requestSkillUse(name, sessionIdRef.current); const returnToConversation = returnToConversationRef.current; if (returnToConversation !== void 0 && (taken || !isDirectSkillUseActive())) returnToConversation(); else if (taken) { setNotice(tRef.current("skills.used", { name })); setError(null); } else { setError(tRef.current("skills.noConversation")); setNotice(null); } }, []); const context = (0, react.useMemo)(() => ({ client, writable: props.writable !== false, revision, configRevision, overview, refresh, navigate, notice: showNotice, fail, useSkill, evolution, ...props.onOpenSettings === void 0 ? {} : { openSettings: props.onOpenSettings }, ...props.sessionId === void 0 ? {} : { sessionId: props.sessionId } }), [ client, configRevision, evolution, fail, navigate, overview, props.onOpenSettings, props.sessionId, props.writable, refresh, revision, showNotice, useSkill ]); const waiting = overview === null ? 0 : overview.counts.pending + overview.counts.drafts; const trashed = overview === null ? 0 : overview.counts.trash; const onTabKeyDown = (event) => { const currentIndex = TABS.indexOf(location.tab); if (currentIndex < 0) return; let nextIndex; if (event.key === "ArrowRight") nextIndex = (currentIndex + 1) % TABS.length; else if (event.key === "ArrowLeft") nextIndex = (currentIndex - 1 + TABS.length) % TABS.length; else if (event.key === "Home") nextIndex = 0; else if (event.key === "End") nextIndex = TABS.length - 1; if (nextIndex === void 0) return; event.preventDefault(); setLocation({ tab: TABS[nextIndex] }); event.currentTarget.querySelectorAll("[role=\"tab\"]")[nextIndex]?.focus(); }; const tabs = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: sidebarCss.memoryNavigation, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", { className: sidebarCss.memoryTabs, role: "tablist", "aria-label": t("tabs.aria"), onKeyDown: onTabKeyDown, children: TABS.map((tab) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", { type: "button", role: "tab", tabIndex: location.tab === tab ? 0 : -1, "aria-selected": location.tab === tab, "data-active": location.tab === tab ? "" : void 0, onClick: () => setLocation({ tab }), children: [ t(`tab.${tab}`), tab === "evolution" && waiting > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", { className: css.skTabBadge, "aria-label": t("tabs.waiting", { count: waiting }), children: waiting }), tab === "trash" && trashed > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("b", { className: css.skTabBadge, "aria-label": t("tabs.trash", { count: trashed }), children: trashed }) ] }, tab)) }) }); return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [ /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", { className: sidebarCss.memoryWorkspace, children: [props.standalone !== true && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PageHeader, { title: t("page.title"), description: t("page.description"), ...context.writable ? {} : { meta: t("page.readOnly") } }), tabs] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: error === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skAlert, role: "alert", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: error }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css.skDismiss, onClick: () => setError(null), "aria-label": t("common.close"), children: "×" })] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Reveal, { children: notice === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skNotice, role: "status", children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: notice }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", { type: "button", className: css.skDismiss, onClick: () => setNotice(null), "aria-label": t("common.close"), children: "×" })] }) }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { className: css.skPage, children: [ location.tab === "skills" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillsPage, { context, location }), location.tab === "evolution" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EvolutionPage, { context, location }), location.tab === "evals" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(EvalsPage, { context, location }), location.tab === "market" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MarketPage, { context, location }), location.tab === "trash" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(TrashPage, { context, location }) ] }, location.tab) ] }); } function SkillsSourcePage(props) { if (props.management === void 0) return null; return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(MemorySourcePageFrame, { locale: props.locale, children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SkillsView, { ...props, management: props.management }, props.sourceInstanceKey) }); } function installSkillsMemoryUI(ctx, locale = "zh") { const t = translate(locale); return installMemorySourceUI(ctx, { sourceTypeId: "skills", pages: [{ id: "library", order: 800, label: () => t("page.title"), navigation: { stickyHeader: false, group: "tools", glyph: "✦" }, component: SkillsSourcePage }] }); } function apply$1(ctx) { const disposePage = installSkillsMemoryUI(ctx); let disposeBridge = installSkillUseBridge(ctx); ctx.inject?.([ "conversation", "sessions", "layout" ], (inner) => { disposeBridge(); const disposeDirect = installSkillUseBridge(inner); inner.effect?.(() => () => { disposeDirect(); disposeBridge = installSkillUseBridge(ctx); }); }); ctx.effect?.(() => () => { disposeBridge(); disposePage(); }); } // src-client/mnemon-workbench.ts const BRAIN_PACKAGE = "dsh-brain"; const FORK_PACKAGE = "dsh-brain-mnemon"; const SETTINGS_ID = "dsh-brain:mnemon"; const SETTINGS_SECTION = "settings.section"; const BUNDLE_CONFIG = "plugins.bundle.config"; const STANDALONE_PACKAGES = /* @__PURE__ */ new Set(["dsh-mnemon", FORK_PACKAGE]); function withOverrides(object, overrides) { return new Proxy(object, { get(target, key) { if (Object.hasOwn(overrides, key)) return Reflect.get(overrides, key); const value = Reflect.get(target, key, target); return typeof value === "function" ? value.bind(target) : value; } }); } function embeddedContext(ctx) { const localeNamespace = (name) => name === "mnemon" ? FORK_PACKAGE : name; const locale = withOverrides(ctx.locale, { bind: (name) => ctx.locale.bind(localeNamespace(name)), register: (name, ...args) => ctx.locale.register(localeNamespace(name), ...args) }); return withOverrides(ctx, { slots: withOverrides(ctx.slots, { inject: (name, setup) => ctx.slots.inject(name === BUNDLE_CONFIG ? SETTINGS_SECTION : name, setup), register: (options, Component) => { const embedded = { ...options, priority: (options.priority ?? 0) + 1 }; if (options.locale !== void 0) embedded.locale = localeNamespace(options.locale); if (options.name === BUNDLE_CONFIG && options.key === FORK_PACKAGE) { const { key: _key, ...section } = embedded; return ctx.slots.register({ ...section, name: SETTINGS_SECTION, id: SETTINGS_ID, order: 101, label: () => "Mnemon" }, (props) => react.createElement(CardBoundary, null, react.createElement(Component, { ...props, view: "page" }))); } if (options.name === "plugins.row.config" && options.key?.startsWith(FORK_PACKAGE + "#mnemon-")) embedded.key = "dsh-brain#" + ("dsh-brain-" + options.key.slice(17)); if (options.name === "plugins.detail.actions" && options.id === FORK_PACKAGE + "/open-workspace") return ctx.slots.register(embedded, (props) => { const subject = props.subject; if (subject?.kind !== "bundle" || subject.pkg.name !== BRAIN_PACKAGE) return null; return react.createElement(Component, { ...props, subject: { ...subject, pkg: { ...subject.pkg, name: FORK_PACKAGE } } }); }); return ctx.slots.register(embedded, Component); } }), locale, inject: (names, setup) => ctx.inject(names, (inner) => { if (!names.includes("pluginNavigation")) return setup(inner); return setup(withOverrides(inner, { pluginNavigation: withOverrides(inner.pluginNavigation, { openBundle: () => inner.pluginNavigation.openBundle(BRAIN_PACKAGE) }) })); }) }); } function MnemonBundleSettings({ ctx }) { const subscribe = react.useCallback((listener) => ctx.slots.subscribe?.(SETTINGS_SECTION, listener) ?? (() => {}), [ctx]); const getSnapshot = react.useCallback(() => ctx.slots.entriesOfSlot?.(SETTINGS_SECTION).find((entry) => entry.options.id === SETTINGS_ID), [ctx]); const entry = react.useSyncExternalStore(subscribe, getSnapshot, getSnapshot); return entry === void 0 ? null : react.createElement(entry.component, entry.inject?.()); } function mountMnemonWorkbench(ctx) { if (typeof ctx.inject !== "function") return; ctx.inject(inject$1, (host) => { const standalone = () => host.slots.entriesOfSlot(BUNDLE_CONFIG).some((entry) => STANDALONE_PACKAGES.has(entry.options.key ?? "")); let active; let stopping; let disposed = false; const stop = (after) => { if (active === void 0) return stopping; const previous = active; active = void 0; stopping = previous.dispose().catch((error) => console.error("[dsh-brain] Mnemon workbench cleanup failed", error)).then(() => { stopping = void 0; after?.(); }); return stopping; }; const reconcile = () => { if (disposed || stopping !== void 0) return; if (standalone()) stop(reconcile); else if (active === void 0) { active = host.plugin({ name: "dsh-brain: Mnemon workbench", apply(child) { const embedded = embeddedContext(child); apply$4(embedded); apply$3(embedded); apply$2(embedded); apply$5(embedded); apply$1(embedded); } }); const started = active; Promise.resolve(started).catch((error) => { console.error("[dsh-brain] Mnemon workbench registration failed", error); if (active === started) stop(); }); } }; host.effect(() => { const unsubscribe = host.slots.subscribe(BUNDLE_CONFIG, reconcile); reconcile(); return async () => { disposed = true; unsubscribe(); await stop(); }; }, "dsh-brain: Mnemon workbench availability"); }); } // src-client/index.ts const h = react.createElement; const inject = ["slots"]; function apply(ctx) { const configCard = function(props) { return h(CardBoundary, null, h(SettingsCard, null), props?.view === "page" ? h(MnemonBundleSettings, { ctx }) : null); }; const register = function(seat, options, component) { try { ctx.slots.inject(seat, function() { return ctx.slots.register(options, component); }); } catch (failure) { if (typeof console !== "undefined") console.warn("[dsh-brain] slot " + seat + " unavailable: " + messageOf(failure)); } }; register("plugins.bundle.config", { name: "plugins.bundle.config", key: "dsh-brain" }, configCard); register("settings.section", { name: "settings.section", id: "dsh-brain", order: 100, label: function() { return "云端记忆"; } }, configCard); try { if (typeof ctx.effect === "function") ctx.effect(() => registerBrainPanel(ctx), "dsh-brain: panel"); else registerBrainPanel(ctx); } catch (failure) { if (typeof console !== "undefined") console.warn("[dsh-brain] panel registration failed: " + messageOf(failure)); } try { if (typeof ctx.effect === "function") ctx.effect(() => mountBrainSidebarTab(ctx), "dsh-brain: project memory sidebar"); else mountBrainSidebarTab(ctx); } catch (failure) { if (typeof console !== "undefined") console.warn("[dsh-brain] project memory sidebar registration failed: " + messageOf(failure)); } mountMnemonWorkbench(ctx); } const name = "dsh-brain"; exports.apply = apply; exports.inject = inject; exports.name = name; return module.exports; } });