@deepseek-ai/dsh-tool-subagent 0.2.1-alpha.1 → 0.2.1-alpha.3

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.
@@ -0,0 +1,43 @@
1
+ /** Deployment-owned preset choices for one delegation tool. */
2
+ import type { Context } from '@deepseek-ai/cordis';
3
+ import type { SubagentProvider } from '@deepseek-ai/dsh-subagent';
4
+ /** Optional default and model-selectable preset ids for a spawn tool. */
5
+ export interface PresetSelectionConfig {
6
+ /** Default independent preset; omission inherits the parent when the model makes no selection. */
7
+ agentPreset?: string;
8
+ /** Non-empty allowlist exposing agent_preset to the model; omission disables model selection. */
9
+ allowedAgentPresets?: string[] | undefined;
10
+ }
11
+ /** Untrusted preset selection from model/tool JSON. */
12
+ export interface PresetSelectionRequest {
13
+ readonly agent_preset?: unknown;
14
+ }
15
+ /** Validates configured references and resolves model input against the allowlist. */
16
+ export declare class SubagentPresetSelection {
17
+ private readonly config;
18
+ private descriptions;
19
+ constructor(config: PresetSelectionConfig);
20
+ /** Whether this tool requires the preset service and an independently composing provider. */
21
+ get configured(): boolean;
22
+ /** Preset ids advertised in the model parameter. */
23
+ get choices(): readonly string[] | undefined;
24
+ /** Model-visible selection guidance and configured preset descriptions. */
25
+ get description(): string;
26
+ /**
27
+ * Read configured preset declarations before publishing the tool; mounting validates their activation.
28
+ * @param ctx - Tool composition containing the preset service.
29
+ */
30
+ validate(ctx: Context): Promise<void>;
31
+ /**
32
+ * Reject independent selection for providers that inherit conversation history or lack support.
33
+ * @param provider - Currently registered delegation provider.
34
+ */
35
+ assertProvider(provider: SubagentProvider): void;
36
+ /**
37
+ * Validate model input and apply the deployment default.
38
+ * @param request - Model-supplied tool arguments.
39
+ * @returns Selected preset id, or omission to inherit the parent.
40
+ */
41
+ resolve(request: PresetSelectionRequest): string | undefined;
42
+ }
43
+ //# sourceMappingURL=preset-selection.d.ts.map
package/locale/en.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "meta": {
3
+ "title": "tool-subagent"
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "meta": {
3
+ "title": "tool-subagent/model-selection-settings"
4
+ }
5
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "meta": {
3
+ "title": "子智能体模型选择设置"
4
+ }
5
+ }
package/locale/zh.json ADDED
@@ -0,0 +1,6 @@
1
+ {
2
+ "meta": {
3
+ "title": "子智能体委派工具",
4
+ "description": "让 AI 将任务交给子智能体,并获取运行结果。"
5
+ }
6
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@deepseek-ai/dsh-tool-subagent",
3
3
  "description": "Model-facing subagent delegation tool over the ctx.subagents seam",
4
- "version": "0.2.1-alpha.1",
4
+ "version": "0.2.1-alpha.3",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -23,46 +23,53 @@
23
23
  "default": "./lib/model-selection-settings.js"
24
24
  },
25
25
  "./src/*": "./src/*",
26
- "./package.json": "./package.json"
26
+ "./package.json": "./package.json",
27
+ "./locale/*.json": "./locale/*.json",
28
+ "./model-selection-settings/locale/*.json": "./locale/model-selection-settings/*.json"
27
29
  },
28
30
  "files": [
31
+ "locale/*.json",
32
+ "locale/model-selection-settings/*.json",
29
33
  "lib/index.js",
30
34
  "lib/model-selection-settings.js",
31
35
  "lib/types/**/*.d.ts"
32
36
  ],
33
37
  "license": "MIT",
