pulselink-mcp 0.3.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.
Files changed (54) hide show
  1. pulselink_mcp-0.3.0/LICENSE +21 -0
  2. pulselink_mcp-0.3.0/MANIFEST.in +4 -0
  3. pulselink_mcp-0.3.0/PKG-INFO +134 -0
  4. pulselink_mcp-0.3.0/README.md +96 -0
  5. pulselink_mcp-0.3.0/pulselink_mcp/__init__.py +54 -0
  6. pulselink_mcp-0.3.0/pulselink_mcp/__main__.py +5 -0
  7. pulselink_mcp-0.3.0/pulselink_mcp/agent_data/IDENTITY.md +15 -0
  8. pulselink_mcp-0.3.0/pulselink_mcp/agent_server.py +76 -0
  9. pulselink_mcp-0.3.0/pulselink_mcp/api/__init__.py +4 -0
  10. pulselink_mcp-0.3.0/pulselink_mcp/api/api_client_base.py +23 -0
  11. pulselink_mcp-0.3.0/pulselink_mcp/api/api_client_pulse.py +43 -0
  12. pulselink_mcp-0.3.0/pulselink_mcp/api_client.py +7 -0
  13. pulselink_mcp-0.3.0/pulselink_mcp/auth.py +21 -0
  14. pulselink_mcp-0.3.0/pulselink_mcp/integrations/__init__.py +10 -0
  15. pulselink_mcp-0.3.0/pulselink_mcp/integrations/x_search_tool.py +451 -0
  16. pulselink_mcp-0.3.0/pulselink_mcp/main_agent.json +14 -0
  17. pulselink_mcp-0.3.0/pulselink_mcp/mcp/__init__.py +3 -0
  18. pulselink_mcp-0.3.0/pulselink_mcp/mcp/mcp_pulse.py +103 -0
  19. pulselink_mcp-0.3.0/pulselink_mcp/mcp_config.json +3 -0
  20. pulselink_mcp-0.3.0/pulselink_mcp/mcp_server.py +63 -0
  21. pulselink_mcp-0.3.0/pulselink_mcp/pulselink_input_models.py +12 -0
  22. pulselink_mcp-0.3.0/pulselink_mcp/pulselink_response_models.py +15 -0
  23. pulselink_mcp-0.3.0/pulselink_mcp/sources/__init__.py +90 -0
  24. pulselink_mcp-0.3.0/pulselink_mcp/sources/base.py +288 -0
  25. pulselink_mcp-0.3.0/pulselink_mcp/sources/china.py +126 -0
  26. pulselink_mcp-0.3.0/pulselink_mcp/sources/dev.py +107 -0
  27. pulselink_mcp-0.3.0/pulselink_mcp/sources/forums.py +203 -0
  28. pulselink_mcp-0.3.0/pulselink_mcp/sources/media.py +166 -0
  29. pulselink_mcp-0.3.0/pulselink_mcp/sources/social.py +156 -0
  30. pulselink_mcp-0.3.0/pulselink_mcp/sources/web.py +122 -0
  31. pulselink_mcp-0.3.0/pulselink_mcp.egg-info/PKG-INFO +134 -0
  32. pulselink_mcp-0.3.0/pulselink_mcp.egg-info/SOURCES.txt +52 -0
  33. pulselink_mcp-0.3.0/pulselink_mcp.egg-info/dependency_links.txt +1 -0
  34. pulselink_mcp-0.3.0/pulselink_mcp.egg-info/entry_points.txt +3 -0
  35. pulselink_mcp-0.3.0/pulselink_mcp.egg-info/requires.txt +30 -0
  36. pulselink_mcp-0.3.0/pulselink_mcp.egg-info/top_level.txt +6 -0
  37. pulselink_mcp-0.3.0/pyproject.toml +66 -0
  38. pulselink_mcp-0.3.0/requirements.txt +2 -0
  39. pulselink_mcp-0.3.0/scripts/security_sanitizer.py +160 -0
  40. pulselink_mcp-0.3.0/scripts/validate_a2a_agent.py +139 -0
  41. pulselink_mcp-0.3.0/scripts/validate_agent.py +15 -0
  42. pulselink_mcp-0.3.0/scripts/verify_api_integration.py +279 -0
  43. pulselink_mcp-0.3.0/setup.cfg +4 -0
  44. pulselink_mcp-0.3.0/tests/__init__.py +0 -0
  45. pulselink_mcp-0.3.0/tests/conftest.py +10 -0
  46. pulselink_mcp-0.3.0/tests/test_api_wrapper.py +11 -0
  47. pulselink_mcp-0.3.0/tests/test_auth.py +20 -0
  48. pulselink_mcp-0.3.0/tests/test_concept_parity.py +15 -0
  49. pulselink_mcp-0.3.0/tests/test_init_dynamics.py +6 -0
  50. pulselink_mcp-0.3.0/tests/test_pulselink_mcp_validation.py +7 -0
  51. pulselink_mcp-0.3.0/tests/test_sources.py +315 -0
  52. pulselink_mcp-0.3.0/tests/test_sources_live.py +59 -0
  53. pulselink_mcp-0.3.0/tests/test_startup.py +5 -0
  54. pulselink_mcp-0.3.0/tests/test_x_search_tool.py +164 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Audel Rouhi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,4 @@
