Files
stack/apps/gateway/src/agent/session.dto.ts
Jason Woltje d1bef49b4e
Some checks failed
ci/woodpecker/push/ci Pipeline failed
feat(agent): session cwd sandbox, system prompt config, tool restrictions (#148)
Co-authored-by: Jason Woltje <jason@diversecanvas.com>
Co-committed-by: Jason Woltje <jason@diversecanvas.com>
2026-03-15 19:15:05 +00:00

45 lines
1.3 KiB
TypeScript

export interface SessionInfoDto {
id: string;
provider: string;
modelId: string;
createdAt: string;
promptCount: number;
channels: string[];
durationMs: number;
}
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[];
}