Skip to content

Commit 4503678

Browse files
committed
web fetch fix, skills, update deps
1 parent 648469b commit 4503678

7 files changed

Lines changed: 130 additions & 99 deletions

File tree

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
---
2+
name: dependency-update
3+
description: Run this to update project dependencies
4+
disable-model-invocation: true
5+
---
6+
17
I need you to update the dependencies in pyproject.toml.
28
The process to go through is:
9+
310
1. Notice how we do versioning. We make sure that we do not auto upgrade to the major version. For example, "openai[aiohttp]>=2.9,<3.0", means we will never upgrade to v3.x. You will just be updating minor versions. Note that for dev dependencies we don't need to pin to be less than the major version. Additionally, do not touch uv_build or anything outside `dependencies` or `[dependency-groups]`
411
2. For each dependency, go to its pypi release history site. For example, for the openai package that is: https://pypi.org/project/openai/#history Get the latest release version.
512
3. Now bump the dependency in pyproject.toml. For example, if the current version in the pyproject.toml is `>=1.05,<2.0`, but on Pypi the latest version is 1.11, change the dependency to `>=1.11,<2.0`
Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,34 @@
1+
---
2+
name: prepare-release
3+
description: Run this before commiting and pushing changes.
4+
disable-model-invocation: true
5+
---
6+
17
I am about to release a new version of this package. Please take the following steps to make sure it is successful:
28

3-
Understand changes
9+
Understand changes:
10+
411
1. Look at my currently staged changes to identify what changes were made.
512

6-
Checks
13+
Checks:
14+
715
1. Make sure the pyproject.toml is updated with a new version number.
816
2. Ensure there are no spelling and grammar mistakes.
917
3. Run `uv sync --all-extras --all-groups` to make sure the lock file is up to date.
1018
4. Run all formatting, linting, and type checking: `uv run ruff format && uv run ruff check --fix && uv run ty check`
1119
5. Run `uv build` to make sure the package builds correctly.
1220
6. If any of these checks fail, please stop and inform me about the issues so we can fix them before proceeding.
1321

14-
Draft release notes
22+
Draft release notes:
23+
1524
1. Look at the previous release logs at https://github.com/DavidKoleczek/agent-core/releases your draft release MUST follow the same style and structure.
1625
2. Create a draft release description based on the recent code changes and place it in `ai_working/release_note_drafts/draft_release_{version}.md`. Here are some additional guidelines:
17-
- Don't list dependency updates individual. Just say "Updated dependencies".
26+
27+
- Don't list dependency updates individual. Just say "Updated dependencies".
28+
1829
3. At the end of the release notes be sure to include:
30+
1931
```
2032
**Full Changelog**: https://github.com/DavidKoleczek/agent-core/compare/vx1.y1.z1...vx2.y2.z2
2133
Available on [PyPI](https://pypi.org/project/agent-core-toolkit/x.y.z/).
22-
```
34+
```

.claude/commands/setup-reference-repos.md renamed to .claude/skills/setup-reference-repos/SKILL.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
---
2+
name: setup-reference-repos
3+
description: Run this to set up reference repositories for AI usage.
4+
disable-model-invocation: true
5+
---
6+
17
Follow these steps to clone repos of key dependencies for ai context.
8+
29
1. Read the `pyproject.toml` to understand which versions are being used.
3-
1. Create directory: Ensure `ai_working/` exists.
10+
1. Create directory: Ensure `ai_working/` exists.
411
1. Check for existing repos: If any of these directories exist in `ai_working/`, delete them completely before proceeding:
512
- `ai_working/interop-router`
613
- `ai_working/openai-python`

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ print(render("Hello, {{ you }}!", you="World"))
3535
- `interop-router`: Start at `.venv/lib/python3.11/site-packages/interop_router/router.py` and `.venv/lib/python3.11/site-packages/interop_router/types.py`
3636
- `openai`: Key files stem from `.venv/lib/python3.11/site-packages/openai/resources` and `.venv/lib/python3.11/site-packages/openai/types`
3737
- `anthropic`: Key files stem from `.venv/lib/python3.11/site-packages/anthropic/resources/messages/messages.py`
38+
- Do not manually run checks like `uv run ruff format` or `uv run pytest`. They will either be run automatically after code changes or user triggered since they may take a while.
3839

3940
# Dependency Context
4041
- For libraries that are new or change frequently, you must refer to their official documentation or source code.

pyproject.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
[project]
22
name = "agent-core-toolkit"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
description = "Common building blocks for creating AI agents."
55
readme = "README.md"
66
authors = [
77
{ name = "David Koleczek", email = "45405824+DavidKoleczek@users.noreply.github.com" }
88
]
99
requires-python = ">=3.11"
1010
dependencies = [
11-
"click>=8.3,<9.0",
12-
"httpx>=0.27,<1.0",
13-
"interop-router==0.1.5",
14-
"loguru>=0.7,<1.0",
15-
"pydantic>=2.12,<3.0",
16-
"pymupdf>=1.26,<2.0",
17-
"pymupdf4llm>=0.2,<1.0",
11+
"click>=8.3.1,<9.0",
12+
"httpx>=0.28.1,<1.0",
13+
"interop-router==0.1.6",
14+
"loguru>=0.7.3,<1.0",
15+
"pydantic>=2.12.5,<3.0",
16+
"pymupdf>=1.27.1,<2.0",
17+
"pymupdf4llm>=0.3.4,<1.0",
1818
"python-liquid>=2.1,<3.0",
1919
"rich>=14.3.2,<15.0",
20-
"tree-sitter>=0.25,<1.0",
21-
"tree-sitter-bash>=0.25,<1.0",
20+
"tree-sitter>=0.25.2,<1.0",
21+
"tree-sitter-bash>=0.25.1,<1.0",
2222
]
2323

2424
[project.optional-dependencies]
@@ -48,11 +48,11 @@ data = [
4848
dev = [
4949
"agent-core-toolkit[web]",
5050
"ipykernel>=7.2.0",
51-
"nbclient>=0.10",
52-
"pytest>=9.0",
51+
"nbclient>=0.10.4",
52+
"pytest>=9.0.2",
5353
"pytest-asyncio>=1.3",
54-
"ruff>=0.15.0",
55-
"ty>=0.0.15",
54+
"ruff>=0.15.1",
55+
"ty>=0.0.17",
5656
]
5757

5858
[tool.ruff]

src/agent_core/tools/web_fetch.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from openai.types.responses import ResponseFunctionCallOutputItemListParam
44
from openai.types.responses.function_tool_param import FunctionToolParam
55

6+
from agent_core.tools._utils import ConstraintPolicy
67
from agent_core.web.process_url import process_url
78

89
TOOL_NAME = "web_fetch"
@@ -43,6 +44,9 @@ class WebFetchTool:
4344
def __init__(self) -> None:
4445
pass
4546

47+
def check_constraint(self, **arguments: object) -> ConstraintPolicy:
48+
return ConstraintPolicy.ALLOW
49+
4650
async def execute(self, **arguments: object) -> str | ResponseFunctionCallOutputItemListParam:
4751
url = str(arguments.get("url"))
4852
result = await process_url(url)

0 commit comments

Comments
 (0)