pycodex-ws 0.6.2__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.
Files changed (165) hide show
  1. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/PKG-INFO +49 -31
  2. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/README.md +47 -29
  3. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_router/protocol.py +4 -3
  4. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_router/server.py +2 -2
  5. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_ws/server_support.py +17 -12
  6. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pyproject.toml +11 -2
  7. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/WORKSPACE_API.md +78 -95
  8. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/app.py +43 -40
  9. pycodex_ws-0.7.0/workspace_server/banners.mjs +359 -0
  10. pycodex_ws-0.7.0/workspace_server/content_views.css +1 -0
  11. pycodex_ws-0.7.0/workspace_server/content_views.mjs +43 -0
  12. pycodex_ws-0.7.0/workspace_server/conversation.mjs +221 -0
  13. pycodex_ws-0.7.0/workspace_server/custom_frontend.mjs +47 -0
  14. pycodex_ws-0.7.0/workspace_server/dialogs.mjs +504 -0
  15. pycodex_ws-0.7.0/workspace_server/external_call.py +285 -0
  16. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/build.mjs +32 -1
  17. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/content_views.css +64 -1
  18. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/content_views.mjs +305 -42
  19. pycodex_ws-0.7.0/workspace_server/markdown.mjs +367 -0
  20. pycodex_ws-0.7.0/workspace_server/optional_features/README.md +27 -0
  21. pycodex_ws-0.7.0/workspace_server/optional_features/file-attachments/README.md +137 -0
  22. pycodex_ws-0.7.0/workspace_server/optional_features/file-attachments/source/custom.css +189 -0
  23. pycodex_ws-0.7.0/workspace_server/optional_features/file-attachments/source/custom.js +5 -0
  24. pycodex_ws-0.7.0/workspace_server/optional_features/file-attachments/source/upload_browser.py +313 -0
  25. pycodex_ws-0.7.0/workspace_server/optional_features/file-attachments/source/upload_core.mjs +271 -0
  26. pycodex_ws-0.7.0/workspace_server/optional_features/file-attachments/source/upload_core.test.mjs +161 -0
  27. pycodex_ws-0.7.0/workspace_server/optional_features/file-attachments/source/uploads.mjs +385 -0
  28. pycodex_ws-0.7.0/workspace_server/optional_features/session-time-sort/README.md +50 -0
  29. pycodex_ws-0.7.0/workspace_server/optional_features/session-time-sort/source/custom.css +17 -0
  30. pycodex_ws-0.7.0/workspace_server/optional_features/session-time-sort/source/custom.js +6 -0
  31. pycodex_ws-0.7.0/workspace_server/optional_features/session-time-sort/source/session-time-sort.mjs +169 -0
  32. pycodex_ws-0.7.0/workspace_server/optional_features/session-time-sort/source/verify.mjs +189 -0
  33. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/source/verify.cjs +10 -8
  34. pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/README.md +187 -0
  35. pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/preview-mobile.png +0 -0
  36. pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/preview.png +0 -0
  37. pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/notifications.py +277 -0
  38. pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/runtime_checks.py +132 -0
  39. pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/summarize.py +88 -0
  40. pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/test_notifications.py +329 -0
  41. pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/test_xiaoai.py +275 -0
  42. pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/verify.cjs +98 -0
  43. pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/workspace.patch +191 -0
  44. pycodex_ws-0.7.0/workspace_server/optional_features/xiaoai-notifications/source/xiaoai.py +430 -0
  45. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/reloader.py +11 -1
  46. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/routes.py +164 -25
  47. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/session_view.py +42 -0
  48. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/sessions.py +38 -4
  49. pycodex_ws-0.7.0/workspace_server/sessions_ui.mjs +344 -0
  50. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/sharing.py +1 -0
  51. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/view_sources.py +14 -11
  52. pycodex_ws-0.7.0/workspace_server/vscode_server.py +1421 -0
  53. pycodex_ws-0.7.0/workspace_server/workspace.css +1612 -0
  54. pycodex_ws-0.7.0/workspace_server/workspace.html +354 -0
  55. pycodex_ws-0.7.0/workspace_server/workspace.mjs +1068 -0
  56. pycodex_ws-0.7.0/workspace_server/workspace.template.html +338 -0
  57. pycodex_ws-0.7.0/workspace_server/workspace_dom.mjs +30 -0
  58. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/workspaces.py +4 -0
  59. pycodex_ws-0.6.2/workspace_server/content_views.css +0 -1
  60. pycodex_ws-0.6.2/workspace_server/content_views.mjs +0 -37
  61. pycodex_ws-0.6.2/workspace_server/one_line_agent.py +0 -391
  62. pycodex_ws-0.6.2/workspace_server/optional_features/README.md +0 -32
  63. pycodex_ws-0.6.2/workspace_server/workspace.html +0 -4151
  64. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/.gitignore +0 -0
  65. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/LICENSE +0 -0
  66. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_router/__init__.py +0 -0
  67. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_router/__main__.py +0 -0
  68. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_router/browser.py +0 -0
  69. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_router/client.py +0 -0
  70. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_router/index.html +0 -0
  71. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_ws/__init__.py +0 -0
  72. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_ws/feishu_auth.py +0 -0
  73. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_ws/feishu_card.py +0 -0
  74. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_ws/feishu_connection.py +0 -0
  75. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_ws/feishu_link.py +0 -0
  76. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_ws/feishu_oauth.py +0 -0
  77. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_ws/feishu_render.py +0 -0
  78. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/pycodex_ws/workspace_config.py +0 -0
  79. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/__init__.py +0 -0
  80. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/__main__.py +0 -0
  81. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/agent_access.py +0 -0
  82. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/content_views.LICENSE.txt +0 -0
  83. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/customization.py +0 -0
  84. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/editor.css +0 -0
  85. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/editor.mjs +0 -0
  86. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/.gitignore +0 -0
  87. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/composer.mjs +0 -0
  88. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/editor.css +0 -0
  89. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/editor.mjs +0 -0
  90. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/editor_context.mjs +0 -0
  91. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/package-lock.json +0 -0
  92. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/package.json +0 -0
  93. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/prompt_history.mjs +0 -0
  94. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/touch_selection.mjs +0 -0
  95. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/transcript.mjs +0 -0
  96. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/frontend/view_labels.mjs +0 -0
  97. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/CONTRIBUTING.md +0 -0
  98. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/README.md +0 -0
  99. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/preview-mobile.png +0 -0
  100. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/preview.html +0 -0
  101. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/preview.png +0 -0
  102. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/source/custom.css +0 -0
  103. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/source/custom.js +0 -0
  104. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/source/fixture.mjs +0 -0
  105. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/clock-ticks/source/verify.mjs +0 -0
  106. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/README.md +0 -0
  107. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/preview-mobile.png +0 -0
  108. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/preview.html +0 -0
  109. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/preview.png +0 -0
  110. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/source/fixture.mjs +0 -0
  111. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/source/tool-groups.css +0 -0
  112. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/source/tool-groups.js +0 -0
  113. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/consecutive-tool-groups/source/verify.mjs +0 -0
  114. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/README.md +0 -0
  115. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/preview-mobile.png +0 -0
  116. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/preview.html +0 -0
  117. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/preview.png +0 -0
  118. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/source/custom.css +0 -0
  119. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/source/custom.js +0 -0
  120. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/source/fixture.mjs +0 -0
  121. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/exec-status/source/verify.mjs +0 -0
  122. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/README.md +0 -0
  123. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/preview-mobile.png +0 -0
  124. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/preview.html +0 -0
  125. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/preview.png +0 -0
  126. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/source/custom.css +0 -0
  127. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/source/custom.js +0 -0
  128. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/source/fixture.mjs +0 -0
  129. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/reasoning-display/source/verify.mjs +0 -0
  130. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/README.md +0 -0
  131. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/preview-mobile.png +0 -0
  132. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/preview.html +0 -0
  133. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/preview.png +0 -0
  134. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/source/custom.css +0 -0
  135. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/source/custom.js +0 -0
  136. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/source/fixture.mjs +0 -0
  137. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/source/session-tips.js +0 -0
  138. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/session-tips/source/verify.mjs +0 -0
  139. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/README.md +0 -0
  140. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/preview.png +0 -0
  141. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/source/custom.css +0 -0
  142. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/source/custom.js +0 -0
  143. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/source/skill-completion.css +0 -0
  144. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/source/skill-completion.mjs +0 -0
  145. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/skill-completion/source/verify.mjs +0 -0
  146. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/README.md +0 -0
  147. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/preview-mobile.png +0 -0
  148. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/preview.html +0 -0
  149. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/preview.png +0 -0
  150. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/source/custom.css +0 -0
  151. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/source/custom.js +0 -0
  152. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/source/fixture.mjs +0 -0
  153. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/tool-calls/source/verify.mjs +0 -0
  154. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/README.md +0 -0
  155. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/preview-mobile.png +0 -0
  156. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/preview.png +0 -0
  157. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/source/custom.css +0 -0
  158. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/source/custom.js +0 -0
  159. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/source/voice-input.css +0 -0
  160. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/optional_features/voice-input/source/voice-input.js +0 -0
  161. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/owned_process.py +0 -0
  162. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/runtime_info.py +0 -0
  163. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/session_api.py +0 -0
  164. {pycodex_ws-0.6.2 → pycodex_ws-0.7.0}/workspace_server/workspace_views.py +0 -0
  165. {pycodex_ws-0.6.2 → 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.6.2
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.6.2
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
- See the [0.6.0 release notes](https://github.com/Randomizez/pycodex/blob/v0.6.0/docs/RELEASE_0.6.0.md) for changes and
20
- integration migration from 0.5.0.
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. Status dots show
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)`. In a code or diff view,
70
- select text and choose **Insert into chat** to add editable context to the draft.
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
- Click the gear button and choose **Frontend customization** to start a
93
- customization conversation with the Agent.
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 and view controls.
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
- Ask the Agent to show the [feature catalog](workspace_server/optional_features/README.md)
115
- in the view area, then choose features by name or ID in chat. The Agent adapts
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
- ## One-line Agent
143
-
144
- An Agent that runs directly in most shells without installation, for bootstrapping
145
- an Agent environment or simple debugging.
146
-
147
- Open **Settings → One-line Agent**, choose a profile and click **Enable One-line Agent**.
148
- Copy the Bash or PowerShell command, replace the example task `看一下这台机器`,
149
- and run it in the target terminal. Commands execute on that machine; the terminal
150
- shows their results and the Agent's final replies.
151
-
152
- Leave the terminal running to continue the conversation from its workspace
153
- session. When idle, you can also edit the task and rerun the command with the same
154
- key to keep the existing history. For another terminal or an independent session,
155
- change the key's final session suffix from `1` to `2`, `3`, etc.
156
-
157
- Use **Stop** to end the service and its sessions. Closing a session and reusing
158
- its key starts a fresh conversation. After a server restart, enable the service
159
- again and copy a new command; recorded history is kept.
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
- See the [0.6.0 release notes](https://github.com/Randomizez/pycodex/blob/v0.6.0/docs/RELEASE_0.6.0.md) for changes and
9
- integration migration from 0.5.0.
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. Status dots show
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)`. In a code or diff view,
59
- select text and choose **Insert into chat** to add editable context to the draft.
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
- Click the gear button and choose **Frontend customization** to start a
82
- customization conversation with the Agent.
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 and view controls.
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
- Ask the Agent to show the [feature catalog](workspace_server/optional_features/README.md)
104
- in the view area, then choose features by name or ID in chat. The Agent adapts
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
- ## One-line Agent
132
-
133
- An Agent that runs directly in most shells without installation, for bootstrapping
134
- an Agent environment or simple debugging.
135
-
136
- Open **Settings → One-line Agent**, choose a profile and click **Enable One-line Agent**.
137
- Copy the Bash or PowerShell command, replace the example task `看一下这台机器`,
138
- and run it in the target terminal. Commands execute on that machine; the terminal
139
- shows their results and the Agent's final replies.
140
-
141
- Leave the terminal running to continue the conversation from its workspace
142
- session. When idle, you can also edit the task and rerun the command with the same
143
- key to keep the existing history. For another terminal or an independent session,
144
- change the key's final session suffix from `1` to `2`, `3`, etc.
145
-
146
- Use **Stop** to end the service and its sessions. Closing a session and reusing
147
- its key starts a fresh conversation. After a server restart, enable the service
148
- again and copy a new command; recorded history is kept.
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 one_line_agent_request(scope):
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" and scope["method"] == "POST"
66
- and re.fullmatch(r"(?:/w/[A-Za-z0-9_-]+)?/b", route_path(scope))
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 one_line_agent_request(scope)
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 one_line_agent_request, route_path, trusted_agent_request
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 json_object_body(
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 one_line_agent_request(request.scope):
203
- # This endpoint validates its own workspace-scoped temporary token.
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/one-line-agent"}:
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.6.2"
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.6.2",
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",