vercel-internal-core-bundle 0.2.0__tar.gz → 0.2.1__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.
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/PKG-INFO +3 -2
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/pyproject.toml +2 -1
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/byte_stream.py +1 -1
- vercel_internal_core_bundle-0.2.1/vercel/_internal/core/detect_agent.py +45 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/http/transport.py +2 -2
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/session.py +1 -1
- vercel_internal_core_bundle-0.2.1/vercel/_internal/core/version.py +1 -0
- vercel_internal_core_bundle-0.2.0/vercel/_internal/core/version.py +0 -1
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/LICENSE +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/README.md +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/_vercel_hatch_build.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/hatch_build.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/__init__.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/_vendor/__init__.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/_vendor/vendor.txt +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/errors.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/http/__init__.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/http/_compat.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/http/config.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/http/httpx.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/http/retry.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/iter_coroutine.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/options.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/polyfills/__init__.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/polyfills/_datetime.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/polyfills/_strenum.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/polyfills/_strenum_impl.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/polyfills/_typing.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/py.typed +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/time.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/typeutils.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/url.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/api/__init__.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/api/py.typed +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/errors/__init__.py +0 -0
- {vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/errors/py.typed +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: vercel-internal-core-bundle
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: Shared internal runtime for Vercel Python packages
|
|
5
5
|
License-Expression: MIT
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Requires-Python: >=3.10
|
|
8
|
-
Requires-Dist:
|
|
8
|
+
Requires-Dist: anyio<5,>=4.11.0
|
|
9
|
+
Requires-Dist: vercel-internal-shared-vendored-deps>=0.1.4
|
|
9
10
|
Description-Content-Type: text/markdown
|
|
10
11
|
|
|
11
12
|
# vercel-internal-core-bundle
|
|
@@ -14,7 +14,7 @@ from collections.abc import AsyncIterator
|
|
|
14
14
|
from contextlib import AbstractAsyncContextManager, asynccontextmanager
|
|
15
15
|
from typing import Protocol, TypeAlias, cast
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
import anyio
|
|
18
18
|
|
|
19
19
|
from vercel._internal.core.polyfills import Buffer
|
|
20
20
|
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"""Detect coding agents from the environment of the current process.
|
|
2
|
+
|
|
3
|
+
The checks mirror the environment-variable rules in @vercel/detect-agent 1.2.5.
|
|
4
|
+
Its filesystem-based Devin check is intentionally outside this utility's scope.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from __future__ import annotations
|
|
8
|
+
|
|
9
|
+
import os
|
|
10
|
+
from collections.abc import Mapping
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def detect_agent_name(environ: Mapping[str, str] | None = None) -> str | None:
|
|
14
|
+
"""Return the agent driving this process, if its environment identifies one."""
|
|
15
|
+
env = os.environ if environ is None else environ
|
|
16
|
+
|
|
17
|
+
declared = env.get("AI_AGENT", "").strip()
|
|
18
|
+
if declared:
|
|
19
|
+
if declared in {"github-copilot", "github-copilot-cli"}:
|
|
20
|
+
return "github-copilot"
|
|
21
|
+
return declared
|
|
22
|
+
|
|
23
|
+
if env.get("CURSOR_TRACE_ID"):
|
|
24
|
+
return "cursor"
|
|
25
|
+
if env.get("CURSOR_AGENT") or env.get("CURSOR_EXTENSION_HOST_ROLE") == "agent-exec":
|
|
26
|
+
return "cursor-cli"
|
|
27
|
+
if env.get("GEMINI_CLI"):
|
|
28
|
+
return "gemini"
|
|
29
|
+
if any(env.get(name) for name in ("CODEX_SANDBOX", "CODEX_CI", "CODEX_THREAD_ID")):
|
|
30
|
+
return "codex"
|
|
31
|
+
if env.get("ANTIGRAVITY_AGENT"):
|
|
32
|
+
return "antigravity"
|
|
33
|
+
if env.get("AUGMENT_AGENT"):
|
|
34
|
+
return "augment-cli"
|
|
35
|
+
if env.get("OPENCODE_CLIENT"):
|
|
36
|
+
return "opencode"
|
|
37
|
+
if env.get("CLAUDECODE") or env.get("CLAUDE_CODE"):
|
|
38
|
+
return "cowork" if env.get("CLAUDE_CODE_IS_COWORK") else "claude"
|
|
39
|
+
if env.get("REPL_ID"):
|
|
40
|
+
return "replit"
|
|
41
|
+
if any(
|
|
42
|
+
env.get(name) for name in ("COPILOT_MODEL", "COPILOT_ALLOW_ALL", "COPILOT_GITHUB_TOKEN")
|
|
43
|
+
):
|
|
44
|
+
return "github-copilot"
|
|
45
|
+
return None
|
|
@@ -13,9 +13,9 @@ from datetime import timedelta
|
|
|
13
13
|
from types import TracebackType
|
|
14
14
|
from typing import Any, Final, TypeAlias, cast, final
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
import anyio
|
|
17
17
|
import vercel.internal._vendor.httpx2 as httpx
|
|
18
|
-
from
|
|
18
|
+
from anyio.abc import ObjectReceiveStream, ObjectSendStream
|
|
19
19
|
|
|
20
20
|
from vercel._internal.core.http._compat import is_async_http_client
|
|
21
21
|
from vercel._internal.core.polyfills import StrEnum
|
|
@@ -8,7 +8,7 @@ from contextvars import ContextVar, Token
|
|
|
8
8
|
from types import TracebackType
|
|
9
9
|
from typing import TYPE_CHECKING, Any, ClassVar, TypeVar, cast, overload
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
import anyio
|
|
12
12
|
import vercel.internal._vendor.httpx2 as httpx
|
|
13
13
|
|
|
14
14
|
from vercel._internal.core.errors import (
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.2.1"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.0"
|
|
File without changes
|
|
File without changes
|
{vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/_vercel_hatch_build.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/_internal/core/url.py
RENAMED
|
File without changes
|
{vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/api/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/errors/__init__.py
RENAMED
|
File without changes
|
{vercel_internal_core_bundle-0.2.0 → vercel_internal_core_bundle-0.2.1}/vercel/errors/py.typed
RENAMED
|
File without changes
|