akgentic-tool 1.6.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 (106) hide show
  1. akgentic_tool-1.6.0/.github/workflows/ci.yml +85 -0
  2. akgentic_tool-1.6.0/.github/workflows/release.yml +69 -0
  3. akgentic_tool-1.6.0/.gitignore +27 -0
  4. akgentic_tool-1.6.0/LICENSE +661 -0
  5. akgentic_tool-1.6.0/PKG-INFO +669 -0
  6. akgentic_tool-1.6.0/README.md +630 -0
  7. akgentic_tool-1.6.0/examples/README.md +59 -0
  8. akgentic_tool-1.6.0/examples/knowledge_agent.md +57 -0
  9. akgentic_tool-1.6.0/examples/knowledge_agent.py +395 -0
  10. akgentic_tool-1.6.0/examples/planning_agent.md +71 -0
  11. akgentic_tool-1.6.0/examples/planning_agent.py +332 -0
  12. akgentic_tool-1.6.0/pyproject.toml +104 -0
  13. akgentic_tool-1.6.0/src/akgentic/__init__.py +10 -0
  14. akgentic_tool-1.6.0/src/akgentic/tool/__init__.py +101 -0
  15. akgentic_tool-1.6.0/src/akgentic/tool/core.py +727 -0
  16. akgentic_tool-1.6.0/src/akgentic/tool/errors.py +36 -0
  17. akgentic_tool-1.6.0/src/akgentic/tool/event.py +206 -0
  18. akgentic_tool-1.6.0/src/akgentic/tool/knowledge_graph/__init__.py +94 -0
  19. akgentic_tool-1.6.0/src/akgentic/tool/knowledge_graph/kg_actor.py +1114 -0
  20. akgentic_tool-1.6.0/src/akgentic/tool/knowledge_graph/kg_tool.py +375 -0
  21. akgentic_tool-1.6.0/src/akgentic/tool/knowledge_graph/models.py +379 -0
  22. akgentic_tool-1.6.0/src/akgentic/tool/mcp/__init__.py +31 -0
  23. akgentic_tool-1.6.0/src/akgentic/tool/mcp/mcp.py +265 -0
  24. akgentic_tool-1.6.0/src/akgentic/tool/mcp/oauth_handler.py +250 -0
  25. akgentic_tool-1.6.0/src/akgentic/tool/planning/README.md +32 -0
  26. akgentic_tool-1.6.0/src/akgentic/tool/planning/__init__.py +17 -0
  27. akgentic_tool-1.6.0/src/akgentic/tool/planning/planning.py +332 -0
  28. akgentic_tool-1.6.0/src/akgentic/tool/planning/planning_actor.py +425 -0
  29. akgentic_tool-1.6.0/src/akgentic/tool/py.typed +2 -0
  30. akgentic_tool-1.6.0/src/akgentic/tool/sandbox/__init__.py +33 -0
  31. akgentic_tool-1.6.0/src/akgentic/tool/sandbox/actor.py +231 -0
  32. akgentic_tool-1.6.0/src/akgentic/tool/sandbox/bwrap.py +114 -0
  33. akgentic_tool-1.6.0/src/akgentic/tool/sandbox/docker.py +151 -0
  34. akgentic_tool-1.6.0/src/akgentic/tool/sandbox/local.py +148 -0
  35. akgentic_tool-1.6.0/src/akgentic/tool/sandbox/sandbox.Dockerfile +24 -0
  36. akgentic_tool-1.6.0/src/akgentic/tool/sandbox/seatbelt.py +172 -0
  37. akgentic_tool-1.6.0/src/akgentic/tool/sandbox/tool.py +211 -0
  38. akgentic_tool-1.6.0/src/akgentic/tool/search/__init__.py +10 -0
  39. akgentic_tool-1.6.0/src/akgentic/tool/search/search.py +247 -0
  40. akgentic_tool-1.6.0/src/akgentic/tool/team/__init__.py +17 -0
  41. akgentic_tool-1.6.0/src/akgentic/tool/team/team.py +545 -0
  42. akgentic_tool-1.6.0/src/akgentic/tool/vector.py +267 -0
  43. akgentic_tool-1.6.0/src/akgentic/tool/vector_store/__init__.py +57 -0
  44. akgentic_tool-1.6.0/src/akgentic/tool/vector_store/actor.py +552 -0
  45. akgentic_tool-1.6.0/src/akgentic/tool/vector_store/embedding_actor.py +192 -0
  46. akgentic_tool-1.6.0/src/akgentic/tool/vector_store/inmemory.py +286 -0
  47. akgentic_tool-1.6.0/src/akgentic/tool/vector_store/protocol.py +202 -0
  48. akgentic_tool-1.6.0/src/akgentic/tool/vector_store/tool.py +110 -0
  49. akgentic_tool-1.6.0/src/akgentic/tool/vector_store/weaviate.py +287 -0
  50. akgentic_tool-1.6.0/src/akgentic/tool/workspace/__init__.py +77 -0
  51. akgentic_tool-1.6.0/src/akgentic/tool/workspace/edit.py +373 -0
  52. akgentic_tool-1.6.0/src/akgentic/tool/workspace/readers.py +185 -0
  53. akgentic_tool-1.6.0/src/akgentic/tool/workspace/tool.py +1282 -0
  54. akgentic_tool-1.6.0/src/akgentic/tool/workspace/workspace.py +172 -0
  55. akgentic_tool-1.6.0/tests/__init__.py +1 -0
  56. akgentic_tool-1.6.0/tests/conftest.py +61 -0
  57. akgentic_tool-1.6.0/tests/sandbox/__init__.py +0 -0
  58. akgentic_tool-1.6.0/tests/sandbox/test_bwrap_sandbox.py +285 -0
  59. akgentic_tool-1.6.0/tests/sandbox/test_docker_sandbox.py +722 -0
  60. akgentic_tool-1.6.0/tests/sandbox/test_exec_tool.py +752 -0
  61. akgentic_tool-1.6.0/tests/sandbox/test_local_sandbox.py +642 -0
  62. akgentic_tool-1.6.0/tests/sandbox/test_sandbox_actor.py +376 -0
  63. akgentic_tool-1.6.0/tests/sandbox/test_seatbelt_sandbox.py +386 -0
  64. akgentic_tool-1.6.0/tests/search/__init__.py +0 -0
  65. akgentic_tool-1.6.0/tests/search/test_search_graceful.py +357 -0
  66. akgentic_tool-1.6.0/tests/test_command_models.py +273 -0
  67. akgentic_tool-1.6.0/tests/test_command_registry.py +812 -0
  68. akgentic_tool-1.6.0/tests/test_command_registry_weak_observer.py +131 -0
  69. akgentic_tool-1.6.0/tests/test_core_factory.py +875 -0
  70. akgentic_tool-1.6.0/tests/test_example.py +17 -0
  71. akgentic_tool-1.6.0/tests/test_kg_actor.py +1913 -0
  72. akgentic_tool-1.6.0/tests/test_kg_imports.py +90 -0
  73. akgentic_tool-1.6.0/tests/test_kg_integration.py +328 -0
  74. akgentic_tool-1.6.0/tests/test_kg_models.py +432 -0
  75. akgentic_tool-1.6.0/tests/test_kg_query.py +864 -0
  76. akgentic_tool-1.6.0/tests/test_kg_state_event.py +448 -0
  77. akgentic_tool-1.6.0/tests/test_kg_tool.py +1059 -0
  78. akgentic_tool-1.6.0/tests/test_kg_vector_index.py +266 -0
  79. akgentic_tool-1.6.0/tests/test_knowledge_agent_example.py +113 -0
  80. akgentic_tool-1.6.0/tests/test_planning_actor.py +622 -0
  81. akgentic_tool-1.6.0/tests/test_planning_agent_example.py +104 -0
  82. akgentic_tool-1.6.0/tests/test_planning_prompt.py +509 -0
  83. akgentic_tool-1.6.0/tests/test_planning_search.py +564 -0
  84. akgentic_tool-1.6.0/tests/test_planning_search_score.py +675 -0
  85. akgentic_tool-1.6.0/tests/test_planning_semantic.py +457 -0
  86. akgentic_tool-1.6.0/tests/test_team_tool.py +715 -0
  87. akgentic_tool-1.6.0/tests/test_team_tool_weak_observer.py +182 -0
  88. akgentic_tool-1.6.0/tests/test_tool_state_event.py +159 -0
  89. akgentic_tool-1.6.0/tests/test_toolcard_weak_observer.py +89 -0
  90. akgentic_tool-1.6.0/tests/test_vector.py +270 -0
  91. akgentic_tool-1.6.0/tests/vector_store/__init__.py +1 -0
  92. akgentic_tool-1.6.0/tests/vector_store/test_actor.py +1153 -0
  93. akgentic_tool-1.6.0/tests/vector_store/test_embedding_actor.py +293 -0
  94. akgentic_tool-1.6.0/tests/vector_store/test_inmemory.py +375 -0
  95. akgentic_tool-1.6.0/tests/vector_store/test_integration.py +403 -0
  96. akgentic_tool-1.6.0/tests/vector_store/test_protocol.py +260 -0
  97. akgentic_tool-1.6.0/tests/vector_store/test_public_api.py +38 -0
  98. akgentic_tool-1.6.0/tests/vector_store/test_tool.py +401 -0
  99. akgentic_tool-1.6.0/tests/vector_store/test_weaviate.py +502 -0
  100. akgentic_tool-1.6.0/tests/workspace/__init__.py +0 -0
  101. akgentic_tool-1.6.0/tests/workspace/test_edit_matcher.py +321 -0
  102. akgentic_tool-1.6.0/tests/workspace/test_patch.py +312 -0
  103. akgentic_tool-1.6.0/tests/workspace/test_read_tool.py +1475 -0
  104. akgentic_tool-1.6.0/tests/workspace/test_view_tool.py +413 -0
  105. akgentic_tool-1.6.0/tests/workspace/test_workspace.py +326 -0
  106. akgentic_tool-1.6.0/tests/workspace/test_workspace_tool.py +1237 -0
