@sparkelf/dsh-patch-officecli-deliverables 0.1.0-rc.22
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/LICENSE +21 -0
- package/README.i18n.yaml +6 -0
- package/README.md +11 -0
- package/README.zh.md +11 -0
- package/package.json +39 -0
- package/patches/officecli-deliverables.patch +41 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 DeepSeek
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Bilingual-pair consistency record (docs/i18n/README.md): the git blob hash of each
|
|
2
|
+
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
|
+
# after editing either side, bring the other along and re-record with:
|
|
4
|
+
# pnpm run verify-translation-pairing --write patches/npm/officecli-deliverables/README.md
|
|
5
|
+
README.md: df5d22e6968a0b0c9ae9a75d86f07cd3c8523d88
|
|
6
|
+
README.zh.md: 776368343bd008eed837e42551df0d5748ee85c9
|
package/README.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @sparkelf/dsh-patch-officecli-deliverables
|
|
2
|
+
|
|
3
|
+
English | [中文](README.zh.md)
|
|
4
|
+
|
|
5
|
+
This data-only package patches official DSH revision `d347e703908d0406b7a7ef80e3a0e594d86b2215`. It teaches the existing deliverables projection which `officecli` argv operations write an original Office file, so a completed turn lists the DOCX, XLSX, or PPTX path as a clickable output. It does not render, copy, convert, or cache the file.
|
|
6
|
+
|
|
7
|
+
The payload changes only `packages/client/ui-deliverables/src/client/turn-deliverables.ts`. Remove it after official DSH recognizes the same OfficeCLI output contract.
|
|
8
|
+
|
|
9
|
+
## Model Experience
|
|
10
|
+
|
|
11
|
+
None. The OfficeCLI tool owns model instructions and results; this patch changes the browser's output link only.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# @sparkelf/dsh-patch-officecli-deliverables
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
本data-only package patch official DSH revision `d347e703908d0406b7a7ef80e3a0e594d86b2215`。它让existing deliverables projection识别会写入原始Office文件的`officecli` argv operations,使完成turn把DOCX、XLSX或PPTX path列为可点击产物。它不render、copy、convert或cache该文件。
|
|
6
|
+
|
|
7
|
+
payload只修改`packages/client/ui-deliverables/src/client/turn-deliverables.ts`。Official DSH识别相同OfficeCLI output contract后删除本patch。
|
|
8
|
+
|
|
9
|
+
## 模型体验
|
|
10
|
+
|
|
11
|
+
无。OfficeCLI tool持有model instructions与results;本patch只改变browser output link。
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Data-only exact source patch adding OfficeCLI originals to the existing deliverables and file-link projection",
|
|
3
|
+
"dshPatch": {
|
|
4
|
+
"formatVersion": 1,
|
|
5
|
+
"variants": [
|
|
6
|
+
{
|
|
7
|
+
"dsh": ">=0.1.3-alpha.1",
|
|
8
|
+
"file": "./patches/officecli-deliverables.patch",
|
|
9
|
+
"id": "officecli-deliverables",
|
|
10
|
+
"target": {
|
|
11
|
+
"baseRevision": "d347e703908d0406b7a7ef80e3a0e594d86b2215",
|
|
12
|
+
"kind": "dsh-source",
|
|
13
|
+
"paths": [
|
|
14
|
+
"packages/client/ui-deliverables/src/client/"
|
|
15
|
+
]
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
},
|
|
20
|
+
"exports": {
|
|
21
|
+
"./package.json": "./package.json",
|
|
22
|
+
"./patches/officecli-deliverables.patch": "./patches/officecli-deliverables.patch"
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"patches/*.patch"
|
|
26
|
+
],
|
|
27
|
+
"license": "MIT",
|
|
28
|
+
"name": "@sparkelf/dsh-patch-officecli-deliverables",
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"repository": {
|
|
33
|
+
"directory": "patches/npm/officecli-deliverables",
|
|
34
|
+
"type": "git",
|
|
35
|
+
"url": "git+https://github.com/SparkElf/deepseek-harness-plus.git"
|
|
36
|
+
},
|
|
37
|
+
"type": "module",
|
|
38
|
+
"version": "0.1.0-rc.22"
|
|
39
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
diff --git a/packages/client/ui-deliverables/src/client/turn-deliverables.ts b/packages/client/ui-deliverables/src/client/turn-deliverables.ts
|
|
2
|
+
index 90e3248516..74b08021b5 100644
|
|
3
|
+
--- a/packages/client/ui-deliverables/src/client/turn-deliverables.ts
|
|
4
|
+
+++ b/packages/client/ui-deliverables/src/client/turn-deliverables.ts
|
|
5
|
+
@@ -53,11 +53,36 @@ function mutationPath(name: string, argsRaw: string): string | null {
|
|
6
|
+
return validEditArgs(args) ? pathValue(args.file_path) : null
|
|
7
|
+
case 'str_replace_editor':
|
|
8
|
+
return editorMutationPath(args)
|
|
9
|
+
+ case 'officecli':
|
|
10
|
+
+ return officeCliMutationPath(args)
|
|
11
|
+
default:
|
|
12
|
+
return null
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
+const OFFICECLI_MUTATIONS = new Set([
|
|
17
|
+
+ 'create',
|
|
18
|
+
+ 'set',
|
|
19
|
+
+ 'add',
|
|
20
|
+
+ 'remove',
|
|
21
|
+
+ 'move',
|
|
22
|
+
+ 'swap',
|
|
23
|
+
+ 'batch',
|
|
24
|
+
+ 'refresh',
|
|
25
|
+
+ 'merge',
|
|
26
|
+
+ 'raw-set',
|
|
27
|
+
+ 'add-part',
|
|
28
|
+
+ 'save',
|
|
29
|
+
+ 'close',
|
|
30
|
+
+])
|
|
31
|
+
+
|
|
32
|
+
+/** 读取 OfficeCLI 写命令的原件路径;命令 argv 是该工具的唯一文件合同。 */
|
|
33
|
+
+function officeCliMutationPath(args: Readonly<Record<string, unknown>>): string | null {
|
|
34
|
+
+ if (!Array.isArray(args.command) || !args.command.every(value => typeof value === 'string')) return null
|
|
35
|
+
+ const [operation, file] = args.command
|
|
36
|
+
+ return operation !== undefined && OFFICECLI_MUTATIONS.has(operation) ? pathValue(file) : null
|
|
37
|
+
+}
|
|
38
|
+
+
|
|
39
|
+
/** Validate the fields that an `edit` execution requires. */
|
|
40
|
+
function validEditArgs(args: Readonly<Record<string, unknown>>): boolean {
|
|
41
|
+
return typeof args.old_string === 'string'
|