pycodex-ws 0.7.1__tar.gz → 0.7.2__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.
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/PKG-INFO +9 -6
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/README.md +6 -3
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pyproject.toml +3 -3
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/app.py +11 -6
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/owned_process.py +23 -3
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/sessions.py +40 -19
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/sessions_ui.mjs +1 -3
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/vscode_server.py +17 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/workspace.css +40 -1
- pycodex_ws-0.7.2/workspace_server/workspace.html +375 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/workspace.mjs +70 -5
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/workspace.template.html +5 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/workspaces.py +16 -5
- pycodex_ws-0.7.1/workspace_server/workspace.html +0 -370
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/.gitignore +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/LICENSE +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_router/__init__.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_router/__main__.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_router/browser.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_router/client.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_router/index.html +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_router/protocol.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_router/server.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_ws/__init__.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_ws/feishu_auth.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_ws/feishu_card.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_ws/feishu_connection.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_ws/feishu_link.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_ws/feishu_oauth.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_ws/feishu_render.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_ws/server_support.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/pycodex_ws/workspace_config.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/WORKSPACE_API.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/__init__.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/__main__.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/agent_access.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/banners.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/content_views.LICENSE.txt +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/content_views.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/content_views.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/conversation.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/custom_frontend.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/customization.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/dialogs.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/editor.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/editor.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/external_call.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/.gitignore +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/build.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/composer.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/content_views.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/content_views.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/editor.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/editor.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/editor_context.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/package-lock.json +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/package.json +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/prompt_history.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/touch_selection.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/transcript.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/frontend/view_labels.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/markdown.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/CONTRIBUTING.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/README.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/clock-ticks/README.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/clock-ticks/preview-mobile.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/clock-ticks/preview.html +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/clock-ticks/preview.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/clock-ticks/source/custom.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/clock-ticks/source/custom.js +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/clock-ticks/source/fixture.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/clock-ticks/source/verify.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/consecutive-tool-groups/README.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/consecutive-tool-groups/preview-mobile.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/consecutive-tool-groups/preview.html +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/consecutive-tool-groups/preview.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/consecutive-tool-groups/source/fixture.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/consecutive-tool-groups/source/tool-groups.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/consecutive-tool-groups/source/tool-groups.js +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/consecutive-tool-groups/source/verify.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/exec-status/README.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/exec-status/preview-mobile.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/exec-status/preview.html +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/exec-status/preview.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/exec-status/source/custom.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/exec-status/source/custom.js +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/exec-status/source/fixture.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/exec-status/source/verify.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/file-attachments/README.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/file-attachments/source/custom.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/file-attachments/source/custom.js +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/file-attachments/source/upload_browser.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/file-attachments/source/upload_core.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/file-attachments/source/upload_core.test.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/file-attachments/source/uploads.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/reasoning-display/README.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/reasoning-display/preview-mobile.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/reasoning-display/preview.html +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/reasoning-display/preview.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/reasoning-display/source/custom.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/reasoning-display/source/custom.js +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/reasoning-display/source/fixture.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/reasoning-display/source/verify.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-time-sort/README.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-time-sort/source/custom.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-time-sort/source/custom.js +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-time-sort/source/session-time-sort.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-time-sort/source/verify.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-tips/README.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-tips/preview-mobile.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-tips/preview.html +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-tips/preview.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-tips/source/custom.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-tips/source/custom.js +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-tips/source/fixture.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-tips/source/session-tips.js +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/session-tips/source/verify.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/skill-completion/README.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/skill-completion/preview.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/skill-completion/source/custom.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/skill-completion/source/custom.js +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/skill-completion/source/skill-completion.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/skill-completion/source/skill-completion.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/skill-completion/source/verify.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/tool-calls/README.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/tool-calls/preview-mobile.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/tool-calls/preview.html +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/tool-calls/preview.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/tool-calls/source/custom.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/tool-calls/source/custom.js +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/tool-calls/source/fixture.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/tool-calls/source/verify.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/voice-input/README.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/voice-input/preview-mobile.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/voice-input/preview.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/voice-input/source/custom.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/voice-input/source/custom.js +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/voice-input/source/verify.cjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/voice-input/source/voice-input.css +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/voice-input/source/voice-input.js +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/xiaoai-notifications/README.md +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/xiaoai-notifications/preview-mobile.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/xiaoai-notifications/preview.png +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/xiaoai-notifications/source/notifications.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/xiaoai-notifications/source/runtime_checks.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/xiaoai-notifications/source/summarize.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/xiaoai-notifications/source/test_notifications.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/xiaoai-notifications/source/test_xiaoai.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/xiaoai-notifications/source/verify.cjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/xiaoai-notifications/source/workspace.patch +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/optional_features/xiaoai-notifications/source/xiaoai.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/reloader.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/routes.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/runtime_info.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/session_api.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/session_view.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/sharing.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/view_sources.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/workspace_dom.mjs +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/workspace_views.py +0 -0
- {pycodex_ws-0.7.1 → pycodex_ws-0.7.2}/workspace_server/workspaces.html +0 -0
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pycodex-ws
|
|
3
|
-
Version: 0.7.
|
|
3
|
+
Version: 0.7.2
|
|
4
4
|
Summary: Browser workspace and optional Feishu integration for python-codex
|
|
5
5
|
License-File: LICENSE
|
|
6
6
|
Requires-Python: >=3.7
|
|
7
7
|
Requires-Dist: pillow>=9.0.0
|
|
8
|
-
Requires-Dist: pyagy==0.7.
|
|
9
|
-
Requires-Dist: python-codex==0.7.
|
|
8
|
+
Requires-Dist: pyagy==0.7.2
|
|
9
|
+
Requires-Dist: python-codex==0.7.2
|
|
10
10
|
Requires-Dist: websockets<16,>=11
|
|
11
11
|
Description-Content-Type: text/markdown
|
|
12
12
|
|
|
@@ -42,6 +42,8 @@ pycodex-ws --listen 127.0.0.1:6007 --workspace-config workspaces.json
|
|
|
42
42
|
|
|
43
43
|
Open `http://127.0.0.1:6007`. Use `python3 -m workspace_server` if the command
|
|
44
44
|
is not on `PATH`. Keep stdin open while the server runs; EOF initiates shutdown.
|
|
45
|
+
On Windows you can leave the console idle. Press Ctrl+Z followed by Enter
|
|
46
|
+
to send EOF, or close the stdin pipe if using a launcher.
|
|
45
47
|
Model configuration comes from `~/.codex/config.toml`.
|
|
46
48
|
|
|
47
49
|
With `pycodex-ws --listen-to KEY@router:6000`, the OS assigns a free local
|
|
@@ -55,9 +57,10 @@ open, and click the toggle or empty space again to close it. Expansion narrows
|
|
|
55
57
|
the conversation while keeping the board fixed. On phones, use the header
|
|
56
58
|
buttons to switch between chat and board.
|
|
57
59
|
|
|
58
|
-
Use the expanded sidebar to create, rename or close sessions. Click
|
|
59
|
-
|
|
60
|
-
|
|
60
|
+
Use the expanded sidebar to create, rename or close sessions. Click ×, then
|
|
61
|
+
choose **Close** in the same row. **Cancel** or Escape dismisses the confirmation.
|
|
62
|
+
The last session stays open. Status dots show running sessions and unread
|
|
63
|
+
replies. `/cd <directory>` changes the current
|
|
61
64
|
session's working directory while idle; `/model`, `/resume`, `/compact` and
|
|
62
65
|
other core session commands are also available.
|
|
63
66
|
|
|
@@ -30,6 +30,8 @@ pycodex-ws --listen 127.0.0.1:6007 --workspace-config workspaces.json
|
|
|
30
30
|
|
|
31
31
|
Open `http://127.0.0.1:6007`. Use `python3 -m workspace_server` if the command
|
|
32
32
|
is not on `PATH`. Keep stdin open while the server runs; EOF initiates shutdown.
|
|
33
|
+
On Windows you can leave the console idle. Press Ctrl+Z followed by Enter
|
|
34
|
+
to send EOF, or close the stdin pipe if using a launcher.
|
|
33
35
|
Model configuration comes from `~/.codex/config.toml`.
|
|
34
36
|
|
|
35
37
|
With `pycodex-ws --listen-to KEY@router:6000`, the OS assigns a free local
|
|
@@ -43,9 +45,10 @@ open, and click the toggle or empty space again to close it. Expansion narrows
|
|
|
43
45
|
the conversation while keeping the board fixed. On phones, use the header
|
|
44
46
|
buttons to switch between chat and board.
|
|
45
47
|
|
|
46
|
-
Use the expanded sidebar to create, rename or close sessions. Click
|
|
47
|
-
|
|
48
|
-
|
|
48
|
+
Use the expanded sidebar to create, rename or close sessions. Click ×, then
|
|
49
|
+
choose **Close** in the same row. **Cancel** or Escape dismisses the confirmation.
|
|
50
|
+
The last session stays open. Status dots show running sessions and unread
|
|
51
|
+
replies. `/cd <directory>` changes the current
|
|
49
52
|
session's working directory while idle; `/model`, `/resume`, `/compact` and
|
|
50
53
|
other core session commands are also available.
|
|
51
54
|
|
|
@@ -4,13 +4,13 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pycodex-ws"
|
|
7
|
-
version = "0.7.
|
|
7
|
+
version = "0.7.2"
|
|
8
8
|
description = "Browser workspace and optional Feishu integration for python-codex"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.7"
|
|
11
11
|
dependencies = [
|
|
12
|
-
"python-codex==0.7.
|
|
13
|
-
"pyagy==0.7.
|
|
12
|
+
"python-codex==0.7.2",
|
|
13
|
+
"pyagy==0.7.2",
|
|
14
14
|
"pillow>=9.0.0",
|
|
15
15
|
"websockets>=11,<16",
|
|
16
16
|
]
|
|
@@ -4,6 +4,7 @@ import os
|
|
|
4
4
|
import secrets
|
|
5
5
|
import sys
|
|
6
6
|
import threading
|
|
7
|
+
from concurrent.futures import ThreadPoolExecutor
|
|
7
8
|
from functools import partial
|
|
8
9
|
|
|
9
10
|
from contextlib import asynccontextmanager
|
|
@@ -372,7 +373,7 @@ async def _http_exception_response(request: Request, exc: HTTPException) -> JSON
|
|
|
372
373
|
|
|
373
374
|
|
|
374
375
|
def _create_lifespan_app(
|
|
375
|
-
start: "typing.Callable[[], typing.Awaitable[None]]",
|
|
376
|
+
start: "typing.Callable[[ThreadPoolExecutor], typing.Awaitable[None]]",
|
|
376
377
|
close: "typing.Callable[[], typing.Awaitable[None]]",
|
|
377
378
|
) -> Starlette:
|
|
378
379
|
@asynccontextmanager
|
|
@@ -384,11 +385,15 @@ def _create_lifespan_app(
|
|
|
384
385
|
and threading.current_thread() is threading.main_thread()
|
|
385
386
|
):
|
|
386
387
|
asyncio.get_child_watcher().attach_loop(asyncio.get_running_loop())
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
await
|
|
388
|
+
with ThreadPoolExecutor(max_workers=1, thread_name_prefix="workspace-launch") as launcher:
|
|
389
|
+
# Even executor.submit() starts a thread synchronously on first use.
|
|
390
|
+
# Warm this single worker before accepting requests, including for an empty registry.
|
|
391
|
+
await asyncio.get_running_loop().run_in_executor(launcher, threading.get_ident)
|
|
392
|
+
await start(launcher)
|
|
393
|
+
try:
|
|
394
|
+
yield
|
|
395
|
+
finally:
|
|
396
|
+
await close()
|
|
392
397
|
|
|
393
398
|
return Starlette(
|
|
394
399
|
lifespan=lifespan,
|
|
@@ -2,6 +2,7 @@ import asyncio
|
|
|
2
2
|
import os
|
|
3
3
|
import secrets
|
|
4
4
|
import socket
|
|
5
|
+
import sys
|
|
5
6
|
import tempfile
|
|
6
7
|
import threading
|
|
7
8
|
from contextlib import AsyncExitStack, ExitStack
|
|
@@ -110,6 +111,27 @@ def _configure_agent_access(state, cleanup, listener):
|
|
|
110
111
|
state["agent_header_path"] = header_path
|
|
111
112
|
|
|
112
113
|
|
|
114
|
+
def _wait_for_owner_eof(input_fd):
|
|
115
|
+
if sys.platform == "win32":
|
|
116
|
+
import _winapi
|
|
117
|
+
import msvcrt
|
|
118
|
+
|
|
119
|
+
# A blocking CRT _read holds the descriptor lock until input arrives.
|
|
120
|
+
handle = msvcrt.get_osfhandle(input_fd)
|
|
121
|
+
terminal = os.isatty(input_fd)
|
|
122
|
+
while True:
|
|
123
|
+
try:
|
|
124
|
+
data, _ = _winapi.ReadFile(handle, 4096)
|
|
125
|
+
except BrokenPipeError:
|
|
126
|
+
return
|
|
127
|
+
if not data or (terminal and data.startswith(b"\x1a")):
|
|
128
|
+
return
|
|
129
|
+
else:
|
|
130
|
+
# Avoid holding a buffered stdin lock across interpreter shutdown.
|
|
131
|
+
while os.read(input_fd, 4096):
|
|
132
|
+
pass
|
|
133
|
+
|
|
134
|
+
|
|
113
135
|
def run_owned_server(build, host, port, input_fd, listen_to=None, workspaces=()):
|
|
114
136
|
"""Keep a reloadable server alive while its launching process holds stdin open."""
|
|
115
137
|
import uvicorn
|
|
@@ -117,9 +139,7 @@ def run_owned_server(build, host, port, input_fd, listen_to=None, workspaces=())
|
|
|
117
139
|
owner_closed = threading.Event()
|
|
118
140
|
|
|
119
141
|
def watch_owner():
|
|
120
|
-
|
|
121
|
-
while os.read(input_fd, 4096):
|
|
122
|
-
pass
|
|
142
|
+
_wait_for_owner_eof(input_fd)
|
|
123
143
|
owner_closed.set()
|
|
124
144
|
|
|
125
145
|
class OwnedServer(uvicorn.Server):
|
|
@@ -6,9 +6,11 @@ import sys
|
|
|
6
6
|
import threading
|
|
7
7
|
import typing
|
|
8
8
|
from collections import deque
|
|
9
|
+
from concurrent.futures import Future
|
|
9
10
|
from dataclasses import replace
|
|
10
11
|
from pathlib import Path
|
|
11
12
|
|
|
13
|
+
import anyio
|
|
12
14
|
from starlette.concurrency import run_in_threadpool
|
|
13
15
|
|
|
14
16
|
from pycodex.bootstrap import build_model
|
|
@@ -395,27 +397,46 @@ class ThreadedWorkspaceInteractiveSession:
|
|
|
395
397
|
self._view.attach_server_loop(server_loop)
|
|
396
398
|
self._thread: "typing.Union[threading.Thread, None]" = None
|
|
397
399
|
self._worker_loop: "typing.Union[asyncio.AbstractEventLoop, None]" = None
|
|
398
|
-
self.
|
|
399
|
-
self.
|
|
400
|
+
self._startup: "typing.Optional[asyncio.Task]" = None
|
|
401
|
+
self._thread_launcher = None
|
|
400
402
|
self._session: "typing.Union[WorkspaceInteractiveSession, None]" = None
|
|
401
403
|
|
|
402
|
-
async def start(self) -> "ThreadedWorkspaceInteractiveSession":
|
|
403
|
-
if self.
|
|
404
|
-
|
|
405
|
-
|
|
404
|
+
async def start(self, thread_launcher=None) -> "ThreadedWorkspaceInteractiveSession":
|
|
405
|
+
if self._startup is None:
|
|
406
|
+
self._thread_launcher = thread_launcher
|
|
407
|
+
self._startup = asyncio.create_task(self._launch_worker())
|
|
408
|
+
try:
|
|
409
|
+
await asyncio.shield(self._startup)
|
|
410
|
+
except asyncio.CancelledError:
|
|
411
|
+
# The ASGI request scope may already be cancelled at every await.
|
|
412
|
+
with anyio.CancelScope(shield=True):
|
|
413
|
+
await self.close()
|
|
414
|
+
raise
|
|
415
|
+
return self
|
|
416
|
+
|
|
417
|
+
async def _launch_worker(self) -> None:
|
|
418
|
+
ready = Future()
|
|
419
|
+
thread = threading.Thread(
|
|
406
420
|
target=self._thread_main,
|
|
421
|
+
args=(ready,),
|
|
407
422
|
name="pycodex-workspace-session",
|
|
408
423
|
daemon=True,
|
|
409
424
|
)
|
|
410
|
-
self.
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
) from self._startup_error
|
|
416
|
-
return self
|
|
425
|
+
await self._server_loop.run_in_executor(self._thread_launcher, thread.start)
|
|
426
|
+
self._thread = thread
|
|
427
|
+
startup_error = await asyncio.wrap_future(ready)
|
|
428
|
+
if startup_error is not None:
|
|
429
|
+
raise RuntimeError("workspace session thread failed to start") from startup_error
|
|
417
430
|
|
|
418
|
-
def _thread_main(self) -> None:
|
|
431
|
+
def _thread_main(self, ready) -> None:
|
|
432
|
+
try:
|
|
433
|
+
self._run_worker(ready)
|
|
434
|
+
except BaseException as exc:
|
|
435
|
+
if ready.done():
|
|
436
|
+
raise
|
|
437
|
+
ready.set_result(exc)
|
|
438
|
+
|
|
439
|
+
def _run_worker(self, ready) -> None:
|
|
419
440
|
loop = asyncio.new_event_loop()
|
|
420
441
|
self._worker_loop = loop
|
|
421
442
|
asyncio.set_event_loop(loop)
|
|
@@ -429,11 +450,8 @@ class ThreadedWorkspaceInteractiveSession:
|
|
|
429
450
|
except BaseException:
|
|
430
451
|
loop.run_until_complete(session.close())
|
|
431
452
|
raise
|
|
432
|
-
|
|
453
|
+
loop.call_soon(ready.set_result, None)
|
|
433
454
|
loop.run_forever()
|
|
434
|
-
except BaseException as exc:
|
|
435
|
-
self._startup_error = exc
|
|
436
|
-
self._ready.set()
|
|
437
455
|
finally:
|
|
438
456
|
pending = asyncio.all_tasks(loop)
|
|
439
457
|
for task in pending:
|
|
@@ -446,6 +464,8 @@ class ThreadedWorkspaceInteractiveSession:
|
|
|
446
464
|
loop.close()
|
|
447
465
|
|
|
448
466
|
async def close(self, finish_turn: bool = False) -> None:
|
|
467
|
+
if self._startup is not None and not self._startup.done():
|
|
468
|
+
await asyncio.gather(asyncio.shield(self._startup), return_exceptions=True)
|
|
449
469
|
session = self._session
|
|
450
470
|
loop = self._worker_loop
|
|
451
471
|
try:
|
|
@@ -463,8 +483,9 @@ class ThreadedWorkspaceInteractiveSession:
|
|
|
463
483
|
loop.call_soon_threadsafe(loop.stop)
|
|
464
484
|
thread = self._thread
|
|
465
485
|
if thread is not None:
|
|
466
|
-
await
|
|
486
|
+
await self._server_loop.run_in_executor(self._thread_launcher, thread.join)
|
|
467
487
|
self._thread = None
|
|
488
|
+
self._startup = None
|
|
468
489
|
|
|
469
490
|
async def _call(self, coroutine):
|
|
470
491
|
return await asyncio.wrap_future(
|
|
@@ -313,9 +313,7 @@ export function createSessionsUI({
|
|
|
313
313
|
}
|
|
314
314
|
|
|
315
315
|
async function closeSession(sessionId) {
|
|
316
|
-
|
|
317
|
-
if (!session || sessions.length <= 1) return;
|
|
318
|
-
if (!window.confirm(`Close session “${session.title || "pycodex"}”? It will be removed from this workspace.`)) return;
|
|
316
|
+
if (!sessionById(sessionId) || sessions.length <= 1) return;
|
|
319
317
|
const response = await fetch(relativeUrl(`api/sessions/${encodeURIComponent(sessionId)}`), {
|
|
320
318
|
method: "DELETE",
|
|
321
319
|
});
|
|
@@ -1564,6 +1564,23 @@ def _terminate_process_group(process: subprocess.Popen) -> None:
|
|
|
1564
1564
|
import signal
|
|
1565
1565
|
|
|
1566
1566
|
if process.poll() is None:
|
|
1567
|
+
if os.name == "nt":
|
|
1568
|
+
try:
|
|
1569
|
+
subprocess.run(
|
|
1570
|
+
["taskkill", "/F", "/T", "/PID", str(process.pid)],
|
|
1571
|
+
stdout=subprocess.DEVNULL,
|
|
1572
|
+
stderr=subprocess.DEVNULL,
|
|
1573
|
+
)
|
|
1574
|
+
except OSError:
|
|
1575
|
+
try:
|
|
1576
|
+
process.kill()
|
|
1577
|
+
except OSError:
|
|
1578
|
+
pass
|
|
1579
|
+
try:
|
|
1580
|
+
process.wait(timeout=5)
|
|
1581
|
+
except subprocess.TimeoutExpired:
|
|
1582
|
+
pass
|
|
1583
|
+
return
|
|
1567
1584
|
try:
|
|
1568
1585
|
os.killpg(process.pid, signal.SIGTERM)
|
|
1569
1586
|
except OSError:
|
|
@@ -582,7 +582,7 @@ body[data-access-role="visitor"] .session-banner[data-admin-only="true"] { displ
|
|
|
582
582
|
visibility: hidden;
|
|
583
583
|
pointer-events: none;
|
|
584
584
|
}
|
|
585
|
-
.workspace:not(.sessions-collapsed) .session-sidebar .tab:is(:hover, :focus-within, .active) .tab-close {
|
|
585
|
+
.workspace:not(.sessions-collapsed) .session-sidebar .tab:not(.confirming-close):is(:hover, :focus-within, .active) .tab-close {
|
|
586
586
|
opacity: 0.85;
|
|
587
587
|
visibility: visible;
|
|
588
588
|
pointer-events: auto;
|
|
@@ -591,6 +591,45 @@ body[data-access-role="visitor"] .session-banner[data-admin-only="true"] { displ
|
|
|
591
591
|
opacity: 0.28;
|
|
592
592
|
cursor: default;
|
|
593
593
|
}
|
|
594
|
+
.session-sidebar .tab.confirming-close > :not(.tab-close-confirmation) { visibility: hidden; }
|
|
595
|
+
.tab-close-confirmation:not([hidden]) {
|
|
596
|
+
position: absolute;
|
|
597
|
+
inset: 0;
|
|
598
|
+
display: flex;
|
|
599
|
+
align-items: center;
|
|
600
|
+
gap: 4px;
|
|
601
|
+
padding-inline: 8px;
|
|
602
|
+
color: var(--ink);
|
|
603
|
+
background: var(--panel-deep);
|
|
604
|
+
box-shadow: inset 0 0 0 1px var(--line);
|
|
605
|
+
border-radius: inherit;
|
|
606
|
+
font-size: 12px;
|
|
607
|
+
font-weight: 500;
|
|
608
|
+
}
|
|
609
|
+
.tab-close-confirmation span {
|
|
610
|
+
flex: 1 1 auto;
|
|
611
|
+
min-width: 0;
|
|
612
|
+
overflow: hidden;
|
|
613
|
+
text-overflow: ellipsis;
|
|
614
|
+
white-space: nowrap;
|
|
615
|
+
}
|
|
616
|
+
.tab-close-confirmation button {
|
|
617
|
+
flex: 0 0 auto;
|
|
618
|
+
min-height: 26px;
|
|
619
|
+
padding-inline: 8px;
|
|
620
|
+
border: 1px solid transparent;
|
|
621
|
+
border-radius: var(--radius-sm);
|
|
622
|
+
color: var(--muted);
|
|
623
|
+
background: transparent;
|
|
624
|
+
cursor: pointer;
|
|
625
|
+
}
|
|
626
|
+
.tab-close-confirmation .tab-close-confirm {
|
|
627
|
+
color: var(--danger);
|
|
628
|
+
background: var(--danger-soft);
|
|
629
|
+
}
|
|
630
|
+
.tab-close-cancel:hover { color: var(--ink); background: var(--panel-hover); }
|
|
631
|
+
.tab-close-confirm:hover { border-color: var(--danger); }
|
|
632
|
+
.tab-close-confirmation button:focus-visible { outline: 1px solid currentColor; outline-offset: -2px; }
|
|
594
633
|
.session-sidebar .tab-status {
|
|
595
634
|
position: absolute;
|
|
596
635
|
top: 0;
|