@@ -0,0 +1,85 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ pull_request:
6
+ branches: [master]
7
+ workflow_dispatch:
8
+
9
+ env:
10
+ NO_COLOR: "1"
11
+ # Release channel for akgentic-* dependencies. On a release branch set this
12
+ # to that branch (e.g. version-1.x); sibling akgentic-* packages are built
13
+ # from this branch into the local wheelhouse.
14
+ RELEASE_BRANCH: master
15
+ # Transitive closure of akgentic-* dependencies, space-separated. uv resolves
16
+ # the graph from the wheelhouse, so order does not matter.
17
+ AKGENTIC_DEPS: "akgentic-core"
18
+
19
+ jobs:
20
+ quality:
21
+ runs-on: ubuntu-latest
22
+ steps:
23
+ - name: Checkout akgentic-tool
24
+ uses: actions/checkout@v6
25
+
26
+ - name: Install uv
27
+ uses: astral-sh/setup-uv@v8.1.0
28
+ with:
29
+ version: "latest"
30
+
31
+ - name: Set up Python 3.12
32
+ run: uv python install 3.12
33
+
34
+ # Build every akgentic-* dependency from RELEASE_BRANCH into a local
35
+ # wheelhouse. uv pip install --find-links then resolves them from there;
36
+ # all other (PyPI) deps still come from the default index.
37
+ - name: Build akgentic-* dependency wheelhouse
38
+ run: |
39
+ mkdir -p wheelhouse
40
+ for dep in ${AKGENTIC_DEPS}; do
41
+ echo "::group::build ${dep} @ ${RELEASE_BRANCH}"
42
+ git clone --depth 1 --branch "${RELEASE_BRANCH}" \
43
+ "https://github.com/b12consulting/${dep}.git" "/tmp/${dep}"
44
+ uv build --wheel --out-dir wheelhouse "/tmp/${dep}"
45
+ echo "::endgroup::"
46
+ done
47
+ ls -1 wheelhouse
48
+
49
+ - name: Create virtual environment
50
+ run: uv venv
51
+
52
+ # Install the package editable, resolving akgentic-* deps from the
53
+ # wheelhouse and everything else from PyPI. All optional extras are
54
+ # listed so mypy can analyze their imports (weaviate, vision/PIL, docs).
55
+ - name: Install dependencies
56
+ run: uv pip install --find-links wheelhouse -e ".[dev,vector_search,weaviate,docs,vision]"
57
+
58
+ # --no-sync: run in the wheelhouse-built venv without re-resolving from a
59
+ # lockfile (there is no project lockfile in this install model).
60
+ - name: Type checking
61
+ run: uv run --no-sync mypy src/
62
+
63
+ - name: Linting
64
+ run: uv run --no-sync ruff check src/
65
+
66
+ - name: Run tests with coverage
67
+ run: >
68
+ uv run --no-sync pytest tests/
69
+ --cov=akgentic.tool
70
+ --cov-report=term-missing
71
+ --cov-report=json:coverage.json
72
+ --cov-fail-under=80
73
+
74
+ - name: Update coverage badge
75
+ if: github.ref_name == 'master' && github.event_name == 'push'
76
+ run: |
77
+ COVERAGE=$(python -c "import json; print(int(json.load(open('coverage.json'))['totals']['percent_covered_display']))")
78
+ if [ "$COVERAGE" -ge 90 ]; then COLOR="brightgreen"
79
+ elif [ "$COVERAGE" -ge 80 ]; then COLOR="green"
80
+ elif [ "$COVERAGE" -ge 70 ]; then COLOR="yellow"
81
+ else COLOR="red"; fi
82
+ echo "{\"schemaVersion\":1,\"label\":\"coverage\",\"message\":\"${COVERAGE}%\",\"color\":\"${COLOR}\"}" > badge.json
83
+ gh gist edit c0f2e0aa0a8c184ee8823dd4feefddd5 -f coverage.json badge.json
84
+ env:
85
+ GH_TOKEN: ${{ secrets.GH_PAT }}
@@ -0,0 +1,69 @@
1
+ name: Release
2
+
3
+ # Manual release: reads version from pyproject.toml on master, tags master HEAD,
4
+ # builds the wheel, and creates a GitHub Release with the wheel attached.
5
+ #
6
+ # Bumping the version is a separate maintainer action via a normal PR. This
7
+ # workflow does NOT push commits to master — branch protection blocks that.
8
+ # The release flow is therefore two-step:
9
+ # 1. Open a "chore: bump version to X.Y.Z" PR; merge it.
10
+ # 2. Trigger this workflow from the Actions tab.
11
+
12
+ on:
13
+ workflow_dispatch:
14
+
15
+ jobs:
16
+ release:
17
+ runs-on: ubuntu-latest
18
+ permissions:
19
+ contents: write
20
+ steps:
21
+ - name: Checkout master
22
+ uses: actions/checkout@v6
23
+ with:
24
+ ref: master
25
+ fetch-depth: 0
26
+
27
+ - name: Install uv
28
+ uses: astral-sh/setup-uv@v8.1.0
29
+ with:
30
+ version: "latest"
31
+
32
+ - name: Set up Python 3.12
33
+ run: uv python install 3.12
34
+
35
+ - name: Read version from pyproject.toml
36
+ id: version
37
+ run: |
38
+ VERSION=$(grep -E '^version = ' pyproject.toml | sed -E 's/version = "(.*)"/\1/')
39
+ echo "Releasing version: $VERSION"
40
+ echo "version=$VERSION" >> "$GITHUB_OUTPUT"
41
+
42
+ - name: Verify tag does not already exist
43
+ env:
44
+ VERSION: ${{ steps.version.outputs.version }}
45
+ run: |
46
+ if git rev-parse "v$VERSION" >/dev/null 2>&1; then
47
+ echo "::error::Tag v$VERSION already exists. Bump the version in pyproject.toml first."
48
+ exit 1
49
+ fi
50
+
51
+ - name: Tag master HEAD
52
+ env:
53
+ VERSION: ${{ steps.version.outputs.version }}
54
+ run: |
55
+ git config user.name "github-actions[bot]"
56
+ git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
57
+ git tag "v$VERSION"
58
+ git push origin "v$VERSION"
59
+
60
+ - name: Build wheel
61
+ run: uv build --wheel --out-dir dist/
62
+
63
+ - name: Create GitHub Release
64
+ uses: softprops/action-gh-release@v2
65
+ with:
66
+ tag_name: "v${{ steps.version.outputs.version }}"
67
+ name: "v${{ steps.version.outputs.version }}"
68
+ files: dist/*.whl
69
+ generate_release_notes: true
@@ -0,0 +1,27 @@
1
+ # Byte-compiled / optimized / DLL files
2
+ __pycache__/
3
+ *.py[cod]
4
+ *$py.class
5
+
6
+ # Distribution / packaging
7
+ dist/
8
+ build/
9
+ *.egg-info/
10
+ **/settings.local.json
11
+
12
+ # Testing
13
+ .pytest_cache/
14
+ .coverage
15
+ htmlcov/
16
+
17
+ # Type checking
18
+ .mypy_cache/
19
+ .dmypy.json
20
+
21
+ # Virtual environments
22
+ .venv/
23
+ venv/
24
+
25
+ # IDE
26
+ .vscode/
27
+ .idea/