ReMe/reme/schema/__init__.py
jinliyl 524b1b6908
feat(studio): unify the workbench and proactive runtime (#764)
* fix(proactive): simplify round files and restore failed summaries

* fix(proactive): validate document-relative Markdown links

* feat(proactive_agent): implement v2 daily record workflow with single-file decision

- Add ProactiveAgentStepV2 class to support single daily note decision and reminder
- Introduce RoundOutputs for v2 round file tracking, and keep RoundArtifacts for v1 summary backup
- Refactor AgentOutbox to support both v1 standalone reminder files and v2 daily reminder records
- Add proactive_record utilities to parse and validate v2 daily record frontmatter and metadata
- Enhance proactive_agent to prepare, read, and manage artifacts for both v1 and v2 flows
- Add configuration profile proactive_v2 to enable new workflow with backward compatibility
- Update proactive.yaml and reactive proactive_agent_step configuration comment for easy switching
- Provide extensive schema validation for v2 reminders ensuring priority and message consistency
- Document v2 workflow and usage in English and Chinese runtime docs
- Add unit tests for v2 step verifying single file output and proper decision handling

* refactor(agent/runtime): replace ReminderRef with string keys and simplify reminder handling

- Remove ReminderRef model and switch to using workspace-relative string keys for reminders
- Simplify AgentOutbox to read, write, and manage reminders keyed by strings
- Change file locking and version checking to protect concurrent edits on daily record files
- Replace legacy and v2 reminder file handling with unified ReminderFiles storage
- Adjust ChatNotifications to operate with the new key scheme and update pending/read sets
- Refactor RoundOutputs to RoundRecord for safer round record tracking and rollback
- Remove unused ProactiveRunResult and related references from imports and exports
- Update InboxWakeRequest, AgentReminder, and related models for consistent ID and path validation
- Adjust proactive agent runtime and local runtime to check reminder versions before commit
- Correct language and docs to describe reminders as daily records instead of separate files
- Clean up roles of inbox and outbox for reminder ownership, delivery, and acknowledgments

* fix(proactive): serialize round commits and align desktop reminders

* refactor(proactive): unify task triggers in Proactive Runtime

* fix(proactive): bound reminder payloads and simplify receipts

* refactor(studio): share workbench and simplify proactive delivery

* fix(studio): update and centralize build dependencies

* fix(proactive): guard draft repair and verify Studio deployments

* chore(docs): update source-map-js

* feat(release): support publishing selected artifacts from a tag

* chore(studio): remove the public playground

* refactor: simplify reminders and release workflows

* fix: preserve proactive records and align release provenance

* test(proactive): remove brittle prompt and preset assertions

* fix(proactive): register reminders after input acknowledgement

* feat(notebook): list projects across todos and ideas

* feat(studio): connect mobile apps to configurable ReMe services

* fix(proactive): reserve registered reminder paths

* fix(studio): request Android local network access

* fix(proactive): reserve reminder paths referenced by receipts
2026-11-23 17:19:21 +08:00

156 lines
3.8 KiB
Python

"""Schema"""
from .application_config import ApplicationConfig, ComponentConfig, JobConfig
from .agent_reply import AgentReply, collect_reply, replay_reply
from .agent_session import SessionMessage, SessionSnapshot, SessionStatus
from .proactive_runtime import (
AgentName,
AgentType,
AgentSession,
ChatAgentConfig,
NotificationConfig,
AgentReminder,
SubmitChatReminderRequest,
)
from .agent_activity import AgentActivity
from .agent_message import AgentMessage, ArtifactItem, SummaryItem, TextItem, ToolAction, ToolItem
from .agent_view import (
AskAgentRequest,
AgentRequest,
AgentSessionView,
TaskDocumentRequest,
AgentView,
AgentSnapshot,
AgentUpdate,
AgentHeartbeat,
ClientActivity,
ClientInfo,
)
from .compaction import CallDecision, CompactionOptions, CompactionRequest, CompactionResult
from .dream import (
DreamExtractOutput,
DreamState,
DreamUnit,
IntegrateOutcome,
)
from .proactive import (
ProactiveResult,
ProactiveState,
ProactiveStateFile,
ProactiveTopic,
)
from .emb_node import EmbNode
from .event import Event
from .agent_inbox import InboxItem, InboxReceipt
from .finance import CryptoQuote, FinanceNewsItem, StockQuote
from .proactive_agent import (
CreateProactiveAgentConfig,
ManageProactiveAgentRequest,
NotificationWindow,
ProactiveAgent,
ProactiveAgentConfig,
TaskSettings,
)
from .file_chunk import FileChunk
from .file_front_matter import FileFrontMatter
from .graph_snapshot import GraphSnapshot, GraphSnapshotEdge, GraphSnapshotNode
from .idea import Idea
from .job_execution import JobExecution, JobExecutionStatus
from .notebook import IdeaRequest, TodoRequest
from .file_link import FileLink
from .file_node import FileNode
from .request import Request
from .response import Response
from .resource_metadata import ResourceFile, ResourceMetadata
from .stream_chunk import StreamChunk
from .speech import ASRResult, AudioFormat, TTSResult
from .token_usage import TokenUsage
from .todo import Todo, TodoProgress
from .traverse_graph import TraverseGraph, TraverseGraphEdge, TraverseGraphNode
__all__ = [
"ASRResult",
"AudioFormat",
"TTSResult",
"AgentActivity",
"AgentMessage",
"ArtifactItem",
"SummaryItem",
"TextItem",
"ToolAction",
"ToolItem",
"AgentSnapshot",
"AgentUpdate",
"AgentHeartbeat",
"ClientActivity",
"ClientInfo",
"TaskSettings",
"AgentReply",
"collect_reply",
"replay_reply",
"CallDecision",
"CompactionOptions",
"CompactionRequest",
"CompactionResult",
"ApplicationConfig",
"ComponentConfig",
"DreamExtractOutput",
"DreamState",
"DreamUnit",
"EmbNode",
"Event",
"InboxReceipt",
"InboxItem",
"FinanceNewsItem",
"StockQuote",
"CryptoQuote",
"AgentView",
"AgentRequest",
"AskAgentRequest",
"TaskDocumentRequest",
"AgentSessionView",
"AgentSession",
"ChatAgentConfig",
"ManageProactiveAgentRequest",
"NotificationWindow",
"ProactiveAgent",
"ProactiveAgentConfig",
"CreateProactiveAgentConfig",
"AgentReminder",
"AgentName",
"AgentType",
"NotificationConfig",
"SubmitChatReminderRequest",
"FileChunk",
"FileFrontMatter",
"FileLink",
"FileNode",
"GraphSnapshot",
"GraphSnapshotEdge",
"GraphSnapshotNode",
"Idea",
"IdeaRequest",
"IntegrateOutcome",
"JobConfig",
"JobExecution",
"JobExecutionStatus",
"ProactiveResult",
"ProactiveState",
"ProactiveStateFile",
"ProactiveTopic",
"Request",
"Response",
"ResourceFile",
"ResourceMetadata",
"SessionMessage",
"SessionSnapshot",
"SessionStatus",
"StreamChunk",
"TokenUsage",
"Todo",
"TodoProgress",
"TodoRequest",
"TraverseGraph",
"TraverseGraphEdge",
"TraverseGraphNode",
]