cowork-dash 0.1.5__tar.gz → 0.1.7__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. cowork_dash-0.1.7/.claude/settings.local.json +26 -0
  2. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/CHANGELOG.md +29 -0
  3. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/PKG-INFO +1 -1
  4. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/agent.py +69 -25
  5. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/app.py +636 -321
  6. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/assets/styles.css +12 -0
  7. cowork_dash-0.1.7/cowork_dash/backends.py +435 -0
  8. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/canvas.py +96 -37
  9. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/cli.py +23 -12
  10. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/components.py +0 -1
  11. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/config.py +21 -0
  12. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/file_utils.py +147 -18
  13. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/layout.py +11 -2
  14. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/tools.py +196 -7
  15. cowork_dash-0.1.7/cowork_dash/virtual_fs.py +468 -0
  16. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/pyproject.toml +7 -1
  17. cowork_dash-0.1.7/tests/conftest.py +87 -0
  18. cowork_dash-0.1.7/tests/test_backends.py +434 -0
  19. cowork_dash-0.1.7/tests/test_canvas.py +527 -0
  20. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/tests/test_core.py +2 -1
  21. cowork_dash-0.1.7/tests/test_file_utils.py +458 -0
  22. cowork_dash-0.1.7/tests/test_virtual_fs.py +486 -0
  23. cowork_dash-0.1.7/uv.lock +2715 -0
  24. cowork_dash-0.1.5/.claude/settings.local.json +0 -16
  25. cowork_dash-0.1.5/docs/CLI_USAGE.md +0 -303
  26. cowork_dash-0.1.5/tests/conftest.py +0 -44
  27. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/.gitignore +0 -0
  28. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/LICENSE +0 -0
  29. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/MANIFEST.in +0 -0
  30. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/README.md +0 -0
  31. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/__init__.py +0 -0
  32. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/__main__.py +0 -0
  33. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/assets/app.js +0 -0
  34. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/assets/favicon.ico +0 -0
  35. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/cowork_dash/assets/favicon.svg +0 -0
  36. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/docs/dark.png +0 -0
  37. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/docs/light.png +0 -0
  38. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/examples/example_agent.py +0 -0
  39. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/examples/python_api_example.py +0 -0
  40. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/templates/index.html +0 -0
  41. {cowork_dash-0.1.5 → cowork_dash-0.1.7}/tests/__init__.py +0 -0
@@ -0,0 +1,26 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(tree:*)",
5
+ "Bash(find:*)",
6
+ "Bash(xargs:*)",
7
+ "Bash(python3:*)",
8
+ "Bash(cat:*)",
9
+ "Bash(gh pr view:*)",
10
+ "Bash(gh pr create:*)",
11
+ "Bash(pip show:*)",
12
+ "Bash(DEEPAGENT_VIRTUAL_FS=true uv run python:*)",
13
+ "Bash(ls:*)",
14
+ "Bash(source ~/.zshrc)",
15
+ "Bash(vact cowork)",
16
+ "Bash(python:*)",
17
+ "Bash(grep:*)",
18
+ "Bash(uv run python:*)",
19
+ "Bash(uv run ruff check:*)",
20
+ "Bash(uv run pytest:*)",
21
+ "Bash(uv add:*)"
22
+ ],
23
+ "deny": [],
24
+ "ask": []
25
+ }
26
+ }
@@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.7] - 2026-01-26
9
+
10
+ ### Added
11
+ - Virtual filesystem mode (`--virtual-fs` flag) for multi-user session isolation
12
+ - VirtualFilesystem, VirtualPath, and SessionManager classes for in-memory storage
13
+ - VirtualFilesystemBackend implementing DeepAgents' BackendProtocol
14
+ - Session-aware agent factory creating per-session agents with isolated backends
15
+ - Comprehensive test suite with 184 tests covering virtual FS, backends, canvas, and file utilities
16
+ - Tool context system for session-aware file operations
17
+
18
+ ### Changed
19
+ - File and canvas utilities now support both physical and virtual filesystems
20
+ - CLI updated with `--virtual-fs` flag for ephemeral session mode
21
+
22
+ ### Removed
23
+ - Dead code cleanup: removed 156 lines of unused imports, functions, and debug methods
24
+ - Removed obsolete CLI_USAGE.md documentation
25
+
26
+ ## [0.1.6] - 2026-01-25
27
+
28
+ ### Fixed
29
+ - Duplicate agent response rendering issue
30
+ - Agent state now resets on page refresh for clean sessions
31
+ - Tool calls indicator disappearing during execution (race condition fix)
32
+ - Missing return value in interrupt handling callback
33
+ - Default agent workspace now uses environment variable or current directory
34
+
8
35
  ## [0.1.5] - 2026-01-24
9
36
 
10
37
  ### Added
@@ -109,6 +136,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
109
136
  - Resizable split-pane interface
110
137
  - Upload/download functionality for files
111
138
 
139
+ [0.1.7]: https://github.com/dkedar7/cowork-dash/compare/v0.1.6...v0.1.7
140
+ [0.1.6]: https://github.com/dkedar7/cowork-dash/compare/v0.1.5...v0.1.6
112
141
  [0.1.5]: https://github.com/dkedar7/cowork-dash/compare/v0.1.4...v0.1.5
