agent-codemode 1.1.1__tar.gz → 1.2.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 (160) hide show
  1. agent_codemode-1.2.0/CHANGELOG.md +16 -0
  2. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/PKG-INFO +2 -2
  3. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/README.md +1 -1
  4. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/__version__.py +1 -1
  5. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/composition/executor.py +3 -3
  6. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/server.py +4 -3
  7. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/toolset.py +4 -2
  8. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/README.md +1 -1
  9. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/integrations/index.mdx +1 -1
  10. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docusaurus.config.js +1 -8
  11. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/package.json +4 -2
  12. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/src/theme/CustomDocItem.tsx +1 -6
  13. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/src/theme/IconsTitle.tsx +1 -3
  14. agent_codemode-1.2.0/docs/src/theme/PrimerRoot.tsx +91 -0
  15. agent_codemode-1.2.0/docs/src/theme/Root.tsx +16 -0
  16. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/skills/README.md +1 -1
  17. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/pyproject.toml +1 -0
  18. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/README.md +1 -1
  19. agent_codemode-1.2.0/tests/test_execute_code_result.py +115 -0
  20. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/tests/test_skill_bindings.py +43 -1
  21. agent_codemode-1.1.1/CHANGELOG.md +0 -7
  22. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/.github/workflows/build.yaml +0 -0
  23. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/.github/workflows/py-code-style.yaml +0 -0
  24. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/.github/workflows/py-tests.yaml +0 -0
  25. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/.github/workflows/py-typing.yaml +0 -0
  26. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/.github/workflows/release.yaml +0 -0
  27. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/.github/workflows/reusable-python.yaml +0 -0
  28. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/.gitignore +0 -0
  29. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/.licenserc.yaml +0 -0
  30. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/.pre-commit-config.yaml +0 -0
  31. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/.vscode/settings.json +0 -0
  32. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/Dockerfile +0 -0
  33. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/LICENSE +0 -0
  34. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/Makefile +0 -0
  35. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/RELEASE.md +0 -0
  36. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/__init__.py +0 -0
  37. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/composition/__init__.py +0 -0
  38. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/discovery/__init__.py +0 -0
  39. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/discovery/codegen.py +0 -0
  40. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/discovery/registry.py +0 -0
  41. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/proxy/__init__.py +0 -0
  42. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/proxy/mcp_client.py +0 -0
  43. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/proxy/meta_tools.py +0 -0
  44. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/tool_definitions.py +0 -0
  45. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/agent_codemode/types.py +0 -0
  46. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/.gitignore +0 -0
  47. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/LICENSE +0 -0
  48. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/Makefile +0 -0
  49. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/babel.config.js +0 -0
  50. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/concept/_category_.yml +0 -0
  51. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/concept/index.mdx +0 -0
  52. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/discovery/_category_.yml +0 -0
  53. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/discovery/index.mdx +0 -0
  54. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/examples/_category_.yml +0 -0
  55. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/examples/index.mdx +0 -0
  56. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/getting-started/_category_.yml +0 -0
  57. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/getting-started/index.mdx +0 -0
  58. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/index.mdx +0 -0
  59. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/integrations/_category_.yml +0 -0
  60. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/mcp-server/_category_.yml +0 -0
  61. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/mcp-server/index.mdx +0 -0
  62. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/mcp-servers/_category_.yml +0 -0
  63. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/mcp-servers/index.mdx +0 -0
  64. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/programmatic-tools/_category_.yml +0 -0
  65. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/programmatic-tools/index.mdx +0 -0
  66. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/skills/_category_.yml +0 -0
  67. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/docs/skills/index.mdx +0 -0
  68. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/sidebars.js +0 -0
  69. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/src/components/HomepageRow1.js +0 -0
  70. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/src/components/HomepageRow1.module.css +0 -0
  71. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/src/components/HomepageRow2.js +0 -0
  72. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/src/components/HomepageRow2.module.css +0 -0
  73. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/src/components/HomepageRow3.js +0 -0
  74. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/src/components/HomepageRow3.module.css +0 -0
  75. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/src/css/custom.css +0 -0
  76. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/src/pages/index.module.css +0 -0
  77. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/src/pages/markdown-page.md +0 -0
  78. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/bricks.svg +0 -0
  79. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/building-construction.svg +0 -0
  80. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/cloud-sun.svg +0 -0
  81. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/cloud.svg +0 -0
  82. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/collaboration.svg +0 -0
  83. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/copy-left.svg +0 -0
  84. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/datalayer/logo.png +0 -0
  85. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/datalayer/logo.svg +0 -0
  86. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/datalayer/personas/business.svg +0 -0
  87. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/datalayer/personas/data-scientist.svg +0 -0
  88. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/datalayer/personas/devops.svg +0 -0
  89. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/datalayer/project/project-line.svg +0 -0
  90. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/favicon.ico +0 -0
  91. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/jupyter.svg +0 -0
  92. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/open-source.svg +0 -0
  93. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/react-js.svg +0 -0
  94. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/react-js2.svg +0 -0
  95. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/ringed-planet.svg +0 -0
  96. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/robot.svg +0 -0
  97. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/rocket.svg +0 -0
  98. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/shield.svg +0 -0
  99. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/sparkles.svg +0 -0
  100. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/streamlit.gif +0 -0
  101. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/super-hero.svg +0 -0
  102. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/target.svg +0 -0
  103. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/docs/static/img/thumbs-up.svg +0 -0
  104. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/patterns/Makefile +0 -0
  105. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/patterns/README.md +0 -0
  106. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/patterns/codemode_example.py +0 -0
  107. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/patterns/codemode_patterns_example.py +0 -0
  108. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/simple/Makefile +0 -0
  109. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/simple/README.md +0 -0
  110. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/simple/agent_cli.py +0 -0
  111. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/simple/example_mcp_server.py +0 -0
  112. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/Makefile +0 -0
  113. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/README.md +0 -0
  114. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/agent_cli.py +0 -0
  115. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/example_mcp_server.py +0 -0
  116. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/skills/pdf/LICENSE.txt +0 -0
  117. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/skills/pdf/SKILL.md +0 -0
  118. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/skills/pdf/forms.md +0 -0
  119. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/skills/pdf/reference.md +0 -0
  120. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/skills/pdf/scripts/check_bounding_boxes.py +0 -0
  121. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/skills/pdf/scripts/check_bounding_boxes_test.py +0 -0
  122. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/skills/pdf/scripts/check_fillable_fields.py +0 -0
  123. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/skills/pdf/scripts/convert_pdf_to_images.py +0 -0
  124. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/skills/pdf/scripts/create_validation_image.py +0 -0
  125. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/skills/pdf/scripts/extract_form_field_info.py +0 -0
  126. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/skills/pdf/scripts/fill_fillable_fields.py +0 -0
  127. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/examples/skills/skills/pdf/scripts/fill_pdf_form_with_annotations.py +0 -0
  128. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/crawl/SKILL.md +0 -0
  129. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/crawl/scripts/check_robots.py +0 -0
  130. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/crawl/scripts/crawl_site.py +0 -0
  131. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/crawl/scripts/extract_links.py +0 -0
  132. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/crawl/scripts/extract_tables.py +0 -0
  133. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/crawl/scripts/fetch_js_page.py +0 -0
  134. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/crawl/scripts/fetch_page.py +0 -0
  135. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/github/SKILL.md +0 -0
  136. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/github/scripts/get_repo.py +0 -0
  137. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/github/scripts/list_issues.py +0 -0
  138. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/github/scripts/list_prs.py +0 -0
  139. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/github/scripts/list_repos.py +0 -0
  140. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/github/scripts/search_repos.py +0 -0
  141. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/pdf/LICENSE.txt +0 -0
  142. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/pdf/SKILL.md +0 -0
  143. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/pdf/forms.md +0 -0
  144. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/pdf/reference.md +0 -0
  145. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/pdf/scripts/check_bounding_boxes.py +0 -0
  146. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/pdf/scripts/check_bounding_boxes_test.py +0 -0
  147. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/pdf/scripts/check_fillable_fields.py +0 -0
  148. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/pdf/scripts/convert_pdf_to_images.py +0 -0
  149. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/pdf/scripts/create_validation_image.py +0 -0
  150. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/pdf/scripts/extract_form_field_info.py +0 -0
  151. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/pdf/scripts/fill_fillable_fields.py +0 -0
  152. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/skills/pdf/scripts/fill_pdf_form_with_annotations.py +0 -0
  153. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/tests/__init__.py +0 -0
  154. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/tests/conftest.py +0 -0
  155. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/tests/test_agent_minimal.py +0 -0
  156. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/tests/test_codemode.py +0 -0
  157. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/tests/test_direct_execution.py +0 -0
  158. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/tests/test_executor_async.py +0 -0
  159. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/tests/test_executor_streaming.py +0 -0
  160. {agent_codemode-1.1.1 → agent_codemode-1.2.0}/tests/test_stdout_capture.py +0 -0
