dsh-plugin-tlrp 0.0.0-stage → 0.4.0

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.
@@ -0,0 +1,18 @@
1
+ # dsh-plugin-tlrp 的 bundle 声明:被列进 profile 的 dsh.profile.bundles 即激活。
2
+ # 形态与 dsh-plugin-prompt-clock / dsh-plugin-tlmemory 一致(dsh.bundle.patch 是宿主唯一认可的激活通道)。
3
+ #
4
+ # 行 id 必须与插件配置 activeProfileEntryId 一致(默认 `tlrp`):设置面板与
5
+ # `settings.mutate(ns, ops)` 都用这个 profile 条目 id 作为命名空间。
6
+ - insert:
7
+ - id: tlrp
8
+ name: dsh-plugin-tlrp
9
+
10
+ # 覆盖写法示例(注意:匹配到同名 id 时整份 config 会被替换,不是深合并):
11
+ #
12
+ # - id: tlrp
13
+ # config:
14
+ # mode: rp
15
+ # activeCharacterId: firefly
16
+ # enableStatusFooter: true
17
+ # customSceneOverride: 匹诺康尼·筑梦边境天台
18
+ # timeZone: Asia/Shanghai
package/icon.svg ADDED
@@ -0,0 +1,18 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64" role="img" aria-label="TLRP dual-mode roleplay router">
2
+ <defs>
3
+ <linearGradient id="tlrpBg" x1="0" y1="0" x2="1" y2="1">
4
+ <stop offset="0" stop-color="#0d1b2a"/>
5
+ <stop offset="1" stop-color="#132b33"/>
6
+ </linearGradient>
7
+ <linearGradient id="tlrpGlow" x1="0" y1="0" x2="1" y2="0">
8
+ <stop offset="0" stop-color="#7ff3d0"/>
9
+ <stop offset="1" stop-color="#4ec9ff"/>
10
+ </linearGradient>
11
+ </defs>
12
+ <rect x="2" y="2" width="60" height="60" rx="16" fill="url(#tlrpBg)"/>
13
+ <path d="M32 12a20 20 0 1 0 0 40 16 16 0 0 1 0-40z" fill="url(#tlrpGlow)" opacity="0.92"/>
14
+ <path d="M40 16l10 16-10 16-3.4-5.4L44 32l-7.4-10.6z" fill="#eaf7ff" opacity="0.9"/>
15
+ <circle cx="46" cy="20" r="2" fill="#ffd36e"/>
16
+ <circle cx="50" cy="32" r="1.5" fill="#ffd36e" opacity="0.8"/>
17
+ <circle cx="46" cy="44" r="2" fill="#ffd36e" opacity="0.65"/>
18
+ </svg>
package/index.cjs ADDED
@@ -0,0 +1,37 @@
1
+ 'use strict'
2
+
3
+ /**
4
+ * dsh-plugin-tlrp(CommonJS 入口)
5
+ *
6
+ * 与 index.js 等价:同一个实现源 `lib/core.cjs` + `lib/schema.cjs`。
7
+ * 宿主用 `import()` 加载时走 index.js,用 `require()` 加载时走这里。
8
+ */
9
+
10
+ const core = require('./lib/core.cjs')
11
+ const { buildConfig } = require('./lib/schema.cjs')
12
+ const { loadSchemastery } = require('./lib/resolve.cjs')
13
+
14
+ const plugin = core.createPlugin()
15
+
16
+ /** 解析 schemastery;失败时为 undefined(插件仍可运行,只是没有设置表单)。 */
17
+ const resolved = loadSchemastery(require)
18
+ if (!resolved.z) {
19
+ console.warn(`[tlrp] 未能解析 @deepseek-ai/schemastery,设置表单将不可用;尝试记录:${resolved.attempts.join(' | ')}`)
20
+ }
21
+
22
+ const Config = resolved.z ? buildConfig(resolved.z) : undefined
23
+
24
+ const name = plugin.name
25
+ const inject = []
26
+
27
+ const apply = plugin.apply
28
+
29
+ module.exports = {
30
+ name,
31
+ inject,
32
+ apply,
33
+ Config,
34
+ // 供测试与诊断使用
35
+ __internals: core,
36
+ __schemastery: { source: resolved.source, attempts: resolved.attempts },
37
+ }
package/index.js ADDED
@@ -0,0 +1,34 @@
1
+ /**
2
+ * dsh-plugin-tlrp(ESM 入口)
3
+ *
4
+ * 实现源在 lib/core.cjs / lib/schema.cjs,index.cjs 与这里只做绑定,
5
+ * 避免双入口出现两份会漂移的逻辑。
6
+ */
7
+
8
+ import { createRequire } from 'node:module'
9
+
10
+ const require = createRequire(import.meta.url)
11
+
12
+ const core = require('./lib/core.cjs')
13
+ const { buildConfig } = require('./lib/schema.cjs')
14
+ const { loadSchemastery } = require('./lib/resolve.cjs')
15
+
16
+ const plugin = core.createPlugin()
17
+
18
+ /** 解析 schemastery;失败时为 undefined(插件仍可运行,只是没有设置表单)。 */
19
+ const resolved = loadSchemastery(require)
20
+ if (!resolved.z) {
21
+ console.warn(`[tlrp] 未能解析 @deepseek-ai/schemastery,设置表单将不可用;尝试记录:${resolved.attempts.join(' | ')}`)
22
+ }
23
+
24
+ export const Config = resolved.z ? buildConfig(resolved.z) : undefined
25
+
26
+ export const name = plugin.name
27
+
28
+ export const inject = []
29
+
30
+ export const apply = plugin.apply
31
+
32
+ export const __internals = core
33
+
34
+ export const __schemastery = { source: resolved.source, attempts: resolved.attempts }