Projects: shareable, registry-backed, container-mounted; drop ticket board
Nightly Build / build (push) Successful in 6m27s
Nightly Build / build (push) Successful in 6m27s
Rework projects from single-user leftovers into shareable endeavours.
- DB: move `projects` from the owner bucket to the registry (system.db,
not encrypted); add `owner_user_id` + `slug` (drop free `path`); new
`project_members(project_id, user_id, can_write)` mirroring
`shared_folder_members`. Drop `project_tickets` entirely. Only user↔agent
conversations stay encrypted (per-user DB) — each member keeps a private
project chat. Registry home dissolves the cross-DB-FK problem.
- Filesystem/container: on disk `{WD}/projects/{owner_userid}/{slug}`,
agent/container path `projects/{owner_username}/{slug}`. Two-segment routing
in UserFs (ProjectMount + host_base_and_tail arm) and a second loop in
build_user_fs; read-only members get a :ro mount. Reuse the shared-folder
remount machinery (refresh_user_shared_folders -> refresh_user_mounts).
- Remove the ticket system: ProjectTicketManager, UserContext.tickets, its
wiring, and the project_tickets references in scheduled_jobs/cron.
- API: repoint handlers to the registry pool + membership scoping. Sharing is
self-service — owner or any write-member may add/remove members and set
read/write; only the owner deletes; the owner cannot be removed. New
POST/DELETE /api/projects/{id}/members[/{user_id}]. Seed `@fs_any allow
projects/*`; build_runtime_run_context sets working_directory to the agent
path and drops the host-path allow_fs_writes.
- Frontend: create form without the free path field, owner/read-write badges;
the detail page becomes header + description + sharing panel + Open chat + a
file-explorer placeholder (the future primary surface). i18n en/it/fr.
This commit is contained in:
@@ -34,8 +34,6 @@ use crate::location::LocationManager;
|
||||
use crate::mcp::McpManager;
|
||||
use crate::memory::MemoryManager;
|
||||
use crate::plugin::PluginManager;
|
||||
use crate::projects::tickets::ProjectTicketManager;
|
||||
use crate::projects::ProjectManager;
|
||||
use crate::provider::ProviderRegistry;
|
||||
use crate::run_context::RunContextManager;
|
||||
use crate::secrets::SecretsStore;
|
||||
@@ -86,7 +84,10 @@ impl Skald {
|
||||
///
|
||||
/// Best-effort by contract: the membership row is already committed, so a Docker
|
||||
/// hiccup must not fail the caller; the state settles at the next login/boot.
|
||||
pub async fn refresh_user_shared_folders(&self, user_id: &str) -> anyhow::Result<()> {
|
||||
///
|
||||
/// Covers both shared-folder and project membership changes — both feed
|
||||
/// `build_user_fs`, so a recreate reflows either mount set.
|
||||
pub async fn refresh_user_mounts(&self, user_id: &str) -> anyhow::Result<()> {
|
||||
// New mount topology (graceful stop → remove → recreate from current rows).
|
||||
self.container().recreate(user_id).await?;
|
||||
|
||||
@@ -146,8 +147,6 @@ impl Skald {
|
||||
|
||||
// Tasks
|
||||
pub fn cron(&self) -> &Arc<TaskManager> { &self.tasks.cron }
|
||||
pub fn projects(&self) -> &Arc<ProjectManager> { &self.tasks.projects }
|
||||
pub fn ticket_manager(&self) -> &Arc<ProjectTicketManager> { &self.tasks.ticket_manager }
|
||||
|
||||
// Conversation
|
||||
pub fn manager(&self) -> &Arc<ChatSessionManager> { &self.conversation.manager }
|
||||
|
||||
Reference in New Issue
Block a user