Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions python/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ GEMINI_MODEL=""
# Ollama
OLLAMA_ENDPOINT=""
OLLAMA_MODEL=""
# Observability
ENABLE_INSTRUMENTATION=true
# Observability (instrumentation is enabled by default; set "ENABLE_INSTRUMENTATION" to "false" to opt out)
ENABLE_SENSITIVE_DATA=true
OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317/"
2 changes: 1 addition & 1 deletion python/.github/skills/python-development/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def equal(arg1: str, arg2: str) -> bool:
from agent_framework import Agent, Message, tool

# Components
from agent_framework.observability import enable_instrumentation
from agent_framework.observability import enable_sensitive_telemetry

# Connectors (lazy-loaded)
from agent_framework.openai import OpenAIChatClient
Expand Down
2 changes: 1 addition & 1 deletion python/CODING_STANDARD.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ The package follows a flat import structure:

- **Components**: Import from `agent_framework.<component>`
```python
from agent_framework.observability import enable_instrumentation, configure_otel_providers
from agent_framework.observability import enable_sensitive_telemetry, configure_otel_providers
```

- **Connectors**: Import from `agent_framework.<vendor/platform>`
Expand Down
4 changes: 1 addition & 3 deletions python/packages/a2a/agent_framework_a2a/_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,7 @@ def __init__(
self.client = factory.create(agent_card, interceptors=interceptors) # type: ignore
except Exception as transport_error:
# Transport negotiation failed - fall back to minimal agent card with JSONRPC
fallback_url = (
agent_card.supported_interfaces[0].url if agent_card.supported_interfaces else url
)
fallback_url = agent_card.supported_interfaces[0].url if agent_card.supported_interfaces else url
if not fallback_url:
raise ValueError(
"A2A transport negotiation failed and no fallback URL is available. "
Expand Down
11 changes: 4 additions & 7 deletions python/packages/chatkit/agent_framework_chatkit/_converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from __future__ import annotations

import logging
import sys
from collections.abc import Awaitable, Callable, Sequence

from agent_framework import (
Expand All @@ -30,11 +29,6 @@
WorkflowItem,
)

if sys.version_info >= (3, 11):
from typing import assert_never # type:ignore # pragma: no cover
else:
from typing_extensions import assert_never # type:ignore # pragma: no cover

logger = logging.getLogger(__name__)


Expand Down Expand Up @@ -528,7 +522,10 @@ async def _thread_item_to_input_item(
# TODO(evmattso): Implement generated image handling in a future PR
return []
case _:
assert_never(item)
# Unknown ThreadItem variant (e.g. types added in newer chatkit versions).
# Skip rather than fail so we remain forward-compatible with chatkit upgrades.
logger.debug("Skipping unsupported ThreadItem of type %s", type(item).__name__)
return []

async def to_agent_input(
self,
Expand Down
11 changes: 3 additions & 8 deletions python/packages/core/agent_framework/_skills.py
Original file line number Diff line number Diff line change
Expand Up @@ -651,9 +651,7 @@ def _validate_compatibility(compatibility: str | None) -> None:
ValueError: If the value exceeds the maximum allowed length.
"""
if compatibility is not None and len(compatibility) > MAX_COMPATIBILITY_LENGTH:
raise ValueError(
f"Skill compatibility must be {MAX_COMPATIBILITY_LENGTH} characters or fewer."
)
raise ValueError(f"Skill compatibility must be {MAX_COMPATIBILITY_LENGTH} characters or fewer.")


def _build_skill_content(
Expand Down Expand Up @@ -733,6 +731,7 @@ class InlineSkill(Skill):
instructions="Use this skill for DB tasks.",
)


@skill.resource
def get_schema() -> str:
return "CREATE TABLE ..."
Expand Down Expand Up @@ -2522,11 +2521,7 @@ def _validate_and_normalize_directory_names(

# Reject absolute paths (check both POSIX and Windows-style roots
# so validation is consistent regardless of the host OS)
if (
os.path.isabs(directory)
or normalized.startswith("/")
or re.match(r"^[A-Za-z]:[/\\]", directory)
):
if os.path.isabs(directory) or normalized.startswith("/") or re.match(r"^[A-Za-z]:[/\\]", directory):
logger.warning(
"Skipping directory '%s': absolute paths are not allowed.",
directory,
Expand Down
Loading
Loading