Skip to content

Commit 5b78fd3

Browse files
committed
fix ci
1 parent 4a64f40 commit 5b78fd3

File tree

12 files changed

+37
-219
lines changed

12 files changed

+37
-219
lines changed

go/test/e2e/invoke_api_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,8 @@ func TestE2EInvokeOpenAIAgent(t *testing.T) {
630630
require.NoError(t, cmd.Run())
631631

632632
defer func() {
633-
cli.Delete(t.Context(), agent)
634-
cli.Delete(t.Context(), modelCfg)
633+
cli.Delete(t.Context(), agent) //nolint:errcheck
634+
cli.Delete(t.Context(), modelCfg) //nolint:errcheck
635635
}()
636636

637637
// Setup A2A client - use the agent's actual name

python/packages/kagent-crewai/src/kagent/crewai/_a2a.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
from a2a.types import AgentCard
1010
from fastapi import FastAPI, Request
1111
from fastapi.responses import PlainTextResponse
12+
from kagent.core import KAgentConfig, configure_tracing
13+
from kagent.core.a2a import KAgentRequestContextBuilder, KAgentTaskStore
1214
from opentelemetry.instrumentation.crewai import CrewAIInstrumentor
1315

1416
from crewai import Crew, Flow
15-
from kagent.core import KAgentConfig, configure_tracing
16-
from kagent.core.a2a import KAgentRequestContextBuilder, KAgentTaskStore
1717

1818
from ._executor import CrewAIAgentExecutor, CrewAIAgentExecutorConfig
1919

python/packages/kagent-crewai/src/kagent/crewai/_listeners.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,12 @@
1515
TaskStatusUpdateEvent,
1616
TextPart,
1717
)
18+
from kagent.core.a2a import (
19+
A2A_DATA_PART_METADATA_TYPE_FUNCTION_CALL,
20+
A2A_DATA_PART_METADATA_TYPE_FUNCTION_RESPONSE,
21+
A2A_DATA_PART_METADATA_TYPE_KEY,
22+
get_kagent_metadata_key,
23+
)
1824

1925
from crewai.events import (
2026
AgentExecutionCompletedEvent,
@@ -27,12 +33,6 @@
2733
ToolUsageFinishedEvent,
2834
ToolUsageStartedEvent,
2935
)
30-
from kagent.core.a2a import (
31-
A2A_DATA_PART_METADATA_TYPE_FUNCTION_CALL,
32-
A2A_DATA_PART_METADATA_TYPE_FUNCTION_RESPONSE,
33-
A2A_DATA_PART_METADATA_TYPE_KEY,
34-
get_kagent_metadata_key,
35-
)
3636

3737

3838
class A2ACrewAIListener(BaseEventListener):

python/packages/kagent-openai/__init__.py

Whitespace-only changes.

python/packages/kagent-openai/src/kagent/openai/_a2a.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from a2a.server.request_handlers import DefaultRequestHandler
1717
from a2a.server.tasks import InMemoryTaskStore
1818
from a2a.types import AgentCard
19-
from agents import Agent
19+
from agents import Agent, set_tracing_disabled
2020
from fastapi import FastAPI, Request
2121
from fastapi.responses import PlainTextResponse
2222
from kagent.core import KAgentConfig, configure_tracing
@@ -143,6 +143,9 @@ def build(self) -> FastAPI:
143143

144144
if self.tracing:
145145
try:
146+
# Set OpenAI tracing disabled and set custom OTEL tracing to be enabled
147+
logger.info("Configuring tracing for KAgent OpenAI app")
148+
set_tracing_disabled(True)
146149
configure_tracing(app)
147150

148151
# Configure tracing for OpenAI Agents SDK
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
# KAgent Skills
22

33
Core library for discovering, parsing, and loading KAgent skills from the filesystem.
4+
5+
For example usage, see `kagent-adk` and `kagent-openai` packages.

python/packages/kagent-skills/src/kagent/skills/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
from .discovery import discover_skills
2-
from .loader import load_skill_content
1+
from .discovery import discover_skills, load_skill_content
32
from .models import Skill
43
from .prompts import (
54
generate_skills_tool_description,

python/packages/kagent-skills/src/kagent/skills/discovery.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,23 @@ def discover_skills(skills_directory: Path) -> list[Skill]:
5858
logger.error(f"Failed to parse skill {skill_dir.name}: {e}")
5959

6060
return skills
61+
62+
63+
def load_skill_content(skills_directory: Path, skill_name: str) -> str:
64+
"""Load and return the full content of a skill's SKILL.md file."""
65+
# Find skill directory
66+
skill_dir = skills_directory / skill_name
67+
if not skill_dir.exists() or not skill_dir.is_dir():
68+
raise FileNotFoundError(f"Skill '{skill_name}' not found in {skills_directory}")
69+
70+
skill_file = skill_dir / "SKILL.md"
71+
if not skill_file.exists():
72+
raise FileNotFoundError(f"Skill '{skill_name}' has no SKILL.md file in {skill_dir}")
73+
74+
try:
75+
with open(skill_file, encoding="utf-8") as f:
76+
content = f.read()
77+
return content
78+
except Exception as e:
79+
logger.error(f"Failed to load skill {skill_name}: {e}")
80+
raise OSError(f"Error loading skill '{skill_name}': {e}") from e

python/packages/kagent-skills/src/kagent/skills/loader.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

python/packages/kagent-skills/src/kagent/skills/shell.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,6 @@ async def execute_command(
135135
env["PATH"] = f"{bash_venv_bin}:{env.get('PATH', '')}"
136136
env["VIRTUAL_ENV"] = bash_venv_path
137137

138-
logger.warning(f"path modified: {env['PATH']}")
139-
logger.warning(f"Set virtual env to: {env.get('VIRTUAL_ENV')}")
140-
logger.warning(f"Set pythonpath to: {env.get('PYTHONPATH')}")
141-
142138
sandboxed_command = f'srt "{command}"'
143139

144140
try:

0 commit comments

Comments
 (0)