The handoff link, the conversation menu's Hand off ▸, HandoffDialog, the
Continued from / Continued in banners and POST /api/handoff move to the
handoff live plugin (ai-agent-plugins). What the core keeps is generic:
- ui.menuItems (conversation.menu): a plugin row in the conversation menu
opening the plugin's sandboxed dialog; frame bridges close() and toast()
- slot places conversation.threadHeader / conversation.threadEnd, whose
update carries the plugin's own meta.plugins.<id> (pluginData)
- ConversationDetail.pluginData (owner only)
- conversations.data: GET|POST hub/conversations/{sid}/data, a plugin's
own data on a conversation (handler only, owner only, operator approval)
- runs.start takes test; hub/conversations rows carry model and harness
- carryover.handoffs moves the old meta.handoffFrom / handoffTo stamps
into meta.plugins.handoff once
Removed: runs/handoff.py, /api/handoff, SpawnBody.handoffFrom and the
spawn's handoff origin, meta.handoffFrom/handoffTo and their resolved refs,
Handoff.tsx, the Handoffs eye switch (the plugin's vis switch replaces it).
The CLI's --handoff-from and MCP handoff_from are left alone (inert) until
the CLI/MCP plugin-commands mechanism lands.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
541 lines
12 KiB
Python
541 lines
12 KiB
Python
"""Pydantic response models — the OpenAPI schema for the read endpoints.
|
|
|
|
These are **documentation-only**: they are attached to the routes via
|
|
``responses={200: {"model": …}}`` (see ``main.py``), never as ``response_model``.
|
|
FastAPI therefore serves them in ``/openapi.json`` but does **not** validate or
|
|
filter the actual returned dicts through them — so a model that drifts from the
|
|
real payload can only produce a wrong TypeScript type (caught by ``tsc``), never
|
|
a silent runtime regression.
|
|
|
|
They mirror ``frontend/src/types.ts`` field-for-field; fields are intentionally
|
|
**camelCase** (matching the JSON the handlers already emit) so Orval generates
|
|
property names identical to the hand-written types they replace. Class names
|
|
match the TS interface names so the generated model names line up 1:1.
|
|
|
|
The package has one module per section of the API (``conversations``,
|
|
``projects``, ``cron``, …); every model is re-exported here so handlers keep
|
|
writing ``schemas.ConversationDetail``.
|
|
"""
|
|
from .base import (
|
|
Schema,
|
|
AccountSplit,
|
|
)
|
|
from .usage import * # noqa: F401,F403
|
|
from .usage import __all__ as _usage_all
|
|
from .telemetry import * # noqa: F401,F403
|
|
from .telemetry import __all__ as _telemetry_all
|
|
from .plugin_commands import * # noqa: F401,F403
|
|
from .plugin_commands import __all__ as _plugin_commands_all
|
|
from .chrome import * # noqa: F401,F403
|
|
from .chrome import __all__ as _chrome_all
|
|
from .security import * # noqa: F401,F403
|
|
from .security import __all__ as _security_all
|
|
from .scheduled import * # noqa: F401,F403
|
|
from .scheduled import __all__ as _scheduled_all
|
|
from .whatsnew import * # noqa: F401,F403
|
|
from .whatsnew import __all__ as _whatsnew_all
|
|
from .movies import * # noqa: F401,F403
|
|
from .movies import __all__ as _movies_all
|
|
from .meta import * # noqa: F401,F403
|
|
from .meta import __all__ as _meta_all
|
|
from .hostfiles import * # noqa: F401,F403
|
|
from .hostfiles import __all__ as _hostfiles_all
|
|
from .perf import * # noqa: F401,F403
|
|
from .perf import __all__ as _perf_all
|
|
from .perf_storage import * # noqa: F401,F403
|
|
from .perf_storage import __all__ as _perf_storage_all
|
|
from .guest_perf import * # noqa: F401,F403
|
|
from .guest_perf import __all__ as _guest_perf_all
|
|
from .bgtasks import * # noqa: F401,F403
|
|
from .bgtasks import __all__ as _bgtasks_all
|
|
from .mcp import * # noqa: F401,F403
|
|
from .mcp import __all__ as _mcp_all
|
|
from .tags import * # noqa: F401,F403
|
|
from .tags import __all__ as _tags_all
|
|
from .drafts import * # noqa: F401,F403
|
|
from .drafts import __all__ as _drafts_all
|
|
from .roles import * # noqa: F401,F403
|
|
from .roles import __all__ as _roles_all
|
|
from .users import (
|
|
GuestClaude,
|
|
IdpApp,
|
|
IdpStatus,
|
|
GuestIdp,
|
|
IdpSyncResult,
|
|
AuthMethods,
|
|
ComputerPolicy,
|
|
ComputerLimits,
|
|
Computer,
|
|
ComputersResponse,
|
|
ComputerEnroll,
|
|
ComputersWaiting,
|
|
TerminalSession,
|
|
TerminalSessions,
|
|
ProjectGrant,
|
|
NotifyPrefs,
|
|
PushDevice,
|
|
PushPref,
|
|
PushDevices,
|
|
PushSendResult,
|
|
PushTestResult,
|
|
Me,
|
|
GuestUser,
|
|
UsersResponse,
|
|
DaySpend,
|
|
ProjectSpend,
|
|
StatsPeriod,
|
|
StatsTotals,
|
|
StatsMonth,
|
|
StatsDay,
|
|
StatsCalendarDay,
|
|
StatsProject,
|
|
StatsModel,
|
|
StatsTokens,
|
|
StatsFootprint,
|
|
GuestStats,
|
|
UserConversation,
|
|
UserActivity,
|
|
LoginLink,
|
|
ShareCandidate,
|
|
AudienceMember,
|
|
GuestShortcut,
|
|
CurvePoint,
|
|
AnimationCurve,
|
|
GuestDefaults,
|
|
GuestSkill,
|
|
GuestSkillsResponse,
|
|
ConversationShare,
|
|
NewProjectAccess,
|
|
NewProjectPolicy,
|
|
DomainDns,
|
|
DomainStatus,
|
|
)
|
|
from .files import (
|
|
FileKind,
|
|
FileEntry,
|
|
Pricing,
|
|
Totals,
|
|
Bundle,
|
|
SkillStat,
|
|
DashboardTotals,
|
|
TopFile,
|
|
Dashboard,
|
|
)
|
|
from .skills import (
|
|
SkillCopy,
|
|
SkillSummary,
|
|
SkillsTotals,
|
|
SkillsResponse,
|
|
SkillPrompt,
|
|
)
|
|
from .conversations import (
|
|
FullText,
|
|
EffortUsage,
|
|
ModelUsage,
|
|
PlanPct,
|
|
ToolUsage,
|
|
ConvNotification,
|
|
WorktreeInfo,
|
|
ForkedFrom,
|
|
SpawnedBy,
|
|
AutoArchived,
|
|
SpawnedConvRef,
|
|
CronRef,
|
|
ScheduledRef,
|
|
AgentRunRef,
|
|
Resource,
|
|
RelatedConversation,
|
|
RelatedConversationsResponse,
|
|
PastConversationsResponse,
|
|
ConversationRefCard,
|
|
ConversationRefsResponse,
|
|
ConvLook,
|
|
LinearInfo,
|
|
ConvMeta,
|
|
ConvSummary,
|
|
Usage,
|
|
DeployCall,
|
|
SubagentFormRef,
|
|
SubagentRef,
|
|
StoppedOn,
|
|
SubagentListItem,
|
|
SubagentsResponse,
|
|
RunningAgent,
|
|
ParentConvRef,
|
|
Task,
|
|
ConversationSummary,
|
|
ThreadItem,
|
|
TurnAuthor,
|
|
TurnUsage,
|
|
ArtefactItem,
|
|
ConversationDetail,
|
|
ConversationsResponse,
|
|
)
|
|
from .notifications import (
|
|
NotifConversation,
|
|
NotificationsResponse,
|
|
FeedNotification,
|
|
UnreadNotificationsResponse,
|
|
NotifStateResponse,
|
|
NotifStateChange,
|
|
FreshContextSettings,
|
|
DeliveryStatus,
|
|
NotifyResult,
|
|
AskRecord,
|
|
NotifyLogEntry,
|
|
NotifyLogResponse,
|
|
)
|
|
from .askform import (
|
|
AskFormRecord,
|
|
AskFormsResponse,
|
|
)
|
|
from .search import (
|
|
SearchMsg,
|
|
SearchConv,
|
|
SearchIndexResponse,
|
|
)
|
|
from .projects import (
|
|
ProjectCostSummary,
|
|
TokenTypeSpend,
|
|
ProjectByType,
|
|
ProjectCostDetail,
|
|
GoalSummary,
|
|
GoalChecklistItem,
|
|
GoalClaim,
|
|
GoalDetail,
|
|
GoalMilestone,
|
|
GoalTheme,
|
|
RunningConversation,
|
|
GoalBoardEntry,
|
|
GoalsResponse,
|
|
ProjectSummary,
|
|
ProjectWorker,
|
|
IndexMeta,
|
|
OgImage,
|
|
KeyFile,
|
|
ProjectCommit,
|
|
ProjectDetail,
|
|
ProjectsResponse,
|
|
)
|
|
from .services import (
|
|
ServiceSummary,
|
|
ServiceDetail,
|
|
ServicesResponse,
|
|
)
|
|
from .misc import (
|
|
GhLogin,
|
|
UiStateValue,
|
|
OkResponse,
|
|
ModelInfo,
|
|
ModelsResponse,
|
|
ModelPreset,
|
|
ModelPresetResponse,
|
|
PendingLogin,
|
|
LoginState,
|
|
UsageRead,
|
|
AccountStatus,
|
|
LoginCodeResult,
|
|
Account,
|
|
AccountsResponse,
|
|
AccountRunner,
|
|
AccountHealthConversation,
|
|
AccountHealth,
|
|
WorkerLoginHealth,
|
|
AccountsHealthResponse,
|
|
AccountCheckResult,
|
|
Profile,
|
|
ProfilesResponse,
|
|
Worker,
|
|
WorkerClaudeProxy,
|
|
WorkerOpencodeProxy,
|
|
WorkersResponse,
|
|
LabSyncItem,
|
|
RepoPlugin,
|
|
RepoPluginCell,
|
|
RepoPluginWorker,
|
|
RepoPluginsView,
|
|
WorkerLabSync,
|
|
OpenRouterModel,
|
|
OpenRouterModelsResponse,
|
|
SpawnResult,
|
|
CodeModeRunner,
|
|
CodeModeStatus,
|
|
InterruptResult,
|
|
UploadedFile,
|
|
UploadResult,
|
|
ConversationMetaResponse,
|
|
MetaUpdateResult,
|
|
ArchiveOldResult,
|
|
AutoArchiveItem,
|
|
AutoArchiveResult,
|
|
BannerStep,
|
|
BannerStatus,
|
|
HomeTile,
|
|
HomeTileDay,
|
|
HomeTilesResponse,
|
|
MachineAttention,
|
|
MachineAttentionItem,
|
|
MachinesWakeable,
|
|
MachineWakeResult,
|
|
WakeableMachine,
|
|
GenProgress,
|
|
GenProgressSnapshot,
|
|
)
|
|
from .diff import (
|
|
CommitRef,
|
|
ConversationCommits,
|
|
DiffLine,
|
|
DiffHunk,
|
|
FileDiff,
|
|
WorktreeRef,
|
|
DiffResult,
|
|
)
|
|
from .cron import (
|
|
CronRun,
|
|
CronRunConfig,
|
|
CronJob,
|
|
CronJobsResponse,
|
|
CronPromptFile,
|
|
GuestCronJob,
|
|
GuestCronLimits,
|
|
GuestCronJobsResponse,
|
|
)
|
|
from .agents import (
|
|
AgentSummary,
|
|
AgentsTotals,
|
|
AgentsResponse,
|
|
AgentRun,
|
|
AgentDay,
|
|
AgentDetail,
|
|
ClaudeHookEntry,
|
|
ClaudeHooksResponse,
|
|
)
|
|
|
|
__all__ = [
|
|
"GuestClaude",
|
|
"ComputerPolicy",
|
|
"ComputerLimits",
|
|
"Computer",
|
|
"ComputersResponse",
|
|
"ComputerEnroll",
|
|
"ComputersWaiting",
|
|
"IdpApp",
|
|
"IdpStatus",
|
|
"GuestIdp",
|
|
"IdpSyncResult",
|
|
"AuthMethods",
|
|
"TerminalSession",
|
|
"TerminalSessions",
|
|
"Schema",
|
|
"AccountSplit",
|
|
"FileKind",
|
|
"FileEntry",
|
|
"Pricing",
|
|
"Totals",
|
|
"Bundle",
|
|
"SkillStat",
|
|
"DashboardTotals",
|
|
"TopFile",
|
|
"Dashboard",
|
|
"SkillCopy",
|
|
"SkillSummary",
|
|
"SkillsTotals",
|
|
"SkillsResponse",
|
|
"SkillPrompt",
|
|
"ToolUsage",
|
|
"ConvNotification",
|
|
"WorktreeInfo",
|
|
"ForkedFrom",
|
|
"SpawnedBy",
|
|
"AutoArchived",
|
|
"SpawnedConvRef",
|
|
"CronRef",
|
|
"ScheduledRef",
|
|
"AgentRunRef",
|
|
"ConvLook",
|
|
"LinearInfo",
|
|
"ConvMeta",
|
|
"ConvSummary",
|
|
"Usage",
|
|
"DeployCall",
|
|
"SubagentFormRef",
|
|
"SubagentRef",
|
|
"StoppedOn",
|
|
"SubagentListItem",
|
|
"SubagentsResponse",
|
|
"RunningAgent",
|
|
"ParentConvRef",
|
|
"Task",
|
|
"ConversationSummary",
|
|
"ThreadItem",
|
|
"FullText",
|
|
"TurnAuthor",
|
|
"ProjectGrant",
|
|
"NotifyPrefs",
|
|
"Me",
|
|
"GuestUser",
|
|
"UsersResponse",
|
|
"DaySpend",
|
|
"ProjectSpend",
|
|
"UserConversation",
|
|
"UserActivity",
|
|
"LoginLink",
|
|
"ShareCandidate",
|
|
"AudienceMember",
|
|
"ConversationShare",
|
|
"NewProjectAccess",
|
|
"NewProjectPolicy",
|
|
"DomainDns",
|
|
"DomainStatus",
|
|
"GuestShortcut",
|
|
"CurvePoint",
|
|
"AnimationCurve",
|
|
"GuestDefaults",
|
|
"GuestSkill",
|
|
"GuestSkillsResponse",
|
|
"TurnUsage",
|
|
"ArtefactItem",
|
|
"ConversationDetail",
|
|
"ConversationsResponse",
|
|
"NotifConversation",
|
|
"NotificationsResponse",
|
|
"FeedNotification",
|
|
"UnreadNotificationsResponse",
|
|
"NotifStateResponse",
|
|
"NotifStateChange",
|
|
"FreshContextSettings",
|
|
"DeliveryStatus",
|
|
"NotifyResult",
|
|
"AskRecord",
|
|
"NotifyLogEntry",
|
|
"NotifyLogResponse",
|
|
"AskFormRecord",
|
|
"AskFormsResponse",
|
|
"SearchMsg",
|
|
"SearchConv",
|
|
"SearchIndexResponse",
|
|
"ProjectCostSummary",
|
|
"TokenTypeSpend",
|
|
"ProjectByType",
|
|
"ProjectCostDetail",
|
|
"GoalSummary",
|
|
"GoalChecklistItem",
|
|
"GoalClaim",
|
|
"GoalDetail",
|
|
"GoalMilestone",
|
|
"GoalTheme",
|
|
"RunningConversation",
|
|
"GoalBoardEntry",
|
|
"GoalsResponse",
|
|
"ProjectSummary",
|
|
"ProjectWorker",
|
|
"IndexMeta",
|
|
"OgImage",
|
|
"KeyFile",
|
|
"ProjectCommit",
|
|
"ProjectDetail",
|
|
"ProjectsResponse",
|
|
"ServiceSummary",
|
|
"ServiceDetail",
|
|
"ServicesResponse",
|
|
"UiStateValue",
|
|
"OkResponse",
|
|
"ModelInfo",
|
|
"ModelsResponse",
|
|
"ModelPreset",
|
|
"ModelPresetResponse",
|
|
"PendingLogin",
|
|
"GhLogin",
|
|
"LoginState",
|
|
"UsageRead",
|
|
"AccountStatus",
|
|
"LoginCodeResult",
|
|
"Account",
|
|
"AccountsResponse",
|
|
"AccountRunner",
|
|
"AccountHealthConversation",
|
|
"AccountHealth",
|
|
"WorkerLoginHealth",
|
|
"AccountsHealthResponse",
|
|
"AccountCheckResult",
|
|
"Profile",
|
|
"ProfilesResponse",
|
|
"Worker",
|
|
"WorkerClaudeProxy",
|
|
"WorkerOpencodeProxy",
|
|
"WorkersResponse",
|
|
"LabSyncItem",
|
|
"RepoPlugin",
|
|
"RepoPluginCell",
|
|
"RepoPluginWorker",
|
|
"RepoPluginsView",
|
|
"WorkerLabSync",
|
|
"OpenRouterModel",
|
|
"OpenRouterModelsResponse",
|
|
"SpawnResult",
|
|
"CodeModeRunner",
|
|
"CodeModeStatus",
|
|
"InterruptResult",
|
|
"UploadedFile",
|
|
"UploadResult",
|
|
"ConversationMetaResponse",
|
|
"MetaUpdateResult",
|
|
"ArchiveOldResult",
|
|
"AutoArchiveItem",
|
|
"AutoArchiveResult",
|
|
"BannerStep",
|
|
"BannerStatus",
|
|
"HomeTile",
|
|
"HomeTileDay",
|
|
"HomeTilesResponse",
|
|
"MachineAttention",
|
|
"MachineAttentionItem",
|
|
"MachinesWakeable",
|
|
"MachineWakeResult",
|
|
"WakeableMachine",
|
|
"CommitRef",
|
|
"ConversationCommits",
|
|
"DiffLine",
|
|
"DiffHunk",
|
|
"FileDiff",
|
|
"WorktreeRef",
|
|
"DiffResult",
|
|
"CronRun",
|
|
"CronRunConfig",
|
|
"CronJob",
|
|
"CronJobsResponse",
|
|
"CronPromptFile",
|
|
"AgentSummary",
|
|
"AgentsTotals",
|
|
"AgentsResponse",
|
|
"AgentRun",
|
|
"AgentDay",
|
|
"AgentDetail",
|
|
"ClaudeHookEntry",
|
|
"ClaudeHooksResponse",
|
|
"EffortUsage",
|
|
"ModelUsage",
|
|
"PlanPct",
|
|
"Resource",
|
|
"RelatedConversation",
|
|
"RelatedConversationsResponse",
|
|
*_usage_all,
|
|
*_scheduled_all,
|
|
*_whatsnew_all,
|
|
*_movies_all,
|
|
*_meta_all,
|
|
*_hostfiles_all,
|
|
*_perf_all,
|
|
*_perf_storage_all,
|
|
*_guest_perf_all,
|
|
*_bgtasks_all,
|
|
*_chrome_all,
|
|
*_security_all,
|
|
*_mcp_all,
|
|
*_tags_all,
|
|
*_drafts_all,
|
|
*_roles_all,
|
|
*_telemetry_all,
|
|
*_plugin_commands_all,
|
|
]
|