Skip to content

Commit baceadb

Browse files
ZhiXiao-Linclaude
andcommitted
fix(sdk): remove stale with_skill_dir/with_agent_dir from SessionOptions
SessionOptions now only supports model override. skill_dirs and agent_dirs are configured at the agent level via CodeConfig. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6f3ff73 commit baceadb

2 files changed

Lines changed: 3 additions & 31 deletions

File tree

sdk/node/src/lib.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -176,10 +176,6 @@ pub struct ToolResult {
176176
pub struct SessionOptions {
177177
/// Override the default model. Format: "provider/model" (e.g., "openai/gpt-4o").
178178
pub model: Option<String>,
179-
/// Additional skill directories for this session.
180-
pub skill_dirs: Option<Vec<String>>,
181-
/// Additional agent directories for this session.
182-
pub agent_dirs: Option<Vec<String>>,
183179
}
184180

185181
// ============================================================================
@@ -213,7 +209,7 @@ impl Agent {
213209
/// Bind to a workspace directory, returning a Session.
214210
///
215211
/// @param workspace - Path to the workspace directory
216-
/// @param options - Optional session overrides (model, skillDirs, agentDirs)
212+
/// @param options - Optional session overrides (model)
217213
#[napi]
218214
pub fn session(
219215
&self,
@@ -225,16 +221,6 @@ impl Agent {
225221
if let Some(model) = o.model {
226222
opts = opts.with_model(model);
227223
}
228-
if let Some(dirs) = o.skill_dirs {
229-
for dir in dirs {
230-
opts = opts.with_skill_dir(dir);
231-
}
232-
}
233-
if let Some(dirs) = o.agent_dirs {
234-
for dir in dirs {
235-
opts = opts.with_agent_dir(dir);
236-
}
237-
}
238224
opts
239225
});
240226

sdk/python/src/lib.rs

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -318,31 +318,17 @@ impl PyAgent {
318318
/// Args:
319319
/// workspace: Path to the workspace directory
320320
/// model: Optional model override, format "provider/model" (e.g., "openai/gpt-4o")
321-
/// skill_dirs: Optional list of additional skill directories
322-
/// agent_dirs: Optional list of additional agent directories
323-
#[pyo3(signature = (workspace, model=None, skill_dirs=None, agent_dirs=None))]
321+
#[pyo3(signature = (workspace, model=None))]
324322
fn session(
325323
&self,
326324
workspace: String,
327325
model: Option<String>,
328-
skill_dirs: Option<Vec<String>>,
329-
agent_dirs: Option<Vec<String>>,
330326
) -> PyResult<PySession> {
331-
let opts = if model.is_some() || skill_dirs.is_some() || agent_dirs.is_some() {
327+
let opts = if model.is_some() {
332328
let mut o = RustSessionOptions::new();
333329
if let Some(m) = model {
334330
o = o.with_model(m);
335331
}
336-
if let Some(dirs) = skill_dirs {
337-
for dir in dirs {
338-
o = o.with_skill_dir(dir);
339-
}
340-
}
341-
if let Some(dirs) = agent_dirs {
342-
for dir in dirs {
343-
o = o.with_agent_dir(dir);
344-
}
345-
}
346332
Some(o)
347333
} else {
348334
None

0 commit comments

Comments
 (0)