mirror of
https://github.com/harivansh-afk/sandbox-agent.git
synced 2026-04-21 05:02:17 +00:00
feat: separate agentMode and permissionMode in API
This commit is contained in:
parent
46d8028cf7
commit
7e1b63a622
1 changed files with 20 additions and 4 deletions
24
spec.md
24
spec.md
|
|
@ -63,15 +63,19 @@ sandbox-daemon sessions get-messages --endpoint xxxx --token xxxx
|
||||||
POST /agents/{}/install (this will install the agent)
|
POST /agents/{}/install (this will install the agent)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
GET /agents/{}/modes
|
||||||
|
< { modes: [{ id: "build", name: "Build", description: "..." }, ...] }
|
||||||
|
|
||||||
POST /sessions/{} (will install agent if not already installed)
|
POST /sessions/{} (will install agent if not already installed)
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
agent:"claud"|"codex"|"opencode",
|
agent: "claude" | "codex" | "opencode",
|
||||||
model?:string,
|
agentMode?: string, // Which agent/behavior: "build", "plan", or custom
|
||||||
variant?:string,
|
permissionMode?: "default" | "plan" | "bypass", // Permission restrictions
|
||||||
|
model?: string,
|
||||||
|
variant?: string,
|
||||||
token?: string,
|
token?: string,
|
||||||
validateToken?: boolean,
|
validateToken?: boolean,
|
||||||
dangerouslySkipPermissions?: boolean,
|
|
||||||
agentVersion?: string
|
agentVersion?: string
|
||||||
}
|
}
|
||||||
<
|
<
|
||||||
|
|
@ -80,6 +84,18 @@ POST /sessions/{} (will install agent if not already installed)
|
||||||
error?: AgentError
|
error?: AgentError
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// agentMode vs permissionMode:
|
||||||
|
// - agentMode = what the agent DOES (behavior, system prompt)
|
||||||
|
// - permissionMode = what the agent CAN DO (capability restrictions)
|
||||||
|
// These are separate concepts. OpenCode has custom agents. Claude has subagent types.
|
||||||
|
//
|
||||||
|
// Assertions:
|
||||||
|
// - agentMode defaults to "build" if not specified
|
||||||
|
// - permissionMode defaults to "default" if not specified
|
||||||
|
// - permissionMode "plan" = read-only (no writes), agent must use ExitPlanMode to execute
|
||||||
|
// - permissionMode "bypass" = skip all permission checks (dangerous)
|
||||||
|
// - agentMode "plan" != permissionMode "plan" (one is behavior, one is restriction)
|
||||||
|
|
||||||
POST /sessions/{}/messages
|
POST /sessions/{}/messages
|
||||||
{
|
{
|
||||||
message: string
|
message: string
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue