How tzpzfmz/upsp works
UPSP is a local Windows application for maintaining a continuing, auditable persona across model calls. The principal workflow is initialization, then a serial setup → reaction (including tool practice) → cleanup cycle; assembled context and persisted state, memory, relationships, and Round records carry results forward. The README documents the product stages and capabilities; source-index references and excerpts support the named implementation layers. Some GUI-to-backend wiring and unsampled subsystem calls are not shown, so those links are omitted or marked unverified.
Main entry points: executor.py Runtime Executor · context.py Context Assembly · cleanup_pipeline.py Cleanup Stage · reaction_loop.py Reaction Loop
Components 21
User Surface
- Windows Desktop Shell
desktop/UPSP.Desktop/MainForm.cs - Conversation UI
UPSP/gui/src/view.ts - GUI Runtime
UPSP/gui/src/runtime.ts
Runtime Cycle
- Local Backend Entry
UPSP/OS/main.py - Runtime Executor
UPSP/OS/engines/executor.py - Setup Stage
UPSP/OS/engines/setup_runner.py - Reaction Loop
UPSP/OS/engines/reaction_loop.py - Cleanup Stage
UPSP/OS/engines/cleanup_pipeline.py
Context and Action
- Context Assembly
UPSP/OS/assembly/context.py - Tool Dispatch
UPSP/OS/engines/general_tool_dispatcher.py
Persona Records
- Memory Records
UPSP/OS/data/memory_store.py - Relationship Records
UPSP/OS/data/relation_store.py - Persona State
UPSP/OS/data/state_store.py - Context Cache
UPSP/OS/data/context_store.py - Workbench
UPSP/OS/data/workbench.py - Round History
UPSP/OS/data/chronicle_store.py
Identity and Setup
- Persona Initialization
UPSP/initialization/persona_initializer.py - Instance Management
UPSP/initialization/instance_service.py - Model Configuration
UPSP/OS/data/config_store.py
Other components
- User
- Configured Model Service
Connections 23
- User → Windows Desktop Shell: uses
README.md - Windows Desktop Shell → Conversation UI: presents
- Conversation UI → GUI Runtime: dispatches UI events
UPSP/gui/src/app.ts - GUI Runtime → Local Backend Entry: requests
- User → Persona Initialization: creates persona
README.md - Persona Initialization → Instance Management: initializes instance
UPSP/initialization/instance_service.py - Local Backend Entry → Runtime Executor: starts runtime
UPSP/OS/main.py - Runtime Executor → Setup Stage: runs setup
- Runtime Executor → Reaction Loop: runs reaction
- Runtime Executor → Cleanup Stage: runs cleanup
- Reaction Loop → Configured Model Service: sends request
README.md - Reaction Loop → Tool Dispatch: dispatches tools
- Runtime Executor → Context Assembly: assembles frames
UPSP/OS/engines/runtime_services.py - Context Assembly → Memory Records: reads memory
UPSP/OS/assembly/context.py - Context Assembly → Relationship Records: reads relationships
UPSP/OS/assembly/context.py - Context Assembly → Context Cache: uses context cache
UPSP/OS/assembly/context.py - Context Assembly → Workbench: mounts materials
UPSP/OS/assembly/context.py - Cleanup Stage → Memory Records: settles memory
- Cleanup Stage → Persona State: settles state
- Cleanup Stage → Round History: records Round
UPSP/OS/engines/cleanup_pipeline.py - Runtime Executor → Persona State: reads and updates
UPSP/OS/engines/runtime_services.py - Runtime Executor → Model Configuration: loads settings
UPSP/OS/engines/runtime_services.py - Model Configuration → Configured Model Service: configures connection
UPSP/OS/data/config_store.py