@deepseek-ai/dsh-harness-dev-context 0.2.1-rc.3 → 0.2.2-alpha.2
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/lib/index.js +4 -3
- package/lib/types/index.d.ts +2 -15
- package/locale/de.json +6 -0
- package/locale/en.json +6 -0
- package/locale/es.json +6 -0
- package/locale/fr.json +6 -0
- package/locale/ja.json +6 -0
- package/locale/pt.json +6 -0
- package/locale/ru.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +16 -14
package/README.i18n.yaml
CHANGED
|
@@ -33,8 +33,8 @@
|
|
|
33
33
|
en: 4696b6c3a1f91f96
|
|
34
34
|
zh: 3a56d257ec768a5e
|
|
35
35
|
/deepseek-ai-dsh-harness-dev-context/understand-the-implementation/main-flow:
|
|
36
|
-
en:
|
|
37
|
-
zh:
|
|
36
|
+
en: 55c4cdd475f9f851
|
|
37
|
+
zh: ac4fb96e7be88810
|
|
38
38
|
/deepseek-ai-dsh-harness-dev-context/further-exploration:
|
|
39
39
|
en: f291741c499581ac
|
|
40
40
|
zh: 8ee0baef51e69ef0
|
package/README.md
CHANGED
|
@@ -57,7 +57,7 @@ A host-only session projection, `harnessDevLegacyPrompt`, folds every committed
|
|
|
57
57
|
|
|
58
58
|
### Main flow
|
|
59
59
|
|
|
60
|
-
Activation
|
|
60
|
+
Activation awaits the projection handle before registering both sections and both contexts. At each assembly the sections read the handle to choose the admitted earlier paragraph or the current guidance; at each request admission the contexts read the advertised URL. Disposing the plugin fiber removes every registration.
|
|
61
61
|
|
|
62
62
|
</details>
|
|
63
63
|
|
package/README.zh.md
CHANGED
|
@@ -57,7 +57,7 @@ kind: "package-reference"
|
|
|
57
57
|
|
|
58
58
|
### 主流程
|
|
59
59
|
|
|
60
|
-
|
|
60
|
+
激活时等待取得投影 handle,再注册两个段落与两个上下文。每次组装时,段落读取 handle,在已提交的早期段落与当前说明之间选择;每次请求准入时,上下文读取公告 URL。销毁插件 fiber 会移除全部注册。
|
|
61
61
|
|
|
62
62
|
</details>
|
|
63
63
|
|
package/lib/index.js
CHANGED
|
@@ -82,9 +82,10 @@ const ADMITS_NOTHING = {
|
|
|
82
82
|
* Register the two sections, their runtime-context values, and the
|
|
83
83
|
* projection that keeps a Session's admitted paragraphs.
|
|
84
84
|
* @param ctx - plugin context with every {@link inject} service.
|
|
85
|
+
* @returns after the projection reader and prompt registrations are ready.
|
|
85
86
|
*/
|
|
86
|
-
function apply(ctx) {
|
|
87
|
-
ctx.sessionProjections.register({
|
|
87
|
+
async function apply(ctx) {
|
|
88
|
+
const legacyPromptProjectionHandle = await ctx.sessionProjections.register({
|
|
88
89
|
key: LEGACY_PROMPT,
|
|
89
90
|
stateVersion: 1,
|
|
90
91
|
stateSchema: legacyPromptSchema,
|
|
@@ -93,7 +94,7 @@ function apply(ctx) {
|
|
|
93
94
|
});
|
|
94
95
|
const admitted = (context) => {
|
|
95
96
|
const session = context.agent?.session;
|
|
96
|
-
return session === void 0 ? ADMITS_NOTHING :
|
|
97
|
+
return session === void 0 ? ADMITS_NOTHING : legacyPromptProjectionHandle.stateOf(session);
|
|
97
98
|
};
|
|
98
99
|
ctx.systemPrompt.section({
|
|
99
100
|
name: HARNESS_SOURCE,
|
package/lib/types/index.d.ts
CHANGED
|
@@ -9,28 +9,15 @@
|
|
|
9
9
|
* @module @deepseek-ai/dsh-harness-dev-context
|
|
10
10
|
*/
|
|
11
11
|
import type { Context } from '@deepseek-ai/cordis';
|
|
12
|
-
import { z as zod } from 'zod';
|
|
13
12
|
/** Stable Cordis plugin name. */
|
|
14
13
|
export declare const name = "harness-dev-context";
|
|
15
14
|
/** Prompt registries, the projection registry, and the Web GUI whose URL the model learns. */
|
|
16
15
|
export declare const inject: string[];
|
|
17
|
-
declare const legacyPromptSchema: zod.ZodObject<{
|
|
18
|
-
source: zod.ZodNullable<zod.ZodString>;
|
|
19
|
-
web: zod.ZodNullable<zod.ZodString>;
|
|
20
|
-
}, zod.core.$strip>;
|
|
21
|
-
/** Value-bearing paragraphs of the latest nonempty system prompt a Session committed; `null` where it has none. */
|
|
22
|
-
type LegacyPrompt = zod.infer<typeof legacyPromptSchema>;
|
|
23
|
-
declare module '@deepseek-ai/dsh-session-projection/types' {
|
|
24
|
-
interface SessionProjectionStateMap {
|
|
25
|
-
/** Value-bearing harness-source and Web-surface paragraphs of the latest nonempty admitted system prompt. */
|
|
26
|
-
harnessDevLegacyPrompt: LegacyPrompt;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
16
|
/**
|
|
30
17
|
* Register the two sections, their runtime-context values, and the
|
|
31
18
|
* projection that keeps a Session's admitted paragraphs.
|
|
32
19
|
* @param ctx - plugin context with every {@link inject} service.
|
|
20
|
+
* @returns after the projection reader and prompt registrations are ready.
|
|
33
21
|
*/
|
|
34
|
-
export declare function apply(ctx: Context): void
|
|
35
|
-
export {};
|
|
22
|
+
export declare function apply(ctx: Context): Promise<void>;
|
|
36
23
|
//# sourceMappingURL=index.d.ts.map
|
package/locale/de.json
ADDED
package/locale/en.json
ADDED
package/locale/es.json
ADDED
package/locale/fr.json
ADDED
package/locale/ja.json
ADDED
package/locale/pt.json
ADDED
package/locale/ru.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-harness-dev-context",
|
|
3
3
|
"description": "Model context naming the DeepSeek Harness checkout and Web GUI URL without letting either change the system prompt",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.2-alpha.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -19,9 +19,11 @@
|
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
21
|
"./src/*": "./src/*",
|
|
22
|
+
"./locale/*.json": "./locale/*.json",
|
|
22
23
|
"./package.json": "./package.json"
|
|
23
24
|
},
|
|
24
25
|
"files": [
|
|
26
|
+
"locale/*.json",
|
|
25
27
|
"lib/index.js",
|
|
26
28
|
"lib/types/**/*.d.ts"
|
|
27
29
|
],
|
|
@@ -30,20 +32,20 @@
|
|
|
30
32
|
"zod": "4.4.3"
|
|
31
33
|
},
|
|
32
34
|
"peerDependencies": {
|
|
33
|
-
"@deepseek-ai/cordis": "~4.0.
|
|
34
|
-
"@deepseek-ai/dsh-agent": "0.2.
|
|
35
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
36
|
-
"@deepseek-ai/dsh-session-projection": "0.2.
|
|
37
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.
|
|
35
|
+
"@deepseek-ai/cordis": "~4.0.6-alpha.1",
|
|
36
|
+
"@deepseek-ai/dsh-agent": "0.2.2-alpha.2",
|
|
37
|
+
"@deepseek-ai/dsh-session": "0.2.2-alpha.2",
|
|
38
|
+
"@deepseek-ai/dsh-session-projection": "0.2.2-alpha.2",
|
|
39
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.2"
|
|
38
40
|
},
|
|
39
41
|
"devDependencies": {
|
|
40
|
-
"@deepseek-ai/cordis": "~4.0.
|
|
41
|
-
"@deepseek-ai/dsh-agent": "0.2.
|
|
42
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.
|
|
43
|
-
"@deepseek-ai/dsh-llm": "0.2.
|
|
44
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
45
|
-
"@deepseek-ai/dsh-session-projection": "0.2.
|
|
46
|
-
"@deepseek-ai/dsh-system-prompt": "0.2.
|
|
47
|
-
"@deepseek-ai/dsh-web-app": "0.2.
|
|
42
|
+
"@deepseek-ai/cordis": "~4.0.6-alpha.1",
|
|
43
|
+
"@deepseek-ai/dsh-agent": "0.2.2-alpha.2",
|
|
44
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.2.2-alpha.2",
|
|
45
|
+
"@deepseek-ai/dsh-llm": "0.2.2-alpha.2",
|
|
46
|
+
"@deepseek-ai/dsh-session": "0.2.2-alpha.2",
|
|
47
|
+
"@deepseek-ai/dsh-session-projection": "0.2.2-alpha.2",
|
|
48
|
+
"@deepseek-ai/dsh-system-prompt": "0.2.2-alpha.2",
|
|
49
|
+
"@deepseek-ai/dsh-web-app": "0.2.2-alpha.2"
|
|
48
50
|
}
|
|
49
51
|
}
|