dsh-plugins-jizuo-creator-video 0.3.28 → 0.3.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/node_modules/@jizuo/video-plugin/README.md +3 -3
- package/node_modules/@jizuo/video-plugin/node_modules/@jizuo/plugin/README.md +3 -3
- package/node_modules/@jizuo/video-plugin/node_modules/@jizuo/plugin/lib/client.js +5 -2
- package/node_modules/@jizuo/video-plugin/node_modules/@jizuo/plugin/lib/dream-worker.js +17 -2
- package/node_modules/@jizuo/video-plugin/node_modules/@jizuo/plugin/lib/index.js +69 -2
- package/node_modules/@jizuo/video-plugin/node_modules/@jizuo/plugin/package.json +1 -1
- package/node_modules/@jizuo/video-plugin/package.json +4 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ dsh-plugins-jizuo-creator-video
|
|
|
12
12
|
dsh plugin --profile desktop add dsh-plugins-jizuo-creator-video
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
这是已验证 v0.3.29 插件包的 npm 安装入口,内含原始插件及共享核心,无需额外安装依赖。
|
|
16
16
|
|
|
17
17
|
已有 GitHub 安装版本时,请先卸载对应的旧安装项,再安装此 npm 包,完成后重启 DSH;卸载插件不会删除作品或对话。不要同时安装同一功能的 GitHub 包与 npm 包。
|
|
18
18
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
支持 **DeepSeek Harness Desktop 0.2.0-rc.2**。在左侧「插件」→「添加插件」粘贴下面这一行,确认来源后安装:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
https://github.com/ShikangPang/jizuo-creator-video/releases/download/v0.3.
|
|
10
|
+
https://github.com/ShikangPang/jizuo-creator-video/releases/download/v0.3.29/jizuo-video-plugin-0.3.29.tgz
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
只填安装包地址,不要填整个安装命令。安装完成后「已安装」中显示「即作视频」,可分别启用、关闭、配置或卸载。共享核心已包含在安装包中,自动加载,不需要另装即作桌面端或手动安装核心插件。保留 Harness 原有新会话、插件与工作区入口;创作项目统一显示在工作区区域,小说和视频以前置图标区分,不再提供独立的创作面板。
|
|
@@ -17,7 +17,7 @@ https://github.com/ShikangPang/jizuo-creator-video/releases/download/v0.3.28/jiz
|
|
|
17
17
|
也可使用 Desktop 菜单安装的 dsh 命令:
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
|
-
dsh plugin --profile desktop add https://github.com/ShikangPang/jizuo-creator-video/releases/download/v0.3.
|
|
20
|
+
dsh plugin --profile desktop add https://github.com/ShikangPang/jizuo-creator-video/releases/download/v0.3.29/jizuo-video-plugin-0.3.29.tgz
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
源码克隆后运行 `node scripts/install.mjs --all` 一次安装五个插件,默认 desktop;Web 用户显式传 `--profile web`。脚本严格检查宿主版本。不要用旧版全局 dsh 命令安装到新版 Desktop,也不要绕过兼容检查。
|
|
@@ -26,7 +26,7 @@ dsh plugin --profile desktop add https://github.com/ShikangPang/jizuo-creator-vi
|
|
|
26
26
|
|
|
27
27
|
启用即作写作插件后,点击工作区列表顶部的“导入小说”。支持 TXT、Markdown 和 DOCX,单文件最大 10 MB。选择文件后预览章节、修改作品名称,确认后创建新的小说项目,展开“正文”即可编辑。取消预览不会创建作品;首章前的内容保留为前言。TXT 支持 UTF-8 和 GB18030 编码。
|
|
28
28
|
|
|
29
|
-
已安装多个即作插件时,请将它们一并更新到 0.3.
|
|
29
|
+
已安装多个即作插件时,请将它们一并更新到 0.3.29,并重启 Harness,使共享核心版本一致。
|
|
30
30
|
|
|
31
31
|
## 项目与数据
|
|
32
32
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
支持 **DeepSeek Harness Desktop 0.2.0-rc.2**。在左侧「插件」→「添加插件」粘贴下面这一行,确认来源后安装:
|
|
8
8
|
|
|
9
9
|
```text
|
|
10
|
-
https://github.com/ShikangPang/jizuo-creator-writing/releases/download/v0.3.
|
|
10
|
+
https://github.com/ShikangPang/jizuo-creator-writing/releases/download/v0.3.29/jizuo-writing-plugin-0.3.29.tgz
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
只填安装包地址,不要填整个安装命令。安装完成后「已安装」中显示「即作写作」,可分别启用、关闭、配置或卸载。共享核心已包含在安装包中,自动加载,不需要另装即作桌面端或手动安装核心插件。保留 Harness 原有新会话、插件与工作区入口;创作项目统一显示在工作区区域,小说和视频以前置图标区分,不再提供独立的创作面板。
|
|
@@ -17,7 +17,7 @@ https://github.com/ShikangPang/jizuo-creator-writing/releases/download/v0.3.28/j
|
|
|
17
17
|
也可使用 Desktop 菜单安装的 dsh 命令:
|
|
18
18
|
|
|
19
19
|
```sh
|
|
20
|
-
dsh plugin --profile desktop add https://github.com/ShikangPang/jizuo-creator-writing/releases/download/v0.3.
|
|
20
|
+
dsh plugin --profile desktop add https://github.com/ShikangPang/jizuo-creator-writing/releases/download/v0.3.29/jizuo-writing-plugin-0.3.29.tgz
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
源码克隆后运行 `node scripts/install.mjs --all` 一次安装五个插件,默认 desktop;Web 用户显式传 `--profile web`。脚本严格检查宿主版本。不要用旧版全局 dsh 命令安装到新版 Desktop,也不要绕过兼容检查。
|
|
@@ -26,7 +26,7 @@ dsh plugin --profile desktop add https://github.com/ShikangPang/jizuo-creator-wr
|
|
|
26
26
|
|
|
27
27
|
启用即作写作插件后,点击工作区列表顶部的“导入小说”。支持 TXT、Markdown 和 DOCX,单文件最大 10 MB。选择文件后预览章节、修改作品名称,确认后创建新的小说项目,展开“正文”即可编辑。取消预览不会创建作品;首章前的内容保留为前言。TXT 支持 UTF-8 和 GB18030 编码。
|
|
28
28
|
|
|
29
|
-
已安装多个即作插件时,请将它们一并更新到 0.3.
|
|
29
|
+
已安装多个即作插件时,请将它们一并更新到 0.3.29,并重启 Harness,使共享核心版本一致。
|
|
30
30
|
|
|
31
31
|
## 项目与数据
|
|
32
32
|
|
|
@@ -10536,7 +10536,6 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10536
10536
|
pluginEnabled(expandedWorkId, "writing")
|
|
10537
10537
|
]);
|
|
10538
10538
|
(0, react.useEffect)(() => {
|
|
10539
|
-
if (subscribeWorksChanges === void 0) return;
|
|
10540
10539
|
let active = true;
|
|
10541
10540
|
let unlisten = () => void 0;
|
|
10542
10541
|
let refreshing = false;
|
|
@@ -10578,7 +10577,10 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10578
10577
|
} while (active && refreshQueued);
|
|
10579
10578
|
refreshing = false;
|
|
10580
10579
|
};
|
|
10581
|
-
|
|
10580
|
+
const timer = window.setInterval(() => {
|
|
10581
|
+
refresh();
|
|
10582
|
+
}, BACKGROUND_REFRESH_INTERVAL_MS);
|
|
10583
|
+
if (subscribeWorksChanges !== void 0) Promise.resolve().then(() => subscribeWorksChanges(() => {
|
|
10582
10584
|
refresh();
|
|
10583
10585
|
})).then((dispose) => {
|
|
10584
10586
|
if (active) unlisten = dispose;
|
|
@@ -10586,6 +10588,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
10586
10588
|
}).catch(() => {});
|
|
10587
10589
|
return () => {
|
|
10588
10590
|
active = false;
|
|
10591
|
+
window.clearInterval(timer);
|
|
10589
10592
|
unlisten();
|
|
10590
10593
|
};
|
|
10591
10594
|
}, [remote, subscribeWorksChanges]);
|
|
@@ -64773,7 +64773,8 @@ async function previewImport(rawInput) {
|
|
|
64773
64773
|
warnings.push(...converted.messages.map((message) => message.message));
|
|
64774
64774
|
} else if (input.format === "markdown") chapters = splitMarkdown(decodeText(source), suggestedTitle);
|
|
64775
64775
|
else chapters = splitText(decodeText(source), suggestedTitle);
|
|
64776
|
-
|
|
64776
|
+
chapters = chapters.filter((chapter) => chapter.content.trim() !== "");
|
|
64777
|
+
if (chapters.length === 0) throw new JizuoError("validation_error", "文件中没有可导入的正文,请检查文件内容");
|
|
64777
64778
|
const sourceHash = createHash("sha256").update(source).digest("hex");
|
|
64778
64779
|
const previewHash = sha256Text(JSON.stringify({
|
|
64779
64780
|
sourcePath: input.sourcePath,
|
|
@@ -66517,6 +66518,12 @@ var MultiRootWorkDomainService = class extends WorkDomainService {
|
|
|
66517
66518
|
}
|
|
66518
66519
|
return entries.sort((left, right) => right.trashedAt.localeCompare(left.trashedAt));
|
|
66519
66520
|
}
|
|
66521
|
+
/** Exact original folders of trashed projects, retaining their owning storage root. */
|
|
66522
|
+
async listTrashedWorkPaths() {
|
|
66523
|
+
const paths = [];
|
|
66524
|
+
for (const { root, service } of await this.availableServices()) for (const entry of await service.listTrash()) if (entry.kind === "work") paths.push(resolveWithin(root, entry.originalRelativePath));
|
|
66525
|
+
return paths;
|
|
66526
|
+
}
|
|
66520
66527
|
async restoreFromTrash(input) {
|
|
66521
66528
|
return (await this.serviceForTrash(input.trashId)).restoreFromTrash(input);
|
|
66522
66529
|
}
|
|
@@ -71705,6 +71712,11 @@ const NOOP_HOSTED_MODELS = {
|
|
|
71705
71712
|
async clear() {}
|
|
71706
71713
|
};
|
|
71707
71714
|
var JizuoService = class extends MultiRootWorkDomainService {
|
|
71715
|
+
reconcileProjectWorkspaces;
|
|
71716
|
+
async listWorks() {
|
|
71717
|
+
await this.reconcileProjectWorkspaces?.();
|
|
71718
|
+
return super.listWorks();
|
|
71719
|
+
}
|
|
71708
71720
|
video;
|
|
71709
71721
|
chatMediaRepository;
|
|
71710
71722
|
chatMedia;
|
|
@@ -71789,7 +71801,10 @@ var JizuoService = class extends MultiRootWorkDomainService {
|
|
|
71789
71801
|
const parsed = MoveToTrashInput.parse(input);
|
|
71790
71802
|
const remove = async () => {
|
|
71791
71803
|
const entry = await super.moveToTrash(parsed);
|
|
71792
|
-
if (entry.kind === "work")
|
|
71804
|
+
if (entry.kind === "work") {
|
|
71805
|
+
this.clearMemoryServices(entry.workId);
|
|
71806
|
+
await this.reconcileProjectWorkspaces?.();
|
|
71807
|
+
}
|
|
71793
71808
|
return entry;
|
|
71794
71809
|
};
|
|
71795
71810
|
return this.dreamHost ? this.dreamHost.withWorkMutation(parsed.workId, remove) : remove();
|
|
@@ -9977,6 +9977,50 @@ var ChatMediaService = class {
|
|
|
9977
9977
|
}
|
|
9978
9978
|
};
|
|
9979
9979
|
//#endregion
|
|
9980
|
+
//#region src/project-workspace-cleanup.ts
|
|
9981
|
+
async function missingPathKey(path) {
|
|
9982
|
+
try {
|
|
9983
|
+
await lstat(path);
|
|
9984
|
+
return;
|
|
9985
|
+
} catch (error) {
|
|
9986
|
+
if (error.code !== "ENOENT") throw error;
|
|
9987
|
+
}
|
|
9988
|
+
const key = join(await realpath(dirname(path)), basename(path));
|
|
9989
|
+
return process.platform === "win32" ? key.toLowerCase() : key;
|
|
9990
|
+
}
|
|
9991
|
+
/** Reconcile only paths proven to belong to trashed projects, never arbitrary missing folders. */
|
|
9992
|
+
function attachProjectWorkspaceCleanup(service, registry, reportError) {
|
|
9993
|
+
let active = true;
|
|
9994
|
+
let tail = Promise.resolve();
|
|
9995
|
+
const reconcile = () => {
|
|
9996
|
+
tail = tail.then(async () => {
|
|
9997
|
+
if (!active) return;
|
|
9998
|
+
const paths = /* @__PURE__ */ new Set();
|
|
9999
|
+
for (const path of await service.listTrashedWorkPaths()) {
|
|
10000
|
+
const key = await missingPathKey(path);
|
|
10001
|
+
if (key) paths.add(key);
|
|
10002
|
+
}
|
|
10003
|
+
if (paths.size === 0) return;
|
|
10004
|
+
for (const workspace of [...registry.list()]) {
|
|
10005
|
+
if (!active) return;
|
|
10006
|
+
let key;
|
|
10007
|
+
try {
|
|
10008
|
+
key = await missingPathKey(workspace.path);
|
|
10009
|
+
} catch {
|
|
10010
|
+
continue;
|
|
10011
|
+
}
|
|
10012
|
+
if (active && key && paths.has(key)) await registry.delete(workspace.id);
|
|
10013
|
+
}
|
|
10014
|
+
}).catch(reportError);
|
|
10015
|
+
return tail;
|
|
10016
|
+
};
|
|
10017
|
+
service.reconcileProjectWorkspaces = reconcile;
|
|
10018
|
+
return () => {
|
|
10019
|
+
active = false;
|
|
10020
|
+
if (service.reconcileProjectWorkspaces === reconcile) service.reconcileProjectWorkspaces = void 0;
|
|
10021
|
+
};
|
|
10022
|
+
}
|
|
10023
|
+
//#endregion
|
|
9980
10024
|
//#region ../writing-plugin/src/tool-input-schema.ts
|
|
9981
10025
|
function parseToolInput(schema, input, name) {
|
|
9982
10026
|
const parsed = schema.safeParse(input);
|
|
@@ -68588,7 +68632,8 @@ async function previewImport(rawInput) {
|
|
|
68588
68632
|
warnings.push(...converted.messages.map((message) => message.message));
|
|
68589
68633
|
} else if (input.format === "markdown") chapters = splitMarkdown(decodeText(source), suggestedTitle);
|
|
68590
68634
|
else chapters = splitText(decodeText(source), suggestedTitle);
|
|
68591
|
-
|
|
68635
|
+
chapters = chapters.filter((chapter) => chapter.content.trim() !== "");
|
|
68636
|
+
if (chapters.length === 0) throw new JizuoError("validation_error", "文件中没有可导入的正文,请检查文件内容");
|
|
68592
68637
|
const sourceHash = createHash("sha256").update(source).digest("hex");
|
|
68593
68638
|
const previewHash = sha256Text(JSON.stringify({
|
|
68594
68639
|
sourcePath: input.sourcePath,
|
|
@@ -70332,6 +70377,12 @@ var MultiRootWorkDomainService = class extends WorkDomainService {
|
|
|
70332
70377
|
}
|
|
70333
70378
|
return entries.sort((left, right) => right.trashedAt.localeCompare(left.trashedAt));
|
|
70334
70379
|
}
|
|
70380
|
+
/** Exact original folders of trashed projects, retaining their owning storage root. */
|
|
70381
|
+
async listTrashedWorkPaths() {
|
|
70382
|
+
const paths = [];
|
|
70383
|
+
for (const { root, service } of await this.availableServices()) for (const entry of await service.listTrash()) if (entry.kind === "work") paths.push(resolveWithin(root, entry.originalRelativePath));
|
|
70384
|
+
return paths;
|
|
70385
|
+
}
|
|
70335
70386
|
async restoreFromTrash(input) {
|
|
70336
70387
|
return (await this.serviceForTrash(input.trashId)).restoreFromTrash(input);
|
|
70337
70388
|
}
|
|
@@ -137068,6 +137119,11 @@ const NOOP_HOSTED_MODELS = {
|
|
|
137068
137119
|
async clear() {}
|
|
137069
137120
|
};
|
|
137070
137121
|
var JizuoService = class extends MultiRootWorkDomainService {
|
|
137122
|
+
reconcileProjectWorkspaces;
|
|
137123
|
+
async listWorks() {
|
|
137124
|
+
await this.reconcileProjectWorkspaces?.();
|
|
137125
|
+
return super.listWorks();
|
|
137126
|
+
}
|
|
137071
137127
|
video;
|
|
137072
137128
|
chatMediaRepository;
|
|
137073
137129
|
chatMedia;
|
|
@@ -137152,7 +137208,10 @@ var JizuoService = class extends MultiRootWorkDomainService {
|
|
|
137152
137208
|
const parsed = MoveToTrashInput.parse(input);
|
|
137153
137209
|
const remove = async () => {
|
|
137154
137210
|
const entry = await super.moveToTrash(parsed);
|
|
137155
|
-
if (entry.kind === "work")
|
|
137211
|
+
if (entry.kind === "work") {
|
|
137212
|
+
this.clearMemoryServices(entry.workId);
|
|
137213
|
+
await this.reconcileProjectWorkspaces?.();
|
|
137214
|
+
}
|
|
137156
137215
|
return entry;
|
|
137157
137216
|
};
|
|
137158
137217
|
return this.dreamHost ? this.dreamHost.withWorkMutation(parsed.workId, remove) : remove();
|
|
@@ -142979,6 +143038,14 @@ async function applyCreationRuntime(ctx, config) {
|
|
|
142979
143038
|
hostedModels,
|
|
142980
143039
|
accountEnabled: config.hostUi !== "native"
|
|
142981
143040
|
});
|
|
143041
|
+
if (config.hostUi === "native") ctx.inject(["workspaceRegistry"], (workspaceContext) => {
|
|
143042
|
+
const registry = workspaceContext.get("workspaceRegistry");
|
|
143043
|
+
const dispose = attachProjectWorkspaceCleanup(service, registry, () => {
|
|
143044
|
+
workspaceContext.logger.warn("即作工作区登记清理暂未完成,将在刷新项目时重试。");
|
|
143045
|
+
});
|
|
143046
|
+
workspaceContext.effect(() => dispose, "jizuo-project-workspaces");
|
|
143047
|
+
service.reconcileProjectWorkspaces?.();
|
|
143048
|
+
});
|
|
142982
143049
|
if (config.hostUi === "native") service.setAccountEnabled(false).catch(() => {});
|
|
142983
143050
|
ctx.effect(() => () => {
|
|
142984
143051
|
service.setAccountEnabled(false).catch(() => {});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jizuo/video-plugin",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.29",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./lib/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@jizuo/plugin": "0.3.
|
|
33
|
+
"@jizuo/plugin": "0.3.29"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@deepseek-ai/cordis": "4.0.4",
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"type": "git",
|
|
65
65
|
"url": "https://github.com/ShikangPang/jizuo-creator-video.git"
|
|
66
66
|
},
|
|
67
|
+
"packageManager": "pnpm@11.7.0",
|
|
67
68
|
"description": "即作视频:独立视频项目、小说改编剧本与视频编辑",
|
|
68
69
|
"keywords": [
|
|
69
70
|
"dsh-plugin",
|
|
@@ -79,4 +80,4 @@
|
|
|
79
80
|
"pack:core": "pnpm --dir core pack",
|
|
80
81
|
"verify:package": "node --experimental-vm-modules scripts/verify-package.mjs"
|
|
81
82
|
}
|
|
82
|
-
}
|
|
83
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-plugins-jizuo-creator-video",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.29",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "即作视频:独立视频项目、小说改编剧本与视频编辑",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
},
|
|
25
25
|
"icon": "./icon.svg",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@jizuo/video-plugin": "0.3.
|
|
27
|
+
"@jizuo/video-plugin": "0.3.29"
|
|
28
28
|
},
|
|
29
29
|
"bundledDependencies": [
|
|
30
30
|
"@jizuo/video-plugin"
|