-
Notifications
You must be signed in to change notification settings - Fork 1
Workspace
Edge adaptation of the upstream workspace directory management system.
Upstream reference: Workspace
WorkspaceRegistry (ctx.workspaceRegistry) associates stable UUIDs with working directories, each carrying a display title and an ordered session ledger. Operations include create, rename, delete, reorder, attach/detach sessions, and archive sessions. Workspace state is persisted through storageDomain.
Installed as-is. All workspace logic — identity, membership, ordering, session ledger, archive — is upstream code.
Each workspace mutation in instance.ts manually broadcasts a host/workspace-changed or host/workspace-removed frame over WebSocket after the operation completes. Upstream does this through the in-process Connection plugin; Edge replaces the transport with explicit broadcast() calls.
On first DO activation (no existing workspace state), Edge creates a default workspace at /workspace. This path matches the Computer VFS root where files are stored.
- Workspace identity (branded UUID), path canonicalization, uniqueness rules
- Session membership and attachment logic
- Ordering semantics (
insertBefore) - Archive session set management
- Persistence format (storageDomain records)
Workspace state lives in storageDomain backed by DO KV. The registry caches the full workspace list in memory after bootstrap. List reads are O(1) from the in-memory cache. Mutations are single-key KV writes.
Each workspace mutation produces one WebSocket frame broadcast. Since workspace operations are infrequent (user-initiated), this adds negligible overhead. Upstream broadcasts the same frames through a different transport.
| Component | Category | Edge Code |
|---|---|---|
| WorkspaceRegistry | Reuse | One ctx.plugin() call |
| CRUD broadcast | Bridge | Per-mutation broadcast() in instance.ts |
| Default workspace | Bridge | One-time /workspace creation on first boot |
Key observation: WorkspaceRegistry is fully upstream. Edge only adds the WebSocket broadcast that upstream's Connection plugin would provide, plus a one-time default workspace for the VFS root.
- Home
- Architecture
- Core & Scope
- Session & Persistence
- Model & Context
-
Execution & Tools
- Tools
- Bash
- Subprocess 🚫
- PTY Session 🚫
- Background Jobs 🚫
- Filesystem
- LSP Navigation 🚫
- Code Runtime 🚫
-
Web Access
⚠️ -
Skills
⚠️ - Workflow 🚫
- Subagent 🚫
-
Policy & Interaction
- Goal
- Approval 🚫
- Permission Presets 🚫
-
Sandbox
⚠️ - Plan Mode 🚫
- User Interaction 🚫
- Commands 🚫
- Schedule 🚫
- Message Feedback 🚫
- Platform & Access
- Development
- 首页
- 架构
- 核心与作用域
- 会话与持久化
- 模型与上下文
- 执行与工具
- 策略与交互
- 平台与接入
- 开发