pycodex-ws 0.6.3__tar.gz → 0.7.0__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.6.3 → pycodex_ws-0.7.0}/PKG-INFO +49 -31
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/README.md +47 -29
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_router/protocol.py +4 -3
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_router/server.py +2 -2
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_ws/server_support.py +17 -12
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pyproject.toml +11 -2
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/WORKSPACE_API.md +78 -95
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/app.py +43 -40
- pycodex_ws-0.7.0/workspace_server/banners.mjs +359 -0
- pycodex_ws-0.7.0/workspace_server/content_views.css +1 -0
- pycodex_ws-0.7.0/workspace_server/content_views.mjs +43 -0
- pycodex_ws-0.7.0/workspace_server/conversation.mjs +221 -0
- pycodex_ws-0.7.0/workspace_server/custom_frontend.mjs +47 -0
- pycodex_ws-0.7.0/workspace_server/dialogs.mjs +504 -0
- pycodex_ws-0.7.0/workspace_server/external_call.py +285 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/build.mjs +32 -1
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/content_views.css +64 -1
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/content_views.mjs +305 -42
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/transcript.mjs +7 -10
- pycodex_ws-0.7.0/workspace_server/markdown.mjs +367 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/README.md +27 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/file-attachments/source/upload_browser.py +1 -2
- pycodex_ws-0.7.0/workspace_server/optional_features/session-time-sort/README.md +50 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/session-time-sort/source/custom.css +17 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/session-time-sort/source/custom.js +6 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/session-time-sort/source/session-time-sort.mjs +169 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/session-time-sort/source/verify.mjs +189 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/source/verify.cjs +10 -8
- pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/README.md +187 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/preview-mobile.png +0 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/preview.png +0 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/notifications.py +277 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/runtime_checks.py +132 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/summarize.py +88 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/test_notifications.py +329 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/test_xiaoai.py +275 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/verify.cjs +98 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/workspace.patch +191 -0
- pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/xiaoai.py +430 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/reloader.py +11 -1
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/routes.py +164 -25
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/session_api.py +44 -18
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/session_view.py +42 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/sessions.py +39 -5
- pycodex_ws-0.7.0/workspace_server/sessions_ui.mjs +344 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/sharing.py +1 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/view_sources.py +14 -11
- pycodex_ws-0.7.0/workspace_server/vscode_server.py +1421 -0
- pycodex_ws-0.7.0/workspace_server/workspace.css +1612 -0
- pycodex_ws-0.7.0/workspace_server/workspace.html +354 -0
- pycodex_ws-0.7.0/workspace_server/workspace.mjs +1068 -0
- pycodex_ws-0.7.0/workspace_server/workspace.template.html +338 -0
- pycodex_ws-0.7.0/workspace_server/workspace_dom.mjs +30 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/workspaces.py +4 -0
- pycodex_ws-0.6.3/workspace_server/content_views.css +0 -1
- pycodex_ws-0.6.3/workspace_server/content_views.mjs +0 -37
- pycodex_ws-0.6.3/workspace_server/one_line_agent.py +0 -391
- pycodex_ws-0.6.3/workspace_server/optional_features/README.md +0 -33
- pycodex_ws-0.6.3/workspace_server/workspace.html +0 -4158
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/.gitignore +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/LICENSE +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_router/__init__.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_router/__main__.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_router/browser.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_router/client.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_router/index.html +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_ws/__init__.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_ws/feishu_auth.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_ws/feishu_card.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_ws/feishu_connection.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_ws/feishu_link.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_ws/feishu_oauth.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_ws/feishu_render.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/pycodex_ws/workspace_config.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/__init__.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/__main__.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/agent_access.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/content_views.LICENSE.txt +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/customization.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/editor.css +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/editor.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/.gitignore +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/composer.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/editor.css +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/editor.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/editor_context.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/package-lock.json +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/package.json +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/prompt_history.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/touch_selection.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/frontend/view_labels.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/CONTRIBUTING.md +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/README.md +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/preview-mobile.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/preview.html +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/preview.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/source/custom.css +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/source/custom.js +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/source/fixture.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/source/verify.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/README.md +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/preview-mobile.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/preview.html +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/preview.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/source/fixture.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/source/tool-groups.css +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/source/tool-groups.js +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/source/verify.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/README.md +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/preview-mobile.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/preview.html +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/preview.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/source/custom.css +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/source/custom.js +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/source/fixture.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/source/verify.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/file-attachments/README.md +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/file-attachments/source/custom.css +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/file-attachments/source/custom.js +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/file-attachments/source/upload_core.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/file-attachments/source/upload_core.test.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/file-attachments/source/uploads.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/README.md +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/preview-mobile.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/preview.html +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/preview.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/source/custom.css +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/source/custom.js +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/source/fixture.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/source/verify.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/README.md +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/preview-mobile.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/preview.html +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/preview.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/source/custom.css +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/source/custom.js +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/source/fixture.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/source/session-tips.js +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/source/verify.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/README.md +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/preview.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/source/custom.css +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/source/custom.js +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/source/skill-completion.css +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/source/skill-completion.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/source/verify.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/README.md +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/preview-mobile.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/preview.html +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/preview.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/source/custom.css +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/source/custom.js +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/source/fixture.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/source/verify.mjs +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/README.md +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/preview-mobile.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/preview.png +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/source/custom.css +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/source/custom.js +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/source/voice-input.css +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/source/voice-input.js +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/owned_process.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/runtime_info.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/workspace_views.py +0 -0
- {pycodex_ws-0.6.3 → pycodex_ws-0.7.0}/workspace_server/workspaces.html +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pycodex-ws
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
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: python-codex==0.
|
|
8
|
+
Requires-Dist: python-codex==0.7.0
|
|
9
9
|
Requires-Dist: websockets<16,>=11
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
|
|
@@ -16,8 +16,8 @@ optional Feishu integration for
|
|
|
16
16
|
[`python-codex`](https://pypi.org/project/python-codex/).
|
|
17
17
|
Requires Python 3.7+ and installs the matching core version.
|
|
18
18
|
|
|
19
|
-
|
|
20
|
-
|
|
19
|
+
For changes since 0.6.0 and Python integration updates, see the
|
|
20
|
+
[0.7.0 release notes](https://github.com/Randomizez/pycodex/blob/v0.7.0/docs/RELEASE_0.7.0.md).
|
|
21
21
|
|
|
22
22
|
## Quick start
|
|
23
23
|
|
|
@@ -50,7 +50,8 @@ open, and click the toggle or empty space again to close it. Expansion narrows
|
|
|
50
50
|
the conversation while keeping the board fixed. On phones, use the header
|
|
51
51
|
buttons to switch between chat and board.
|
|
52
52
|
|
|
53
|
-
Use the expanded sidebar to create, rename or close sessions.
|
|
53
|
+
Use the expanded sidebar to create, rename or close sessions. Click × and
|
|
54
|
+
confirm to close a session; the last session stays open. Status dots show
|
|
54
55
|
running sessions and unread replies. `/cd <directory>` changes the current
|
|
55
56
|
session's working directory while idle; `/model`, `/resume`, `/compact` and
|
|
56
57
|
other core session commands are also available.
|
|
@@ -66,11 +67,17 @@ in a scrollable log. New retries update the same row and preserve its open state
|
|
|
66
67
|
refreshing starts collapsed. Other model diagnostics and final errors stay visible.
|
|
67
68
|
|
|
68
69
|
Click Markdown links to open files and comparisons, for example
|
|
69
|
-
`[source](app.py:42)` or `[changes](diff:HEAD:app.py)`.
|
|
70
|
-
|
|
70
|
+
`[source](app.py:42)` or `[changes](diff:HEAD:app.py)`. A Markdown link such as
|
|
71
|
+
`[source](file:///data/project/app.py#L42-L48)` opens the workspace file at line 42.
|
|
72
|
+
In a code or diff view, select text and choose **Insert into chat** to add editable context to the draft.
|
|
71
73
|
Click a context block to edit or remove it before sending.
|
|
72
74
|
See [view links and supported formats](../../docs/RUNTIME.md#workspace-content-views).
|
|
73
75
|
|
|
76
|
+
With embedded VS Code enabled, clicking a file or diff link opens it in the
|
|
77
|
+
current browser tab's workbench. You can open the same folder in several tabs
|
|
78
|
+
and use each editor independently. Git comparisons display symbolic links as
|
|
79
|
+
their target paths. VS Code handles large files using its own editor limits.
|
|
80
|
+
|
|
74
81
|
When using a router, its directory groups workspaces by device and lists unread
|
|
75
82
|
workspaces at the top. Device handles reorder the list; pencil buttons edit
|
|
76
83
|
device names.
|
|
@@ -89,14 +96,22 @@ distributed separately as a VSIX.
|
|
|
89
96
|
|
|
90
97
|
## Customize the interface
|
|
91
98
|
|
|
92
|
-
|
|
93
|
-
|
|
99
|
+
Choose **Settings → Customize Agent** from the conversation header to open a
|
|
100
|
+
conversation and the
|
|
101
|
+
[optional feature catalog](workspace_server/optional_features/README.md), with
|
|
102
|
+
a **Customize Agent** banner at the top of the chat for reopening the catalog,
|
|
103
|
+
switching to `?builtin=1`, copying the frontend directory or opening `WORKSPACE_API.md`.
|
|
104
|
+
Browse the feature descriptions, then send a feature name, ID or your own
|
|
105
|
+
interface request in chat. The Agent starts with that message.
|
|
94
106
|
Custom files live in the server user's `~/.pycodex/frontend/`:
|
|
95
107
|
|
|
96
108
|
- `custom.css` and `custom.js`: optional styles and an ES module, loaded automatically.
|
|
97
109
|
- `workspace.html`: optional full-page override; otherwise the packaged page is used.
|
|
98
110
|
- Other files: available at workspace-relative `frontend/<path>` URLs.
|
|
99
111
|
|
|
112
|
+
The frontend build embeds the page styles and JavaScript in the packaged `workspace.html`.
|
|
113
|
+
Once the updated files are on the server, refresh the browser to load the new interface.
|
|
114
|
+
|
|
100
115
|
Refresh to apply changes and keep the selected conversation. Open the workspace
|
|
101
116
|
with `?builtin=1` to bypass all customizations; click “Re-enable customizations”
|
|
102
117
|
to return. Changes apply to all workspaces for that OS user.
|
|
@@ -104,16 +119,16 @@ See the [customization contract](../../docs/RUNTIME.md#frontend-customization).
|
|
|
104
119
|
For custom interfaces, the [resource API](../../docs/WORKSPACE_API.md) exposes
|
|
105
120
|
state, model catalogs, asynchronous command results, paginated history, event
|
|
106
121
|
replay and sub-agent/background-work inventories. A `mount(host)` export in
|
|
107
|
-
`custom.js` can access the built-in page's session, draft
|
|
122
|
+
`custom.js` can access the built-in page's session, draft, banner (`host.setBanner`)
|
|
123
|
+
and view controls, and host wrappers can embed `<script type="application/json" data-pycodex-banner>` banners.
|
|
108
124
|
|
|
109
125
|
Backend module ownership and the preserved session interfaces are documented in
|
|
110
126
|
the [runtime guide](../../docs/RUNTIME.md#workspace-session-api).
|
|
111
127
|
File/Git source resolution and view storage retain their existing public classes;
|
|
112
128
|
see [content views](../../docs/RUNTIME.md#workspace-content-views).
|
|
113
129
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
their source into your frontend. To share a local change, ask it to publish a
|
|
130
|
+
The Agent adapts the selected feature's source into your frontend.
|
|
131
|
+
To share a local change, ask it to publish a
|
|
117
132
|
feature PR on GitHub; the [contribution guide](workspace_server/optional_features/CONTRIBUTING.md)
|
|
118
133
|
specifies the source, documentation, validation and PR format.
|
|
119
134
|
|
|
@@ -139,24 +154,27 @@ permissions. An unprotected server must configure its administrator password
|
|
|
139
154
|
before enabling sharing. Router authentication is unchanged: a link through a
|
|
140
155
|
router still requires its normal login.
|
|
141
156
|
|
|
142
|
-
##
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
Copy the
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
157
|
+
## External Call
|
|
158
|
+
|
|
159
|
+
Open **Settings → External Call**, pick a profile and click
|
|
160
|
+
**Create session**. The workspace selects the new conversation and pins an
|
|
161
|
+
**External Call** banner at the top of the chat with **Copy Bash**,
|
|
162
|
+
**Copy PowerShell** and expandable **Details** for the full commands and
|
|
163
|
+
endpoint URL. Copy the command for your client machine and run it in a terminal.
|
|
164
|
+
|
|
165
|
+
Send the task from the Web conversation. External Call sessions inject
|
|
166
|
+
contextual guidance distinguishing the host workspace machine (`exec_command`
|
|
167
|
+
and other standard tools, `<environment_context>`, `AGENTS.md`, skills) from the
|
|
168
|
+
connected client machine (`client_exec_command`). The terminal prints each
|
|
169
|
+
command and its output, and returns the output and exit status to the
|
|
170
|
+
conversation. The Bash and PowerShell commands are client examples over the
|
|
171
|
+
session's `b/<code>` HTTP endpoint; custom scripts or executables (such as Python
|
|
172
|
+
or `cmd`) can pull commands with `GET` and return results with `POST` or `GET`.
|
|
173
|
+
|
|
174
|
+
Each new session gets its own connection code. Closing its tab invalidates that
|
|
175
|
+
code, releases pending requests and stops the terminal loop. After a server
|
|
176
|
+
restart, create a new session to reconnect a terminal. Previous conversations
|
|
177
|
+
retain their recorded history.
|
|
160
178
|
|
|
161
179
|
## Storage
|
|
162
180
|
|
|
@@ -5,8 +5,8 @@ optional Feishu integration for
|
|
|
5
5
|
[`python-codex`](https://pypi.org/project/python-codex/).
|
|
6
6
|
Requires Python 3.7+ and installs the matching core version.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
For changes since 0.6.0 and Python integration updates, see the
|
|
9
|
+
[0.7.0 release notes](https://github.com/Randomizez/pycodex/blob/v0.7.0/docs/RELEASE_0.7.0.md).
|
|
10
10
|
|
|
11
11
|
## Quick start
|
|
12
12
|
|
|
@@ -39,7 +39,8 @@ open, and click the toggle or empty space again to close it. Expansion narrows
|
|
|
39
39
|
the conversation while keeping the board fixed. On phones, use the header
|
|
40
40
|
buttons to switch between chat and board.
|
|
41
41
|
|
|
42
|
-
Use the expanded sidebar to create, rename or close sessions.
|
|
42
|
+
Use the expanded sidebar to create, rename or close sessions. Click × and
|
|
43
|
+
confirm to close a session; the last session stays open. Status dots show
|
|
43
44
|
running sessions and unread replies. `/cd <directory>` changes the current
|
|
44
45
|
session's working directory while idle; `/model`, `/resume`, `/compact` and
|
|
45
46
|
other core session commands are also available.
|
|
@@ -55,11 +56,17 @@ in a scrollable log. New retries update the same row and preserve its open state
|
|
|
55
56
|
refreshing starts collapsed. Other model diagnostics and final errors stay visible.
|
|
56
57
|
|
|
57
58
|
Click Markdown links to open files and comparisons, for example
|
|
58
|
-
`[source](app.py:42)` or `[changes](diff:HEAD:app.py)`.
|
|
59
|
-
|
|
59
|
+
`[source](app.py:42)` or `[changes](diff:HEAD:app.py)`. A Markdown link such as
|
|
60
|
+
`[source](file:///data/project/app.py#L42-L48)` opens the workspace file at line 42.
|
|
61
|
+
In a code or diff view, select text and choose **Insert into chat** to add editable context to the draft.
|
|
60
62
|
Click a context block to edit or remove it before sending.
|
|
61
63
|
See [view links and supported formats](../../docs/RUNTIME.md#workspace-content-views).
|
|
62
64
|
|
|
65
|
+
With embedded VS Code enabled, clicking a file or diff link opens it in the
|
|
66
|
+
current browser tab's workbench. You can open the same folder in several tabs
|
|
67
|
+
and use each editor independently. Git comparisons display symbolic links as
|
|
68
|
+
their target paths. VS Code handles large files using its own editor limits.
|
|
69
|
+
|
|
63
70
|
When using a router, its directory groups workspaces by device and lists unread
|
|
64
71
|
workspaces at the top. Device handles reorder the list; pencil buttons edit
|
|
65
72
|
device names.
|
|
@@ -78,14 +85,22 @@ distributed separately as a VSIX.
|
|
|
78
85
|
|
|
79
86
|
## Customize the interface
|
|
80
87
|
|
|
81
|
-
|
|
82
|
-
|
|
88
|
+
Choose **Settings → Customize Agent** from the conversation header to open a
|
|
89
|
+
conversation and the
|
|
90
|
+
[optional feature catalog](workspace_server/optional_features/README.md), with
|
|
91
|
+
a **Customize Agent** banner at the top of the chat for reopening the catalog,
|
|
92
|
+
switching to `?builtin=1`, copying the frontend directory or opening `WORKSPACE_API.md`.
|
|
93
|
+
Browse the feature descriptions, then send a feature name, ID or your own
|
|
94
|
+
interface request in chat. The Agent starts with that message.
|
|
83
95
|
Custom files live in the server user's `~/.pycodex/frontend/`:
|
|
84
96
|
|
|
85
97
|
- `custom.css` and `custom.js`: optional styles and an ES module, loaded automatically.
|
|
86
98
|
- `workspace.html`: optional full-page override; otherwise the packaged page is used.
|
|
87
99
|
- Other files: available at workspace-relative `frontend/<path>` URLs.
|
|
88
100
|
|
|
101
|
+
The frontend build embeds the page styles and JavaScript in the packaged `workspace.html`.
|
|
102
|
+
Once the updated files are on the server, refresh the browser to load the new interface.
|
|
103
|
+
|
|
89
104
|
Refresh to apply changes and keep the selected conversation. Open the workspace
|
|
90
105
|
with `?builtin=1` to bypass all customizations; click “Re-enable customizations”
|
|
91
106
|
to return. Changes apply to all workspaces for that OS user.
|
|
@@ -93,16 +108,16 @@ See the [customization contract](../../docs/RUNTIME.md#frontend-customization).
|
|
|
93
108
|
For custom interfaces, the [resource API](../../docs/WORKSPACE_API.md) exposes
|
|
94
109
|
state, model catalogs, asynchronous command results, paginated history, event
|
|
95
110
|
replay and sub-agent/background-work inventories. A `mount(host)` export in
|
|
96
|
-
`custom.js` can access the built-in page's session, draft
|
|
111
|
+
`custom.js` can access the built-in page's session, draft, banner (`host.setBanner`)
|
|
112
|
+
and view controls, and host wrappers can embed `<script type="application/json" data-pycodex-banner>` banners.
|
|
97
113
|
|
|
98
114
|
Backend module ownership and the preserved session interfaces are documented in
|
|
99
115
|
the [runtime guide](../../docs/RUNTIME.md#workspace-session-api).
|
|
100
116
|
File/Git source resolution and view storage retain their existing public classes;
|
|
101
117
|
see [content views](../../docs/RUNTIME.md#workspace-content-views).
|
|
102
118
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
their source into your frontend. To share a local change, ask it to publish a
|
|
119
|
+
The Agent adapts the selected feature's source into your frontend.
|
|
120
|
+
To share a local change, ask it to publish a
|
|
106
121
|
feature PR on GitHub; the [contribution guide](workspace_server/optional_features/CONTRIBUTING.md)
|
|
107
122
|
specifies the source, documentation, validation and PR format.
|
|
108
123
|
|
|
@@ -128,24 +143,27 @@ permissions. An unprotected server must configure its administrator password
|
|
|
128
143
|
before enabling sharing. Router authentication is unchanged: a link through a
|
|
129
144
|
router still requires its normal login.
|
|
130
145
|
|
|
131
|
-
##
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
Copy the
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
146
|
+
## External Call
|
|
147
|
+
|
|
148
|
+
Open **Settings → External Call**, pick a profile and click
|
|
149
|
+
**Create session**. The workspace selects the new conversation and pins an
|
|
150
|
+
**External Call** banner at the top of the chat with **Copy Bash**,
|
|
151
|
+
**Copy PowerShell** and expandable **Details** for the full commands and
|
|
152
|
+
endpoint URL. Copy the command for your client machine and run it in a terminal.
|
|
153
|
+
|
|
154
|
+
Send the task from the Web conversation. External Call sessions inject
|
|
155
|
+
contextual guidance distinguishing the host workspace machine (`exec_command`
|
|
156
|
+
and other standard tools, `<environment_context>`, `AGENTS.md`, skills) from the
|
|
157
|
+
connected client machine (`client_exec_command`). The terminal prints each
|
|
158
|
+
command and its output, and returns the output and exit status to the
|
|
159
|
+
conversation. The Bash and PowerShell commands are client examples over the
|
|
160
|
+
session's `b/<code>` HTTP endpoint; custom scripts or executables (such as Python
|
|
161
|
+
or `cmd`) can pull commands with `GET` and return results with `POST` or `GET`.
|
|
162
|
+
|
|
163
|
+
Each new session gets its own connection code. Closing its tab invalidates that
|
|
164
|
+
code, releases pending requests and stops the terminal loop. After a server
|
|
165
|
+
restart, create a new session to reconnect a terminal. Previous conversations
|
|
166
|
+
retain their recorded history.
|
|
149
167
|
|
|
150
168
|
## Storage
|
|
151
169
|
|
|
@@ -59,11 +59,12 @@ def agent_api_request(scope):
|
|
|
59
59
|
)
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
def
|
|
62
|
+
def external_call_request(scope):
|
|
63
63
|
"""Only the terminal exchange endpoint; its workspace validates the temporary token."""
|
|
64
64
|
return (
|
|
65
|
-
scope["type"] == "http"
|
|
66
|
-
and
|
|
65
|
+
scope["type"] == "http"
|
|
66
|
+
and scope["method"] in {"GET", "POST"}
|
|
67
|
+
and re.fullmatch(r"(?:/w/[A-Za-z0-9_-]+)?/b/[^/]+", route_path(scope))
|
|
67
68
|
is not None
|
|
68
69
|
)
|
|
69
70
|
|
|
@@ -27,10 +27,10 @@ from pycodex_ws.workspace_config import normalize_workspace_id
|
|
|
27
27
|
|
|
28
28
|
from .browser import BrowserAccess, require_login
|
|
29
29
|
from .protocol import (
|
|
30
|
-
one_line_agent_request,
|
|
31
30
|
decode,
|
|
32
31
|
device_id,
|
|
33
32
|
encode,
|
|
33
|
+
external_call_request,
|
|
34
34
|
normalize_api_url,
|
|
35
35
|
request_scope,
|
|
36
36
|
response_headers,
|
|
@@ -432,7 +432,7 @@ class Router:
|
|
|
432
432
|
agent_access = trusted_agent_request(scope)
|
|
433
433
|
if blocked or not (
|
|
434
434
|
agent_access
|
|
435
|
-
or
|
|
435
|
+
or external_call_request(scope)
|
|
436
436
|
or auth_cookie_matches(
|
|
437
437
|
self.browser_token, connection.cookies.get("pycodex_router_auth")
|
|
438
438
|
)
|
|
@@ -15,7 +15,7 @@ from starlette.requests import Request
|
|
|
15
15
|
from starlette.responses import HTMLResponse, JSONResponse, RedirectResponse
|
|
16
16
|
from starlette.routing import Route
|
|
17
17
|
|
|
18
|
-
from pycodex_router.protocol import
|
|
18
|
+
from pycodex_router.protocol import external_call_request, route_path, trusted_agent_request
|
|
19
19
|
|
|
20
20
|
AUTH_COOKIE_NAME = "pycodex_ws_auth"
|
|
21
21
|
|
|
@@ -33,14 +33,7 @@ def parse_listen(target: str) -> "typing.Tuple[str, int]":
|
|
|
33
33
|
return host, port
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
async def
|
|
37
|
-
request: Request, max_bytes: "typing.Union[int, None]" = None,
|
|
38
|
-
) -> "typing.Dict[str, object]":
|
|
39
|
-
media_type = request.headers.get("content-type", "").split(";", 1)[0].strip().lower()
|
|
40
|
-
if media_type != "application/json" and not (
|
|
41
|
-
media_type.startswith("application/") and media_type.endswith("+json")
|
|
42
|
-
):
|
|
43
|
-
raise HTTPException(status_code=422, detail="request body must be JSON")
|
|
36
|
+
async def read_body(request: Request, max_bytes: "typing.Union[int, None]") -> bytearray:
|
|
44
37
|
body = bytearray()
|
|
45
38
|
async for chunk in request.stream():
|
|
46
39
|
if max_bytes is not None and len(body) + len(chunk) > max_bytes:
|
|
@@ -50,6 +43,18 @@ async def json_object_body(
|
|
|
50
43
|
headers={"Connection": "close"},
|
|
51
44
|
)
|
|
52
45
|
body.extend(chunk)
|
|
46
|
+
return body
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
async def json_object_body(
|
|
50
|
+
request: Request, max_bytes: "typing.Union[int, None]" = None,
|
|
51
|
+
) -> "typing.Dict[str, object]":
|
|
52
|
+
media_type = request.headers.get("content-type", "").split(";", 1)[0].strip().lower()
|
|
53
|
+
if media_type != "application/json" and not (
|
|
54
|
+
media_type.startswith("application/") and media_type.endswith("+json")
|
|
55
|
+
):
|
|
56
|
+
raise HTTPException(status_code=422, detail="request body must be JSON")
|
|
57
|
+
body = await read_body(request, max_bytes)
|
|
53
58
|
try:
|
|
54
59
|
payload = json.loads(body)
|
|
55
60
|
except (json.JSONDecodeError, UnicodeDecodeError):
|
|
@@ -199,8 +204,8 @@ def install_auth(
|
|
|
199
204
|
root = request.scope.get("root_path", "")
|
|
200
205
|
if sharing is not None:
|
|
201
206
|
target = sharing.workspace(path)
|
|
202
|
-
if
|
|
203
|
-
#
|
|
207
|
+
if external_call_request(request.scope):
|
|
208
|
+
# The terminal exchange authenticates its own session connection.
|
|
204
209
|
return await call_next(request)
|
|
205
210
|
cookie = request.cookies.get(cookie_name)
|
|
206
211
|
if path in {"/favicon.ico", "/login"}:
|
|
@@ -210,7 +215,7 @@ def install_auth(
|
|
|
210
215
|
return await call_next(request)
|
|
211
216
|
grant = None if target is None else sharing.grant(target[0], cookie)
|
|
212
217
|
if grant is not None:
|
|
213
|
-
if target[1].rstrip("/") in {"/api/share", "/api/reload", "/api/
|
|
218
|
+
if target[1].rstrip("/") in {"/api/share", "/api/reload", "/api/external-call-sessions"}:
|
|
214
219
|
return JSONResponse({"error": "administrator access required"}, 403)
|
|
215
220
|
request.scope["pycodex.access_role"] = "visitor"
|
|
216
221
|
return await call_next(request)
|
|
@@ -4,12 +4,12 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pycodex-ws"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.7.0"
|
|
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.
|
|
12
|
+
"python-codex==0.7.0",
|
|
13
13
|
"pillow>=9.0.0",
|
|
14
14
|
"websockets>=11,<16",
|
|
15
15
|
]
|
|
@@ -26,6 +26,15 @@ packages = ["workspace_server", "pycodex_ws", "pycodex_router"]
|
|
|
26
26
|
exclude = ["workspace_server/frontend"]
|
|
27
27
|
artifacts = [
|
|
28
28
|
"workspace_server/workspace.html",
|
|
29
|
+
"workspace_server/workspace.css",
|
|
30
|
+
"workspace_server/workspace.mjs",
|
|
31
|
+
"workspace_server/workspace_dom.mjs",
|
|
32
|
+
"workspace_server/markdown.mjs",
|
|
33
|
+
"workspace_server/conversation.mjs",
|
|
34
|
+
"workspace_server/sessions_ui.mjs",
|
|
35
|
+
"workspace_server/dialogs.mjs",
|
|
36
|
+
"workspace_server/custom_frontend.mjs",
|
|
37
|
+
"workspace_server/banners.mjs",
|
|
29
38
|
"workspace_server/workspaces.html",
|
|
30
39
|
"workspace_server/content_views.mjs",
|
|
31
40
|
"workspace_server/content_views.css",
|