@sparkelf/dsh-patch-legacy-code-preset 0.1.0-rc.22 → 0.1.0-rc.26
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.i18n.yaml +2 -2
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/package.json +3 -3
- package/patches/legacy-code-preset.patch +10 -10
package/README.i18n.yaml
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write patches/npm/legacy-code-preset/README.md
|
|
5
|
-
README.md:
|
|
6
|
-
README.zh.md:
|
|
5
|
+
README.md: 9f9623b4ee704768729f3a8afd3293c9eb377eb9
|
|
6
|
+
README.zh.md: 782564481ba7230e382afa498304e07e8f6f5357
|
package/README.md
CHANGED
|
@@ -4,6 +4,6 @@ English | [中文](README.zh.md)
|
|
|
4
4
|
|
|
5
5
|
This data-only package preserves sessions created before the official `code` agent preset was renamed to `ptc`. Resume first resolves a real `code` preset, then falls back to `ptc` only when `code` is absent; the browser labels that persisted legacy id as the localized PTC preset. Session logs remain unchanged.
|
|
6
6
|
|
|
7
|
-
The target is exact official source revision `
|
|
7
|
+
The target is exact official source revision `fb2c4b9e698e30edb738bca4cf0618587db7d203`. The payload is applied before that source tree is built. The package has no JavaScript entry, lifecycle script, Cordis plugin, accepted-fork fallback, or alternate variant.
|
|
8
8
|
|
|
9
9
|
Retire this package when official DSH provides equivalent legacy preset resolution and display behavior.
|
package/README.zh.md
CHANGED
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
|
|
5
5
|
该data-only package让official `code` agent preset改名为`ptc`之前创建的会话仍可恢复。恢复时先解析真实存在的`code` preset;只有`code`不存在时才回退到`ptc`。浏览器把该持久化旧id显示为本地化PTC preset,Session日志保持原样。
|
|
6
6
|
|
|
7
|
-
target是exact official source revision `
|
|
7
|
+
target是exact official source revision `fb2c4b9e698e30edb738bca4cf0618587db7d203`,payload在该source tree build前应用。本package没有JavaScript entry、lifecycle script、Cordis plugin、accepted-fork fallback或alternate variant。
|
|
8
8
|
|
|
9
9
|
official DSH提供同等legacy preset解析与显示行为后,retire本package。
|
package/package.json
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
"formatVersion": 1,
|
|
5
5
|
"variants": [
|
|
6
6
|
{
|
|
7
|
-
"dsh": ">=0.1.
|
|
7
|
+
"dsh": ">=0.1.5-rc.2",
|
|
8
8
|
"file": "./patches/legacy-code-preset.patch",
|
|
9
9
|
"id": "legacy-code-preset-ptc-compatibility",
|
|
10
10
|
"target": {
|
|
11
|
-
"baseRevision": "
|
|
11
|
+
"baseRevision": "fb2c4b9e698e30edb738bca4cf0618587db7d203",
|
|
12
12
|
"kind": "dsh-source",
|
|
13
13
|
"paths": [
|
|
14
14
|
"packages/api/session-controller/src/",
|
|
@@ -34,5 +34,5 @@
|
|
|
34
34
|
"url": "git+https://github.com/SparkElf/deepseek-harness-plus.git"
|
|
35
35
|
},
|
|
36
36
|
"type": "module",
|
|
37
|
-
"version": "0.1.0-rc.
|
|
37
|
+
"version": "0.1.0-rc.26"
|
|
38
38
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/packages/api/session-controller/src/agent.ts b/packages/api/session-controller/src/agent.ts
|
|
2
|
-
index
|
|
2
|
+
index dd41090c22..8c2cd5029b 100644
|
|
3
3
|
--- a/packages/api/session-controller/src/agent.ts
|
|
4
4
|
+++ b/packages/api/session-controller/src/agent.ts
|
|
5
5
|
@@ -12,10 +12,13 @@ import { ReasoningEffortId } from '@deepseek-ai/dsh-llm'
|
|
@@ -17,10 +17,10 @@ index b1f1872662..0dbc14092a 100644
|
|
|
17
17
|
/** Cold Session identity absent from persistence. */
|
|
18
18
|
export class ApiSessionNotFound extends Error {}
|
|
19
19
|
|
|
20
|
-
@@ -
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
20
|
+
@@ -379,7 +382,15 @@ export class ApiSessionAgentController {
|
|
21
|
+
if (presets === undefined) {
|
|
22
|
+
return { setup: (_agentCtx, agent) => { this.installSelection(agent) } }
|
|
23
|
+
}
|
|
24
24
|
- const resolvedId = (await presets.resolve(presetId)).id
|
|
25
25
|
+ let resolved
|
|
26
26
|
+ try {
|
|
@@ -33,9 +33,9 @@ index b1f1872662..0dbc14092a 100644
|
|
|
33
33
|
+ const resolvedId = resolved.id
|
|
34
34
|
return {
|
|
35
35
|
agentPreset: resolvedId,
|
|
36
|
-
setup: async (agentCtx) => {
|
|
36
|
+
setup: async (agentCtx, agent) => {
|
|
37
37
|
diff --git a/packages/api/session-controller/tests/agent.host.spec.ts b/packages/api/session-controller/tests/agent.host.spec.ts
|
|
38
|
-
index
|
|
38
|
+
index 586d7b4e7b..8f3d42a404 100644
|
|
39
39
|
--- a/packages/api/session-controller/tests/agent.host.spec.ts
|
|
40
40
|
+++ b/packages/api/session-controller/tests/agent.host.spec.ts
|
|
41
41
|
@@ -8,6 +8,7 @@ import { agentPresetProjectionDefinition } from '@deepseek-ai/dsh-agent-presets'
|
|
@@ -85,9 +85,9 @@ index d5b569aa49..7ddb1a931f 100644
|
|
|
85
85
|
it('rejects an ownership race before resume and a persisted cwd conflict', async () => {
|
|
86
86
|
const child = await harness()
|
|
87
87
|
const childMeta = header('resume-child-race')
|
|
88
|
-
@@ -
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
@@ -452,4 +485,29 @@ describe('ApiSession create or adoption', () => {
|
|
89
|
+
await expect(agents.ensureSession(SessionId('mkdir-failure'), join(file, 'child'), false))
|
|
90
|
+
.rejects.toThrow('failed to ensure project directory')
|
|
91
91
|
})
|
|
92
92
|
+
|
|
93
93
|
+ it('falls back from a missing legacy code preset to ptc', async () => {
|