langchain-stackresolve 0.1.0__tar.gz → 0.2.0__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: langchain-stackresolve
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: LangChain tools for StackResolve: find, compare, and audit software for AI agents, plus structured company research.
5
5
  Project-URL: Homepage, https://stackresolve.dev
6
6
  Project-URL: Repository, https://github.com/autorevai/stackresolve
@@ -17,7 +17,7 @@ Classifier: Topic :: Software Development :: Libraries :: Python Modules
17
17
  Requires-Python: >=3.9
18
18
  Requires-Dist: langchain-core>=0.3.0
19
19
  Requires-Dist: pydantic>=2.0
20
- Requires-Dist: stackresolve>=0.1.0
20
+ Requires-Dist: stackresolve>=0.2.0
21
21
  Provides-Extra: test
22
22
  Requires-Dist: pytest-asyncio>=0.23; extra == 'test'
23
23
  Requires-Dist: pytest>=7.0; extra == 'test'
@@ -18,7 +18,7 @@ from .tools import (
18
18
  StackResolveSearchTools,
19
19
  )
20
20
 
21
- __version__ = "0.1.0"
21
+ __version__ = "0.2.0"
22
22
 
23
23
  __all__ = [
24
24
  "StackResolveToolkit",
@@ -28,6 +28,9 @@ from stackresolve import StackResolve, StackResolveError
28
28
  # can run to tens of kilobytes and the tail is rarely what the model needs.
29
29
  MAX_CHARS = 6000
30
30
 
31
+ # Sent in the User-Agent so API traffic from this adapter is attributable.
32
+ INTEGRATION = "langchain-stackresolve/0.2.0"
33
+
31
34
 
32
35
  def _dump(payload: Any, max_chars: int = MAX_CHARS) -> str:
33
36
  """Serialize a payload to JSON, truncating on a character budget.
@@ -65,6 +68,11 @@ def _build_client(
65
68
  url = base_url or os.environ.get("STACKRESOLVE_BASE_URL")
66
69
  if url:
67
70
  opts["base_url"] = url
71
+ # Identify the adapter in the User-Agent. Without this a call through this
72
+ # package is indistinguishable from a raw SDK call, and we cannot tell which
73
+ # distribution surface is actually being used.
74
+ if INTEGRATION:
75
+ opts["integration"] = INTEGRATION
68
76
  return StackResolve(**opts)
69
77
 
70
78
 
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "langchain-stackresolve"
7
- version = "0.1.0"
7
+ version = "0.2.0"
8
8
  description = "LangChain tools for StackResolve: find, compare, and audit software for AI agents, plus structured company research."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.9"
@@ -29,7 +29,7 @@ classifiers = [
29
29
  ]
30
30
  dependencies = [
31
31
  "langchain-core>=0.3.0",
32
- "stackresolve>=0.1.0",
32
+ "stackresolve>=0.2.0",
33
33
  "pydantic>=2.0",
34
34
  ]
35
35
 
@@ -174,3 +174,13 @@ def test_research_forwards_the_optional_question():
174
174
  ("anthropic.com", "what is the enterprise SLA?"),
175
175
  {},
176
176
  )
177
+
178
+
179
+ def test_integration_label_matches_the_package_version():
180
+ """The User-Agent label is how we attribute traffic; a stale one misreports it."""
181
+ import langchain_stackresolve as pkg
182
+ from langchain_stackresolve.tools import INTEGRATION
183
+
184
+ assert INTEGRATION.endswith("/" + pkg.__version__), (
185
+ f"INTEGRATION={INTEGRATION!r} does not match __version__={pkg.__version__!r}"
186
+ )