@jayyuen66/dsh-dir-prep-organize 0.1.13 → 0.1.15
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/CHANGELOG.md +8 -0
- package/README.md +14 -5
- package/README.zh-CN.md +14 -5
- package/client.js +38 -2229
- package/cordis.patch.yml +4 -0
- package/docs/DETAIL.md +6 -0
- package/docs/DETAIL.zh.md +6 -0
- package/host.js +3 -16
- package/package.json +49 -45
- package/types/src/remote.d.ts +1 -4
- package/types/src/ui-messages.d.ts +7 -2
package/cordis.patch.yml
CHANGED
|
@@ -3,5 +3,9 @@
|
|
|
3
3
|
# 内置精选集由 host 半从 templates.data.mjs 经 defaults 方法按需下发。
|
|
4
4
|
# 架构与数据流见 README 与 host.ts / src/client-entry.ts。
|
|
5
5
|
- insert:
|
|
6
|
+
# 固定 id:该供应行必须保持开启;停用后本包设置卡会失去 shared 客户端供应。
|
|
7
|
+
# 多个插件共用同一个 id,宿主会把开关标成“无法唯一定位”并禁用。
|
|
8
|
+
- id: dsh-plugin-shared
|
|
9
|
+
name: "@jayyuen66/dsh-plugin-shared"
|
|
6
10
|
- id: dir-prep-organize
|
|
7
11
|
name: "@jayyuen66/dsh-dir-prep-organize"
|
package/docs/DETAIL.md
CHANGED
|
@@ -24,3 +24,9 @@ No external CLI, interpreter or credential of its own. It uses the host's model
|
|
|
24
24
|
## Further detail
|
|
25
25
|
|
|
26
26
|
The vendored role library, the generated default-template table and the import-scan depth rules are developer-facing and live in the package README (`README.md` / `README.zh-CN.md`).
|
|
27
|
+
|
|
28
|
+
## Feedback
|
|
29
|
+
|
|
30
|
+
Issues and pull requests are welcome: [https://github.com/JayYuen666/dsh-dir-prep-organize/issues](https://github.com/JayYuen666/dsh-dir-prep-organize/issues).
|
|
31
|
+
|
|
32
|
+
If a plugin fails to boot, include the dsh host version, the profile install shape, and the browser console line. The `missed the module table` line is especially useful: it tells us whether the shared client row was materialized.
|
package/docs/DETAIL.zh.md
CHANGED
|
@@ -24,3 +24,9 @@
|
|
|
24
24
|
## 更完整的说明
|
|
25
25
|
|
|
26
26
|
vendored 角色库、生成的默认模板表、导入扫描的层数规则都属于开发内容,写在随包 README(`README.md` / `README.zh-CN.md`)。
|
|
27
|
+
|
|
28
|
+
## 反馈
|
|
29
|
+
|
|
30
|
+
欢迎提 issue 和 PR:[https://github.com/JayYuen666/dsh-dir-prep-organize/issues](https://github.com/JayYuen666/dsh-dir-prep-organize/issues)。
|
|
31
|
+
|
|
32
|
+
插件启动失败时,请附上 dsh 宿主版本、profile 安装形态和浏览器控制台原文。`missed the module table` 这一行尤其有用:它能直接说明 shared 客户端供应行有没有被物化。
|
package/host.js
CHANGED
|
@@ -2,12 +2,13 @@
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import Schema from "@deepseek-ai/schemastery";
|
|
4
4
|
import { brandString } from "@deepseek-ai/dsh-brand";
|
|
5
|
-
import {
|
|
5
|
+
import { TypertRemoteService } from "@deepseek-ai/dsh-typert-protocol";
|
|
6
6
|
import { LOCALE_SETTINGS_NAMESPACE, messagesFor, resolveLocalePreference } from "@jayyuen66/dsh-plugin-shared/lib/locale";
|
|
7
7
|
import { isRecord } from "@jayyuen66/dsh-plugin-shared/lib/record";
|
|
8
8
|
import { truncateCodePoints } from "@jayyuen66/dsh-plugin-shared/lib/text";
|
|
9
9
|
import { errorText } from "@jayyuen66/dsh-plugin-shared/lib/errors";
|
|
10
10
|
import { claimInstance } from "@jayyuen66/dsh-plugin-shared/lib/instance-lock";
|
|
11
|
+
import { markRemote } from "@jayyuen66/dsh-plugin-shared/lib/remote-marker";
|
|
11
12
|
// src/host-messages.ts
|
|
12
13
|
const HOST_MESSAGES = {
|
|
13
14
|
zh: {
|
|
@@ -405,7 +406,7 @@ const MAX_READ_CONCURRENCY = 64;
|
|
|
405
406
|
/** Node `setTimeout` 的延时上限(2^31-1 ms)。** 超过它 V8 会打一条
|
|
406
407
|
* TimeoutOverflowWarning 然后把延时静默夹成 1 ms**——于是「把超时调大」这个配置意图
|
|
407
408
|
* 被反转成「立刻失败」,且只在 stderr 留一行警告。`Schema.natural()` 不挡这个值。 */
|
|
408
|
-
const MAX_TIMER_MS =
|
|
409
|
+
const MAX_TIMER_MS = 0x7fffffff;
|
|
409
410
|
/**
|
|
410
411
|
* 把一个部署来的数夹进 `[min, max]`,非有限值回落到 `fallback`。
|
|
411
412
|
*
|
|
@@ -1588,20 +1589,6 @@ var DirPrepRemoteService = class extends TypertRemoteService {
|
|
|
1588
1589
|
};
|
|
1589
1590
|
}
|
|
1590
1591
|
};
|
|
1591
|
-
/** 标准装饰器的程序化调用:标记落到真正的原型上,源码不引装饰器语法。 */
|
|
1592
|
-
function markRemote(prototype, methodName) {
|
|
1593
|
-
const context = {
|
|
1594
|
-
kind: "method",
|
|
1595
|
-
name: methodName,
|
|
1596
|
-
static: false,
|
|
1597
|
-
private: false,
|
|
1598
|
-
addInitializer: (initializer) => {
|
|
1599
|
-
Reflect.apply(initializer, Object.create(prototype), []);
|
|
1600
|
-
}
|
|
1601
|
-
};
|
|
1602
|
-
const decorate = Remote(methodName);
|
|
1603
|
-
Reflect.apply(decorate, void 0, [Reflect.get(prototype, methodName), context]);
|
|
1604
|
-
}
|
|
1605
1592
|
markRemote(DirPrepRemoteService.prototype, "defaults");
|
|
1606
1593
|
markRemote(DirPrepRemoteService.prototype, "context");
|
|
1607
1594
|
markRemote(DirPrepRemoteService.prototype, "model");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jayyuen66/dsh-dir-prep-organize",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"description": "dsh 插件:对话输入框「润色」按钮(主键直接润色/▾ 以角色风格润色,结合当前目录 + session 模型润色草稿)+「模板」下拉(内置精选角色集生成自插件 agents/ 角色库,可按部门分组;设置卡可增删改/一键导入内置全部/导入本地角色 .md)",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cordis",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"registry": "https://registry.npmjs.org"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@jayyuen66/dsh-plugin-shared": "^0.2.
|
|
64
|
+
"@jayyuen66/dsh-plugin-shared": "^0.2.12",
|
|
65
65
|
"zod": "4.6.7"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
@@ -69,63 +69,64 @@
|
|
|
69
69
|
"@deepseek-ai/cordis-plugin-group": "1.1.0",
|
|
70
70
|
"@deepseek-ai/cordis-plugin-include": "1.1.0",
|
|
71
71
|
"@deepseek-ai/cosmokit": "1.9.0",
|
|
72
|
-
"@deepseek-ai/dsh-agent-default-model": "0.2.2-rc.
|
|
73
|
-
"@deepseek-ai/dsh-app-boot": "0.2.2-rc.
|
|
74
|
-
"@deepseek-ai/dsh-brand": "0.2.2-rc.
|
|
75
|
-
"@deepseek-ai/dsh-client-locale": "0.2.2-rc.
|
|
76
|
-
"@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.
|
|
77
|
-
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.
|
|
78
|
-
"@deepseek-ai/dsh-client-ui-
|
|
79
|
-
"@deepseek-ai/dsh-client-ui-
|
|
80
|
-
"@deepseek-ai/dsh-client-ui-
|
|
81
|
-
"@deepseek-ai/dsh-
|
|
82
|
-
"@deepseek-ai/dsh-
|
|
83
|
-
"@deepseek-ai/dsh-
|
|
84
|
-
"@deepseek-ai/dsh-
|
|
85
|
-
"@deepseek-ai/dsh-
|
|
86
|
-
"@deepseek-ai/dsh-
|
|
87
|
-
"@deepseek-ai/dsh-
|
|
88
|
-
"@deepseek-ai/dsh-
|
|
89
|
-
"@deepseek-ai/dsh-
|
|
90
|
-
"@deepseek-ai/dsh-
|
|
91
|
-
"@deepseek-ai/dsh-
|
|
92
|
-
"@deepseek-ai/dsh-
|
|
72
|
+
"@deepseek-ai/dsh-agent-default-model": "0.2.2-rc.5",
|
|
73
|
+
"@deepseek-ai/dsh-app-boot": "0.2.2-rc.5",
|
|
74
|
+
"@deepseek-ai/dsh-brand": "0.2.2-rc.5",
|
|
75
|
+
"@deepseek-ai/dsh-client-locale": "0.2.2-rc.5",
|
|
76
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.5",
|
|
77
|
+
"@deepseek-ai/dsh-client-ui-plugin-manager": "0.2.2-rc.5",
|
|
78
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.5",
|
|
79
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.5",
|
|
80
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.5",
|
|
81
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.5",
|
|
82
|
+
"@deepseek-ai/dsh-config-editor": "0.2.2-rc.5",
|
|
83
|
+
"@deepseek-ai/dsh-error": "0.2.2-rc.5",
|
|
84
|
+
"@deepseek-ai/dsh-fs": "0.2.2-rc.5",
|
|
85
|
+
"@deepseek-ai/dsh-home-paths": "0.2.2-rc.5",
|
|
86
|
+
"@deepseek-ai/dsh-launch-environment": "0.2.2-rc.5",
|
|
87
|
+
"@deepseek-ai/dsh-llm": "0.2.2-rc.5",
|
|
88
|
+
"@deepseek-ai/dsh-output-retention": "0.2.2-rc.5",
|
|
89
|
+
"@deepseek-ai/dsh-sandbox": "0.2.2-rc.5",
|
|
90
|
+
"@deepseek-ai/dsh-scope": "0.2.2-rc.5",
|
|
91
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.5",
|
|
92
|
+
"@deepseek-ai/dsh-settings": "0.2.2-rc.5",
|
|
93
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.5",
|
|
93
94
|
"@deepseek-ai/schemastery": "3.19.0",
|
|
94
95
|
"@e18e/eslint-plugin": "0.8.1",
|
|
95
96
|
"@types/node": "26.6.6",
|
|
96
97
|
"@types/react": "19.3.0",
|
|
97
98
|
"@types/react-dom": "19.3.0",
|
|
98
|
-
"@vitest/coverage-v8": "5.1.
|
|
99
|
+
"@vitest/coverage-v8": "5.1.1",
|
|
99
100
|
"eslint-plugin-regexp": "3.3.3",
|
|
100
101
|
"eslint-plugin-sonarjs": "4.2.2",
|
|
101
|
-
"eslint-plugin-zod": "5.
|
|
102
|
-
"fast-check": "4.10.
|
|
102
|
+
"eslint-plugin-zod": "5.3.0",
|
|
103
|
+
"fast-check": "4.10.3",
|
|
103
104
|
"happy-dom": "21.0.4",
|
|
104
|
-
"oxfmt": "0.
|
|
105
|
-
"oxlint": "1.
|
|
106
|
-
"oxlint-tsgolint": "7.0.
|
|
105
|
+
"oxfmt": "0.79.0",
|
|
106
|
+
"oxlint": "1.94.0",
|
|
107
|
+
"oxlint-tsgolint": "7.0.2007",
|
|
107
108
|
"react": "^19.3.0",
|
|
108
109
|
"react-dom": "^19.3.0",
|
|
109
|
-
"rolldown": "1.3.
|
|
110
|
+
"rolldown": "1.3.3",
|
|
110
111
|
"typescript": "7.0.2",
|
|
111
112
|
"vite": "8.3.8",
|
|
112
|
-
"vitest": "5.1.
|
|
113
|
+
"vitest": "5.1.1"
|
|
113
114
|
},
|
|
114
115
|
"peerDependencies": {
|
|
115
116
|
"@deepseek-ai/cordis": "^4.0.5 || ^4.0.6-alpha.2",
|
|
116
117
|
"@deepseek-ai/cosmokit": "^1.8.6 || ^1.8.7-alpha.2",
|
|
117
|
-
"@deepseek-ai/dsh": "^0.2.2-rc.
|
|
118
|
-
"@deepseek-ai/dsh-agent-default-model": "^0.2.2-rc.
|
|
119
|
-
"@deepseek-ai/dsh-brand": "^0.2.2-rc.
|
|
120
|
-
"@deepseek-ai/dsh-client-locale": "^0.2.2-rc.
|
|
121
|
-
"@deepseek-ai/dsh-client-ui-conversation": "^0.2.2-rc.
|
|
122
|
-
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.2-rc.
|
|
123
|
-
"@deepseek-ai/dsh-client-ui-settings": "^0.2.2-rc.
|
|
124
|
-
"@deepseek-ai/dsh-client-ui-slots": "^0.2.2-rc.
|
|
125
|
-
"@deepseek-ai/dsh-fs": "^0.2.2-rc.
|
|
126
|
-
"@deepseek-ai/dsh-llm": "^0.2.2-rc.
|
|
127
|
-
"@deepseek-ai/dsh-session": "^0.2.2-rc.
|
|
128
|
-
"@deepseek-ai/dsh-typert-protocol": "^0.2.2-rc.
|
|
118
|
+
"@deepseek-ai/dsh": "^0.2.2-rc.5",
|
|
119
|
+
"@deepseek-ai/dsh-agent-default-model": "^0.2.2-rc.5",
|
|
120
|
+
"@deepseek-ai/dsh-brand": "^0.2.2-rc.5",
|
|
121
|
+
"@deepseek-ai/dsh-client-locale": "^0.2.2-rc.5",
|
|
122
|
+
"@deepseek-ai/dsh-client-ui-conversation": "^0.2.2-rc.5",
|
|
123
|
+
"@deepseek-ai/dsh-client-ui-renderer": "^0.2.2-rc.5",
|
|
124
|
+
"@deepseek-ai/dsh-client-ui-settings": "^0.2.2-rc.5",
|
|
125
|
+
"@deepseek-ai/dsh-client-ui-slots": "^0.2.2-rc.5",
|
|
126
|
+
"@deepseek-ai/dsh-fs": "^0.2.2-rc.5",
|
|
127
|
+
"@deepseek-ai/dsh-llm": "^0.2.2-rc.5",
|
|
128
|
+
"@deepseek-ai/dsh-session": "^0.2.2-rc.5",
|
|
129
|
+
"@deepseek-ai/dsh-typert-protocol": "^0.2.2-rc.5",
|
|
129
130
|
"@deepseek-ai/schemastery": "^3.19.0"
|
|
130
131
|
},
|
|
131
132
|
"peerDependenciesMeta": {
|
|
@@ -171,7 +172,7 @@
|
|
|
171
172
|
},
|
|
172
173
|
"icon": "icon.svg",
|
|
173
174
|
"engines": {
|
|
174
|
-
"dsh": "^0.2.2-rc.
|
|
175
|
+
"dsh": "^0.2.2-rc.5",
|
|
175
176
|
"node": ">=24.9.0"
|
|
176
177
|
},
|
|
177
178
|
"dsh": {
|
|
@@ -181,7 +182,10 @@
|
|
|
181
182
|
},
|
|
182
183
|
"client": {
|
|
183
184
|
"platform": "web",
|
|
184
|
-
"immediately": true
|
|
185
|
+
"immediately": true,
|
|
186
|
+
"external": [
|
|
187
|
+
"@jayyuen66/dsh-plugin-shared/client"
|
|
188
|
+
]
|
|
185
189
|
}
|
|
186
190
|
},
|
|
187
191
|
"scripts": {
|
package/types/src/remote.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InvocationDescriptor } from "@deepseek-ai/dsh-typert-protocol";
|
|
2
|
+
import type { RemoteHost } from "@jayyuen66/dsh-plugin-shared/lib/typert-client";
|
|
2
3
|
/** Typert Remote 命名空间(client 半只用这一枚)。
|
|
3
4
|
*
|
|
4
5
|
* 宿主半的注册键在 host.ts 的 `DIR_PREP_REMOTE_NAMESPACE`——两半各自打包、client 包
|
|
@@ -22,9 +23,6 @@ export interface DirPrepReader {
|
|
|
22
23
|
sessionId: string;
|
|
23
24
|
}) => Promise<unknown>;
|
|
24
25
|
}
|
|
25
|
-
interface RemoteHost {
|
|
26
|
-
get?: (name: string, strict?: boolean) => unknown;
|
|
27
|
-
}
|
|
28
26
|
/** 造读取器;当前部署没有远程通道时 undefined(卡片只显示读不到)。
|
|
29
27
|
*
|
|
30
28
|
* `get` 这两处的做法和 buildReader 里查命名空间时保持一致,都显式传 `strict = false`:
|
|
@@ -33,4 +31,3 @@ interface RemoteHost {
|
|
|
33
31
|
* `get` 本身也可能抛(宿主版本演进之后,反射接口可能不再接受 bool),接住它只是为了把这
|
|
34
32
|
* 一栏降级成「读不到」,不让整张卡片跟着炸。 */
|
|
35
33
|
export declare function createDirPrepReader(ctx: RemoteHost): DirPrepReader | undefined;
|
|
36
|
-
export {};
|
|
@@ -4,6 +4,7 @@ import type { MessagesCatalog } from "@jayyuen66/dsh-plugin-shared/lib/locale";
|
|
|
4
4
|
export interface UiMessages {
|
|
5
5
|
/** 角色库小节标题与说明(这份列表同时喂「模板」下拉与「润色」▾)。 */
|
|
6
6
|
readonly rolesSection: string;
|
|
7
|
+
readonly rolesCount: string;
|
|
7
8
|
readonly rolesHint: string;
|
|
8
9
|
/** 设置源可写位为 false 时的状态条。 */
|
|
9
10
|
readonly statusReadOnly: string;
|
|
@@ -23,10 +24,14 @@ export interface UiMessages {
|
|
|
23
24
|
readonly revert: string;
|
|
24
25
|
/** 恢复默认按钮 title(说明改动范围与两步确认)。 */
|
|
25
26
|
readonly resetTitle: string;
|
|
26
|
-
/** 恢复默认按钮(已进入确认态)。 */
|
|
27
|
-
readonly resetConfirm: string;
|
|
28
27
|
/** 恢复默认按钮(空闲态);同时充当回执文本里的动作名。 */
|
|
29
28
|
readonly resetDefault: string;
|
|
29
|
+
/** 确认弹窗正文(危险操作统一走宿主 RiskConfirmation,rtk 同款)。 */
|
|
30
|
+
readonly resetConfirmDescription: string;
|
|
31
|
+
readonly resetConfirmAcknowledge: string;
|
|
32
|
+
readonly resetConfirmCancel: string;
|
|
33
|
+
readonly resetConfirmClose: string;
|
|
34
|
+
readonly resetConfirmAction: string;
|
|
30
35
|
/** 卡底的保存语义说明。 */
|
|
31
36
|
readonly footHint: string;
|
|
32
37
|
/** 保存失败前缀(后接错误摘要)。 */
|