cowork-dash 0.1.6__tar.gz → 0.1.8__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.8/.claude/settings.local.json +26 -0
  2. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/CHANGELOG.md +25 -0
  3. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/PKG-INFO +1 -1
  4. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/agent.py +65 -24
  5. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/app.py +602 -333
  6. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/assets/styles.css +12 -0
  7. cowork_dash-0.1.8/cowork_dash/backends.py +435 -0
  8. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/canvas.py +96 -37
  9. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/cli.py +23 -12
  10. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/components.py +0 -1
  11. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/config.py +21 -0
  12. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/file_utils.py +147 -18
  13. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/layout.py +9 -2
  14. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/tools.py +206 -15
  15. cowork_dash-0.1.8/cowork_dash/virtual_fs.py +468 -0
  16. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/pyproject.toml +7 -1
  17. cowork_dash-0.1.8/tests/conftest.py +87 -0
  18. cowork_dash-0.1.8/tests/test_backends.py +434 -0
  19. cowork_dash-0.1.8/tests/test_canvas.py +527 -0
  20. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/tests/test_core.py +2 -1
  21. cowork_dash-0.1.8/tests/test_file_utils.py +458 -0
  22. cowork_dash-0.1.8/tests/test_virtual_fs.py +486 -0
  23. cowork_dash-0.1.8/uv.lock +2715 -0
  24. cowork_dash-0.1.6/.claude/settings.local.json +0 -16
  25. cowork_dash-0.1.6/docs/CLI_USAGE.md +0 -303
  26. cowork_dash-0.1.6/tests/conftest.py +0 -44
  27. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/.gitignore +0 -0
  28. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/LICENSE +0 -0
  29. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/MANIFEST.in +0 -0
  30. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/README.md +0 -0
  31. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/__init__.py +0 -0
  32. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/__main__.py +0 -0
  33. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/assets/app.js +0 -0
  34. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/assets/favicon.ico +0 -0
  35. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/cowork_dash/assets/favicon.svg +0 -0
  36. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/docs/dark.png +0 -0
  37. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/docs/light.png +0 -0
  38. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/examples/example_agent.py +0 -0
  39. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/examples/python_api_example.py +0 -0
  40. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/templates/index.html +0 -0
  41. {cowork_dash-0.1.6 → cowork_dash-0.1.8}/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,29 @@ 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.8] - 2026-01-27
9
+
10
+ ### Fixed
11
+ - Catch AttributeError when importing pandas on partially initialized module (Linux compatibility)
12
+
13
+ ## [0.1.7] - 2026-01-26
14
+
15
+ ### Added
16
+ - Virtual filesystem mode (`--virtual-fs` flag) for multi-user session isolation
17
+ - VirtualFilesystem, VirtualPath, and SessionManager classes for in-memory storage
18
+ - VirtualFilesystemBackend implementing DeepAgents' BackendProtocol
19
+ - Session-aware agent factory creating per-session agents with isolated backends
20
+ - Comprehensive test suite with 184 tests covering virtual FS, backends, canvas, and file utilities
21
+ - Tool context system for session-aware file operations
22
+
23
+ ### Changed
24
+ - File and canvas utilities now support both physical and virtual filesystems
25
+ - CLI updated with `--virtual-fs` flag for ephemeral session mode
26
+
27
+ ### Removed
28
+ - Dead code cleanup: removed 156 lines of unused imports, functions, and debug methods
29
+ - Removed obsolete CLI_USAGE.md documentation
30
+
8
31
  ## [0.1.6] - 2026-01-25
9
32
 
10
33
  ### Fixed
@@ -118,6 +141,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
118
141
  - Resizable split-pane interface
119
142
  - Upload/download functionality for files
120
143
 
144
+ [0.1.8]: https://github.com/dkedar7/cowork-dash/compare/v0.1.7...v0.1.8
145
+ [0.1.7]: https://github.com/dkedar7/cowork-dash/compare/v0.1.6...v0.1.7
121
146
  [0.1.6]: https://github.com/dkedar7/cowork-dash/compare/v0.1.5...v0.1.6
122
147
  [0.1.5]: https://github.com/dkedar7/cowork-dash/compare/v0.1.4...v0.1.5
123
148
  [0.1.4]: https://github.com/dkedar7/cowork-dash/compare/v0.1.3...v0.1.4
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cowork-dash
3
- Version: 0.1.6
3
+ Version: 0.1.8
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,23 +1,23 @@
1
1
  import os
2
- import uuid
2
+
3
3
  from deepagents import create_deep_agent
4
- from langgraph.checkpoint.memory import InMemorySaver
5
4
  from deepagents.backends import FilesystemBackend
5
+ from langgraph.checkpoint.memory import InMemorySaver
6
6
 
7
7
  from cowork_dash.tools import (
8
8
  add_to_canvas,
9
+ bash,
10
+ clear_notebook_canvas_items,
9
11
  create_cell,
10
- insert_cell,
11
- modify_cell,
12
12
  delete_cell,
13
- execute_cell,
14
13
  execute_all_cells,
14
+ execute_cell,
15
+ get_notebook_canvas_items,
15
16
  get_script,
16
17
  get_variables,
18
+ insert_cell,
19
+ modify_cell,
17
20
  reset_notebook,
18
- get_notebook_canvas_items,
19
- clear_notebook_canvas_items,
20
- bash,
21
21
  )
22
22
 
23
23
  SYSTEM_PROMPT = """You are a helpful AI assistant with access to a filesystem workspace and a Python code execution environment.
@@ -97,25 +97,66 @@ The workspace is your sandbox - feel free to create files, organize content, and
97
97
  workspace_root = os.getenv("DEEPAGENT_WORKSPACE_ROOT", os.getcwd())
98
98
  backend = FilesystemBackend(root_dir=workspace_root, virtual_mode=True)
99
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
+ ]
116
+
117
+ # Global agent for physical filesystem mode
118
+ # This uses FilesystemBackend which writes to disk
100
119
  agent = create_deep_agent(
101
120
  system_prompt=SYSTEM_PROMPT,
102
121
  name="Cowork Dash",
103
122
  backend=backend,
104
- tools=[
105
- add_to_canvas,
106
- bash,
107
- create_cell,
108
- insert_cell,
109
- modify_cell,
110
- delete_cell,
111
- execute_cell,
112
- execute_all_cells,
113
- get_script,
114
- get_variables,
115
- reset_notebook,
116
- get_notebook_canvas_items,
117
- clear_notebook_canvas_items,
118
- ],
123
+ tools=AGENT_TOOLS,
119
124
  interrupt_on=dict(bash=True),
120
125
  checkpointer=InMemorySaver()
121
- )
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
+ )