@knyazevai/dsh 0.1.4 → 0.1.5
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 +1 -1
- package/README.i18n.yaml +6 -0
- package/README.md +28 -94
- package/README.zh.md +49 -0
- package/bin.mjs +25 -0
- package/config/agent-presets/code/agent.cordis.yml +263 -0
- package/config/agent-presets/code/preset.yml +3 -0
- package/config/agent-presets/cordis/agent.cordis.yml +263 -0
- package/config/agent-presets/cordis/preset.yml +3 -0
- package/config/agent-presets/cordis/skills/cordis-plugin-development/SKILL.md +420 -0
- package/config/agent-presets/cordis/skills/editing-cordis-compositions/SKILL.md +165 -0
- package/config/agent-presets/minimal/agent.cordis.yml +88 -0
- package/config/agent-presets/minimal/preset.yml +3 -0
- package/config/agent-presets/standard/agent.cordis.yml +252 -0
- package/config/agent-presets/standard/preset.yml +3 -0
- package/lib/bin.js +158 -0
- package/lib/dump-config-DyK_R56g.js +52 -0
- package/lib/plugin-b-wPL_wv.js +128 -0
- package/lib/profile-boot-ClKqtiSq.js +2 -0
- package/lib/profile-boot-CuWvAMzG.js +283 -0
- package/package.json +98 -33
- package/cordis.patch.yml +0 -84
- package/lib/provider.js +0 -123
package/lib/provider.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
/** Catalog the DSH bundle patch must keep in sync with cordis.patch.yml. */
|
|
2
|
-
|
|
3
|
-
export const PROVIDER_ID = "knyazev-ai";
|
|
4
|
-
export const API_KEY_ENV = "KNYAZEV_AI_API_KEY";
|
|
5
|
-
export const BASE_URL = "https://knyazevai.work/v1";
|
|
6
|
-
export const DEFAULT_MODEL_ID = "deepseek-v4-flash";
|
|
7
|
-
export const DEFAULT_REASONING = "max";
|
|
8
|
-
|
|
9
|
-
/** Cordis plugin name for the per-agent-preset compaction overlay. */
|
|
10
|
-
export const name = "knyazev-ai-compaction";
|
|
11
|
-
|
|
12
|
-
/** No required services: headless profiles do not compose Agent Presets. */
|
|
13
|
-
export const inject = [];
|
|
14
|
-
|
|
15
|
-
const AGENT_PRESET_PATCH_CONTRIBUTOR = Symbol.for("dsh.agent-presets.patch-contributor");
|
|
16
|
-
|
|
17
|
-
const COMPACTION_PATCH = {
|
|
18
|
-
id: "compaction",
|
|
19
|
-
config: [
|
|
20
|
-
{
|
|
21
|
-
id: "compaction-basic",
|
|
22
|
-
name: "@deepseek-ai/dsh-compaction-basic",
|
|
23
|
-
config: {
|
|
24
|
-
maxSummarizationInputTokens: 0,
|
|
25
|
-
compactionRetries: 2,
|
|
26
|
-
maxOverflowRetries: 2,
|
|
27
|
-
modelPolicies: [
|
|
28
|
-
{
|
|
29
|
-
provider: "knyazev-ai",
|
|
30
|
-
model: "deepseek-v4-flash",
|
|
31
|
-
thresholdRatio: 0.5,
|
|
32
|
-
maxSummarizationInputTokens: 131072,
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
provider: "knyazev-ai",
|
|
36
|
-
model: "kimi-2.6",
|
|
37
|
-
maxSummarizationInputTokens: 131072,
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
provider: "knyazev-ai",
|
|
41
|
-
model: "minimax-2.7",
|
|
42
|
-
maxSummarizationInputTokens: 131072,
|
|
43
|
-
},
|
|
44
|
-
],
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
{
|
|
48
|
-
id: "command-compact",
|
|
49
|
-
name: "@deepseek-ai/dsh-command-compact",
|
|
50
|
-
},
|
|
51
|
-
{
|
|
52
|
-
id: "tool-result-pruner",
|
|
53
|
-
name: "@deepseek-ai/dsh-compaction-tool-result-pruner",
|
|
54
|
-
config: {
|
|
55
|
-
thresholdChars: 8192,
|
|
56
|
-
headChars: 4096,
|
|
57
|
-
tailChars: 1024,
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const COMPACTION_PRESET_IDS = ["standard", "code", "cordis"];
|
|
64
|
-
|
|
65
|
-
/**
|
|
66
|
-
* Contribute the compaction group to the shipped presets that own it.
|
|
67
|
-
*
|
|
68
|
-
* The contributor face is optional so the provider remains loadable on older
|
|
69
|
-
* Harness builds; those builds simply retain their stored preset composition.
|
|
70
|
-
*/
|
|
71
|
-
export function apply(ctx) {
|
|
72
|
-
ctx.inject(["agentPresets"], (childCtx) => {
|
|
73
|
-
const agentPresets = typeof childCtx.get === "function" ? childCtx.get("agentPresets") : childCtx.agentPresets;
|
|
74
|
-
const contributor = agentPresets?.[AGENT_PRESET_PATCH_CONTRIBUTOR];
|
|
75
|
-
if (contributor === undefined || typeof contributor.register !== "function") return;
|
|
76
|
-
|
|
77
|
-
for (const presetId of COMPACTION_PRESET_IDS) {
|
|
78
|
-
contributor.register({ presetId, patches: [COMPACTION_PATCH] });
|
|
79
|
-
}
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
export const REASONING_EFFORTS = Object.freeze({
|
|
84
|
-
off: null,
|
|
85
|
-
high: "high",
|
|
86
|
-
max: "max",
|
|
87
|
-
});
|
|
88
|
-
|
|
89
|
-
export const MODELS = Object.freeze([
|
|
90
|
-
Object.freeze({
|
|
91
|
-
id: "deepseek-v4-flash",
|
|
92
|
-
name: "DeepSeek V4 Flash",
|
|
93
|
-
contextWindow: 400000,
|
|
94
|
-
maxTokens: 40000,
|
|
95
|
-
reasoningEfforts: REASONING_EFFORTS,
|
|
96
|
-
}),
|
|
97
|
-
Object.freeze({
|
|
98
|
-
id: "kimi-2.6",
|
|
99
|
-
name: "Kimi 2.6",
|
|
100
|
-
contextWindow: 262144,
|
|
101
|
-
maxTokens: 40000,
|
|
102
|
-
reasoningEfforts: REASONING_EFFORTS,
|
|
103
|
-
}),
|
|
104
|
-
Object.freeze({
|
|
105
|
-
id: "minimax-2.7",
|
|
106
|
-
name: "MiniMax 2.7",
|
|
107
|
-
contextWindow: 204800,
|
|
108
|
-
maxTokens: 40000,
|
|
109
|
-
}),
|
|
110
|
-
]);
|
|
111
|
-
|
|
112
|
-
export const PROVIDER = Object.freeze({
|
|
113
|
-
displayName: "Knyazev AI",
|
|
114
|
-
apiKeyEnv: API_KEY_ENV,
|
|
115
|
-
api: "openai-completions",
|
|
116
|
-
baseURL: BASE_URL,
|
|
117
|
-
compat: Object.freeze({
|
|
118
|
-
thinkingFormat: "qwen",
|
|
119
|
-
supportsReasoningEffort: false,
|
|
120
|
-
}),
|
|
121
|
-
reasoning: DEFAULT_REASONING,
|
|
122
|
-
models: MODELS,
|
|
123
|
-
});
|