repo
stringclasses
454 values
file_path
stringlengths
5
201
extension
stringclasses
1 value
content
stringlengths
8
509k
num_lines
int64
3
16.9k
size_bytes
int64
8
511k
deepagents
libs/code/tests/unit_tests/tui/widgets/test_install_confirm.py
.py
"""Tests for the `/install --package` confirmation modal.""" from __future__ import annotations from typing import TYPE_CHECKING from unittest.mock import patch from textual.app import App, ComposeResult from textual.content import Content from textual.style import Style as TStyle from textual.widgets import Static ...
396
14,975
deepagents
libs/code/tests/unit_tests/tui/widgets/test_links.py
.py
"""Unit tests for style-link click handling.""" import os import webbrowser from types import SimpleNamespace from typing import TYPE_CHECKING, cast from unittest.mock import MagicMock, patch from deepagents_code._env_vars import SHOW_URL_OPEN_TOAST from deepagents_code.tui.widgets._links import ( event_targets_l...
302
10,826
deepagents
libs/code/tests/unit_tests/tui/widgets/test_mcp_login_modal.py
.py
"""Tests for the in-TUI MCP OAuth login modal.""" from __future__ import annotations import asyncio from pathlib import Path from types import SimpleNamespace import pytest from textual.app import App, ComposeResult from textual.widgets import Input, Static from deepagents_code.mcp_oauth_ui import OAuthInteraction ...
410
16,888
deepagents
libs/code/tests/unit_tests/tui/widgets/test_notification_detail.py
.py
"""Tests for `NotificationDetailScreen`.""" from __future__ import annotations import pytest from textual.app import App from deepagents_code.notifications import ( ActionId, MissingDepPayload, NotificationAction, PendingNotification, ) from deepagents_code.tui.widgets.notification_detail import ( ...
134
4,338
deepagents
libs/code/tests/unit_tests/tui/widgets/test_welcome.py
.py
"""Unit tests for the welcome banner widget.""" from pathlib import Path from unittest.mock import MagicMock, patch import pytest from textual.app import App, ComposeResult from textual.content import Content from textual.style import Style as TStyle from deepagents_code import clipboard as clipboard_module from dee...
1,109
45,377
deepagents
libs/code/tests/unit_tests/tui/widgets/test_goal_review.py
.py
"""Unit tests for the goal review widget.""" from __future__ import annotations import asyncio from pathlib import Path from typing import TYPE_CHECKING from textual import events from textual.app import App, ComposeResult from textual.widgets import Markdown, Static import deepagents_code from deepagents_code.tui....
550
20,992
deepagents
libs/code/tests/unit_tests/tui/widgets/test_copy_spans.py
.py
"""Unit tests for the shared click-to-copy span metadata helpers.""" from __future__ import annotations from textual.style import Style as TStyle from deepagents_code.tui.widgets._copy_spans import copy_span_style, copy_span_target class TestCopySpanRoundTrip: """`copy_span_style` output is readable by `copy_s...
44
1,419
deepagents
libs/code/tests/unit_tests/tui/widgets/test_thread_selector.py
.py
"""Tests for ThreadSelectorScreen.""" import asyncio import sqlite3 from collections.abc import Coroutine from pathlib import Path from typing import Any, ClassVar, cast from unittest.mock import ANY, AsyncMock, MagicMock, patch import pytest from rich.cells import cell_len from rich.style import Style from textual.a...
5,571
218,515
deepagents
libs/code/tests/unit_tests/tui/widgets/test_agent_selector.py
.py
"""Tests for AgentSelectorScreen.""" from __future__ import annotations from typing import TYPE_CHECKING, cast from textual.app import App, ComposeResult from textual.containers import Container from textual.widgets import OptionList from deepagents_code.tui.widgets.agent_selector import AgentSelectorScreen if TYP...
487
18,640
deepagents
libs/code/tests/unit_tests/tui/widgets/test_auto_mode_notice.py
.py
"""Tests for the Auto first-enable notice body.""" from __future__ import annotations import pytest from deepagents_code.tui.widgets.auto_mode_notice import ( AUTO_MODE_NOTICE_BODY, AUTO_MODE_NOTICE_MODEL_ANCHOR, build_auto_mode_notice_body, ) def test_distinct_classifier_says_it_is_not_the_coding_mode...
101
3,552
deepagents
libs/code/tests/unit_tests/tui/widgets/test_inline_prompt.py
.py
"""Tests for shared inline-prompt primitives.""" from __future__ import annotations import asyncio import logging from pathlib import Path from typing import TYPE_CHECKING import pytest from textual.app import App from textual.events import Key, Paste from deepagents_code import input as input_module from deepagent...
885
33,702
deepagents
libs/code/tests/unit_tests/tui/widgets/test_messages.py
.py
"""Unit tests for message widgets markup safety.""" import asyncio import logging from time import time from types import SimpleNamespace from typing import ClassVar from unittest.mock import AsyncMock, MagicMock, patch import pytest from deepagents.backends.utils import ( MAX_LINE_LENGTH, format_content_with...
6,836
290,109
deepagents
libs/code/tests/unit_tests/tui/widgets/test_thread_agent_switch.py
.py
"""Tests for the cross-agent thread resume prompt.""" from __future__ import annotations from unittest.mock import MagicMock from textual.app import App, ComposeResult from textual.binding import Binding from textual.widgets import Static from deepagents_code.tui.widgets.thread_agent_switch import ( ThreadAgent...
151
5,303
deepagents
libs/code/tests/unit_tests/tui/widgets/test_update_confirm.py
.py
"""Tests for the `/update` dependency-refresh confirmation modal.""" from __future__ import annotations from textual.app import App, ComposeResult from textual.widgets import Static from deepagents_code.tui.widgets.update_confirm import ( RefreshDependenciesConfirmScreen, UpdateBeforeDependenciesConfirmScree...
107
4,038
deepagents
libs/code/tests/unit_tests/tui/widgets/test_chat_input.py
.py
"""Unit tests for ChatInput widget and completion popup.""" from __future__ import annotations import asyncio import html from typing import TYPE_CHECKING import pytest from textual import events from textual.app import App, ComposeResult from textual.containers import Container from textual.widgets import Static fr...
5,953
229,836
deepagents
libs/code/tests/unit_tests/tui/widgets/test_diff.py
.py
"""Unit tests for the unified-diff rendering widget.""" from __future__ import annotations import logging from typing import TYPE_CHECKING, cast import pytest from textual.geometry import Offset from textual.selection import Selection from textual.widgets import Static from deepagents_code.config import get_glyphs ...
767
32,152
deepagents
libs/code/tests/unit_tests/tui/widgets/test_restart_prompt.py
.py
"""Tests for the post-install restart confirmation modal.""" from __future__ import annotations from textual.app import App, ComposeResult from textual.widgets import Static from deepagents_code.tui.widgets.restart_prompt import RestartPromptScreen class _RestartTestApp(App[None]): def compose(self) -> Compose...
128
4,821
deepagents
libs/code/tests/unit_tests/tui/widgets/test_notification_settings.py
.py
"""Tests for NotificationSettingsScreen.""" from __future__ import annotations from unittest.mock import patch from textual.app import App from textual.widgets import Checkbox, Static from deepagents_code.approval_mode import YOLO_WARNING_KEY from deepagents_code.model_config import is_warning_suppressed, suppress_...
141
5,018
deepagents
libs/code/tests/unit_tests/tui/widgets/test_message_store.py
.py
"""Tests for message store and serialization.""" import logging import pytest from textual.app import App, ComposeResult from textual.content import Content from textual.widget import Widget from textual.widgets import Static from deepagents_code.diff_utils import DiffStats from deepagents_code.tui.widgets import di...
1,477
55,977
deepagents
libs/code/tests/unit_tests/tui/widgets/test_launch_init.py
.py
"""Tests for onboarding screens.""" from __future__ import annotations import re from typing import Any import pytest from textual.app import App, ComposeResult, ScreenStackError from textual.containers import Container, Vertical, VerticalScroll from textual.screen import ModalScreen from textual.widgets import Inpu...
682
24,672
deepagents
libs/code/tests/unit_tests/tui/widgets/test_approval.py
.py
"""Unit tests for approval widget expandable command display.""" import asyncio from collections.abc import Callable, Iterator from typing import Any from unittest.mock import AsyncMock, MagicMock import pytest from deepagents_code.config import get_glyphs from deepagents_code.tui.widgets.approval import ( _SHEL...
1,212
50,774
deepagents
libs/code/tests/unit_tests/tui/widgets/test_update_progress.py
.py
"""Tests for `UpdateProgressScreen`.""" from __future__ import annotations from typing import TYPE_CHECKING import pytest from textual.app import App from textual.widgets import Log, Static from deepagents_code.config import get_glyphs from deepagents_code.tui.widgets.update_progress import UpdateProgressScreen if...
276
9,270
deepagents
libs/code/tests/unit_tests/tui/widgets/test_notification_center.py
.py
"""Tests for `NotificationCenterScreen` and its drill-in flow.""" from __future__ import annotations import pytest from textual.app import App from deepagents_code.notifications import ( ActionId, MissingDepPayload, NotificationAction, PendingNotification, UpdateAvailablePayload, ) from deepagent...
368
15,007
deepagents
libs/code/tests/unit_tests/tui/widgets/test_update_available.py
.py
"""Tests for `UpdateAvailableScreen`.""" from __future__ import annotations from unittest.mock import patch import pytest from textual.app import App from deepagents_code.notifications import ( ActionId, NotificationAction, PendingNotification, UpdateAvailablePayload, ) from deepagents_code.tui.widg...
186
6,747
deepagents
libs/code/tests/unit_tests/tui/widgets/test_mcp_viewer.py
.py
"""Tests for the MCP viewer modal screen.""" import asyncio import pytest from textual.app import App, ComposeResult from textual.notifications import Notification from textual.widget import Widget from textual.widgets import Static from deepagents_code.mcp_tools import MCPServerInfo, MCPToolInfo from deepagents_cod...
2,208
85,604
deepagents
libs/code/tests/unit_tests/tui/widgets/test_auth_widgets.py
.py
"""Tests for the `/auth` prompt and manager screens.""" from __future__ import annotations import asyncio from datetime import UTC from types import SimpleNamespace from typing import TYPE_CHECKING, Any, cast import anyio import pytest from textual.app import App, ComposeResult from textual.containers import Contain...
3,037
136,085
deepagents
libs/code/tests/unit_tests/tui/widgets/test_ask_user.py
.py
"""Tests for ask_user tool integration in the CLI.""" from __future__ import annotations import asyncio from pathlib import Path from typing import TYPE_CHECKING from textual import events from textual.app import App, ComposeResult from textual.binding import Binding from textual.widgets import Markdown, Static imp...
1,433
55,230
deepagents
libs/code/tests/unit_tests/tui/widgets/test_mcp_reconnect.py
.py
"""Tests for the MCP reconnect confirmation modals.""" from __future__ import annotations from textual.app import App, ComposeResult from textual.containers import Vertical from textual.widgets import Static from deepagents_code.tui.widgets.mcp_reconnect import ( MCPDisableReconnectPromptScreen, MCPReconnect...
232
8,130
deepagents
libs/code/tests/unit_tests/tui/widgets/test_plugin_reload.py
.py
"""Tests for the plugin reload confirmation modal.""" from __future__ import annotations from textual.app import App, ComposeResult from textual.widgets import Static from deepagents_code.tui.widgets.plugin_reload import PluginReloadPromptScreen class _PluginReloadTestApp(App[None]): def compose(self) -> Compo...
62
1,990
deepagents
libs/code/tests/unit_tests/tui/widgets/test_tool_renderers.py
.py
from pathlib import Path import pytest from textual.content import Content from textual.widget import Widget from textual.widgets import Markdown from deepagents_code.tui.widgets.tool_renderers import ( DeleteFileRenderer, get_renderer, ) from deepagents_code.tui.widgets.tool_widgets import ( _MAX_LINES, ...
643
23,484
deepagents
libs/code/tests/unit_tests/tui/widgets/test_loading.py
.py
"""Unit tests for the LoadingWidget.""" from __future__ import annotations import asyncio import pytest from textual.app import App, ComposeResult from deepagents_code.tui.widgets.loading import LoadingWidget class LoadingWidgetApp(App[None]): """Minimal app that mounts a LoadingWidget for testing.""" de...
162
5,397
deepagents
libs/code/tests/unit_tests/tui/widgets/test_startup_tip.py
.py
"""Unit tests for the startup tip widget.""" from unittest.mock import patch import pytest from textual.content import Content from deepagents_code._env_vars import HIDE_SPLASH_TIPS from deepagents_code.tui.widgets.startup_tip import ( _TIP_EXTERNAL_EDITOR, _TIP_SHIFT_TAB_WITH_YOLO, _TIP_SHIFT_TAB_WITHOU...
153
5,866
deepagents
libs/code/tests/unit_tests/tui/modals/plugin_manager/test_structure.py
.py
"""Tests for the plugin manager modal structure.""" import asyncio import inspect import re from pathlib import Path from typing import get_args from unittest.mock import AsyncMock, MagicMock import pytest from textual.containers import Vertical from textual.widgets import Input, OptionList, Static from deepagents_c...
1,521
50,041
deepagents
libs/code/tests/unit_tests/skills/test_merge.py
.py
"""Unit tests for skill-name collision (override) debug logging.""" from __future__ import annotations import logging from typing import TYPE_CHECKING, Any, cast from deepagents.backends.filesystem import FilesystemBackend from deepagents_code.plugins.adapters.skills_middleware import PluginSkillsMiddleware from de...
421
16,211
deepagents
libs/code/tests/unit_tests/skills/test_skill_trust.py
.py
"""Tests for the skill directory trust store.""" from pathlib import Path from unittest.mock import MagicMock import pytest from deepagents_code.skills.trust import ( RevokeResult, clear_trusted_skill_dirs, is_skill_dir_trusted, list_trusted_skill_dir_entries, list_trusted_skill_dirs, load_tr...
529
21,824
deepagents
libs/code/tests/unit_tests/skills/test_skills_json.py
.py
"""Tests for skills commands JSON output.""" import json from io import StringIO from pathlib import Path from unittest.mock import patch from deepagents_code.skills.commands import _create, _delete, _info, _list class TestSkillsListJson: """Tests for _list JSON output.""" def test_json_output_with_skills(...
155
6,298
deepagents
libs/code/tests/unit_tests/skills/test_load.py
.py
"""Unit tests for skills loading functionality.""" from pathlib import Path from unittest.mock import patch from deepagents_code._version import __version__ as _cli_version from deepagents_code.config import Settings from deepagents_code.skills.load import list_skills def _create_skill(skill_dir: Path, name: str, d...
926
33,332
deepagents
libs/code/tests/unit_tests/skills/test_thread_inspector.py
.py
"""Tests for the built-in Deep Agents thread inspector script.""" import importlib.util import json import sqlite3 from pathlib import Path from types import ModuleType import pytest _SCRIPT = ( Path(__file__).resolve().parents[3] / "deepagents_code" / "built_in_skills" / "deepagents-thread-inspector...
677
21,872
deepagents
libs/code/tests/unit_tests/skills/test_commands.py
.py
"""Unit tests for skills CLI commands.""" import argparse import io import re from pathlib import Path from unittest.mock import MagicMock, patch import pytest from deepagents.middleware.skills import SkillMetadata, _parse_skill_metadata from rich.console import Console from deepagents_code.main import parse_args fr...
1,626
63,986
deepagents
libs/code/tests/unit_tests/plugins/test_plugin_hooks.py
.py
"""Hooks contributed by installed plugins.""" from __future__ import annotations import json import sys from typing import TYPE_CHECKING import pytest from deepagents_code.approval_mode import ApprovalMode from deepagents_code.hooks.manager import HookSessionIdentity, HooksManager from deepagents_code.hooks.models....
151
4,962
deepagents
libs/code/tests/unit_tests/plugins/test_store.py
.py
from __future__ import annotations from typing import TYPE_CHECKING import pytest from deepagents_code.plugins.models import MarketplaceRecord from deepagents_code.plugins.store import ( PluginStateError, add_installed_plugin, save_marketplace_record, set_plugin_enabled, ) if TYPE_CHECKING: from...
69
2,047
deepagents
libs/code/tests/unit_tests/plugins/test_marketplace.py
.py
from __future__ import annotations import io import json import os import subprocess import urllib.request from http.client import HTTPMessage from pathlib import Path import pytest from deepagents_code.plugins._json import json_object, json_value from deepagents_code.plugins.marketplace import ( MarketplaceErro...
352
11,836
deepagents
libs/code/tests/unit_tests/plugins/test_plugins_p0.py
.py
from __future__ import annotations import argparse import asyncio import io import json import re import shutil import threading from concurrent.futures import ThreadPoolExecutor from pathlib import Path from typing import Any, cast import pytest from deepagents.backends.filesystem import FilesystemBackend from deepa...
1,803
63,354
deepagents
libs/code/tests/integration_tests/test_acp_mode.py
.py
"""ACP client code adapted from the python-sdk examples. See: https://github.com/agentclientprotocol/python-sdk/blob/main/examples/client.py """ from __future__ import annotations import asyncio import asyncio.subprocess as aio_subprocess import contextlib import os from pathlib import Path from typing import TYPE_C...
118
4,304
deepagents
libs/code/tests/integration_tests/test_sandbox_operations.py
.py
"""Integration tests for `BaseSandbox` file operations. This module tests the core file operations implemented in `BaseSandbox`: - write(): Create new files and overwrite existing files - read(): Read file contents - edit(): String replacement in files - ls(): List directory contents - grep(): Search for patterns - gl...
1,178
48,944
deepagents
libs/code/tests/integration_tests/test_goal_criteria_remote.py
.py
"""Integration coverage for server-side goal criteria on the main graph.""" from __future__ import annotations from typing import TYPE_CHECKING import pytest from langchain_core.messages import ToolMessage from deepagents_code._testing_models import DCA_TEST_GOAL_CRITERIA_MARKER if TYPE_CHECKING: from pathlib ...
118
4,562
deepagents
libs/code/tests/integration_tests/test_sandbox_factory.py
.py
"""Test sandbox integrations with upload/download functionality. This module tests sandbox backends (RunLoop, Daytona, Modal, LangSmith) with support for optional sandbox reuse to reduce test execution time. Set `REUSE_SANDBOX=1` environment variable to reuse sandboxes across tests within a class. Otherwise, a fresh ...
349
14,295
deepagents
libs/code/tests/integration_tests/test_offload_server_side.py
.py
"""Integration coverage for the server-side `/offload` path. `/offload` drives the agent's own `compact_conversation` tool (with `force=True`) server-side, so the offloaded archive lands in the agent's composite backend and is readable via `read_file` in every run mode — not in a client-local directory the server can ...
260
9,863
deepagents
libs/code/tests/integration_tests/test_compact_resume.py
.py
"""Integration coverage for resumed-thread compaction.""" from __future__ import annotations from typing import TYPE_CHECKING import pytest if TYPE_CHECKING: from pathlib import Path def _write_model_config(home_dir: Path) -> None: """Write a temp config that points the server subprocess at the test model...
278
10,848
deepagents
libs/code/tests/integration_tests/test_auto_approve_remote.py
.py
"""Integration coverage for TUI auto-approve over the remote server path.""" from __future__ import annotations import asyncio from typing import TYPE_CHECKING, Any, Literal import pytest from deepagents_code._testing_models import ( DCA_TEST_DELEGATE_WRITE_MARKER, DCA_TEST_WRITE_FILE_MARKER, SUBAGENT_W...
203
7,062
deepagents
libs/code/tests/integration_tests/conftest.py
.py
"""Pytest configuration for benchmark tests.""" import os from collections.abc import Generator import pytest from langsmith import Client, get_tracing_context @pytest.fixture(scope="session", autouse=True) def langsmith_client() -> Generator[Client | None, None, None]: """Create a LangSmith client if `LANGSMIT...
40
1,119
deepagents
libs/code/tests/integration_tests/benchmarks/test_local_context_benchmarks.py
.py
"""Wall-time benchmarks for `LocalContextMiddleware`. Run locally: `make benchmark` Run with CodSpeed: `make bench` The shell benchmarks exercise the environment-detection work that delays the first interaction and each post-summarization refresh. The middleware-bookkeeping benchmark isolates `before_agent`'s per-i...
316
10,116
deepagents
libs/code/tests/integration_tests/benchmarks/test_codspeed_import_benchmarks.py
.py
"""CodSpeed-compatible import benchmarks for CLI startup performance. These tests use the pytest-benchmark fixture so CodSpeed can track import times across commits and flag regressions. Module caches are evicted between iterations to simulate a cold-start import. Run locally: ```bash make benchmark uv run --group t...
186
5,451
deepagents
libs/code/tests/integration_tests/benchmarks/test_startup_benchmarks.py
.py
"""Benchmarks for CLI startup and import performance. The CLI defers heavy dependencies (langchain, agent, sessions, etc.) so that fast-path commands like `--help` and `--version` stay snappy. These tests guard that invariant: if a top-level import is accidentally re-added, the relevant test will fail before the regre...
338
12,171
deepagents
libs/code/scripts/generate_commands_catalog.py
.py
"""Generate `COMMANDS.md` from the slash-command registry. Usage: python scripts/generate_commands_catalog.py # writes COMMANDS.md python scripts/generate_commands_catalog.py --check # exits 1 if stale """ from __future__ import annotations import argparse import difflib import sys from pathlib i...
136
4,011
deepagents
libs/code/scripts/check_imports.py
.py
"""Check imports script. Quickly verify that a list of Python files can be loaded by the Python interpreter without raising any errors. Ran before running more expensive tests. Useful in Makefiles. If loading a file fails, the script prints the problematic filename and the detailed error traceback. """ import os imp...
45
1,537
deepagents
libs/code/examples/skills/arxiv-search/arxiv_search.py
.py
#!/usr/bin/env python3 """arXiv Search. Searches the arXiv preprint repository for research papers. """ import argparse def query_arxiv(query: str, max_papers: int = 10) -> str: """Query arXiv for papers based on the provided search query. Parameters ---------- query : str The search query ...
62
1,653
deepagents
libs/code/examples/skills/skill-creator/scripts/quick_validate.py
.py
#!/usr/bin/env python3 """Quick validation script for skills - minimal version. For deepagents CLI, skills are located at: ~/.deepagents/<agent>/skills/<skill-name>/ Example: ```python python quick_validate.py ~/.deepagents/agent/skills/my-skill ``` """ import re import sys from pathlib import Path import yaml de...
153
4,840
deepagents
libs/code/examples/skills/skill-creator/scripts/init_skill.py
.py
#!/usr/bin/env python3 """Skill Initializer - Creates a new skill from template. Usage: init_skill.py <skill-name> --path <path> Examples: init_skill.py my-new-skill --path skills/public init_skill.py my-api-helper --path skills/private init_skill.py custom-skill --path /custom/location For deepagents CLI: init...
312
11,169
deepagents
libs/talon/deepagents_talon/data_lifecycle.py
.py
"""Sensitive local-state retention and cleanup helpers. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import logging from dataclasses import dataclass from datetime import UTC, datetime, timedelta from typing import TYPE_CHECKING if TYPE_CHE...
141
4,038
deepagents
libs/talon/deepagents_talon/media.py
.py
"""Media helpers shared by channel adapters and the Talon host. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import base64 import mimetypes import re from dataclasses import dataclass from pathlib import Path, PureWindowsPath from typing imp...
385
12,458
deepagents
libs/talon/deepagents_talon/mcp.py
.py
"""MCP configuration and tool loading for Talon. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import json import logging import os from dataclasses import dataclass from pathlib import Path from typing import TYPE_CHECKING from deepagents_c...
153
4,778
deepagents
libs/talon/deepagents_talon/runtime.py
.py
"""Deep Agents runtime used by the Talon host. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import asyncio import contextvars import json import logging import os import re from collections.abc import Awaitable, Callable, Mapping, Sequence f...
1,048
37,350
deepagents
libs/talon/deepagents_talon/_version.py
.py
"""Version marker managed by release-please.""" __version__ = "0.0.3" # x-release-please-version
4
99
deepagents
libs/talon/deepagents_talon/__main__.py
.py
"""Command line entry point for the Talon runtime host. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import argparse import asyncio import importlib import logging import os import sys from pathlib import Path from typing import TYPE_CHECKIN...
292
9,865
deepagents
libs/talon/deepagents_talon/__init__.py
.py
"""Local runtime host for long-running Deep Agents. Talon is an experimental runtime and is subject to change or removal at any time. """ from deepagents_talon._version import __version__ from deepagents_talon.config import TalonConfig from deepagents_talon.cron import ( CronJob, CronJobError, CronJobStor...
76
1,782
deepagents
libs/talon/deepagents_talon/fleet_import.py
.py
"""Fleet zip import support for Talon local agent directories.""" from __future__ import annotations import json import re import shutil import tempfile import zipfile from dataclasses import dataclass, field from pathlib import Path, PurePosixPath, PureWindowsPath from typing import TYPE_CHECKING, Any, Self, cast fr...
601
20,298
deepagents
libs/talon/deepagents_talon/host.py
.py
"""Runtime host that coordinates Talon components in one event loop. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import asyncio import contextlib import json import logging import signal from collections import defaultdict from collections....
875
30,018
deepagents
libs/talon/deepagents_talon/observability.py
.py
"""Observability helpers for Talon runtime processes. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import json import logging import re from collections.abc import Mapping, Sequence from contextlib import contextmanager from hashlib import s...
186
5,488
deepagents
libs/talon/deepagents_talon/speech.py
.py
"""Optional inbound voice transcription for Talon channels. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import asyncio import importlib import logging import subprocess import tempfile import threading from collections.abc import Mapping fr...
310
10,175
deepagents
libs/talon/deepagents_talon/interfaces.py
.py
"""Protocol interfaces for Talon host integrations. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations from collections.abc import Awaitable, Callable, Mapping, Sequence from dataclasses import dataclass, field from typing import TYPE_CHECKING, Li...
264
7,995
deepagents
libs/talon/deepagents_talon/config.py
.py
"""Configuration loading for the Talon runtime host. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import os import re from dataclasses import dataclass, field from pathlib import Path from typing import TYPE_CHECKING if TYPE_CHECKING: f...
160
5,071
deepagents
libs/talon/deepagents_talon/async_subagents.py
.py
"""Async subagent configuration loading for Talon. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import logging import tomllib from pathlib import Path from typing import TYPE_CHECKING, cast if TYPE_CHECKING: from deepagents.middleware.a...
95
2,901
deepagents
libs/talon/deepagents_talon/cron/scheduler.py
.py
"""Ticker that runs due cron jobs. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import asyncio import contextlib import logging from collections.abc import Awaitable, Callable from datetime import UTC, datetime from deepagents_talon.cron.jo...
171
5,521
deepagents
libs/talon/deepagents_talon/cron/__init__.py
.py
"""Cron scheduling support for Talon. Talon is an experimental runtime and is subject to change or removal at any time. """ from deepagents_talon.cron.jobs import ( CronJob, CronJobError, CronJobStore, CronOrigin, CronRepeat, CronSchedule, ) from deepagents_talon.cron.scheduler import Persiste...
27
560
deepagents
libs/talon/deepagents_talon/cron/jobs.py
.py
"""Persistent cron job records and storage. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import json import os import tempfile import uuid from dataclasses import dataclass, replace from datetime import UTC, datetime, timedelta from pathlib ...
738
22,763
deepagents
libs/talon/deepagents_talon/cron/tools.py
.py
"""Agent-facing cron job tool helpers. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations from collections.abc import Callable from typing import Any from langchain_core.tools import BaseTool, tool from deepagents_talon.cron.jobs import CronJob,...
262
8,068
deepagents
libs/talon/deepagents_talon/channels/whatsapp.py
.py
"""WhatsApp channel adapter backed by a loopback Node bridge. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import asyncio import json import logging import os import secrets import shlex import shutil import urllib.error import urllib.parse ...
773
29,616
deepagents
libs/talon/deepagents_talon/channels/__init__.py
.py
"""Channel integrations for Talon. Talon is an experimental runtime and is subject to change or removal at any time. """ from deepagents_talon.channels.base import ( ChannelExposure, ChannelMediaError, ExposureMode, chunk_text, format_markdown_for_channel, send_with_retry, validate_media, ...
31
779
deepagents
libs/talon/deepagents_talon/channels/telegram.py
.py
"""Telegram channel adapter backed by the Bot API over urllib. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import asyncio import json import logging import mimetypes import re import secrets import urllib.error import urllib.request from da...
1,285
44,244
deepagents
libs/talon/deepagents_talon/channels/base.py
.py
"""Reusable channel policy and formatting helpers. Talon is an experimental runtime and is subject to change or removal at any time. """ from __future__ import annotations import asyncio import fnmatch import logging import mimetypes import re from dataclasses import dataclass, field, replace from enum import StrEnu...
594
18,318
deepagents
libs/talon/tests/test_async_subagents.py
.py
from __future__ import annotations import logging from deepagents_talon.async_subagents import load_async_subagents def test_load_async_subagents_reads_deepagents_config(tmp_path) -> None: config_path = tmp_path / "config.toml" config_path.write_text( """ [async_subagents.researcher] description = "...
73
1,875
deepagents
libs/talon/tests/test_fleet_import.py
.py
from __future__ import annotations import json import stat import sys import zipfile from typing import TYPE_CHECKING, cast import pytest from deepagents_talon.__main__ import main from deepagents_talon.fleet_import import FleetImportError, format_import_stdout, import_fleet_zip from deepagents_talon.runtime import ...
388
14,600
deepagents
libs/talon/tests/test_config.py
.py
from pathlib import Path import pytest from deepagents_talon.config import TalonConfig, TalonConfigError def test_from_env_creates_assistant_home(tmp_path: Path) -> None: config = TalonConfig.from_env( { "AGENT_ASSISTANT_ID": "assistant-1", "AGENT_MODEL": "provider:model", ...
140
4,755
deepagents
libs/talon/tests/test_observability.py
.py
from __future__ import annotations import asyncio import json import logging from contextlib import contextmanager from typing import TYPE_CHECKING from deepagents_talon.config import TalonConfig from deepagents_talon.host import TalonHost from deepagents_talon.interfaces import AgentRequest, AgentResult, ChannelMess...
151
4,862
deepagents
libs/talon/tests/test_data_lifecycle.py
.py
from __future__ import annotations import os from datetime import UTC, datetime, timedelta from deepagents_talon.config import TalonConfig from deepagents_talon.cron import CronJobStore, CronOrigin, CronSchedule from deepagents_talon.data_lifecycle import cleanup_sensitive_state def test_cleanup_sensitive_state_pru...
48
1,799
deepagents
libs/talon/tests/test_runtime.py
.py
from __future__ import annotations import json import logging from types import SimpleNamespace from typing import TYPE_CHECKING, Any, Protocol, cast import pytest from deepagents.backends import LocalShellBackend from langchain.agents.middleware.types import AgentMiddleware from deepagents_talon.cron import CronJob...
1,101
34,143
deepagents
libs/talon/tests/test_speech.py
.py
from pathlib import Path from deepagents_talon.config import TalonConfig from deepagents_talon.interfaces import ChannelMessage from deepagents_talon.speech import ( DEFAULT_LOCAL_VOICE_TRANSCRIPTION_MODEL, LocalParakeetVoiceTranscriber, OpenAIVoiceTranscriber, build_voice_transcriber, transcribe_v...
138
4,407
deepagents
libs/talon/tests/test_mcp.py
.py
from __future__ import annotations from dataclasses import dataclass from typing import TYPE_CHECKING, TypeAlias from deepagents_code.mcp_tools import MCPServerInfo as CodeMCPServerInfo, MCPToolInfo from deepagents_code.project_utils import ProjectContext from deepagents_talon.config import TalonConfig from deepagent...
66
1,986
deepagents
libs/talon/tests/test_host.py
.py
from __future__ import annotations import asyncio import json from typing import TYPE_CHECKING, cast from deepagents_talon.config import TalonConfig from deepagents_talon.cron import CronJobStore, CronOrigin, CronSchedule from deepagents_talon.host import TalonHost from deepagents_talon.interfaces import ( AgentR...
852
28,536
deepagents
libs/talon/tests/test_media.py
.py
from __future__ import annotations from pathlib import Path from typing import cast import pytest from deepagents_talon.interfaces import ChannelMedia from deepagents_talon.media import ( MAX_TEXT_DOCUMENT_BYTES, MarkdownMediaRef, build_inbound_text, build_model_content, extract_markdown_media, ...
151
4,730
deepagents
libs/talon/tests/conftest.py
.py
from __future__ import annotations from typing import TYPE_CHECKING from deepagents_talon.interfaces import ( ChannelMedia, ChannelMessage, ChannelReaction, ChannelStatus, SendResult, ) if TYPE_CHECKING: from collections.abc import Awaitable, Callable class RecordingChannel: """Shared t...
96
3,295
deepagents
libs/talon/tests/cron/test_scheduler.py
.py
from __future__ import annotations import json import logging from datetime import UTC, datetime, timedelta from deepagents_talon.cron import CronJob, CronJobStore, CronOrigin, CronSchedule from deepagents_talon.cron.scheduler import PersistentCronScheduler def _store(tmp_path) -> CronJobStore: return CronJobSt...
174
5,165
deepagents
libs/talon/tests/cron/test_jobs.py
.py
from __future__ import annotations from datetime import UTC, datetime, timedelta import pytest from deepagents_talon.cron import CronJobError, CronJobStore, CronOrigin, CronSchedule, CronTools def _store(tmp_path, assistant_id: str = "assistant") -> CronJobStore: return CronJobStore(assistant_id=assistant_id, ...
118
4,033
deepagents
libs/talon/tests/integration_tests/test_core_flows.py
.py
from __future__ import annotations import asyncio from datetime import UTC, datetime, timedelta from typing import TYPE_CHECKING from deepagents_talon.config import TalonConfig from deepagents_talon.cron import CronJobStore, CronOrigin, CronSchedule from deepagents_talon.cron.scheduler import PersistentCronScheduler ...
174
6,158
deepagents
libs/talon/tests/integration_tests/test_telegram_host.py
.py
from __future__ import annotations import asyncio from typing import TYPE_CHECKING from deepagents_talon.__main__ import _channels from deepagents_talon.channels.telegram import TelegramChannel from deepagents_talon.channels.whatsapp import WhatsAppChannel from deepagents_talon.config import TalonConfig from deepagen...
121
4,102
deepagents
libs/talon/tests/channels/test_telegram.py
.py
from __future__ import annotations import asyncio import json import os from dataclasses import replace from pathlib import Path from typing import Literal, Self, cast import pytest import deepagents_talon.channels.telegram as telegram_module from deepagents_talon.channels.base import ( DEFAULT_MAX_MEDIA_BYTES, ...
1,398
45,137
deepagents
libs/talon/tests/channels/test_base.py
.py
from __future__ import annotations from pathlib import Path import pytest from deepagents_talon.channels.base import ( DEFAULT_MAX_MEDIA_BYTES, ChannelExposure, ChannelMediaError, ExposureMode, chunk_text, format_markdown_for_channel, max_media_bytes_from_env, message_with_media_paths...
233
7,636
deepagents
libs/talon/tests/channels/test_whatsapp.py
.py
from __future__ import annotations import asyncio import json import logging from pathlib import Path from typing import TYPE_CHECKING, Self, cast import pytest from deepagents_talon.channels.base import ( ChannelExposure, ChannelMediaError, ExposureMode, ) from deepagents_talon.channels.whatsapp import ...
624
19,491
deepagents
libs/deepagents/deepagents/_messages_reducer.py
.py
"""Local `DeltaChannel` reducer for the messages key. Adapted from langgraph's `_messages_delta_reducer` (PR #7729). The upstream version coerces `BaseMessageChunk` writes to full messages for parity with `add_messages`. Deepagents never writes chunks to the messages channel — `langchain.agents.create_agent` appends f...
91
3,677