34
38
  "peerDependencies": {
35
- "@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
36
- "@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
37
- "@deepseek-ai/dsh-session": "0.2.1-alpha.1",
38
- "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.1",
39
- "@deepseek-ai/dsh-scope": "0.2.1-alpha.1",
40
- "@deepseek-ai/dsh-subagent": "0.2.1-alpha.1",
41
- "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.1",
42
- "@deepseek-ai/dsh-jobs": "0.2.1-alpha.1",
43
- "@deepseek-ai/dsh-tools": "0.2.1-alpha.1",
44
- "@deepseek-ai/cordis": "~4.0.5-alpha.1"
39
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
40
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.1-alpha.3",
41
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
42
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.3",
43
+ "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.3",
44
+ "@deepseek-ai/dsh-scope": "0.2.1-alpha.3",
45
+ "@deepseek-ai/dsh-subagent": "0.2.1-alpha.3",
46
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.3",
47
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.3",
48
+ "@deepseek-ai/cordis": "~4.0.5-alpha.2"
49
+ },
50
+ "peerDependenciesMeta": {
51
+ "@deepseek-ai/dsh-agent-preset-registry": {
52
+ "optional": true
53
+ }
45
54
  },
46
55
  "dependencies": {
47
- "zod": "^4.4.3",
48
- "@deepseek-ai/schemastery": "~3.18.5-alpha.1"
56
+ "@deepseek-ai/schemastery": "~3.18.5-alpha.2",
57
+ "zod": "4.4.3"
49
58
  },
50
59
  "devDependencies": {
51
- "@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.1",
52
- "@deepseek-ai/dsh-agent": "0.2.1-alpha.1",
53
- "@deepseek-ai/dsh-llm": "0.2.1-alpha.1",
54
- "@deepseek-ai/dsh-session": "0.2.1-alpha.1",
55
- "@deepseek-ai/dsh-scope": "0.2.1-alpha.1",
56
- "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.1",
57
- "@deepseek-ai/dsh-subagent": "0.2.1-alpha.1",
58
- "@deepseek-ai/dsh-session-persistence": "0.2.1-alpha.1",
59
- "@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.1-alpha.1",
60
- "@deepseek-ai/dsh-tool-jobs": "0.2.1-alpha.1",
61
- "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.1",
62
- "@deepseek-ai/dsh-tools": "0.2.1-alpha.1",
63
- "@deepseek-ai/cordis": "~4.0.5-alpha.1",
64
- "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.1",
65
- "@deepseek-ai/dsh-jobs": "0.2.1-alpha.1",
66
- "@deepseek-ai/dsh-jobs-local": "0.2.1-alpha.1"
60
+ "@deepseek-ai/cordis-plugin-loader": "~1.0.6-alpha.2",
61
+ "@deepseek-ai/dsh-agent": "0.2.1-alpha.3",
62
+ "@deepseek-ai/dsh-agent-preset-registry": "0.2.1-alpha.3",
63
+ "@deepseek-ai/dsh-llm": "0.2.1-alpha.3",
64
+ "@deepseek-ai/dsh-session": "0.2.1-alpha.3",
65
+ "@deepseek-ai/dsh-scope": "0.2.1-alpha.3",
66
+ "@deepseek-ai/dsh-session-persistence": "0.2.1-alpha.3",
67
+ "@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.3",
68
+ "@deepseek-ai/dsh-subagent": "0.2.1-alpha.3",
69
+ "@deepseek-ai/dsh-subagent-spawn-in-process": "0.2.1-alpha.3",
70
+ "@deepseek-ai/dsh-system-prompt": "0.2.1-alpha.3",
71
+ "@deepseek-ai/dsh-tools": "0.2.1-alpha.3",
72
+ "@deepseek-ai/cordis": "~4.0.5-alpha.2",
73
+ "@deepseek-ai/dsh-session-projection": "0.2.1-alpha.3"
67
74
  }
68
75
  }