@@ -0,0 +1,16 @@
1
+ <!--
2
+ ~ Copyright (c) 2025-2026 Datalayer, Inc.
3
+ ~
4
+ ~ BSD 3-Clause License
5
+ -->
6
+
7
+ # Changelog
8
+
9
+ ## 1.2.0
10
+
11
+ - `execute_code` answers what the code printed once, as `stdout` (with `stderr`
12
+ beside it), not also as an `output` twin: every printed result was in the model's
13
+ context twice. The MCP server's `execute_code` and `run_skill` answer the same way;
14
+ a failed run answers empty `stdout` and `stderr` with its `error`.
15
+ - The sandbox's `run_skill` answers a script's printed output as `stdout` (with
16
+ `stderr`), not also as `output`.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: agent_codemode
3
- Version: 1.1.1
3
+ Version: 1.2.0
4
4
  Project-URL: Home, https://github.com/datalayer/agent-codemode
5
5
  Author-email: Datalayer <info@datalayer.io>
6
6
  License: BSD 3-Clause License
@@ -68,7 +68,7 @@ Description-Content-Type: text/markdown
68
68
  ~ BSD 3-Clause License
69
69
  -->
70
70
 
71
- [![Datalayer](https://assets.datalayer.tech/datalayer-25.svg)](https://datalayer.io)
71
+ [![Datalayer](https://images.datalayer.io/legacy/datalayer-25.svg)](https://datalayer.ai)
72
72
 
73
73
  [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%20Sponsor&message=%E2%9D%A4&logo=GitHub&style=flat&color=1ABC9C)](https://github.com/sponsors/datalayer)
74
74
 
@@ -4,7 +4,7 @@
4
4
  ~ BSD 3-Clause License
5
5
  -->
6
6
 
7
- [![Datalayer](https://assets.datalayer.tech/datalayer-25.svg)](https://datalayer.io)
7
+ [![Datalayer](https://images.datalayer.io/legacy/datalayer-25.svg)](https://datalayer.ai)
8
8
 
9
9
  [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%20Sponsor&message=%E2%9D%A4&logo=GitHub&style=flat&color=1ABC9C)](https://github.com/sponsors/datalayer)
10
10
 
@@ -4,4 +4,4 @@
4
4
 
5
5
  """Agent Codemode."""
6
6
 
7
- __version__ = "1.1.1"
7
+ __version__ = "1.2.0"
@@ -992,7 +992,7 @@ async def run_skill(
992
992
  args: Arguments to pass to the script (default: []).
993
993
 
994
994
  Returns:
995
- Dict with keys: output, exit_code, success, error,
995
+ Dict with keys: stdout, stderr, exit_code, success, error,
996
996
  execution_time, script_name.
997
997
  \\"\\"\\"
998
998
  args = args or []
@@ -1003,7 +1003,8 @@ async def run_skill(
1003
1003
  if not script_path.exists():
1004
1004
  return {{
1005
1005
  "success": False,
1006
- "output": "",
1006
+ "stdout": "",
1007
+ "stderr": "",
1007
1008
  "error": f"Script not found: {{script_path}}",
1008
1009
  "exit_code": 1,
1009
1010
  "execution_time": 0.0,
@@ -1041,7 +1042,6 @@ async def run_skill(
1041
1042
 
1042
1043
  return {{
1043
1044
  "success": exit_code == 0 and error is None,
1044
- "output": stdout_text or stderr_text,
1045
1045
  "stdout": stdout_text,
1046
1046
  "stderr": stderr_text,
1047
1047
  "error": error or (stderr_text if exit_code != 0 else None),
@@ -354,7 +354,8 @@ async def handle_execute_code(arguments: dict[str, Any]) -> dict[str, Any]:
354
354
  return {
355
355
  "success": False,
356
356
  "result": None,
357
- "output": "",
357
+ "stdout": "",
358
+ "stderr": "",
358
359
  "error": str(e),
359
360
  }
360
361
 
@@ -439,14 +440,14 @@ async def handle_run_skill(arguments: dict[str, Any]) -> dict[str, Any]:
439
440
  "result": execution.text,
440
441
  "stdout": execution.stdout,
441
442
  "stderr": execution.stderr,
442
- "output": execution.stdout,
443
443
  "error": error_message,
444
444
  }
445
445
  except Exception as e:
446
446
  return {
447
447
  "success": False,
448
448
  "result": None,
449
- "output": "",
449
+ "stdout": "",
450
+ "stderr": "",
450
451
  "execution_time": 0,
451
452
  "error": str(e),
452
453
  }
@@ -564,9 +564,10 @@ if PYDANTIC_AI_AVAILABLE:
564
564
  }
565
565
  for r in execution.results
566
566
  ],
567
+ # What the code printed, once: stdout, not also an "output" twin
568
+ # that doubled every printed result in the model's context.
567
569
  "stdout": execution.stdout,
568
570
  "stderr": execution.stderr,
569
- "output": execution.stdout,
570
571
  "execution_time": elapsed,
571
572
  "execution_ok": execution.execution_ok,
572
573
  "execution_error": execution.execution_error,
@@ -581,7 +582,8 @@ if PYDANTIC_AI_AVAILABLE:
581
582
  return {
582
583
  "success": False,
583
584
  "result": None,
584
- "output": "",
585
+ "stdout": "",
586
+ "stderr": "",
585
587
  "execution_time": 0,
586
588
  "error": str(e),
587
589
  }
@@ -1,4 +1,4 @@
1
- [![Datalayer](https://assets.datalayer.tech/datalayer-25.svg)](https://datalayer.io)
1
+ [![Datalayer](https://images.datalayer.io/legacy/datalayer-25.svg)](https://datalayer.ai)
2
2
 
3
3
  [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%20Sponsor&message=%E2%9D%A4&logo=GitHub&style=flat&color=1ABC9C)](https://github.com/sponsors/datalayer)
4
4
 
@@ -214,7 +214,7 @@ The `execute_code` tool returns errors in the result:
214
214
 
215
215
  ```python
216
216
  result = execute_code(code="invalid python code %%")
217
- # Returns: {"success": False, "error": "SyntaxError: invalid syntax", "output": ""}
217
+ # Returns: {"success": False, "error": "SyntaxError: invalid syntax", "stdout": "", "stderr": "", ...}
218
218
  ```
219
219
 
220
220
  Agents can handle these and retry:
@@ -15,6 +15,7 @@ module.exports = {
15
15
  organizationName: 'datalayer',
16
16
  projectName: 'datalayer',
17
17
  markdown: {
18
+ format: 'detect',
18
19
  mermaid: true,
19
20
  },
20
21
  plugins: [
@@ -176,14 +177,6 @@ module.exports = {
176
177
  label: 'Datalayer AI',
177
178
  href: 'https://datalayer.ai',
178
179
  },
179
- {
180
- label: 'Datalayer App',
181
- href: 'https://datalayer.app',
182
- },
183
- {
184
- label: 'Datalayer Docs',
185
- href: 'https://docs.datalayer.app',
186
- },
187
180
  {
188
181
  label: 'Datalayer Blog',
189
182
  href: 'https://datalayer.blog',
@@ -21,14 +21,16 @@
21
21
  "@docusaurus/theme-live-codeblock": "^3.5.2",
22
22
  "@docusaurus/theme-mermaid": "^3.5.2",
23
23
  "@mdx-js/react": "^3.0.1",
24
- "@primer/react-brand": "^0.58.0",
24
+ "@primer/primitives": "^10.7.0",
25
+ "@primer/react": "^37.31.0",
25
26
  "clsx": "^2.1.1",
26
27
  "docusaurus-lunr-search": "^3.5.0",
27
28
  "mermaid": "^11.3.0",
28
29
  "react": "18.3.1",
29
30
  "react-calendly": "^4.1.0",
30
31
  "react-dom": "18.3.1",
31
- "react-modal-image": "^2.5.0"
32
+ "react-modal-image": "^2.5.0",
33
+ "styled-components": "^5.3.10"
32
34
  },
33
35
  "devDependencies": {
34
36
  "@docusaurus/module-type-aliases": "^3.4.0",
@@ -4,17 +4,12 @@
4
4
  */
5
5
 
6
6
  import React from "react";
7
- import { ThemeProvider } from '@primer/react-brand';
8
7
  import DocItem from "@theme/DocItem";
9
8
 
10
- import '@primer/react-brand/lib/css/main.css'
11
-
12
9
  export const CustomDocItem = (props: any) => {
13
10
  return (
14
11
  <>
15
- <ThemeProvider>
16
- <DocItem {...props}/>
17
- </ThemeProvider>
12
+ <DocItem {...props}/>
18
13
  </>
19
14
  )
20
15
  }
@@ -4,9 +4,7 @@
4
4
  */
5
5
 
6
6
  import React from "react";
7
- import { Box } from '@primer/react';
8
-
9
- import '@primer/react-brand/lib/css/main.css'
7
+ import { Box } from '@datalayer/primer-addons';
10
8
 
11
9
  type Props = {
12
10
  icon1: JSX.Element,
@@ -0,0 +1,91 @@
1
+ /*
2
+ * Copyright (c) 2025-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+
6
+ /**
7
+ * Primer React for the pages of this site, its theme pinned: Datalayer's,
8
+ * in the colour mode Docusaurus shows, with no chooser of its own. A chooser
9
+ * here would repaint the Primer parts while the Docusaurus page around them
10
+ * stays put.
11
+ *
12
+ * The mode follows the `data-theme` Docusaurus sets on `<html>`, so a site
13
+ * pinned to light stays light on a dark system, and its switch, where it has
14
+ * one, moves Primer with it. `Root` sits above Docusaurus' colour mode
15
+ * provider, so the attribute is read, then watched; the first render, the
16
+ * server's included, starts from the site's `colorMode.defaultMode`.
17
+ *
18
+ * The same file in every Datalayer Docusaurus site; `src/theme/Root` wraps
19
+ * the site in it. A plain element carries the colour-mode attributes Primer's
20
+ * components read (what `BaseStyles` would set), without `BaseStyles` itself:
21
+ * its global rules painted every link of the site Primer's blue, over
22
+ * Docusaurus' own colours (21 November 2026). The primitives give the
23
+ * components their CSS variables.
24
+ */
25
+
26
+ import React, { useEffect, useState, type ReactNode } from 'react';
27
+ import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
28
+ import { ThemeProvider } from '@primer/react';
29
+ import { datalayerTheme } from '@datalayer/primer-addons/lib/theme/themes/datalayerTheme';
30
+
31
+ import '@primer/primitives/dist/css/base/size/size.css';
32
+ import '@primer/primitives/dist/css/base/typography/typography.css';
33
+ import '@primer/primitives/dist/css/base/motion/motion.css';
34
+ import '@primer/primitives/dist/css/functional/size/border.css';
35
+ import '@primer/primitives/dist/css/functional/size/breakpoints.css';
36
+ import '@primer/primitives/dist/css/functional/size/size.css';
37
+ import '@primer/primitives/dist/css/functional/size/viewport.css';
38
+ import '@primer/primitives/dist/css/functional/themes/light.css';
39
+ import '@primer/primitives/dist/css/functional/themes/dark.css';
40
+ import '@primer/primitives/dist/css/functional/typography/typography.css';
41
+
42
+ type PrimerMode = 'day' | 'night';
43
+
44
+ /** Docusaurus' `light` or `dark` as Primer's `day` or `night`. */
45
+ const primerModeOf = (docusaurusMode: string | null | undefined): PrimerMode =>
46
+ docusaurusMode === 'dark' ? 'night' : 'day';
47
+
48
+ /*
49
+ * The element sits between #__docusaurus (a column flex box) and the navbar,
50
+ * .main-wrapper and footer: it grows in the root and is a column flex box
51
+ * itself, so .main-wrapper's flex: 1 still fills a short page and the footer
52
+ * stays at the bottom. Font, colour and line height stay Docusaurus'.
53
+ */
54
+ const INHERIT = {
55
+ fontFamily: 'inherit',
56
+ fontSize: 'inherit',
57
+ lineHeight: 'inherit',
58
+ color: 'inherit',
59
+ display: 'flex',
60
+ flexDirection: 'column',
61
+ flex: '1 0 auto',
62
+ } as const;
63
+
64
+ export function PrimerRoot({ children }: { children: ReactNode }) {
65
+ const { siteConfig } = useDocusaurusContext();
66
+ const defaultMode = (siteConfig.themeConfig as { colorMode?: { defaultMode?: string } })?.colorMode?.defaultMode;
67
+ const [colorMode, setColorMode] = useState<PrimerMode>(primerModeOf(defaultMode));
68
+ useEffect(() => {
69
+ const html = document.documentElement;
70
+ const follow = () => setColorMode(primerModeOf(html.getAttribute('data-theme')));
71
+ follow();
72
+ const observer = new MutationObserver(follow);
73
+ observer.observe(html, { attributes: true, attributeFilter: ['data-theme'] });
74
+ return () => observer.disconnect();
75
+ }, []);
76
+ return (
77
+ <ThemeProvider theme={datalayerTheme} colorMode={colorMode}>
78
+ <div
79
+ data-portal-root
80
+ data-color-mode={colorMode === 'night' ? 'dark' : 'light'}
81
+ data-light-theme="light"
82
+ data-dark-theme="dark"
83
+ style={INHERIT}
84
+ >
85
+ {children}
86
+ </div>
87
+ </ThemeProvider>
88
+ );
89
+ }
90
+
91
+ export default PrimerRoot;
@@ -0,0 +1,16 @@
1
+ /*
2
+ * Copyright (c) 2025-2026 Datalayer, Inc.
3
+ * Distributed under the terms of the Modified BSD License.
4
+ */
5
+
6
+ /**
7
+ * Docusaurus' root wrapper (swizzled): every page in Primer React's theme,
8
+ * pinned (see `PrimerRoot`).
9
+ */
10
+
11
+ import React, { type ReactNode } from 'react';
12
+ import { PrimerRoot } from './PrimerRoot';
13
+
14
+ export default function Root({ children }: { children: ReactNode }) {
15
+ return <PrimerRoot>{children}</PrimerRoot>;
16
+ }
@@ -4,7 +4,7 @@
4
4
  ~ BSD 3-Clause License
5
5
  -->
6
6
 
7
- [![Datalayer](https://assets.datalayer.tech/datalayer-25.svg)](https://datalayer.io)
7
+ [![Datalayer](https://images.datalayer.io/legacy/datalayer-25.svg)](https://datalayer.ai)
8
8
 
9
9
  [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%20Sponsor&message=%E2%9D%A4&logo=GitHub&style=flat&color=1ABC9C)](https://github.com/sponsors/datalayer)
10
10
 
@@ -60,6 +60,7 @@ allow-direct-references = true
60
60
 
61
61
  [tool.pytest.ini_options]
62
62
  asyncio_mode = "auto"
63
+ asyncio_default_fixture_loop_scope = "function"
63
64
  testpaths = ["tests"]
64
65
  filterwarnings = [
65
66
  "error",
@@ -4,7 +4,7 @@
4
4
  ~ BSD 3-Clause License
5
5
  -->
6
6
 
7
- [![Datalayer](https://assets.datalayer.tech/datalayer-25.svg)](https://datalayer.io)
7
+ [![Datalayer](https://images.datalayer.io/legacy/datalayer-25.svg)](https://datalayer.ai)
8
8
 
9
9
  [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%20Sponsor&message=%E2%9D%A4&logo=GitHub&style=flat&color=1ABC9C)](https://github.com/sponsors/datalayer)
10
10
 
@@ -0,0 +1,115 @@
1
+ # Copyright (c) 2025-2026 Datalayer, Inc.
2
+ #
3
+ # BSD 3-Clause License
4
+
5
+ """What the code printed comes back once: as stdout, not also as an "output" twin."""
6
+
7
+ from __future__ import annotations
8
+
9
+ import json
10
+ from types import SimpleNamespace
11
+ from typing import Any
12
+
13
+ import pytest
14
+ from code_sandboxes.models import CodeError, Logs, OutputMessage
15
+ from code_sandboxes.models import ExecutionResult as Execution
16
+
17
+ from agent_codemode import server
18
+
19
+ PRINTED = "row\n" * 2000
20
+
21
+
22
+ def _execution(stdout: str = PRINTED, stderr: str = "", **kwargs: Any) -> Execution:
23
+ return Execution(
24
+ logs=Logs(
25
+ stdout=[OutputMessage(line=stdout)] if stdout else [],
26
+ stderr=[OutputMessage(line=stderr, error=True)] if stderr else [],
27
+ ),
28
+ **kwargs,
29
+ )
30
+
31
+
32
+ class _Executor:
33
+ _setup_done = True
34
+ sandbox_client = None
35
+
36
+ def __init__(self, execution: Execution | None = None, fail: bool = False) -> None:
37
+ self.execution = execution or _execution()
38
+ self.fail = fail
39
+
40
+ async def execute(self, code: str, timeout: float = 30.0) -> Execution:
41
+ if self.fail:
42
+ raise RuntimeError("sandbox gone")
43
+ return self.execution
44
+
45
+ async def execute_skill(self, name: str, arguments: Any = None) -> Execution:
46
+ return await self.execute(name)
47
+
48
+
49
+ async def _toolset_execute(executor: _Executor) -> dict[str, Any]:
50
+ toolset_module = pytest.importorskip("agent_codemode.toolset")
51
+ if not toolset_module.PYDANTIC_AI_AVAILABLE:
52
+ pytest.skip("pydantic-ai is not installed")
53
+
54
+ async def _executing(_: bool) -> None:
55
+ return None
56
+
57
+ fake = SimpleNamespace(_executor=executor, _set_runtime_executing=_executing)
58
+ return await toolset_module.CodemodeToolset._execute_code(fake, "print('row')")
59
+
60
+
61
+ @pytest.mark.asyncio
62
+ async def test_the_toolset_answers_what_was_printed_once() -> None:
63
+ result = await _toolset_execute(_Executor())
64
+
65
+ assert result["stdout"] == PRINTED
66
+ assert "output" not in result
67
+ assert json.dumps(result).count("row") == PRINTED.count("row")
68
+
69
+
70
+ @pytest.mark.asyncio
71
+ async def test_the_toolset_keeps_stderr_and_the_code_error() -> None:
72
+ execution = _execution(
73
+ stdout="",
74
+ stderr="Traceback ...",
75
+ code_error=CodeError(name="ValueError", value="bad", traceback="Traceback ..."),
76
+ )
77
+ result = await _toolset_execute(_Executor(execution))
78
+
79
+ assert result["success"] is False
80
+ assert result["stderr"] == "Traceback ..."
81
+ assert result["code_error"]
82
+ assert result["error"]
83
+
84
+
85
+ @pytest.mark.asyncio
86
+ async def test_the_toolset_says_why_the_sandbox_failed() -> None:
87
+ result = await _toolset_execute(_Executor(fail=True))
88
+
89
+ assert result == {
90
+ "success": False,
91
+ "result": None,
92
+ "stdout": "",
93
+ "stderr": "",
94
+ "execution_time": 0,
95
+ "error": "sandbox gone",
96
+ }
97
+
98
+
99
+ @pytest.mark.asyncio
100
+ @pytest.mark.parametrize(
101
+ "handle, arguments",
102
+ [
103
+ (server.handle_execute_code, {"code": "print('row')"}),
104
+ (server.handle_run_skill, {"name": "rows"}),
105
+ ],
106
+ )
107
+ async def test_the_server_answers_what_was_printed_once(
108
+ monkeypatch: pytest.MonkeyPatch, handle: Any, arguments: dict[str, Any]
109
+ ) -> None:
110
+ monkeypatch.setattr(server, "get_executor", lambda: _Executor())
111
+
112
+ result = await handle(arguments)
113
+
114
+ assert result["stdout"] == PRINTED
115
+ assert "output" not in result
@@ -355,6 +355,48 @@ class TestGenerateSkillsInSandbox:
355
355
  assert "exec(" in gen_code # run_skill exec()s the script directly
356
356
  assert "_SKILLS_PATH" in gen_code # All bindings use the skills path constant
357
357
 
358
+ @pytest.mark.asyncio
359
+ async def test_run_skill_answers_what_was_printed_once(self, tmp_path: Path):
360
+ """The sandbox's run_skill answers the script's printed output as stdout, once."""
361
+ import importlib.util
362
+
363
+ from agent_codemode.composition.executor import CodeModeExecutor
364
+
365
+ scripts = tmp_path / "skills" / "rows" / "scripts"
366
+ scripts.mkdir(parents=True)
367
+ (scripts / "print_rows.py").write_text(
368
+ "import sys\nprint('row\\n' * 100, end='')\nprint('warn', file=sys.stderr)\n"
369
+ )
370
+ config = CodeModeConfig(
371
+ generated_path=str(tmp_path / "generated"),
372
+ workspace_path=str(tmp_path / "workspace"),
373
+ skills_path=str(tmp_path / "skills"),
374
+ )
375
+ executor = CodeModeExecutor(registry=ToolRegistry(), config=config)
376
+ executor._sandbox_client = self.MockRemoteSandbox()
377
+ executor.set_skills_metadata(SAMPLE_SKILLS_METADATA)
378
+ executor.generate_skills_in_sandbox()
379
+
380
+ spec = importlib.util.spec_from_file_location(
381
+ "_run_skill_under_test",
382
+ "/tmp/generated/skills/run_skill.py", # noqa: S108 - where the sandbox writes it
383
+ )
384
+ assert spec and spec.loader
385
+ module = importlib.util.module_from_spec(spec)
386
+ spec.loader.exec_module(module)
387
+
388
+ ran = await module.run_skill("rows", "print_rows")
389
+ assert ran["success"] is True
390
+ assert ran["stdout"] == "row\n" * 100
391
+ assert ran["stderr"] == "warn\n"
392
+ assert "output" not in ran
393
+
394
+ missing = await module.run_skill("rows", "nope")
395
+ assert missing["success"] is False
396
+ assert missing["stdout"] == "" and missing["stderr"] == ""
397
+ assert "Script not found" in missing["error"]
398
+ assert "output" not in missing
399
+
358
400
 
359
401
  # ---------------------------------------------------------------------------
360
402
  # 4. Full codegen + import round-trip (no sandbox needed)
@@ -453,7 +495,7 @@ class TestCodegenImportRoundTrip:
453
495
 
454
496
  async def mock_caller(name: str, args: dict) -> Any:
455
497
  calls.append((name, args))
456
- return {"output": "done", "exit_code": 0, "success": True}
498
+ return {"stdout": "done", "exit_code": 0, "success": True}
457
499
 
458
500
  set_tool_caller(mock_caller)
459
501
 
@@ -1,7 +0,0 @@
1
- <!--
2
- ~ Copyright (c) 2025-2026 Datalayer, Inc.
3
- ~
4
- ~ BSD 3-Clause License
5
- -->
6
-
7
- # Changelog
File without changes
File without changes