113
142
  [0.1.4]: https://github.com/dkedar7/cowork-dash/compare/v0.1.3...v0.1.4
114
143
  [0.1.3]: https://github.com/dkedar7/cowork-dash/compare/v0.1.2...v0.1.3
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cowork-dash
3
- Version: 0.1.5
3
+ Version: 0.1.7
4
4
  Summary: AI Agent Web Interface with Filesystem and Canvas Visualization
5
5
  Project-URL: Homepage, https://github.com/dkedar7/cowork-dash
6
6
  Project-URL: Documentation, https://github.com/dkedar7/cowork-dash/blob/main/README.md
@@ -1,22 +1,23 @@
1
- import uuid
1
+ import os
2
+
2
3
  from deepagents import create_deep_agent
3
- from langgraph.checkpoint.memory import InMemorySaver
4
4
  from deepagents.backends import FilesystemBackend
5
+ from langgraph.checkpoint.memory import InMemorySaver
5
6
 
6
7
  from cowork_dash.tools import (
7
8
  add_to_canvas,
9
+ bash,
10
+ clear_notebook_canvas_items,
8
11
  create_cell,
9
- insert_cell,
10
- modify_cell,
11
12
  delete_cell,
12
- execute_cell,
13
13
  execute_all_cells,
14
+ execute_cell,
15
+ get_notebook_canvas_items,
14
16
  get_script,
15
17
  get_variables,
18
+ insert_cell,
19
+ modify_cell,
16
20
  reset_notebook,
17
- get_notebook_canvas_items,
18
- clear_notebook_canvas_items,
19
- bash,
20
21
  )
21
22
 
22
23
  SYSTEM_PROMPT = """You are a helpful AI assistant with access to a filesystem workspace and a Python code execution environment.
@@ -92,27 +93,70 @@ Work iteratively like a human using Jupyter:
92
93
 
93
94
  The workspace is your sandbox - feel free to create files, organize content, and help users manage their projects."""
94
95
 
95
- backend = FilesystemBackend(root_dir=str("/"), virtual_mode=True)
96
+ # Get workspace root from environment variable or default to current directory
97
+ workspace_root = os.getenv("DEEPAGENT_WORKSPACE_ROOT", os.getcwd())
98
+ backend = FilesystemBackend(root_dir=workspace_root, virtual_mode=True)
99
+
100
+ # Default tools list used by both global and session agents
101
+ AGENT_TOOLS = [
102
+ add_to_canvas,
103
+ bash,
104
+ create_cell,
105
+ insert_cell,
106
+ modify_cell,
107
+ delete_cell,
108
+ execute_cell,
109
+ execute_all_cells,
110
+ get_script,
111
+ get_variables,
112
+ reset_notebook,
113
+ get_notebook_canvas_items,
114
+ clear_notebook_canvas_items,
115
+ ]
96
116
 
117
+ # Global agent for physical filesystem mode
118
+ # This uses FilesystemBackend which writes to disk
97
119
  agent = create_deep_agent(
98
120
  system_prompt=SYSTEM_PROMPT,
99
121
  name="Cowork Dash",
100
122
  backend=backend,
101
- tools=[
102
- add_to_canvas,
103
- bash,
104
- create_cell,
105
- insert_cell,
106
- modify_cell,
107
- delete_cell,
108
- execute_cell,
109
- execute_all_cells,
110
- get_script,
111
- get_variables,
112
- reset_notebook,
113
- get_notebook_canvas_items,
114
- clear_notebook_canvas_items,
115
- ],
123
+ tools=AGENT_TOOLS,
116
124
  interrupt_on=dict(bash=True),
117
125
  checkpointer=InMemorySaver()
118
- )
126
+ )
127
+
128
+
129
+ def create_session_agent(session_id: str):
130
+ """Create an agent with session-specific VirtualFilesystem backend.
131
+
132
+ This factory function creates an agent that uses the VirtualFilesystem
133
+ for the given session, enabling isolated file storage between sessions.
134
+
135
+ Args:
136
+ session_id: The session ID to use for VirtualFilesystem lookup.
137
+
138
+ Returns:
139
+ A configured deep agent that uses VirtualFilesystemBackend.
140
+ """
141
+ from .backends import VirtualFilesystemBackend
142
+ from .virtual_fs import get_session_manager
143
+
144
+ # Get the VirtualFilesystem for this session
145
+ fs = get_session_manager().get_filesystem(session_id)
146
+ if fs is None:
147
+ # Session doesn't exist, create it
148
+ get_session_manager().create_session(session_id)
149
+ fs = get_session_manager().get_filesystem(session_id)
150
+
151
+ # Create backend wrapping the VirtualFilesystem
152
+ session_backend = VirtualFilesystemBackend(fs)
153
+
154
+ # Create and return the agent
155
+ return create_deep_agent(
156
+ system_prompt=SYSTEM_PROMPT,
157
+ name="Cowork Dash",
158
+ backend=session_backend,
159
+ tools=AGENT_TOOLS,
160
+ interrupt_on=dict(bash=True),
161
+ checkpointer=InMemorySaver()
162
+ )