cowork-dash 0.1.6__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.
- cowork_dash-0.1.7/.claude/settings.local.json +26 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/CHANGELOG.md +19 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/PKG-INFO +1 -1
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/agent.py +65 -24
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/app.py +602 -333
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/assets/styles.css +12 -0
- cowork_dash-0.1.7/cowork_dash/backends.py +435 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/canvas.py +96 -37
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/cli.py +23 -12
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/components.py +0 -1
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/config.py +21 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/file_utils.py +147 -18
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/layout.py +9 -2
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/tools.py +196 -7
- cowork_dash-0.1.7/cowork_dash/virtual_fs.py +468 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/pyproject.toml +7 -1
- cowork_dash-0.1.7/tests/conftest.py +87 -0
- cowork_dash-0.1.7/tests/test_backends.py +434 -0
- cowork_dash-0.1.7/tests/test_canvas.py +527 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/tests/test_core.py +2 -1
- cowork_dash-0.1.7/tests/test_file_utils.py +458 -0
- cowork_dash-0.1.7/tests/test_virtual_fs.py +486 -0
- cowork_dash-0.1.7/uv.lock +2715 -0
- cowork_dash-0.1.6/.claude/settings.local.json +0 -16
- cowork_dash-0.1.6/docs/CLI_USAGE.md +0 -303
- cowork_dash-0.1.6/tests/conftest.py +0 -44
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/.gitignore +0 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/LICENSE +0 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/MANIFEST.in +0 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/README.md +0 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/__init__.py +0 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/__main__.py +0 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/assets/app.js +0 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/assets/favicon.ico +0 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/cowork_dash/assets/favicon.svg +0 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/docs/dark.png +0 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/docs/light.png +0 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/examples/example_agent.py +0 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/examples/python_api_example.py +0 -0
- {cowork_dash-0.1.6 → cowork_dash-0.1.7}/templates/index.html +0 -0
- {cowork_dash-0.1.6 → 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,24 @@ 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
|
+
|
|
8
26
|
## [0.1.6] - 2026-01-25
|
|
9
27
|
|
|
10
28
|
### Fixed
|
|
@@ -118,6 +136,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
118
136
|
- Resizable split-pane interface
|
|
119
137
|
- Upload/download functionality for files
|
|
120
138
|
|
|
139
|
+
[0.1.7]: https://github.com/dkedar7/cowork-dash/compare/v0.1.6...v0.1.7
|
|
121
140
|
[0.1.6]: https://github.com/dkedar7/cowork-dash/compare/v0.1.5...v0.1.6
|
|
122
141
|
[0.1.5]: https://github.com/dkedar7/cowork-dash/compare/v0.1.4...v0.1.5
|
|
123
142
|
[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.
|
|
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,23 +1,23 @@
|
|
|
1
1
|
import os
|
|
2
|
-
|
|
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
|
+
)
|