agent-framework-github-copilot 1.0.0b260519__tar.gz → 1.0.0rc1__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_framework_github_copilot-1.0.0b260519 → agent_framework_github_copilot-1.0.0rc1}/PKG-INFO +3 -3
- {agent_framework_github_copilot-1.0.0b260519 → agent_framework_github_copilot-1.0.0rc1}/agent_framework_github_copilot/_agent.py +21 -16
- {agent_framework_github_copilot-1.0.0b260519 → agent_framework_github_copilot-1.0.0rc1}/pyproject.toml +3 -3
- {agent_framework_github_copilot-1.0.0b260519 → agent_framework_github_copilot-1.0.0rc1}/LICENSE +0 -0
- {agent_framework_github_copilot-1.0.0b260519 → agent_framework_github_copilot-1.0.0rc1}/README.md +0 -0
- {agent_framework_github_copilot-1.0.0b260519 → agent_framework_github_copilot-1.0.0rc1}/agent_framework_github_copilot/__init__.py +0 -0
{agent_framework_github_copilot-1.0.0b260519 → agent_framework_github_copilot-1.0.0rc1}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: agent-framework-github-copilot
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.0rc1
|
|
4
4
|
Summary: GitHub Copilot integration for Microsoft Agent Framework.
|
|
5
5
|
Author-email: Microsoft <af-support@microsoft.com>
|
|
6
6
|
Requires-Python: >=3.10
|
|
@@ -16,8 +16,8 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
16
16
|
Classifier: Programming Language :: Python :: 3.14
|
|
17
17
|
Classifier: Typing :: Typed
|
|
18
18
|
License-File: LICENSE
|
|
19
|
-
Requires-Dist: agent-framework-core>=1.
|
|
20
|
-
Requires-Dist: github-copilot-sdk>=1.0.
|
|
19
|
+
Requires-Dist: agent-framework-core>=1.8.0,<2
|
|
20
|
+
Requires-Dist: github-copilot-sdk>=1.0.0,<2; python_version >= '3.11'
|
|
21
21
|
Project-URL: homepage, https://aka.ms/agent-framework
|
|
22
22
|
Project-URL: issues, https://github.com/microsoft/agent-framework/issues
|
|
23
23
|
Project-URL: release_notes, https://github.com/microsoft/agent-framework/releases?q=tag%3Apython-1&expanded=true
|
|
@@ -37,9 +37,10 @@ from agent_framework.exceptions import AgentException
|
|
|
37
37
|
from agent_framework.observability import AgentTelemetryLayer
|
|
38
38
|
|
|
39
39
|
try:
|
|
40
|
-
from copilot import CopilotClient, CopilotSession,
|
|
41
|
-
from copilot.generated.
|
|
40
|
+
from copilot import CopilotClient, CopilotSession, RuntimeConnection
|
|
41
|
+
from copilot.generated.rpc import PermissionDecisionUserNotAvailable
|
|
42
42
|
from copilot.session import MCPServerConfig, PermissionRequestResult, ProviderConfig, SystemMessageConfig
|
|
43
|
+
from copilot.session_events import PermissionRequest, SessionEvent, SessionEventType
|
|
43
44
|
from copilot.tools import Tool as CopilotTool
|
|
44
45
|
from copilot.tools import ToolInvocation, ToolResult
|
|
45
46
|
except ImportError as _copilot_import_error:
|
|
@@ -57,8 +58,10 @@ else:
|
|
|
57
58
|
DEFAULT_TIMEOUT_SECONDS: float = 60.0
|
|
58
59
|
"""Default timeout in seconds for Copilot requests."""
|
|
59
60
|
|
|
60
|
-
PermissionHandlerType = Callable[
|
|
61
|
-
|
|
61
|
+
PermissionHandlerType = Callable[
|
|
62
|
+
[PermissionRequest, dict[str, str]], "PermissionRequestResult | Awaitable[PermissionRequestResult]"
|
|
63
|
+
]
|
|
64
|
+
"""Type for permission request handlers. Supports both sync and async callbacks."""
|
|
62
65
|
|
|
63
66
|
|
|
64
67
|
FunctionApprovalCallback = Callable[[Content], "bool | Awaitable[bool]"]
|
|
@@ -121,7 +124,7 @@ def _deny_all_permissions(
|
|
|
121
124
|
_invocation: dict[str, str],
|
|
122
125
|
) -> PermissionRequestResult:
|
|
123
126
|
"""Default permission handler that denies all requests."""
|
|
124
|
-
return
|
|
127
|
+
return PermissionDecisionUserNotAvailable()
|
|
125
128
|
|
|
126
129
|
|
|
127
130
|
class GitHubCopilotSettings(TypedDict, total=False):
|
|
@@ -140,9 +143,9 @@ class GitHubCopilotSettings(TypedDict, total=False):
|
|
|
140
143
|
Can be set via environment variable GITHUB_COPILOT_TIMEOUT.
|
|
141
144
|
log_level: CLI log level.
|
|
142
145
|
Can be set via environment variable GITHUB_COPILOT_LOG_LEVEL.
|
|
143
|
-
|
|
146
|
+
base_directory: Directory where the CLI stores session state, configuration,
|
|
144
147
|
and other persistent data. Can be set via environment variable
|
|
145
|
-
|
|
148
|
+
GITHUB_COPILOT_BASE_DIRECTORY. Defaults to ~/.copilot when not set.
|
|
146
149
|
Only applicable when the SDK spawns the CLI process (ignored when
|
|
147
150
|
connecting to an external server via a pre-configured client).
|
|
148
151
|
"""
|
|
@@ -151,7 +154,7 @@ class GitHubCopilotSettings(TypedDict, total=False):
|
|
|
151
154
|
model: str | None
|
|
152
155
|
timeout: float | None
|
|
153
156
|
log_level: str | None
|
|
154
|
-
|
|
157
|
+
base_directory: str | None
|
|
155
158
|
|
|
156
159
|
|
|
157
160
|
class GitHubCopilotOptions(TypedDict, total=False):
|
|
@@ -314,7 +317,7 @@ class RawGitHubCopilotAgent(BaseAgent, Generic[OptionsT]):
|
|
|
314
317
|
provider: ProviderConfig | None = opts.pop("provider", None)
|
|
315
318
|
instruction_directories: list[str] | None = opts.pop("instruction_directories", None)
|
|
316
319
|
on_function_approval: FunctionApprovalCallback | None = opts.pop("on_function_approval", None)
|
|
317
|
-
|
|
320
|
+
base_directory = opts.pop("base_directory", None)
|
|
318
321
|
|
|
319
322
|
self._settings = load_settings(
|
|
320
323
|
GitHubCopilotSettings,
|
|
@@ -323,7 +326,7 @@ class RawGitHubCopilotAgent(BaseAgent, Generic[OptionsT]):
|
|
|
323
326
|
model=model,
|
|
324
327
|
timeout=timeout,
|
|
325
328
|
log_level=log_level,
|
|
326
|
-
|
|
329
|
+
base_directory=base_directory,
|
|
327
330
|
env_file_path=env_file_path,
|
|
328
331
|
env_file_encoding=env_file_encoding,
|
|
329
332
|
)
|
|
@@ -362,14 +365,16 @@ class RawGitHubCopilotAgent(BaseAgent, Generic[OptionsT]):
|
|
|
362
365
|
if self._client is None:
|
|
363
366
|
cli_path = self._settings.get("cli_path") or None
|
|
364
367
|
log_level = self._settings.get("log_level") or None
|
|
365
|
-
|
|
368
|
+
base_directory = self._settings.get("base_directory") or None
|
|
366
369
|
|
|
367
|
-
|
|
370
|
+
client_kwargs: dict[str, Any] = {}
|
|
371
|
+
if cli_path:
|
|
372
|
+
client_kwargs["connection"] = RuntimeConnection.for_stdio(path=cli_path)
|
|
368
373
|
if log_level:
|
|
369
|
-
|
|
370
|
-
if
|
|
371
|
-
|
|
372
|
-
self._client = CopilotClient(
|
|
374
|
+
client_kwargs["log_level"] = log_level
|
|
375
|
+
if base_directory:
|
|
376
|
+
client_kwargs["base_directory"] = base_directory
|
|
377
|
+
self._client = CopilotClient(**client_kwargs)
|
|
373
378
|
|
|
374
379
|
try:
|
|
375
380
|
await self._client.start()
|
|
@@ -4,7 +4,7 @@ description = "GitHub Copilot integration for Microsoft Agent Framework."
|
|
|
4
4
|
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.10"
|
|
7
|
-
version = "1.0.
|
|
7
|
+
version = "1.0.0rc1"
|
|
8
8
|
license-files = ["LICENSE"]
|
|
9
9
|
urls.homepage = "https://aka.ms/agent-framework"
|
|
10
10
|
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
|
|
@@ -23,8 +23,8 @@ classifiers = [
|
|
|
23
23
|
"Typing :: Typed",
|
|
24
24
|
]
|
|
25
25
|
dependencies = [
|
|
26
|
-
"agent-framework-core>=1.
|
|
27
|
-
"github-copilot-sdk>=1.0.
|
|
26
|
+
"agent-framework-core>=1.8.0,<2",
|
|
27
|
+
"github-copilot-sdk>=1.0.0,<2; python_version >= '3.11'",
|
|
28
28
|
]
|
|
29
29
|
|
|
30
30
|
[tool.uv]
|
{agent_framework_github_copilot-1.0.0b260519 → agent_framework_github_copilot-1.0.0rc1}/LICENSE
RENAMED
|
File without changes
|
{agent_framework_github_copilot-1.0.0b260519 → agent_framework_github_copilot-1.0.0rc1}/README.md
RENAMED
|
File without changes
|