feat: enhance agent and session entity types with additional properties

This commit is contained in:
Vaayne 2025-09-11 12:28:43 +08:00
parent 0f1ad59e58
commit 1f974558f8
2 changed files with 13 additions and 4 deletions

View File

@ -9,9 +9,16 @@ export interface AgentEntity {
name: string
description?: string
avatar?: string
instructions?: string // System prompt
model: string // Model ID (required)
tools?: string[] // Array of enabled tool IDs
plan_model?: string // Optional plan/thinking model ID
small_model?: string // Optional small/fast model ID
built_in_tools?: string[] // Array of built-in tool IDs
mcps?: string[] // Array of MCP tool IDs
knowledges?: string[] // Array of enabled knowledge base IDs
configuration?: Record<string, any> // Extensible settings like temperature, top_p
created_at: string
@ -24,12 +31,13 @@ export type PermissionMode = 'readOnly' | 'acceptEdits' | 'bypassPermissions'
// AgentSession entity representing a conversation session with one or more agents
export interface AgentSessionEntity {
id: string
agent_id: string // Agent ID involved
main_agent_id: string // Primary agent ID for the session
sub_agent_ids?: string[] // Array of sub-agent IDs involved in the session
user_goal?: string // Initial user goal for the session
status: SessionStatus
accessible_paths?: string[] // Array of directory paths the agent can access
agent_session_id?: string // Latest Claude SDK session ID for continuity
max_turns?: number // Maximum number of turns allowed in the session, default 10
external_session_id?: string // Agent session for external agent management/tracking
max_steps?: number // Maximum number of steps the agent can take, default 10
permission_mode?: PermissionMode // Permission mode for the session
created_at: string
updated_at: string

View File

@ -15,6 +15,7 @@ import { MCPConfigSample, McpServerType } from './mcp'
import type { Message } from './newMessage'
import type { BaseTool, MCPTool } from './tool'
export * from './agent'
export * from './knowledge'
export * from './mcp'
export * from './ocr'