@robota-sdk/agent-sdk 3.0.0-beta.22 → 3.0.0-beta.23

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.
@@ -96,16 +96,18 @@ function buildToolsSection(descriptions) {
96
96
  return lines.join("\n");
97
97
  }
98
98
  function buildSystemPrompt(params) {
99
- const { agentsMd, claudeMd, toolDescriptions, trustLevel, projectInfo, cwd } = params;
99
+ const { agentsMd, claudeMd, toolDescriptions, trustLevel, projectInfo, cwd, language } = params;
100
100
  const sections = [];
101
- sections.push(
102
- [
103
- "## Role",
104
- "You are an AI coding assistant with access to tools that let you read and modify code.",
105
- "You help developers understand, write, and improve their codebase.",
106
- "Always be precise, follow existing code conventions, and prefer minimal changes."
107
- ].join("\n")
108
- );
101
+ const roleLines = [
102
+ "## Role",
103
+ "You are an AI coding assistant with access to tools that let you read and modify code.",
104
+ "You help developers understand, write, and improve their codebase.",
105
+ "Always be precise, follow existing code conventions, and prefer minimal changes."
106
+ ];
107
+ if (language) {
108
+ roleLines.push(`Always respond in ${language}. Use ${language} for all explanations and communications.`);
109
+ }
110
+ sections.push(roleLines.join("\n"));
109
111
  if (cwd) {
110
112
  sections.push(`## Working Directory
111
113
  \`${cwd}\``);
@@ -186,7 +188,8 @@ function createSession(options) {
186
188
  toolDescriptions: options.toolDescriptions ?? DEFAULT_TOOL_DESCRIPTIONS,
187
189
  trustLevel: options.config.defaultTrustLevel,
188
190
  projectInfo: options.projectInfo ?? { type: "unknown", language: "unknown" },
189
- cwd: process.cwd()
191
+ cwd: process.cwd(),
192
+ language: options.config.language
190
193
  });
191
194
  const defaultAllow = [
192
195
  "Read(.agents/**)",
@@ -262,6 +265,8 @@ var HooksSchema = import_zod.z.object({
262
265
  var SettingsSchema = import_zod.z.object({
263
266
  /** Trust level used when no --permission-mode flag is given */
264
267
  defaultTrustLevel: import_zod.z.enum(["safe", "moderate", "full"]).optional(),
268
+ /** Response language (e.g., "ko", "en", "ja"). Injected into system prompt. */
269
+ language: import_zod.z.string().optional(),
265
270
  provider: ProviderSchema.optional(),
266
271
  permissions: PermissionsSchema.optional(),
267
272
  env: EnvSchema,
@@ -339,6 +344,7 @@ function mergeSettings(layers) {
339
344
  function toResolvedConfig(merged) {
340
345
  return {
341
346
  defaultTrustLevel: merged.defaultTrustLevel ?? DEFAULTS.defaultTrustLevel,
347
+ language: merged.language,
342
348
  provider: {
343
349
  name: merged.provider?.name ?? DEFAULTS.provider.name,
344
350
  model: merged.provider?.model ?? DEFAULTS.provider.model,
@@ -175,6 +175,8 @@ declare const HooksSchema: z.ZodOptional<z.ZodObject<{
175
175
  */
176
176
  interface IResolvedConfig {
177
177
  defaultTrustLevel: 'safe' | 'moderate' | 'full';
178
+ /** Response language code (e.g., "ko", "en"). Undefined = no language constraint. */
179
+ language?: string;
178
180
  provider: {
179
181
  name: string;
180
182
  model: string;
@@ -237,6 +239,8 @@ interface ISystemPromptParams {
237
239
  projectInfo: IProjectInfo;
238
240
  /** Current working directory */
239
241
  cwd?: string;
242
+ /** Response language code (e.g., "ko", "en"). If set, AI must respond in this language. */
243
+ language?: string;
240
244
  }
241
245
  /**
242
246
  * Assemble the full system prompt string from the provided parameters.
@@ -175,6 +175,8 @@ declare const HooksSchema: z.ZodOptional<z.ZodObject<{
175
175
  */
176
176
  interface IResolvedConfig {
177
177
  defaultTrustLevel: 'safe' | 'moderate' | 'full';
178
+ /** Response language code (e.g., "ko", "en"). Undefined = no language constraint. */
179
+ language?: string;
178
180
  provider: {
179
181
  name: string;
180
182
  model: string;
@@ -237,6 +239,8 @@ interface ISystemPromptParams {
237
239
  projectInfo: IProjectInfo;
238
240
  /** Current working directory */
239
241
  cwd?: string;
242
+ /** Response language code (e.g., "ko", "en"). If set, AI must respond in this language. */
243
+ language?: string;
240
244
  }
241
245
  /**
242
246
  * Assemble the full system prompt string from the provided parameters.
@@ -34,16 +34,18 @@ function buildToolsSection(descriptions) {
34
34
  return lines.join("\n");
35
35
  }
36
36
  function buildSystemPrompt(params) {
37
- const { agentsMd, claudeMd, toolDescriptions, trustLevel, projectInfo, cwd } = params;
37
+ const { agentsMd, claudeMd, toolDescriptions, trustLevel, projectInfo, cwd, language } = params;
38
38
  const sections = [];
39
- sections.push(
40
- [
41
- "## Role",
42
- "You are an AI coding assistant with access to tools that let you read and modify code.",
43
- "You help developers understand, write, and improve their codebase.",
44
- "Always be precise, follow existing code conventions, and prefer minimal changes."
45
- ].join("\n")
46
- );
39
+ const roleLines = [
40
+ "## Role",
41
+ "You are an AI coding assistant with access to tools that let you read and modify code.",
42
+ "You help developers understand, write, and improve their codebase.",
43
+ "Always be precise, follow existing code conventions, and prefer minimal changes."
44
+ ];
45
+ if (language) {
46
+ roleLines.push(`Always respond in ${language}. Use ${language} for all explanations and communications.`);
47
+ }
48
+ sections.push(roleLines.join("\n"));
47
49
  if (cwd) {
48
50
  sections.push(`## Working Directory
49
51
  \`${cwd}\``);
@@ -133,7 +135,8 @@ function createSession(options) {
133
135
  toolDescriptions: options.toolDescriptions ?? DEFAULT_TOOL_DESCRIPTIONS,
134
136
  trustLevel: options.config.defaultTrustLevel,
135
137
  projectInfo: options.projectInfo ?? { type: "unknown", language: "unknown" },
136
- cwd: process.cwd()
138
+ cwd: process.cwd(),
139
+ language: options.config.language
137
140
  });
138
141
  const defaultAllow = [
139
142
  "Read(.agents/**)",
@@ -209,6 +212,8 @@ var HooksSchema = z.object({
209
212
  var SettingsSchema = z.object({
210
213
  /** Trust level used when no --permission-mode flag is given */
211
214
  defaultTrustLevel: z.enum(["safe", "moderate", "full"]).optional(),
215
+ /** Response language (e.g., "ko", "en", "ja"). Injected into system prompt. */
216
+ language: z.string().optional(),
212
217
  provider: ProviderSchema.optional(),
213
218
  permissions: PermissionsSchema.optional(),
214
219
  env: EnvSchema,
@@ -286,6 +291,7 @@ function mergeSettings(layers) {
286
291
  function toResolvedConfig(merged) {
287
292
  return {
288
293
  defaultTrustLevel: merged.defaultTrustLevel ?? DEFAULTS.defaultTrustLevel,
294
+ language: merged.language,
289
295
  provider: {
290
296
  name: merged.provider?.name ?? DEFAULTS.provider.name,
291
297
  model: merged.provider?.model ?? DEFAULTS.provider.model,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robota-sdk/agent-sdk",
3
- "version": "3.0.0-beta.22",
3
+ "version": "3.0.0-beta.23",
4
4
  "description": "Programmatic SDK for building AI agents with Robota — provides Session, query(), built-in tools, permissions, hooks, and context loading",
5
5
  "type": "module",
6
6
  "main": "dist/node/index.js",
@@ -24,10 +24,10 @@
24
24
  "dependencies": {
25
25
  "chalk": "^5.3.0",
26
26
  "zod": "^3.24.0",
27
- "@robota-sdk/agent-core": "3.0.0-beta.22",
28
- "@robota-sdk/agent-provider-anthropic": "3.0.0-beta.22",
29
- "@robota-sdk/agent-tools": "3.0.0-beta.22",
30
- "@robota-sdk/agent-sessions": "3.0.0-beta.22"
27
+ "@robota-sdk/agent-core": "3.0.0-beta.23",
28
+ "@robota-sdk/agent-tools": "3.0.0-beta.23",
29
+ "@robota-sdk/agent-provider-anthropic": "3.0.0-beta.23",
30
+ "@robota-sdk/agent-sessions": "3.0.0-beta.23"
31
31
  },
32
32
  "devDependencies": {
33
33
  "rimraf": "^5.0.5",