dsh-plugin-prompt-tool 0.7.0 → 0.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.d.mts +3 -24
- package/lib/index.mjs +19 -64
- package/package.json +34 -34
package/lib/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { c as PresetWriterParams, l as WRITER_PARAM_KEYS, n as PromptConfigFile, r as PromptConfigSpec, s as ENGINE_PARAM_KEYS } from "./prompt-configs-CN0sJTUL.mjs";
|
|
2
|
-
import { SettingsNamespace } from "@deepseek-ai/dsh-settings";
|
|
3
2
|
import { parseDocument } from "yaml";
|
|
4
3
|
import z from "@deepseek-ai/schemastery";
|
|
5
4
|
import { Context } from "@deepseek-ai/cordis";
|
|
@@ -404,7 +403,7 @@ interface SkillsBridgeState {
|
|
|
404
403
|
skillCatalog: SkillCatalogEntry[];
|
|
405
404
|
}
|
|
406
405
|
/** 自建 loopback settings bridge:替代 registerConfigurableProviders,避免模型设置区出现插件条目。 */
|
|
407
|
-
declare function registerSettingsBridge(ctx: Context, ns:
|
|
406
|
+
declare function registerSettingsBridge(ctx: Context, ns: string, getModelsState: () => ModelDetection, getSkillsState: () => SkillsBridgeState, getEngineStrategyDir: () => string, afterSkillFix?: () => void,
|
|
408
407
|
/** 生成目录(presetDir):读取实际生效的提示词配置(引擎加载源)。 */
|
|
409
408
|
getPresetConfigsDir?: () => string,
|
|
410
409
|
/** 内容导入完成回调:批量 scope 只触发一次重建(更新运行时文本并重建预设)。 */
|
|
@@ -531,27 +530,7 @@ declare function loadToolTemplates(): ToolTemplate[];
|
|
|
531
530
|
/** 参数保存回调:写激活预设 preset.yml;失败必须抛给命令层渲染为错误。 */
|
|
532
531
|
type SavePresetParam = (key: string, value: unknown) => void | Promise<void>;
|
|
533
532
|
/** 通过 DSH 命令注册表暴露 /prompt-tool,Web 与 dsh-tui 都能执行。 */
|
|
534
|
-
declare function registerTuiCommand(ctx: Context, ns:
|
|
535
|
-
//#endregion
|
|
536
|
-
//#region src/runtime/settings-registration.d.ts
|
|
537
|
-
interface SettingsRegistrationHooks<T> {
|
|
538
|
-
/** 注册时的 composition base(每次尝试注册都取最新值)。 */
|
|
539
|
-
base: () => T;
|
|
540
|
-
/** 注册成功后接线:setSource / watch / 初始 onChange。 */
|
|
541
|
-
onRegistered: (scope: {
|
|
542
|
-
get: () => T;
|
|
543
|
-
watch: (callback: (next: T, prev: T) => void) => void;
|
|
544
|
-
}) => void;
|
|
545
|
-
/** 注册失败(schema 校验或重复注册竞态)时的日志出口。 */
|
|
546
|
-
onError: (message: string) => void;
|
|
547
|
-
}
|
|
548
|
-
/**
|
|
549
|
-
* 确保 `ns` 已注册:已注册(describe 命中)直接返回 true;未注册时补注册。
|
|
550
|
-
* 官方 installSettingsSection 的 inject 回调只在 settings 服务首次可用时跑一次,
|
|
551
|
-
* settings 服务实例被替换(provider fiber reload)后注册丢失且不自动重建;
|
|
552
|
-
* 本函数由 Web bridge 每次请求前调用兜底。
|
|
553
|
-
*/
|
|
554
|
-
declare function ensureSettingsRegistered<T>(sctx: Context, ns: SettingsNamespace, schema: unknown, hooks: SettingsRegistrationHooks<T>): boolean;
|
|
533
|
+
declare function registerTuiCommand(ctx: Context, ns: 'prompt-tool', getSource: () => PromptSettings, getModelsState: () => ModelDetection, getModelCatalog: () => Promise<Record<string, string[]>>, getPresetConfigsDir?: () => string, savePresetParam?: SavePresetParam): void;
|
|
555
534
|
//#endregion
|
|
556
535
|
//#region src/runtime/skills-provider.d.ts
|
|
557
536
|
/** 官方 dsh-skill 的 SkillName 契约:kebab-case。 */
|
|
@@ -674,4 +653,4 @@ declare const name = "prompt-tool";
|
|
|
674
653
|
declare const inject: string[];
|
|
675
654
|
declare function apply(ctx: Context, configIn: Config): void;
|
|
676
655
|
//#endregion
|
|
677
|
-
export { BRIDGE_ENDPOINTS, type BridgeEndpoint, type BridgeErrorPayload, type CachedSkillsReader, Config, ENGINE_PARAM_KEYS, MODEL_SEGMENT_MAP, PARAM_KEYS, type PresetSpec, type PromptConfigTemplate, type PromptConfigValidationError, type PromptConfigValidationResult, PromptSettingsSchema, SETTINGS_BRIDGE_PREFIX, SKILL_NAME_RE, type
|
|
656
|
+
export { BRIDGE_ENDPOINTS, type BridgeEndpoint, type BridgeErrorPayload, type CachedSkillsReader, Config, ENGINE_PARAM_KEYS, MODEL_SEGMENT_MAP, PARAM_KEYS, type PresetSpec, type PromptConfigTemplate, type PromptConfigValidationError, type PromptConfigValidationResult, PromptSettingsSchema, SETTINGS_BRIDGE_PREFIX, SKILL_NAME_RE, type SkillCatalogEntry, type SkillEntry, type SkillFixResult, type SkillFrontmatter, type ToolTemplate, WRITER_PARAM_KEYS, type WritePresetOptions, appendCharacterMemory, appendMemoryFile, apply, applyCharacterToPreset, applyModuleConfigs, buildModuleConfigsFromParams, buildWorldBookEntry, cloneBuiltinPreset, convertStToPreset, createCachedSkillsReader, deleteCharacterCard, deleteWorldBookEntry, detectModels, ensurePresetSeed, ensureWebSurface, fixSkillEntry, importCharacterCard, inject, installDefaultModelRoute, isValidSkill, listAdvertisedModels, listBuiltinTemplates, listCharacterCards, listPresets, listSkillFolders, listWorldBookEntries, loadPresetSpec, loadPromptTemplates, loadToolTemplates, mergeSkillDirs, mergeStPresets, migrateLegacyLayout, name, normalizePresetRootDir, parseFrontmatter, processStText, readCharacterMemory, readPluginState, readSkills, registerCharacterTools, registerSettingsBridge, registerTuiCommand, registerWorldBookTools, removeCharacterFromPreset, removeUserPreset, renderComposition, resolvePresetDir, resolvePresetParams, resolveProfileDir, resolveProfileSkillsDir, savePresetParams, stPresetId, syncImportedCharacterMemory, toKebabName, upsertWorldBookEntry, userPresetsDir, validSkills, validatePromptConfigs, writePluginState, writePreset };
|
package/lib/index.mjs
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { A as DEFAULT_SKILLS_DIR, C as resolvePresetParams, D as writePluginState, E as withPresetDoc, M as LEGACY_USER_PRESETS_DIR, O as DEFAULT_PRESET_DIR, S as resolvePresetDir, T as userPresetsDir, _ as packageEngineDir, a as applyModuleConfigs, b as removeUserPreset, c as buildModuleConfigsFromParams, d as ensurePresetSeed, f as listBuiltinTemplates, g as openPresetLocation, h as loadPresetSpec, i as MODEL_SEGMENT_MAP, j as LEGACY_CONTAINER_DIR, k as DEFAULT_RESIDENT_AGENTS_PATH, l as cloneBuiltinPreset, m as loadPresetContent, n as mergePromptConfigs, o as asString, p as listPresets, r as renderPromptConfigYaml, s as assertCompositionArray, t as loadPromptConfigFiles, u as duplicateUserPreset, v as parseImportedPresetId, w as savePresetParams, x as renderComposition, y as readPluginState } from "./prompt-configs-BnQKRHVb.mjs";
|
|
2
|
-
import { settingsNamespace } from "@deepseek-ai/dsh-settings";
|
|
3
2
|
import { appendFileSync, cpSync, existsSync, mkdirSync, mkdtempSync, readFileSync, readdirSync, renameSync, rmSync, statSync, watch, writeFileSync } from "node:fs";
|
|
4
3
|
import { basename, dirname, join, resolve, sep } from "node:path";
|
|
5
4
|
import { fileURLToPath } from "node:url";
|
|
@@ -722,7 +721,7 @@ const PARAM_KEYS = /* @__PURE__ */ new Set([...ENGINE_PARAM_KEYS, ...EXTRA_PARAM
|
|
|
722
721
|
//#endregion
|
|
723
722
|
//#region src/config.ts
|
|
724
723
|
/** 插件配置、settings 数据模型与默认常量(settings 接口层)。 */
|
|
725
|
-
const NS =
|
|
724
|
+
const NS = "prompt-tool";
|
|
726
725
|
const Config = z.object({
|
|
727
726
|
injectAgentsPrompt: z.boolean().default(false),
|
|
728
727
|
writeAgents: z.boolean().default(true),
|
|
@@ -1828,7 +1827,7 @@ function restorePresetImport(targetDir, backupDir) {
|
|
|
1828
1827
|
} catch {}
|
|
1829
1828
|
}
|
|
1830
1829
|
/** 自建 loopback settings bridge:替代 registerConfigurableProviders,避免模型设置区出现插件条目。 */
|
|
1831
|
-
function registerSettingsBridge(ctx, ns, getModelsState, getSkillsState, getEngineStrategyDir,
|
|
1830
|
+
function registerSettingsBridge(ctx, ns, getModelsState, getSkillsState, getEngineStrategyDir, afterSkillFix, getPresetConfigsDir, afterPresetImport, afterOverridesChange, afterPresetPackageImport) {
|
|
1832
1831
|
let invalidateCachedDescriptor = () => {};
|
|
1833
1832
|
ctx.inject(["settings", "webServer"], (sctx) => {
|
|
1834
1833
|
sctx.effect(() => {
|
|
@@ -1881,7 +1880,7 @@ function registerSettingsBridge(ctx, ns, getModelsState, getSkillsState, getEngi
|
|
|
1881
1880
|
const skillsState = getSkillsState();
|
|
1882
1881
|
let hostDefaultModel;
|
|
1883
1882
|
try {
|
|
1884
|
-
const selection = sctx.settings.get(
|
|
1883
|
+
const selection = sctx.settings.get("agent-default-model");
|
|
1885
1884
|
if (selection !== null && typeof selection === "object") {
|
|
1886
1885
|
const record = selection;
|
|
1887
1886
|
hostDefaultModel = {
|
|
@@ -1967,7 +1966,6 @@ function registerSettingsBridge(ctx, ns, getModelsState, getSkillsState, getEngi
|
|
|
1967
1966
|
path: SETTINGS_BRIDGE_PREFIX + BRIDGE_ENDPOINTS.bootstrap,
|
|
1968
1967
|
handler: async (req, res) => {
|
|
1969
1968
|
if (!guard(req, res)) return;
|
|
1970
|
-
ensureRegistered(sctx);
|
|
1971
1969
|
const descriptor = findDescriptor();
|
|
1972
1970
|
if (descriptor === void 0) {
|
|
1973
1971
|
writeBridgeJson(res, 404, {
|
|
@@ -2018,7 +2016,6 @@ function registerSettingsBridge(ctx, ns, getModelsState, getSkillsState, getEngi
|
|
|
2018
2016
|
path: SETTINGS_BRIDGE_PREFIX + BRIDGE_ENDPOINTS.describe,
|
|
2019
2017
|
handler: async (req, res) => {
|
|
2020
2018
|
if (!guard(req, res)) return;
|
|
2021
|
-
ensureRegistered(sctx);
|
|
2022
2019
|
const descriptor = findDescriptor();
|
|
2023
2020
|
if (descriptor === void 0) {
|
|
2024
2021
|
writeBridgeJson(res, 404, {
|
|
@@ -2040,7 +2037,6 @@ function registerSettingsBridge(ctx, ns, getModelsState, getSkillsState, getEngi
|
|
|
2040
2037
|
path: SETTINGS_BRIDGE_PREFIX + BRIDGE_ENDPOINTS.models,
|
|
2041
2038
|
handler: async (req, res) => {
|
|
2042
2039
|
if (!guard(req, res)) return;
|
|
2043
|
-
ensureRegistered(sctx);
|
|
2044
2040
|
writeBridgeJson(res, 200, {
|
|
2045
2041
|
ok: true,
|
|
2046
2042
|
value: { modelCatalog: await listAdvertisedModels(sctx) }
|
|
@@ -2052,7 +2048,6 @@ function registerSettingsBridge(ctx, ns, getModelsState, getSkillsState, getEngi
|
|
|
2052
2048
|
path: SETTINGS_BRIDGE_PREFIX + BRIDGE_ENDPOINTS.mutate,
|
|
2053
2049
|
handler: async (req, res) => {
|
|
2054
2050
|
if (!guard(req, res)) return;
|
|
2055
|
-
ensureRegistered(sctx);
|
|
2056
2051
|
const { body } = await readBridgeBody(req);
|
|
2057
2052
|
if (body === null || body === void 0 || typeof body !== "object") {
|
|
2058
2053
|
writeBridgeJson(res, 400, {
|
|
@@ -2142,7 +2137,6 @@ function registerSettingsBridge(ctx, ns, getModelsState, getSkillsState, getEngi
|
|
|
2142
2137
|
path: SETTINGS_BRIDGE_PREFIX + BRIDGE_ENDPOINTS.skillFix,
|
|
2143
2138
|
handler: async (req, res) => {
|
|
2144
2139
|
if (!guard(req, res)) return;
|
|
2145
|
-
ensureRegistered(sctx);
|
|
2146
2140
|
const { body } = await readBridgeBody(req);
|
|
2147
2141
|
if (body === null || body === void 0 || typeof body !== "object") {
|
|
2148
2142
|
writeBridgeJson(res, 400, {
|
|
@@ -2701,7 +2695,6 @@ function registerSettingsBridge(ctx, ns, getModelsState, getSkillsState, getEngi
|
|
|
2701
2695
|
path: SETTINGS_BRIDGE_PREFIX + BRIDGE_ENDPOINTS.presetDelete,
|
|
2702
2696
|
handler: async (req, res) => {
|
|
2703
2697
|
if (!guard(req, res)) return;
|
|
2704
|
-
ensureRegistered(sctx);
|
|
2705
2698
|
const { body } = await readBridgeBody(req);
|
|
2706
2699
|
const record = body ?? {};
|
|
2707
2700
|
const id = typeof record.id === "string" ? record.id.trim() : "";
|
|
@@ -2746,7 +2739,6 @@ function registerSettingsBridge(ctx, ns, getModelsState, getSkillsState, getEngi
|
|
|
2746
2739
|
path: SETTINGS_BRIDGE_PREFIX + BRIDGE_ENDPOINTS.presetClone,
|
|
2747
2740
|
handler: async (req, res) => {
|
|
2748
2741
|
if (!guard(req, res)) return;
|
|
2749
|
-
ensureRegistered(sctx);
|
|
2750
2742
|
const { body } = await readBridgeBody(req);
|
|
2751
2743
|
const record = body ?? {};
|
|
2752
2744
|
const id = typeof record.id === "string" ? record.id.trim() : "";
|
|
@@ -2778,7 +2770,6 @@ function registerSettingsBridge(ctx, ns, getModelsState, getSkillsState, getEngi
|
|
|
2778
2770
|
path: SETTINGS_BRIDGE_PREFIX + BRIDGE_ENDPOINTS.presetDuplicate,
|
|
2779
2771
|
handler: async (req, res) => {
|
|
2780
2772
|
if (!guard(req, res)) return;
|
|
2781
|
-
ensureRegistered(sctx);
|
|
2782
2773
|
const { body } = await readBridgeBody(req);
|
|
2783
2774
|
const record = body ?? {};
|
|
2784
2775
|
const id = typeof record.id === "string" ? record.id.trim() : "";
|
|
@@ -2814,7 +2805,6 @@ function registerSettingsBridge(ctx, ns, getModelsState, getSkillsState, getEngi
|
|
|
2814
2805
|
path: SETTINGS_BRIDGE_PREFIX + BRIDGE_ENDPOINTS.presetOpen,
|
|
2815
2806
|
handler: async (req, res) => {
|
|
2816
2807
|
if (!guard(req, res)) return;
|
|
2817
|
-
ensureRegistered(sctx);
|
|
2818
2808
|
const { body } = await readBridgeBody(req);
|
|
2819
2809
|
const record = body ?? {};
|
|
2820
2810
|
const id = typeof record.id === "string" ? record.id.trim() : "";
|
|
@@ -3933,25 +3923,6 @@ ${renderTuiStatus(getSource(), readPresetParams(getPresetConfigsDir?.()), resolv
|
|
|
3933
3923
|
});
|
|
3934
3924
|
}
|
|
3935
3925
|
//#endregion
|
|
3936
|
-
//#region src/runtime/settings-registration.ts
|
|
3937
|
-
/**
|
|
3938
|
-
* 确保 `ns` 已注册:已注册(describe 命中)直接返回 true;未注册时补注册。
|
|
3939
|
-
* 官方 installSettingsSection 的 inject 回调只在 settings 服务首次可用时跑一次,
|
|
3940
|
-
* settings 服务实例被替换(provider fiber reload)后注册丢失且不自动重建;
|
|
3941
|
-
* 本函数由 Web bridge 每次请求前调用兜底。
|
|
3942
|
-
*/
|
|
3943
|
-
function ensureSettingsRegistered(sctx, ns, schema, hooks) {
|
|
3944
|
-
if (sctx.settings.describe({ redactSecrets: true }).some((entry) => String(entry.ns) === String(ns))) return true;
|
|
3945
|
-
try {
|
|
3946
|
-
const scope = sctx.settings.register(ns, schema, { base: hooks.base() });
|
|
3947
|
-
hooks.onRegistered(scope);
|
|
3948
|
-
return true;
|
|
3949
|
-
} catch (error) {
|
|
3950
|
-
hooks.onError(error instanceof Error ? error.message : String(error));
|
|
3951
|
-
return false;
|
|
3952
|
-
}
|
|
3953
|
-
}
|
|
3954
|
-
//#endregion
|
|
3955
3926
|
//#region src/runtime/agents-file.ts
|
|
3956
3927
|
/** AGENTS.md 常驻规则的受管块读写(保留文件其余内容)。 */
|
|
3957
3928
|
const RESIDENT_AGENTS_BEGIN = "# === prompt-tool managed block begin ===";
|
|
@@ -4843,7 +4814,7 @@ function apply(ctx, configIn) {
|
|
|
4843
4814
|
const settingsBridge = registerSettingsBridge(ctx, NS, getModelsState, () => ({
|
|
4844
4815
|
activeSkillsDirs,
|
|
4845
4816
|
skillCatalog
|
|
4846
|
-
}), () => "", (
|
|
4817
|
+
}), () => "", () => {
|
|
4847
4818
|
skillCatalog = catalogOf(readAllSkillsChecked());
|
|
4848
4819
|
cachedSkills.invalidate();
|
|
4849
4820
|
invalidateSkills?.();
|
|
@@ -4911,7 +4882,7 @@ function apply(ctx, configIn) {
|
|
|
4911
4882
|
fallbackText: config.fallbackText,
|
|
4912
4883
|
promptConfigs: Array.isArray(initialSpec?.promptConfigs) ? initialSpec.promptConfigs : []
|
|
4913
4884
|
};
|
|
4914
|
-
const agentPresetsNs =
|
|
4885
|
+
const agentPresetsNs = "agent-presets";
|
|
4915
4886
|
let hostSettingsService;
|
|
4916
4887
|
const readHostDefault = (value) => {
|
|
4917
4888
|
if (value === null || typeof value !== "object") return void 0;
|
|
@@ -5115,26 +5086,6 @@ function apply(ctx, configIn) {
|
|
|
5115
5086
|
};
|
|
5116
5087
|
applyBuiltinTools();
|
|
5117
5088
|
const settingsEntry = currentSource();
|
|
5118
|
-
const ensureRegistered = (sctx) => ensureSettingsRegistered(sctx, NS, PromptSettingsSchema, {
|
|
5119
|
-
base: () => settingsEntry,
|
|
5120
|
-
onRegistered: (scope) => {
|
|
5121
|
-
currentSource = () => scope.get();
|
|
5122
|
-
scope.watch(() => {
|
|
5123
|
-
settingsBridge.invalidateDescriptor();
|
|
5124
|
-
try {
|
|
5125
|
-
applyState();
|
|
5126
|
-
} catch (error) {
|
|
5127
|
-
warn(ctx, `prompt-tool: applyState failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
5128
|
-
}
|
|
5129
|
-
});
|
|
5130
|
-
try {
|
|
5131
|
-
applyState();
|
|
5132
|
-
} catch (error) {
|
|
5133
|
-
warn(ctx, `prompt-tool: applyState failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
5134
|
-
}
|
|
5135
|
-
},
|
|
5136
|
-
onError: (message) => warn(ctx, `prompt-tool: settings register failed: ${message}`)
|
|
5137
|
-
});
|
|
5138
5089
|
/** 阶段 2 迁移:旧全局 settings 引擎参数 → 激活预设 preset.yml(一次性,state.paramsMigrated 后跳过)。
|
|
5139
5090
|
* 兼容旧版预设根内 .pt-params-migrated 标记:存在即视为已迁移,并迁入状态文件后删除。 */
|
|
5140
5091
|
const migrateSettingsParamsToPreset = (sctx) => {
|
|
@@ -5205,19 +5156,23 @@ function apply(ctx, configIn) {
|
|
|
5205
5156
|
if (String(ns) !== String(agentPresetsNs)) return;
|
|
5206
5157
|
syncTemplateFromHostDefault(next);
|
|
5207
5158
|
}), "prompt-tool: follow agent-presets default");
|
|
5208
|
-
|
|
5159
|
+
sctx.settings.installSection(ctx, NS, PromptSettingsSchema, settingsEntry, {
|
|
5160
|
+
setSource: (current) => {
|
|
5161
|
+
currentSource = current;
|
|
5162
|
+
},
|
|
5163
|
+
onChange: () => {
|
|
5164
|
+
settingsBridge.invalidateDescriptor();
|
|
5165
|
+
try {
|
|
5166
|
+
applyState();
|
|
5167
|
+
} catch (error) {
|
|
5168
|
+
warn(ctx, `prompt-tool: applyState failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
5169
|
+
}
|
|
5170
|
+
}
|
|
5171
|
+
});
|
|
5209
5172
|
if (legacyMigrated) syncHostDefault("migrate");
|
|
5210
5173
|
else syncTemplateFromHostDefault();
|
|
5211
5174
|
migrateSettingsParamsToPreset(sctx);
|
|
5212
|
-
sctx.effect(() => () => {
|
|
5213
|
-
currentSource = () => settingsEntry;
|
|
5214
|
-
try {
|
|
5215
|
-
applyState();
|
|
5216
|
-
} catch (error) {
|
|
5217
|
-
warn(ctx, `prompt-tool: applyState failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
5218
|
-
}
|
|
5219
|
-
});
|
|
5220
5175
|
});
|
|
5221
5176
|
}
|
|
5222
5177
|
//#endregion
|
|
5223
|
-
export { BRIDGE_ENDPOINTS, Config, ENGINE_PARAM_KEYS, MODEL_SEGMENT_MAP, PARAM_KEYS, PromptSettingsSchema, SETTINGS_BRIDGE_PREFIX, SKILL_NAME_RE, WRITER_PARAM_KEYS, appendCharacterMemory, appendMemoryFile, apply, applyCharacterToPreset, applyModuleConfigs, buildModuleConfigsFromParams, buildWorldBookEntry, cloneBuiltinPreset, convertStToPreset, createCachedSkillsReader, deleteCharacterCard, deleteWorldBookEntry, detectModels, ensurePresetSeed,
|
|
5178
|
+
export { BRIDGE_ENDPOINTS, Config, ENGINE_PARAM_KEYS, MODEL_SEGMENT_MAP, PARAM_KEYS, PromptSettingsSchema, SETTINGS_BRIDGE_PREFIX, SKILL_NAME_RE, WRITER_PARAM_KEYS, appendCharacterMemory, appendMemoryFile, apply, applyCharacterToPreset, applyModuleConfigs, buildModuleConfigsFromParams, buildWorldBookEntry, cloneBuiltinPreset, convertStToPreset, createCachedSkillsReader, deleteCharacterCard, deleteWorldBookEntry, detectModels, ensurePresetSeed, ensureWebSurface, fixSkillEntry, importCharacterCard, inject, installDefaultModelRoute, isValidSkill, listAdvertisedModels, listBuiltinTemplates, listCharacterCards, listPresets, listSkillFolders, listWorldBookEntries, loadPresetSpec, loadPromptTemplates, loadToolTemplates, mergeSkillDirs, mergeStPresets, migrateLegacyLayout, name, normalizePresetRootDir, parseFrontmatter, processStText, readCharacterMemory, readPluginState, readSkills, registerCharacterTools, registerSettingsBridge, registerTuiCommand, registerWorldBookTools, removeCharacterFromPreset, removeUserPreset, renderComposition, resolvePresetDir, resolvePresetParams, resolveProfileDir, resolveProfileSkillsDir, savePresetParams, stPresetId, syncImportedCharacterMemory, toKebabName, upsertWorldBookEntry, userPresetsDir, validSkills, validatePromptConfigs, writePluginState, writePreset };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugin-prompt-tool",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "DSH 插件:提示词工具,规范模型的思维链与回答内容,提供 Web UI 编辑 preset.md 与 AGENTS.md,并按 skills 目录注册可开关技能。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -45,44 +45,44 @@
|
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
48
|
-
"@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.
|
|
49
|
-
"@deepseek-ai/dsh-api-session-controller": "^0.1.2-alpha.
|
|
50
|
-
"@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.
|
|
51
|
-
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.
|
|
52
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.
|
|
53
|
-
"@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.2-alpha.
|
|
54
|
-
"@deepseek-ai/dsh-client-ui-layout": "^0.1.2-alpha.
|
|
55
|
-
"@deepseek-ai/dsh-client-ui-sidebar": "^0.1.2-alpha.
|
|
56
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.
|
|
57
|
-
"@deepseek-ai/dsh-client-ui-workspace": "^0.1.2-alpha.
|
|
58
|
-
"@deepseek-ai/dsh-commands": "^0.1.2-alpha.
|
|
59
|
-
"@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.
|
|
60
|
-
"@deepseek-ai/dsh-settings": "^0.1.2-alpha.
|
|
61
|
-
"@deepseek-ai/dsh-skill": "^0.1.2-alpha.
|
|
62
|
-
"@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.
|
|
63
|
-
"@deepseek-ai/dsh-tools": "^0.1.2-alpha.
|
|
48
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.2",
|
|
49
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.2-alpha.2",
|
|
50
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.2",
|
|
51
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.2",
|
|
52
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.2",
|
|
53
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.2-alpha.2",
|
|
54
|
+
"@deepseek-ai/dsh-client-ui-layout": "^0.1.2-alpha.2",
|
|
55
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "^0.1.2-alpha.2",
|
|
56
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.2",
|
|
57
|
+
"@deepseek-ai/dsh-client-ui-workspace": "^0.1.2-alpha.2",
|
|
58
|
+
"@deepseek-ai/dsh-commands": "^0.1.2-alpha.2",
|
|
59
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.2",
|
|
60
|
+
"@deepseek-ai/dsh-settings": "^0.1.2-alpha.2",
|
|
61
|
+
"@deepseek-ai/dsh-skill": "^0.1.2-alpha.2",
|
|
62
|
+
"@deepseek-ai/dsh-system-prompt": "^0.1.2-alpha.2",
|
|
63
|
+
"@deepseek-ai/dsh-tools": "^0.1.2-alpha.2",
|
|
64
64
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
65
65
|
"react": "^18.2.0"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
69
|
-
"@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.
|
|
70
|
-
"@deepseek-ai/dsh-api-session-controller": "^0.1.2-alpha.
|
|
71
|
-
"@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.
|
|
72
|
-
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.
|
|
73
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.
|
|
74
|
-
"@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.2-alpha.
|
|
75
|
-
"@deepseek-ai/dsh-client-ui-layout": "^0.1.2-alpha.
|
|
76
|
-
"@deepseek-ai/dsh-client-ui-sidebar": "^0.1.2-alpha.
|
|
77
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.
|
|
78
|
-
"@deepseek-ai/dsh-client-ui-workspace": "^0.1.2-alpha.
|
|
79
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.
|
|
80
|
-
"@deepseek-ai/dsh-commands": "^0.1.2-alpha.
|
|
81
|
-
"@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.
|
|
82
|
-
"@deepseek-ai/dsh-scope": "^0.1.2-alpha.
|
|
83
|
-
"@deepseek-ai/dsh-settings": "^0.1.2-alpha.
|
|
84
|
-
"@deepseek-ai/dsh-skill": "^0.1.2-alpha.
|
|
85
|
-
"@deepseek-ai/dsh-tools": "^0.1.2-alpha.
|
|
69
|
+
"@deepseek-ai/dsh-api-remotes": "^0.1.2-alpha.2",
|
|
70
|
+
"@deepseek-ai/dsh-api-session-controller": "^0.1.2-alpha.2",
|
|
71
|
+
"@deepseek-ai/dsh-client-connection": "^0.1.2-alpha.2",
|
|
72
|
+
"@deepseek-ai/dsh-client-ui-primitives": "^0.1.2-alpha.2",
|
|
73
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.1.2-alpha.2",
|
|
74
|
+
"@deepseek-ai/dsh-client-ui-settings-plugins": "^0.1.2-alpha.2",
|
|
75
|
+
"@deepseek-ai/dsh-client-ui-layout": "^0.1.2-alpha.2",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "^0.1.2-alpha.2",
|
|
77
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.1.2-alpha.2",
|
|
78
|
+
"@deepseek-ai/dsh-client-ui-workspace": "^0.1.2-alpha.2",
|
|
79
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.1.2-alpha.2",
|
|
80
|
+
"@deepseek-ai/dsh-commands": "^0.1.2-alpha.2",
|
|
81
|
+
"@deepseek-ai/dsh-host-webserver": "^0.1.2-alpha.2",
|
|
82
|
+
"@deepseek-ai/dsh-scope": "^0.1.2-alpha.2",
|
|
83
|
+
"@deepseek-ai/dsh-settings": "^0.1.2-alpha.2",
|
|
84
|
+
"@deepseek-ai/dsh-skill": "^0.1.2-alpha.2",
|
|
85
|
+
"@deepseek-ai/dsh-tools": "^0.1.2-alpha.2",
|
|
86
86
|
"@types/node": "^26.2.0",
|
|
87
87
|
"@types/react": "~18.3.1",
|
|
88
88
|
"@types/react-dom": "^18.3.0",
|