1
+ include LICENSE
2
+ include README.md
3
+ include requirements.txt
4
+ recursive-include pulselink_mcp *.py *.json
@@ -0,0 +1,134 @@
1
+ Metadata-Version: 2.4
2
+ Name: pulselink-mcp
3
+ Version: 0.3.0
4
+ Summary: PulseLink — keyless open-web & social research source (MCP Server + A2A Server)
5
+ Author-email: Audel Rouhi <knucklessg1@gmail.com>
6
+ License: MIT
7
+ Classifier: Development Status :: 4 - Beta
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Environment :: Console
10
+ Classifier: Operating System :: POSIX :: Linux
11
+ Classifier: Programming Language :: Python :: 3
12
+ Requires-Python: <3.15,>=3.11
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: agent-utilities>=0.51.0
16
+ Requires-Dist: python-dotenv>=1.0.0
17
+ Provides-Extra: mcp
18
+ Requires-Dist: agent-utilities[mcp]>=0.51.0; extra == "mcp"
19
+ Provides-Extra: agent
20
+ Requires-Dist: agent-utilities[agent,logfire]>=0.51.0; extra == "agent"
21
+ Provides-Extra: youtube
22
+ Requires-Dist: yt-dlp>=2024.0; extra == "youtube"
23
+ Provides-Extra: feeds
24
+ Requires-Dist: feedparser>=6.0; extra == "feeds"
25
+ Provides-Extra: audio
26
+ Requires-Dist: faster-whisper>=1.0; extra == "audio"
27
+ Provides-Extra: sources
28
+ Requires-Dist: pulselink-mcp[feeds,youtube]>=0.3.0; extra == "sources"
29
+ Provides-Extra: all
30
+ Requires-Dist: pulselink-mcp[agent,audio,feeds,logfire,mcp,youtube]>=0.3.0; extra == "all"
31
+ Provides-Extra: test
32
+ Requires-Dist: pytest-xdist>=3.6.0; extra == "test"
33
+ Requires-Dist: pytest; extra == "test"
34
+ Requires-Dist: pytest-asyncio; extra == "test"
35
+ Requires-Dist: pytest-cov; extra == "test"
36
+ Requires-Dist: feedparser>=6.0; extra == "test"
37
+ Dynamic: license-file
38
+
39
+ # PulseLink MCP
40
+ ## CLI or API | MCP | Agent
41
+
42
+ ![PyPI - Version](https://img.shields.io/pypi/v/pulselink-mcp)
43
+ ![MCP Server](https://badge.mcpx.dev?type=server 'MCP Server')
44
+ ![PyPI - Downloads](https://img.shields.io/pypi/dd/pulselink-mcp)
45
+ ![GitHub Repo stars](https://img.shields.io/github/stars/Knuckles-Team/pulselink-mcp)
46
+ ![PyPI - License](https://img.shields.io/pypi/l/pulselink-mcp)
47
+ ![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/Knuckles-Team/pulselink-mcp)
48
+
49
+ *Version: 0.3.0*
50
+
51
+ > **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
52
+ > interfaces, the integrated A2A agent server, and guidance for provisioning the
53
+ > backing platform are maintained in the
54
+ > [official documentation](https://knuckles-team.github.io/pulselink-mcp/).
55
+
56
+ ---
57
+
58
+ ## Overview
59
+
60
+ **PulseLink MCP MCP Server + A2A Agent**
61
+
62
+ PulseLink — keyless open-web & social research source (MCP Server + A2A Server)
63
+
64
+ This repository is actively maintained - Contributions are welcome!
65
+
66
+ ## MCP
67
+
68
+ ### Using as an MCP Server
69
+
70
+ The MCP Server can be run in `stdio` (local), `streamable-http` (networked), or
71
+ `sse` mode.
72
+
73
+ #### Environment Variables
74
+
75
+ * `PULSELINK_MCP_URL`: The URL of the target service.
76
+ * `PULSELINK_MCP_TOKEN`: The API token or access token.
77
+
78
+ #### stdio Transport (local IDEs — Cursor, Claude Desktop, VS Code)
79
+
80
+ ```json
81
+ {
82
+ "mcpServers": {
83
+ "pulselink-mcp": {
84
+ "command": "uvx",
85
+ "args": ["--from", "pulselink-mcp", "pulselink-mcp"],
86
+ "env": {
87
+ "PULSELINK_MCP_URL": "https://service.example.com",
88
+ "PULSELINK_MCP_TOKEN": "your_token"
89
+ }
90
+ }
91
+ }
92
+ }
93
+ ```
94
+
95
+ #### Streamable-HTTP Transport (networked / production)
96
+
97
+ ```json
98
+ {
99
+ "mcpServers": {
100
+ "pulselink-mcp": {
101
+ "command": "uvx",
102
+ "args": ["--from", "pulselink-mcp", "pulselink-mcp", "--transport", "streamable-http", "--port", "8000"],
103
+ "env": {
104
+ "TRANSPORT": "streamable-http",
105
+ "HOST": "0.0.0.0",
106
+ "PORT": "8000",
107
+ "PULSELINK_MCP_URL": "https://service.example.com",
108
+ "PULSELINK_MCP_TOKEN": "your_token"
109
+ }
110
+ }
111
+ }
112
+ }
113
+ ```
114
+
115
+ <!-- BEGIN GENERATED: additional-deployment-options -->
116
+ ### Additional Deployment Options
117
+
118
+ `pulselink-mcp` can also run as a **local container** (Docker / Podman / `uv`) or be
119
+ consumed from a **remote deployment**. The
120
+ [Deployment guide](https://knuckles-team.github.io/pulselink-mcp/deployment/) has full,
121
+ copy-paste `mcp_config.json` for all four transports — **stdio**, **streamable-http**,
122
+ **local container / uv**, and **remote URL**:
123
+
124
+ - **Local container / uv** — launch the server from `mcp_config.json` via `uvx`,
125
+ `docker run`, or `podman run`, or point at a local streamable-http container by `url`.
126
+ - **Remote URL** — connect to a server deployed behind Caddy at
127
+ `http://pulselink-mcp.arpa/mcp` using the `"url"` key.
128
+ <!-- END GENERATED: additional-deployment-options -->
129
+
130
+ ## Install Python Package
131
+
132
+ ```bash
133
+ python -m pip install pulselink-mcp
134
+ ```
@@ -0,0 +1,96 @@
1
+ # PulseLink MCP
2
+ ## CLI or API | MCP | Agent
3
+
4
+ ![PyPI - Version](https://img.shields.io/pypi/v/pulselink-mcp)
5
+ ![MCP Server](https://badge.mcpx.dev?type=server 'MCP Server')
6
+ ![PyPI - Downloads](https://img.shields.io/pypi/dd/pulselink-mcp)
7
+ ![GitHub Repo stars](https://img.shields.io/github/stars/Knuckles-Team/pulselink-mcp)
8
+ ![PyPI - License](https://img.shields.io/pypi/l/pulselink-mcp)
9
+ ![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/Knuckles-Team/pulselink-mcp)
10
+
11
+ *Version: 0.3.0*
12
+
13
+ > **Documentation** — Installation, deployment, usage across the API, CLI, and MCP
14
+ > interfaces, the integrated A2A agent server, and guidance for provisioning the
15
+ > backing platform are maintained in the
16
+ > [official documentation](https://knuckles-team.github.io/pulselink-mcp/).
17
+
18
+ ---
19
+
20
+ ## Overview
21
+
22
+ **PulseLink MCP MCP Server + A2A Agent**
23
+
24
+ PulseLink — keyless open-web & social research source (MCP Server + A2A Server)
25
+
26
+ This repository is actively maintained - Contributions are welcome!
27
+
28
+ ## MCP
29
+
30
+ ### Using as an MCP Server
31
+
32
+ The MCP Server can be run in `stdio` (local), `streamable-http` (networked), or
33
+ `sse` mode.
34
+
35
+ #### Environment Variables
36
+
37
+ * `PULSELINK_MCP_URL`: The URL of the target service.
38
+ * `PULSELINK_MCP_TOKEN`: The API token or access token.
39
+
40
+ #### stdio Transport (local IDEs — Cursor, Claude Desktop, VS Code)
41
+
42
+ ```json
43
+ {
44
+ "mcpServers": {
45
+ "pulselink-mcp": {
46
+ "command": "uvx",
47
+ "args": ["--from", "pulselink-mcp", "pulselink-mcp"],
48
+ "env": {
49
+ "PULSELINK_MCP_URL": "https://service.example.com",
50
+ "PULSELINK_MCP_TOKEN": "your_token"
51
+ }
52
+ }
53
+ }
54
+ }
55
+ ```
56
+
57
+ #### Streamable-HTTP Transport (networked / production)
58
+
59
+ ```json
60
+ {
61
+ "mcpServers": {
62
+ "pulselink-mcp": {
63
+ "command": "uvx",
64
+ "args": ["--from", "pulselink-mcp", "pulselink-mcp", "--transport", "streamable-http", "--port", "8000"],
65
+ "env": {
66
+ "TRANSPORT": "streamable-http",
67
+ "HOST": "0.0.0.0",
68
+ "PORT": "8000",
69
+ "PULSELINK_MCP_URL": "https://service.example.com",
70
+ "PULSELINK_MCP_TOKEN": "your_token"
71
+ }
72
+ }
73
+ }
74
+ }
75
+ ```
76
+
77
+ <!-- BEGIN GENERATED: additional-deployment-options -->
78
+ ### Additional Deployment Options
79
+
80
+ `pulselink-mcp` can also run as a **local container** (Docker / Podman / `uv`) or be
81
+ consumed from a **remote deployment**. The
82
+ [Deployment guide](https://knuckles-team.github.io/pulselink-mcp/deployment/) has full,
83
+ copy-paste `mcp_config.json` for all four transports — **stdio**, **streamable-http**,
84
+ **local container / uv**, and **remote URL**:
85
+
86
+ - **Local container / uv** — launch the server from `mcp_config.json` via `uvx`,
87
+ `docker run`, or `podman run`, or point at a local streamable-http container by `url`.
88
+ - **Remote URL** — connect to a server deployed behind Caddy at
89
+ `http://pulselink-mcp.arpa/mcp` using the `"url"` key.
90
+ <!-- END GENERATED: additional-deployment-options -->
91
+
92
+ ## Install Python Package
93
+
94
+ ```bash
95
+ python -m pip install pulselink-mcp
96
+ ```
@@ -0,0 +1,54 @@
1
+ #!/usr/bin/env python
2
+
3
+ import importlib
4
+ import inspect
5
+ import warnings
6
+
7
+ warnings.filterwarnings("ignore", message=".*urllib3.*or chardet.*")
8
+
9
+ __all__: list[str] = []
10
+
11
+ CORE_MODULES = [
12
+ "pulselink_mcp.api",
13
+ ]
14
+
15
+ OPTIONAL_MODULES = {
16
+ "pulselink_mcp.agent_server": "agent",
17
+ "pulselink_mcp.mcp_server": "mcp",
18
+ }
19
+
20
+
21
+ def _import_module_safely(module_name: str):
22
+ """Try to import a module and return it, or None if not available."""
23
+ try:
24
+ return importlib.import_module(module_name)
25
+ except ImportError:
26
+ return None
27
+
28
+
29
+ def _expose_members(module):
30
+ """Expose public classes and functions from a module into globals and __all__."""
31
+ for name, obj in inspect.getmembers(module):
32
+ if (inspect.isclass(obj) or inspect.isfunction(obj)) and not name.startswith(
33
+ "_"
34
+ ):
35
+ globals()[name] = obj
36
+ __all__.append(name)
37
+
38
+
39
+ for module_name in CORE_MODULES:
40
+ try:
41
+ module = importlib.import_module(module_name)
42
+ _expose_members(module)
43
+ except ImportError:
44
+ pass
45
+
46
+ for module_name, extra_name in OPTIONAL_MODULES.items():
47
+ module = _import_module_safely(module_name)
48
+ if module is not None:
49
+ _expose_members(module)
50
+ globals()[f"_{extra_name.upper()}_AVAILABLE"] = True
51
+ else:
52
+ globals()[f"_{extra_name.upper()}_AVAILABLE"] = False
53
+
54
+ __all__.extend(["_MCP_AVAILABLE", "_AGENT_AVAILABLE"])
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/python
2
+ from pulselink_mcp.agent_server import agent_server
3
+
4
+ if __name__ == "__main__":
5
+ agent_server()
@@ -0,0 +1,15 @@
1
+ # IDENTITY.md - PulseLink MCP Agent Identity
2
+
3
+ ## [default]
4
+ * **Name:** PulseLink MCP Agent
5
+ * **Role:** PulseLink — keyless open-web & social research source (MCP Server + A2A Server)
6
+ * **Emoji:** 🤖
7
+
8
+ ### System Prompt
9
+ You are the PulseLink MCP Agent.
10
+ Use the `mcp-client` universal skill and check the reference documentation for
11
+ `pulselink-mcp.md` to discover the exact tags and tools available for your capabilities.
12
+
13
+ ### Capabilities
14
+ - **MCP Operations**: Leverage the `mcp-client` skill to interact with the target MCP server.
15
+ - **Custom Agent**: Handle custom tasks or general tasks.
@@ -0,0 +1,76 @@
1
+ #!/usr/bin/python
2
+ import logging
3
+ import os
4
+ import sys
5
+ import warnings
6
+
7
+ __version__ = "0.3.0"
8
+
9
+ logging.basicConfig(
10
+ level=logging.INFO,
11
+ format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
12
+ handlers=[logging.StreamHandler()],
13
+ )
14
+ logger = logging.getLogger(__name__)
15
+
16
+
17
+ def agent_server():
18
+ from agent_utilities import (
19
+ build_system_prompt_from_workspace,
20
+ create_agent_parser,
21
+ create_agent_server,
22
+ initialize_workspace,
23
+ load_identity,
24
+ )
25
+
26
+ warnings.filterwarnings("ignore", message=".*urllib3.*or chardet.*")
27
+ warnings.filterwarnings("ignore", category=DeprecationWarning, module="fastmcp")
28
+
29
+ initialize_workspace()
30
+ meta = load_identity()
31
+ agent_name = os.getenv("DEFAULT_AGENT_NAME", meta.get("name", "PulseLink MCP"))
32
+
33
+ print(f"{agent_name} v{__version__}", file=sys.stderr)
34
+ parser = create_agent_parser()
35
+ args = parser.parse_args()
36
+
37
+ if args.debug:
38
+ logging.getLogger().setLevel(logging.DEBUG)
39
+ logger.debug("Debug mode enabled")
40
+
41
+ create_agent_server(
42
+ mcp_url=args.mcp_url,
43
+ mcp_config=args.mcp_config or "mcp_config.json",
44
+ host=args.host,
45
+ port=args.port,
46
+ provider=args.provider,
47
+ model_id=args.model_id,
48
+ router_model=args.model_id,
49
+ agent_model=args.model_id,
50
+ base_url=args.base_url,
51
+ api_key=args.api_key,
52
+ agent_description=os.getenv(
53
+ "AGENT_DESCRIPTION",
54
+ meta.get(
55
+ "description",
56
+ "PulseLink — keyless open-web & social research source (MCP Server + A2A Server)",
57
+ ),
58
+ ),
59
+ system_prompt=os.getenv(
60
+ "AGENT_SYSTEM_PROMPT",
61
+ meta.get("content") or build_system_prompt_from_workspace(),
62
+ ),
63
+ custom_skills_directory=args.custom_skills_directory,
64
+ enable_web_ui=args.web,
65
+ enable_otel=args.otel,
66
+ otel_endpoint=args.otel_endpoint,
67
+ otel_headers=args.otel_headers,
68
+ otel_public_key=args.otel_public_key,
69
+ otel_secret_key=args.otel_secret_key,
70
+ otel_protocol=args.otel_protocol,
71
+ debug=args.debug,
72
+ )
73
+
74
+
75
+ if __name__ == "__main__":
76
+ agent_server()
@@ -0,0 +1,4 @@
1
+ from .api_client_base import ApiClientBase
2
+ from .api_client_pulse import PulseLinkClient
3
+
4
+ __all__ = ["ApiClientBase", "PulseLinkClient"]
@@ -0,0 +1,23 @@
1
+ from typing import Any
2
+
3
+ import requests
4
+
5
+
6
+ class ApiClientBase:
7
+ """Base HTTP API client wrapper."""
8
+
9
+ def __init__(self, base_url: str, token: str, verify: bool = True):
10
+ self.base_url = base_url.rstrip("/")
11
+ self.token = token
12
+ self.verify = verify
13
+ self.session = requests.Session()
14
+ self.session.headers.update({"Authorization": f"Bearer {token}"})
15
+
16
+ def request(self, method: str, path: str, **kwargs) -> dict[str, Any]:
17
+ url = f"{self.base_url}/{path.lstrip('/')}"
18
+ response = self.session.request(method, url, verify=self.verify, **kwargs)
19
+ response.raise_for_status()
20
+ try:
21
+ return response.json()
22
+ except ValueError:
23
+ return {"status": response.status_code, "text": response.text}
@@ -0,0 +1,43 @@
1
+ """PulseLink client facade over the source-ladder registry.
2
+
3
+ CONCEPT:PULSE-001 — the single object the MCP server and agent use. Unlike a
4
+ classic single-endpoint API client, PulseLink fans out across many source ladders
5
+ and authenticates per-source through the shared credential provider, so there is no
6
+ base URL / token here — :func:`pulselink_mcp.auth.get_client` constructs it with no
7
+ configuration and every keyless source works immediately.
8
+ """
9
+
10
+ from __future__ import annotations
11
+
12
+ from typing import Any
13
+
14
+ from ..sources import doctor, get_ladder, list_sources
15
+
16
+
17
+ class PulseLinkClient:
18
+ """Thin facade delegating to the source registry."""
19
+
20
+ def sources(self) -> list[str]:
21
+ return list_sources()
22
+
23
+ def search(
24
+ self, source: str, query: str, cursor: str | None = None, limit: int = 10
25
+ ) -> dict[str, Any]:
26
+ return get_ladder(source).search(query, cursor, limit).model_dump()
27
+
28
+ def fetch(self, source: str, target: str) -> dict[str, Any]:
29
+ return get_ladder(source).fetch(target).model_dump()
30
+
31
+ def list_items(
32
+ self, source: str, channel: str, cursor: str | None = None, limit: int = 10
33
+ ) -> dict[str, Any]:
34
+ return get_ladder(source).list_items(channel, cursor, limit).model_dump()
35
+
36
+ def transcribe(self, target: str, source: str = "youtube") -> dict[str, Any]:
37
+ return get_ladder(source).transcribe(target).model_dump()
38
+
39
+ def status(self) -> dict[str, list[dict[str, Any]]]:
40
+ return {
41
+ name: [h.model_dump() for h in backends]
42
+ for name, backends in doctor().items()
43
+ }
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/python
2
+ """Facade re-export of the modular api/ sub-package (backward compatibility)."""
3
+
4
+ from .api import * # noqa: F401,F403
5
+ from .api import __all__ as _api_all
6
+
7
+ __all__ = list(_api_all)
@@ -0,0 +1,21 @@
1
+ #!/usr/bin/python
2
+ """PulseLink client accessor.
3
+
4
+ PulseLink has no single endpoint: it fans out across many source ladders and
5
+ authenticates per-source through the shared credential provider (OS-5.38). So
6
+ ``get_client`` takes no URL/token — it returns a registry-backed facade that works
7
+ keyless out of the box; cookie/official backends light up when their credential
8
+ (``SOURCE_CREDENTIALS``) is present.
9
+ """
10
+
11
+ from .api import PulseLinkClient
12
+
13
+ _client: PulseLinkClient | None = None
14
+
15
+
16
+ def get_client() -> PulseLinkClient:
17
+ """Get or create the singleton PulseLink client facade."""
18
+ global _client
19
+ if _client is None:
20
+ _client = PulseLinkClient()
21
+ return _client
@@ -0,0 +1,10 @@
1
+ """PulseLink integrations — optional capabilities other packages import lazily.
2
+
3
+ CONCEPT:PULSE-006 — X search/browse tools (xAI/Grok index), externalized from
4
+ agent-utilities so its core carries no X integration. agent-utilities imports
5
+ ``x_tools`` from here optionally (try/except ImportError).
6
+ """
7
+
8
+ from .x_search_tool import browse_x_post, x_search, x_tools
9
+
10
+ __all__ = ["x_tools", "x_search", "browse_x_post"]