feat(agent): session cwd sandbox, system prompt config, tool restrictions (#148)
Some checks failed
ci/woodpecker/push/ci Pipeline failed
Some checks failed
ci/woodpecker/push/ci Pipeline failed
Co-authored-by: Jason Woltje <jason@diversecanvas.com> Co-committed-by: Jason Woltje <jason@diversecanvas.com>
This commit was merged in pull request #148.
This commit is contained in:
@@ -12,3 +12,33 @@ export interface SessionListDto {
|
||||
sessions: SessionInfoDto[];
|
||||
total: number;
|
||||
}
|
||||
|
||||
/**
|
||||
* Options accepted when creating an agent session.
|
||||
* All fields are optional; omitting them falls back to env-var or process defaults.
|
||||
*/
|
||||
export interface CreateSessionOptionsDto {
|
||||
/** Provider name (e.g. "anthropic", "openai"). */
|
||||
provider?: string;
|
||||
/** Model ID to use for this session. */
|
||||
modelId?: string;
|
||||
/**
|
||||
* Sandbox working directory for the session.
|
||||
* File, git, and shell tools will be restricted to this directory.
|
||||
* Defaults to AGENT_FILE_SANDBOX_DIR env var or process.cwd().
|
||||
*/
|
||||
sandboxDir?: string;
|
||||
/**
|
||||
* Platform-level system prompt for this session.
|
||||
* Merged with skill prompt additions (platform prompt first, then skills).
|
||||
* Falls back to AGENT_SYSTEM_PROMPT env var when omitted.
|
||||
*/
|
||||
systemPrompt?: string;
|
||||
/**
|
||||
* Explicit allowlist of tool names available in this session.
|
||||
* When provided, only listed tools are registered with the agent.
|
||||
* Admins receive all tools; regular users fall back to AGENT_USER_TOOLS
|
||||
* env var (comma-separated) when this field is not supplied.
|
||||
*/
|
||||
allowedTools?: string[];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user