agent-codemode 1.1.1__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.
- agent_codemode-1.1.1/.github/workflows/build.yaml +24 -0
- agent_codemode-1.1.1/.github/workflows/py-code-style.yaml +44 -0
- agent_codemode-1.1.1/.github/workflows/py-tests.yaml +43 -0
- agent_codemode-1.1.1/.github/workflows/py-typing.yaml +44 -0
- agent_codemode-1.1.1/.github/workflows/release.yaml +105 -0
- agent_codemode-1.1.1/.github/workflows/reusable-python.yaml +100 -0
- agent_codemode-1.1.1/.gitignore +136 -0
- agent_codemode-1.1.1/.licenserc.yaml +18 -0
- agent_codemode-1.1.1/.pre-commit-config.yaml +38 -0
- agent_codemode-1.1.1/.vscode/settings.json +9 -0
- agent_codemode-1.1.1/CHANGELOG.md +7 -0
- agent_codemode-1.1.1/Dockerfile +19 -0
- agent_codemode-1.1.1/LICENSE +29 -0
- agent_codemode-1.1.1/Makefile +82 -0
- agent_codemode-1.1.1/PKG-INFO +559 -0
- agent_codemode-1.1.1/README.md +495 -0
- agent_codemode-1.1.1/RELEASE.md +35 -0
- agent_codemode-1.1.1/agent_codemode/__init__.py +99 -0
- agent_codemode-1.1.1/agent_codemode/__version__.py +7 -0
- agent_codemode-1.1.1/agent_codemode/composition/__init__.py +9 -0
- agent_codemode-1.1.1/agent_codemode/composition/executor.py +1412 -0
- agent_codemode-1.1.1/agent_codemode/discovery/__init__.py +10 -0
- agent_codemode-1.1.1/agent_codemode/discovery/codegen.py +843 -0
- agent_codemode-1.1.1/agent_codemode/discovery/registry.py +380 -0
- agent_codemode-1.1.1/agent_codemode/proxy/__init__.py +10 -0
- agent_codemode-1.1.1/agent_codemode/proxy/mcp_client.py +296 -0
- agent_codemode-1.1.1/agent_codemode/proxy/meta_tools.py +421 -0
- agent_codemode-1.1.1/agent_codemode/server.py +703 -0
- agent_codemode-1.1.1/agent_codemode/tool_definitions.py +154 -0
- agent_codemode-1.1.1/agent_codemode/toolset.py +630 -0
- agent_codemode-1.1.1/agent_codemode/types.py +261 -0
- agent_codemode-1.1.1/docs/.gitignore +23 -0
- agent_codemode-1.1.1/docs/LICENSE +21 -0
- agent_codemode-1.1.1/docs/Makefile +65 -0
- agent_codemode-1.1.1/docs/README.md +37 -0
- agent_codemode-1.1.1/docs/babel.config.js +8 -0
- agent_codemode-1.1.1/docs/docs/concept/_category_.yml +2 -0
- agent_codemode-1.1.1/docs/docs/concept/index.mdx +249 -0
- agent_codemode-1.1.1/docs/docs/discovery/_category_.yml +2 -0
- agent_codemode-1.1.1/docs/docs/discovery/index.mdx +281 -0
- agent_codemode-1.1.1/docs/docs/examples/_category_.yml +2 -0
- agent_codemode-1.1.1/docs/docs/examples/index.mdx +94 -0
- agent_codemode-1.1.1/docs/docs/getting-started/_category_.yml +2 -0
- agent_codemode-1.1.1/docs/docs/getting-started/index.mdx +223 -0
- agent_codemode-1.1.1/docs/docs/index.mdx +305 -0
- agent_codemode-1.1.1/docs/docs/integrations/_category_.yml +2 -0
- agent_codemode-1.1.1/docs/docs/integrations/index.mdx +322 -0
- agent_codemode-1.1.1/docs/docs/mcp-server/_category_.yml +2 -0
- agent_codemode-1.1.1/docs/docs/mcp-server/index.mdx +313 -0
- agent_codemode-1.1.1/docs/docs/mcp-servers/_category_.yml +2 -0
- agent_codemode-1.1.1/docs/docs/mcp-servers/index.mdx +304 -0
- agent_codemode-1.1.1/docs/docs/programmatic-tools/_category_.yml +2 -0
- agent_codemode-1.1.1/docs/docs/programmatic-tools/index.mdx +375 -0
- agent_codemode-1.1.1/docs/docs/skills/_category_.yml +2 -0
- agent_codemode-1.1.1/docs/docs/skills/index.mdx +492 -0
- agent_codemode-1.1.1/docs/docusaurus.config.js +213 -0
- agent_codemode-1.1.1/docs/package.json +50 -0
- agent_codemode-1.1.1/docs/sidebars.js +36 -0
- agent_codemode-1.1.1/docs/src/components/HomepageRow1.js +66 -0
- agent_codemode-1.1.1/docs/src/components/HomepageRow1.module.css +18 -0
- agent_codemode-1.1.1/docs/src/components/HomepageRow2.js +66 -0
- agent_codemode-1.1.1/docs/src/components/HomepageRow2.module.css +18 -0
- agent_codemode-1.1.1/docs/src/components/HomepageRow3.js +67 -0
- agent_codemode-1.1.1/docs/src/components/HomepageRow3.module.css +18 -0
- agent_codemode-1.1.1/docs/src/css/custom.css +189 -0
- agent_codemode-1.1.1/docs/src/pages/index.module.css +39 -0
- agent_codemode-1.1.1/docs/src/pages/markdown-page.md +7 -0
- agent_codemode-1.1.1/docs/src/theme/CustomDocItem.tsx +22 -0
- agent_codemode-1.1.1/docs/src/theme/IconsTitle.tsx +36 -0
- agent_codemode-1.1.1/docs/static/img/bricks.svg +32 -0
- agent_codemode-1.1.1/docs/static/img/building-construction.svg +22 -0
- agent_codemode-1.1.1/docs/static/img/cloud-sun.svg +14 -0
- agent_codemode-1.1.1/docs/static/img/cloud.svg +125 -0
- agent_codemode-1.1.1/docs/static/img/collaboration.svg +1676 -0
- agent_codemode-1.1.1/docs/static/img/copy-left.svg +9 -0
- agent_codemode-1.1.1/docs/static/img/datalayer/logo.png +0 -0
- agent_codemode-1.1.1/docs/static/img/datalayer/logo.svg +158 -0
- agent_codemode-1.1.1/docs/static/img/datalayer/personas/business.svg +527 -0
- agent_codemode-1.1.1/docs/static/img/datalayer/personas/data-scientist.svg +486 -0
- agent_codemode-1.1.1/docs/static/img/datalayer/personas/devops.svg +463 -0
- agent_codemode-1.1.1/docs/static/img/datalayer/project/project-line.svg +564 -0
- agent_codemode-1.1.1/docs/static/img/favicon.ico +0 -0
- agent_codemode-1.1.1/docs/static/img/jupyter.svg +260 -0
- agent_codemode-1.1.1/docs/static/img/open-source.svg +1 -0
- agent_codemode-1.1.1/docs/static/img/react-js.svg +4 -0
- agent_codemode-1.1.1/docs/static/img/react-js2.svg +46 -0
- agent_codemode-1.1.1/docs/static/img/ringed-planet.svg +13 -0
- agent_codemode-1.1.1/docs/static/img/robot.svg +28 -0
- agent_codemode-1.1.1/docs/static/img/rocket.svg +20 -0
- agent_codemode-1.1.1/docs/static/img/shield.svg +14 -0
- agent_codemode-1.1.1/docs/static/img/sparkles.svg +18 -0
- agent_codemode-1.1.1/docs/static/img/streamlit.gif +0 -0
- agent_codemode-1.1.1/docs/static/img/super-hero.svg +32 -0
- agent_codemode-1.1.1/docs/static/img/target.svg +134 -0
- agent_codemode-1.1.1/docs/static/img/thumbs-up.svg +17 -0
- agent_codemode-1.1.1/examples/patterns/Makefile +16 -0
- agent_codemode-1.1.1/examples/patterns/README.md +17 -0
- agent_codemode-1.1.1/examples/patterns/codemode_example.py +188 -0
- agent_codemode-1.1.1/examples/patterns/codemode_patterns_example.py +196 -0
- agent_codemode-1.1.1/examples/simple/Makefile +20 -0
- agent_codemode-1.1.1/examples/simple/README.md +39 -0
- agent_codemode-1.1.1/examples/simple/agent_cli.py +694 -0
- agent_codemode-1.1.1/examples/simple/example_mcp_server.py +260 -0
- agent_codemode-1.1.1/examples/skills/Makefile +20 -0
- agent_codemode-1.1.1/examples/skills/README.md +72 -0
- agent_codemode-1.1.1/examples/skills/agent_cli.py +682 -0
- agent_codemode-1.1.1/examples/skills/example_mcp_server.py +260 -0
- agent_codemode-1.1.1/examples/skills/skills/README.md +11 -0
- agent_codemode-1.1.1/examples/skills/skills/pdf/LICENSE.txt +30 -0
- agent_codemode-1.1.1/examples/skills/skills/pdf/SKILL.md +310 -0
- agent_codemode-1.1.1/examples/skills/skills/pdf/forms.md +235 -0
- agent_codemode-1.1.1/examples/skills/skills/pdf/reference.md +642 -0
- agent_codemode-1.1.1/examples/skills/skills/pdf/scripts/check_bounding_boxes.py +78 -0
- agent_codemode-1.1.1/examples/skills/skills/pdf/scripts/check_bounding_boxes_test.py +228 -0
- agent_codemode-1.1.1/examples/skills/skills/pdf/scripts/check_fillable_fields.py +14 -0
- agent_codemode-1.1.1/examples/skills/skills/pdf/scripts/convert_pdf_to_images.py +34 -0
- agent_codemode-1.1.1/examples/skills/skills/pdf/scripts/create_validation_image.py +42 -0
- agent_codemode-1.1.1/examples/skills/skills/pdf/scripts/extract_form_field_info.py +160 -0
- agent_codemode-1.1.1/examples/skills/skills/pdf/scripts/fill_fillable_fields.py +118 -0
- agent_codemode-1.1.1/examples/skills/skills/pdf/scripts/fill_pdf_form_with_annotations.py +105 -0
- agent_codemode-1.1.1/pyproject.toml +131 -0
- agent_codemode-1.1.1/skills/README.md +11 -0
- agent_codemode-1.1.1/skills/crawl/SKILL.md +441 -0
- agent_codemode-1.1.1/skills/crawl/scripts/check_robots.py +90 -0
- agent_codemode-1.1.1/skills/crawl/scripts/crawl_site.py +193 -0
- agent_codemode-1.1.1/skills/crawl/scripts/extract_links.py +137 -0
- agent_codemode-1.1.1/skills/crawl/scripts/extract_tables.py +131 -0
- agent_codemode-1.1.1/skills/crawl/scripts/fetch_js_page.py +150 -0
- agent_codemode-1.1.1/skills/crawl/scripts/fetch_page.py +113 -0
- agent_codemode-1.1.1/skills/github/SKILL.md +418 -0
- agent_codemode-1.1.1/skills/github/scripts/get_repo.py +189 -0
- agent_codemode-1.1.1/skills/github/scripts/list_issues.py +204 -0
- agent_codemode-1.1.1/skills/github/scripts/list_prs.py +213 -0
- agent_codemode-1.1.1/skills/github/scripts/list_repos.py +203 -0
- agent_codemode-1.1.1/skills/github/scripts/search_repos.py +227 -0
- agent_codemode-1.1.1/skills/pdf/LICENSE.txt +30 -0
- agent_codemode-1.1.1/skills/pdf/SKILL.md +310 -0
- agent_codemode-1.1.1/skills/pdf/forms.md +235 -0
- agent_codemode-1.1.1/skills/pdf/reference.md +642 -0
- agent_codemode-1.1.1/skills/pdf/scripts/check_bounding_boxes.py +81 -0
- agent_codemode-1.1.1/skills/pdf/scripts/check_bounding_boxes_test.py +231 -0
- agent_codemode-1.1.1/skills/pdf/scripts/check_fillable_fields.py +17 -0
- agent_codemode-1.1.1/skills/pdf/scripts/convert_pdf_to_images.py +37 -0
- agent_codemode-1.1.1/skills/pdf/scripts/create_validation_image.py +45 -0
- agent_codemode-1.1.1/skills/pdf/scripts/extract_form_field_info.py +163 -0
- agent_codemode-1.1.1/skills/pdf/scripts/fill_fillable_fields.py +121 -0
- agent_codemode-1.1.1/skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- agent_codemode-1.1.1/tests/__init__.py +5 -0
- agent_codemode-1.1.1/tests/conftest.py +32 -0
- agent_codemode-1.1.1/tests/test_agent_minimal.py +67 -0
- agent_codemode-1.1.1/tests/test_codemode.py +612 -0
- agent_codemode-1.1.1/tests/test_direct_execution.py +63 -0
- agent_codemode-1.1.1/tests/test_executor_async.py +51 -0
- agent_codemode-1.1.1/tests/test_executor_streaming.py +83 -0
- agent_codemode-1.1.1/tests/test_skill_bindings.py +471 -0
- agent_codemode-1.1.1/tests/test_stdout_capture.py +47 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
name: Build
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, develop ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main, develop ]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
python-build:
|
|
12
|
+
name: Python Build & Test (${{ matrix.python-version }})
|
|
13
|
+
strategy:
|
|
14
|
+
matrix:
|
|
15
|
+
python-version: ['3.11', '3.12']
|
|
16
|
+
uses: ./.github/workflows/reusable-python.yaml
|
|
17
|
+
with:
|
|
18
|
+
python-version: ${{ matrix.python-version }}
|
|
19
|
+
install-extras: test,typing
|
|
20
|
+
extra-packages: dbus-python keyring secretstorage
|
|
21
|
+
run-tests: true
|
|
22
|
+
test-command: pytest tests/ --cov=agent_codemode --cov-report term-missing
|
|
23
|
+
run-mypy: true
|
|
24
|
+
mypy-target: agent_codemode
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Py Code Style
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- develop
|
|
8
|
+
paths:
|
|
9
|
+
- 'agent_codemode/**/*.py'
|
|
10
|
+
- 'tests/**/*.py'
|
|
11
|
+
- 'pyproject.toml'
|
|
12
|
+
- 'setup.py'
|
|
13
|
+
- '.pre-commit-config.yaml'
|
|
14
|
+
- 'ruff.toml'
|
|
15
|
+
- '.ruff.toml'
|
|
16
|
+
- '.github/workflows/py-code-style.yaml'
|
|
17
|
+
- '.github/workflows/reusable-python.yaml'
|
|
18
|
+
pull_request:
|
|
19
|
+
branches:
|
|
20
|
+
- main
|
|
21
|
+
- develop
|
|
22
|
+
paths:
|
|
23
|
+
- 'agent_codemode/**/*.py'
|
|
24
|
+
- 'tests/**/*.py'
|
|
25
|
+
- 'pyproject.toml'
|
|
26
|
+
- 'setup.py'
|
|
27
|
+
- '.pre-commit-config.yaml'
|
|
28
|
+
- 'ruff.toml'
|
|
29
|
+
- '.ruff.toml'
|
|
30
|
+
- '.github/workflows/py-code-style.yaml'
|
|
31
|
+
- '.github/workflows/reusable-python.yaml'
|
|
32
|
+
workflow_dispatch:
|
|
33
|
+
|
|
34
|
+
concurrency:
|
|
35
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
36
|
+
cancel-in-progress: true
|
|
37
|
+
|
|
38
|
+
jobs:
|
|
39
|
+
check-code-style:
|
|
40
|
+
uses: ./.github/workflows/reusable-python.yaml
|
|
41
|
+
with:
|
|
42
|
+
python-version: '3.11'
|
|
43
|
+
extra-packages: pre-commit
|
|
44
|
+
run-pre-commit: true
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
name: Py Tests
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- 'agent_codemode/**'
|
|
9
|
+
- 'tests/**'
|
|
10
|
+
- 'pyproject.toml'
|
|
11
|
+
- 'setup.py'
|
|
12
|
+
- 'requirements*.txt'
|
|
13
|
+
- '**/*.py'
|
|
14
|
+
- '.github/workflows/py-tests.yaml'
|
|
15
|
+
- '.github/workflows/reusable-python.yaml'
|
|
16
|
+
pull_request:
|
|
17
|
+
branches:
|
|
18
|
+
- main
|
|
19
|
+
paths:
|
|
20
|
+
- 'agent_codemode/**'
|
|
21
|
+
- 'tests/**'
|
|
22
|
+
- 'pyproject.toml'
|
|
23
|
+
- 'setup.py'
|
|
24
|
+
- 'requirements*.txt'
|
|
25
|
+
- '**/*.py'
|
|
26
|
+
- '.github/workflows/py-tests.yaml'
|
|
27
|
+
- '.github/workflows/reusable-python.yaml'
|
|
28
|
+
|
|
29
|
+
workflow_dispatch:
|
|
30
|
+
|
|
31
|
+
jobs:
|
|
32
|
+
tests:
|
|
33
|
+
strategy:
|
|
34
|
+
max-parallel: 1
|
|
35
|
+
matrix:
|
|
36
|
+
python-version: ['3.10', '3.11', '3.12', '3.13']
|
|
37
|
+
uses: ./.github/workflows/reusable-python.yaml
|
|
38
|
+
with:
|
|
39
|
+
python-version: ${{ matrix.python-version }}
|
|
40
|
+
install-extras: test
|
|
41
|
+
extra-packages: dbus-python keyring secretstorage
|
|
42
|
+
run-tests: true
|
|
43
|
+
test-command: pytest tests/ --cov=agent_codemode --cov-report term-missing
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: Py Type Checking
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
- develop
|
|
8
|
+
paths:
|
|
9
|
+
- 'agent_codemode/**/*.py'
|
|
10
|
+
- 'tests/**/*.py'
|
|
11
|
+
- 'pyproject.toml'
|
|
12
|
+
- 'setup.py'
|
|
13
|
+
- 'mypy.ini'
|
|
14
|
+
- '.mypy.ini'
|
|
15
|
+
- '.github/workflows/py-typing.yaml'
|
|
16
|
+
- '.github/workflows/reusable-python.yaml'
|
|
17
|
+
pull_request:
|
|
18
|
+
branches:
|
|
19
|
+
- main
|
|
20
|
+
- develop
|
|
21
|
+
paths:
|
|
22
|
+
- 'agent_codemode/**/*.py'
|
|
23
|
+
- 'tests/**/*.py'
|
|
24
|
+
- 'pyproject.toml'
|
|
25
|
+
- 'setup.py'
|
|
26
|
+
- 'mypy.ini'
|
|
27
|
+
- '.mypy.ini'
|
|
28
|
+
- '.github/workflows/py-typing.yaml'
|
|
29
|
+
- '.github/workflows/reusable-python.yaml'
|
|
30
|
+
workflow_dispatch:
|
|
31
|
+
|
|
32
|
+
concurrency:
|
|
33
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
34
|
+
cancel-in-progress: true
|
|
35
|
+
|
|
36
|
+
jobs:
|
|
37
|
+
type-check:
|
|
38
|
+
uses: ./.github/workflows/reusable-python.yaml
|
|
39
|
+
with:
|
|
40
|
+
python-version: '3.12'
|
|
41
|
+
install-extras: typing
|
|
42
|
+
extra-packages: types-requests
|
|
43
|
+
run-mypy: true
|
|
44
|
+
mypy-target: agent_codemode
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# Copyright (c) 2023-2026 Datalayer, Inc.
|
|
2
|
+
# Distributed under the terms of the Modified BSD License.
|
|
3
|
+
|
|
4
|
+
# Publishes the release a tag names to PyPI, with no stored token: PyPI
|
|
5
|
+
# trusts this workflow file (OIDC trusted publishing, through the `pypi`
|
|
6
|
+
# environment). The tag must name the version in agent_codemode/__version__.py; a
|
|
7
|
+
# version already published is skipped. See RELEASE.md.
|
|
8
|
+
|
|
9
|
+
name: Release
|
|
10
|
+
|
|
11
|
+
on:
|
|
12
|
+
push:
|
|
13
|
+
tags:
|
|
14
|
+
- 'v*'
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: release-${{ github.ref }}
|
|
18
|
+
cancel-in-progress: false
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
|
|
23
|
+
jobs:
|
|
24
|
+
build:
|
|
25
|
+
runs-on: ubuntu-latest
|
|
26
|
+
outputs:
|
|
27
|
+
python: ${{ steps.plan.outputs.python }}
|
|
28
|
+
steps:
|
|
29
|
+
- uses: actions/checkout@v4
|
|
30
|
+
|
|
31
|
+
- uses: actions/setup-python@v5
|
|
32
|
+
with:
|
|
33
|
+
python-version: '3.12'
|
|
34
|
+
|
|
35
|
+
- name: Check the tag names the version the package carries
|
|
36
|
+
run: |
|
|
37
|
+
set -euo pipefail
|
|
38
|
+
tag="${GITHUB_REF_NAME#v}"
|
|
39
|
+
version="$(python -c "import re;print(re.search(r'__version__\s*=\s*[\"\']([^\"\']+)', open('agent_codemode/__version__.py').read())[1])")"
|
|
40
|
+
echo "tag=$tag version=$version"
|
|
41
|
+
test "$tag" = "$version"
|
|
42
|
+
|
|
43
|
+
- name: Find whether it is published yet
|
|
44
|
+
id: plan
|
|
45
|
+
run: |
|
|
46
|
+
set -euo pipefail
|
|
47
|
+
version="${GITHUB_REF_NAME#v}"
|
|
48
|
+
status="$(curl -sL -o /dev/null -w '%{http_code}' "https://pypi.org/pypi/agent-codemode/$version/json")"
|
|
49
|
+
if [ "$status" = "200" ]; then
|
|
50
|
+
echo "PyPI: agent-codemode $version is already published, skipping"
|
|
51
|
+
echo "python=" >> "$GITHUB_OUTPUT"
|
|
52
|
+
else
|
|
53
|
+
echo "PyPI: agent-codemode $version will be published"
|
|
54
|
+
echo "python=yes" >> "$GITHUB_OUTPUT"
|
|
55
|
+
fi
|
|
56
|
+
|
|
57
|
+
- name: Build
|
|
58
|
+
if: steps.plan.outputs.python != ''
|
|
59
|
+
run: |
|
|
60
|
+
set -euo pipefail
|
|
61
|
+
python -m pip install --upgrade pip build
|
|
62
|
+
python -m build --sdist --wheel --outdir dist .
|
|
63
|
+
ls -la dist
|
|
64
|
+
|
|
65
|
+
- uses: actions/upload-artifact@v4
|
|
66
|
+
if: steps.plan.outputs.python != ''
|
|
67
|
+
with:
|
|
68
|
+
name: python
|
|
69
|
+
path: dist/*
|
|
70
|
+
|
|
71
|
+
pypi:
|
|
72
|
+
needs: build
|
|
73
|
+
if: needs.build.outputs.python != ''
|
|
74
|
+
runs-on: ubuntu-latest
|
|
75
|
+
environment: pypi
|
|
76
|
+
permissions:
|
|
77
|
+
id-token: write
|
|
78
|
+
steps:
|
|
79
|
+
- uses: actions/download-artifact@v4
|
|
80
|
+
with:
|
|
81
|
+
name: python
|
|
82
|
+
path: dist
|
|
83
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
84
|
+
with:
|
|
85
|
+
skip-existing: true
|
|
86
|
+
|
|
87
|
+
release:
|
|
88
|
+
name: GitHub release
|
|
89
|
+
needs: [build, pypi]
|
|
90
|
+
if: always() && needs.build.result == 'success' && needs.pypi.result != 'failure'
|
|
91
|
+
runs-on: ubuntu-latest
|
|
92
|
+
permissions:
|
|
93
|
+
contents: write
|
|
94
|
+
steps:
|
|
95
|
+
- uses: actions/checkout@v4
|
|
96
|
+
with:
|
|
97
|
+
fetch-depth: 0
|
|
98
|
+
- name: Create the release with generated notes
|
|
99
|
+
run: |
|
|
100
|
+
version="${GITHUB_REF_NAME#v}"
|
|
101
|
+
gh release view "$GITHUB_REF_NAME" >/dev/null 2>&1 && exit 0
|
|
102
|
+
gh release create "$GITHUB_REF_NAME" --title "Release $version" --generate-notes \
|
|
103
|
+
--notes "- [PyPI agent-codemode](https://pypi.org/project/agent-codemode/$version/)"
|
|
104
|
+
env:
|
|
105
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
name: Reusable Python Workflow
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_call:
|
|
5
|
+
inputs:
|
|
6
|
+
python-version:
|
|
7
|
+
description: Python version to use
|
|
8
|
+
required: false
|
|
9
|
+
type: string
|
|
10
|
+
default: '3.11'
|
|
11
|
+
install-system-deps:
|
|
12
|
+
description: Install Linux system dependencies and unlock keyring
|
|
13
|
+
required: false
|
|
14
|
+
type: boolean
|
|
15
|
+
default: true
|
|
16
|
+
install-extras:
|
|
17
|
+
description: Optional extras to install from pyproject (for example test,typing)
|
|
18
|
+
required: false
|
|
19
|
+
type: string
|
|
20
|
+
default: ''
|
|
21
|
+
extra-packages:
|
|
22
|
+
description: Optional extra packages to install with uv pip
|
|
23
|
+
required: false
|
|
24
|
+
type: string
|
|
25
|
+
default: ''
|
|
26
|
+
run-tests:
|
|
27
|
+
description: Run tests
|
|
28
|
+
required: false
|
|
29
|
+
type: boolean
|
|
30
|
+
default: false
|
|
31
|
+
test-command:
|
|
32
|
+
description: Test command to run when run-tests=true
|
|
33
|
+
required: false
|
|
34
|
+
type: string
|
|
35
|
+
default: 'pytest -q'
|
|
36
|
+
run-mypy:
|
|
37
|
+
description: Run mypy
|
|
38
|
+
required: false
|
|
39
|
+
type: boolean
|
|
40
|
+
default: false
|
|
41
|
+
mypy-target:
|
|
42
|
+
description: Package/module path to type-check
|
|
43
|
+
required: false
|
|
44
|
+
type: string
|
|
45
|
+
default: ''
|
|
46
|
+
run-pre-commit:
|
|
47
|
+
description: Run pre-commit
|
|
48
|
+
required: false
|
|
49
|
+
type: boolean
|
|
50
|
+
default: false
|
|
51
|
+
|
|
52
|
+
jobs:
|
|
53
|
+
python-checks:
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
|
|
56
|
+
steps:
|
|
57
|
+
- name: Install system dependencies
|
|
58
|
+
if: inputs.install-system-deps
|
|
59
|
+
run: |
|
|
60
|
+
sudo apt-get update
|
|
61
|
+
sudo apt-get install -y libdbus-1-3 libdbus-1-dev libglib2.0-dev
|
|
62
|
+
|
|
63
|
+
- name: Checkout
|
|
64
|
+
uses: actions/checkout@v6
|
|
65
|
+
|
|
66
|
+
- name: Setup UV
|
|
67
|
+
uses: astral-sh/setup-uv@v7
|
|
68
|
+
with:
|
|
69
|
+
version: latest
|
|
70
|
+
python-version: ${{ inputs.python-version }}
|
|
71
|
+
activate-environment: true
|
|
72
|
+
|
|
73
|
+
- name: Install dependencies
|
|
74
|
+
run: |
|
|
75
|
+
uv pip install .
|
|
76
|
+
if [[ -n "${{ inputs.install-extras }}" ]]; then
|
|
77
|
+
uv pip install ".[${{ inputs.install-extras }}]"
|
|
78
|
+
fi
|
|
79
|
+
if [[ -n "${{ inputs.extra-packages }}" ]]; then
|
|
80
|
+
uv pip install ${{ inputs.extra-packages }}
|
|
81
|
+
fi
|
|
82
|
+
|
|
83
|
+
- name: Unlock keyring
|
|
84
|
+
if: inputs.install-system-deps
|
|
85
|
+
uses: t1m0thyj/unlock-keyring@v1
|
|
86
|
+
|
|
87
|
+
- name: Configure git to use https
|
|
88
|
+
run: git config --global hub.protocol https
|
|
89
|
+
|
|
90
|
+
- name: Run tests
|
|
91
|
+
if: inputs.run-tests
|
|
92
|
+
run: ${{ inputs.test-command }}
|
|
93
|
+
|
|
94
|
+
- name: Run mypy
|
|
95
|
+
if: inputs.run-mypy
|
|
96
|
+
run: mypy ${{ inputs.mypy-target }}
|
|
97
|
+
|
|
98
|
+
- name: Run pre-commit
|
|
99
|
+
if: inputs.run-pre-commit
|
|
100
|
+
run: pre-commit run --all-files
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
*.egg-info/
|
|
2
|
+
.ipynb_checkpoints
|
|
3
|
+
|
|
4
|
+
# Created by https://www.gitignore.io/api/python
|
|
5
|
+
# Edit at https://www.gitignore.io/?templates=python
|
|
6
|
+
|
|
7
|
+
### Python ###
|
|
8
|
+
# Byte-compiled / optimized / DLL files
|
|
9
|
+
__pycache__/
|
|
10
|
+
*.py[cod]
|
|
11
|
+
*$py.class
|
|
12
|
+
|
|
13
|
+
# C extensions
|
|
14
|
+
*.so
|
|
15
|
+
|
|
16
|
+
# Distribution / packaging
|
|
17
|
+
.Python
|
|
18
|
+
build/
|
|
19
|
+
dist/
|
|
20
|
+
downloads/
|
|
21
|
+
lib/
|
|
22
|
+
lib64/
|
|
23
|
+
parts/
|
|
24
|
+
sdist/
|
|
25
|
+
var/
|
|
26
|
+
wheels/
|
|
27
|
+
pip-wheel-metadata/
|
|
28
|
+
share/python-wheels/
|
|
29
|
+
.installed.cfg
|
|
30
|
+
|
|
31
|
+
# PyInstaller
|
|
32
|
+
# Usually these files are written by a python script from a template
|
|
33
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
34
|
+
*.manifest
|
|
35
|
+
*.spec
|
|
36
|
+
|
|
37
|
+
# Installer logs
|
|
38
|
+
pip-log.txt
|
|
39
|
+
pip-delete-this-directory.txt
|
|
40
|
+
|
|
41
|
+
# Unit test / coverage reports
|
|
42
|
+
htmlcov/
|
|
43
|
+
.tox/
|
|
44
|
+
.nox/
|
|
45
|
+
.coverage
|
|
46
|
+
.coverage.*
|
|
47
|
+
.cache
|
|
48
|
+
nosetests.xml
|
|
49
|
+
coverage.xml
|
|
50
|
+
*.cover
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
|
|
54
|
+
# Translations
|
|
55
|
+
*.mo
|
|
56
|
+
*.pot
|
|
57
|
+
|
|
58
|
+
# Environment variables:
|
|
59
|
+
.env
|
|
60
|
+
|
|
61
|
+
# Scrapy stuff:
|
|
62
|
+
.scrapy
|
|
63
|
+
|
|
64
|
+
# Sphinx documentation
|
|
65
|
+
docs/_build/
|
|
66
|
+
|
|
67
|
+
# PyBuilder
|
|
68
|
+
target/
|
|
69
|
+
|
|
70
|
+
# pyenv
|
|
71
|
+
.python-version
|
|
72
|
+
|
|
73
|
+
# celery beat schedule file
|
|
74
|
+
celerybeat-schedule
|
|
75
|
+
|
|
76
|
+
# SageMath parsed files
|
|
77
|
+
*.sage.py
|
|
78
|
+
|
|
79
|
+
# Spyder project settings
|
|
80
|
+
.spyderproject
|
|
81
|
+
.spyproject
|
|
82
|
+
|
|
83
|
+
# Rope project settings
|
|
84
|
+
.ropeproject
|
|
85
|
+
|
|
86
|
+
# Mr Developer
|
|
87
|
+
.mr.developer.cfg
|
|
88
|
+
.project
|
|
89
|
+
.pydevproject
|
|
90
|
+
|
|
91
|
+
# mkdocs documentation
|
|
92
|
+
/site
|
|
93
|
+
|
|
94
|
+
# mypy
|
|
95
|
+
.mypy_cache/
|
|
96
|
+
.dmypy.json
|
|
97
|
+
dmypy.json
|
|
98
|
+
|
|
99
|
+
# ruff
|
|
100
|
+
.ruff_cache
|
|
101
|
+
|
|
102
|
+
# Pyre type checker
|
|
103
|
+
.pyre/
|
|
104
|
+
|
|
105
|
+
# End of https://www.gitignore.io/api/python
|
|
106
|
+
|
|
107
|
+
# OSX files
|
|
108
|
+
.DS_Store
|
|
109
|
+
|
|
110
|
+
# Include
|
|
111
|
+
!**/.*ignore
|
|
112
|
+
!**/.*rc
|
|
113
|
+
!**/.*rc.js
|
|
114
|
+
!**/.*rc.json
|
|
115
|
+
!**/.*rc.yml
|
|
116
|
+
!**/.*config
|
|
117
|
+
!*.*rc.json
|
|
118
|
+
!.github
|
|
119
|
+
!.devcontainer
|
|
120
|
+
|
|
121
|
+
untracked_notebooks/*
|
|
122
|
+
.jupyter_ystore
|
|
123
|
+
.jupyter_ystore.db
|
|
124
|
+
docs/.yarn/*
|
|
125
|
+
|
|
126
|
+
uv.lock
|
|
127
|
+
|
|
128
|
+
generated
|
|
129
|
+
skills
|
|
130
|
+
examples/agent/*.txt
|
|
131
|
+
|
|
132
|
+
launcher.py
|
|
133
|
+
|
|
134
|
+
!docs/docs/skills
|
|
135
|
+
!examples/**/skills
|
|
136
|
+
!skills
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
header:
|
|
2
|
+
license:
|
|
3
|
+
content: |
|
|
4
|
+
Copyright (c) 2025-2026 Datalayer, Inc.
|
|
5
|
+
|
|
6
|
+
BSD 3-Clause License
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
paths-ignore:
|
|
10
|
+
- '**/*.ipynb'
|
|
11
|
+
- '**/*.json'
|
|
12
|
+
- '**/*.yaml'
|
|
13
|
+
- '**/*.yml'
|
|
14
|
+
- '**/.*'
|
|
15
|
+
- 'docs/**/*'
|
|
16
|
+
- 'LICENSE'
|
|
17
|
+
|
|
18
|
+
comment: on-failure
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
ci:
|
|
2
|
+
autoupdate_schedule: monthly
|
|
3
|
+
|
|
4
|
+
repos:
|
|
5
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
6
|
+
rev: v5.0.0
|
|
7
|
+
hooks:
|
|
8
|
+
- id: end-of-file-fixer
|
|
9
|
+
- id: check-case-conflict
|
|
10
|
+
- id: check-executables-have-shebangs
|
|
11
|
+
- id: requirements-txt-fixer
|
|
12
|
+
- id: check-added-large-files
|
|
13
|
+
- id: check-case-conflict
|
|
14
|
+
- id: check-toml
|
|
15
|
+
- id: check-yaml
|
|
16
|
+
- id: debug-statements
|
|
17
|
+
- id: forbid-new-submodules
|
|
18
|
+
- id: check-builtin-literals
|
|
19
|
+
- id: trailing-whitespace
|
|
20
|
+
|
|
21
|
+
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
22
|
+
rev: 0.29.4
|
|
23
|
+
hooks:
|
|
24
|
+
- id: check-github-workflows
|
|
25
|
+
|
|
26
|
+
- repo: https://github.com/executablebooks/mdformat
|
|
27
|
+
rev: 0.7.19
|
|
28
|
+
hooks:
|
|
29
|
+
- id: mdformat
|
|
30
|
+
additional_dependencies:
|
|
31
|
+
[mdformat-gfm, mdformat-frontmatter, mdformat-footnote]
|
|
32
|
+
|
|
33
|
+
- repo: https://github.com/charliermarsh/ruff-pre-commit
|
|
34
|
+
rev: v0.8.0
|
|
35
|
+
hooks:
|
|
36
|
+
- id: ruff
|
|
37
|
+
args: ["--fix"]
|
|
38
|
+
- id: ruff-format
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Copyright (c) 2025-2026 Datalayer, Inc.
|
|
2
|
+
#
|
|
3
|
+
# BSD 3-Clause License
|
|
4
|
+
|
|
5
|
+
FROM python:3.10-slim
|
|
6
|
+
|
|
7
|
+
WORKDIR /app
|
|
8
|
+
|
|
9
|
+
COPY pyproject.toml pyproject.toml
|
|
10
|
+
COPY LICENSE LICENSE
|
|
11
|
+
COPY README.md README.md
|
|
12
|
+
COPY agent_codemode/* agent_codemode/
|
|
13
|
+
|
|
14
|
+
RUN pip install -e .
|
|
15
|
+
|
|
16
|
+
RUN pip uninstall -y pycrdt datalayer_pycrdt
|
|
17
|
+
RUN pip install datalayer_pycrdt==0.12.17
|
|
18
|
+
|
|
19
|
+
CMD ["python", "-m", "agent_codemode.server"]
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
BSD 3-Clause License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025, Datalayer
|
|
4
|
+
All rights reserved.
|
|
5
|
+
|
|
6
|
+
Redistribution and use in source and binary forms, with or without
|
|
7
|
+
modification, are permitted provided that the following conditions are met:
|
|
8
|
+
|
|
9
|
+
1. Redistributions of source code must retain the above copyright notice, this
|
|
10
|
+
list of conditions and the following disclaimer.
|
|
11
|
+
|
|
12
|
+
2. Redistributions in binary form must reproduce the above copyright notice,
|
|
13
|
+
this list of conditions and the following disclaimer in the documentation
|
|
14
|
+
and/or other materials provided with the distribution.
|
|
15
|
+
|
|
16
|
+
3. Neither the name of the copyright holder nor the names of its
|
|
17
|
+
contributors may be used to endorse or promote products derived from
|
|
18
|
+
this software without specific prior written permission.
|
|
19
|
+
|
|
20
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
21
|
+
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
22
|
+
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
23
|
+
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
24
|
+
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
25
|
+
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
26
|
+
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
27
|
+
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
28
|
+
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
29
|
+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|