thulp-workspace
Workspace and session management for thulp execution contexts.
Overview
This crate provides functionality for managing agent workspaces, including context, state, and session persistence. Workspaces allow AI agents to maintain state between tool executions and organize their working environment.
Features
- Create and manage multiple workspaces
- Persistent storage of workspace state
- Context data management
- Metadata storage
- Active workspace tracking
- JSON serialization/deserialization
Usage
use ;
use PathBuf;
// Create a new workspace
let workspace = new
.with_metadata
.with_context;
// Save to file
workspace.save_to_file.unwrap;
// Load from file
let loaded = load_from_file.unwrap;
// Manage workspaces
let mut manager = new;
manager.create;
manager.set_active.unwrap;
Workspace Structure
A workspace contains:
- ID: Unique identifier for the workspace
- Name: Human-readable name
- Root: Root directory path
- Metadata: Key-value pairs for workspace metadata
- Context: Structured data for the execution context
License
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.