Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

name: CI

on:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

name: Release

# Publishes all three packages to PyPI when a tag matching `v*` is pushed.
Expand Down
18 changes: 18 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,3 +184,21 @@ See [tests/README.md](tests/README.md) for the full test matrix.
## License

By contributing, you agree that your contributions will be licensed under the [Apache License 2.0](LICENSE).

## File headers

All source files contributed to this repository must include the following
header at the top:

```
Copyright (c) <year>-2026, Arm Limited and Contributors. All rights reserved.
SPDX-License-Identifier: Apache-2.0
```

For languages that use `/* */` or `//` comments (C, C++, Go, JavaScript,
TypeScript, etc.), apply the equivalent block-comment form. For shebang
scripts, place the header immediately after the shebang line.

Preserve this header when editing existing files. If you are contributing
code originally authored by a third party, preserve their original
copyright notice verbatim and do not overwrite it.
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Device Connect Tools — framework-agnostic SDK for Device Connect IoT.

Hierarchical discovery keeps LLM context small:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Shared device normalization helpers.

Operates on flat device dicts (already run through ``connection.flatten_device``
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Framework adapters for device-connect-agent-tools.

Import tools from the adapter matching your agent framework:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Claude Agent SDK adapter — exposes Device Connect tools to claude-agent-sdk.

Hierarchical discovery keeps LLM context small::
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""LangChain adapter — wraps Device Connect tools as LangChain StructuredTools.

Hierarchical discovery keeps LLM context small:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Strands adapter — wraps Device Connect tools with @strands.tool.

Hierarchical discovery keeps LLM context small:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""StrandsDeviceConnectAgent — DeviceConnectAgent with a Strands backend.

Usage::
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""DeviceConnectAgent — high-level agent that connects, discovers, and reacts to events.

Usage::
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Messaging connection management for Device Connect tools.

Uses device_connect_edge.messaging for the underlying connection, credential
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""MCP Bridge for Device Connect.

This module provides:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Entry point for MCP Bridge Server.

Usage:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""MCP Bridge Server for Claude Desktop.

Connects Claude Desktop to Device Connect devices by exposing 4 meta-tools
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Configuration for MCP Bridge and DeviceConnectMCP devices.

Loads configuration from environment variables and credentials files.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""DeviceConnectMCP - FastMCP-compatible API for Device Connect devices.

Provides a simple, decorator-based interface for building Device Connect devices
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""MCP server for remote device operations.

This module provides an MCP server that exposes tools for interacting with
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Tool router for MCP Bridge.

Routes MCP tool calls to Device Connect devices via NATS JSON-RPC.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""MCP tool name parsing utilities."""

from __future__ import annotations
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Device Connect device operations — framework-agnostic tool functions.

Hierarchical discovery tools that keep LLM context small:
Expand Down
4 changes: 4 additions & 0 deletions packages/device-connect-agent-tools/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"
Expand Down
4 changes: 4 additions & 0 deletions packages/device-connect-agent-tools/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

4 changes: 4 additions & 0 deletions packages/device-connect-agent-tools/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Shared fixtures for device-connect-agent-tools tests.

Uses device_connect_edge.messaging.MessagingConfig for credential/TLS resolution.
Expand Down
4 changes: 4 additions & 0 deletions packages/device-connect-agent-tools/tests/fuzz/conftest.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Hypothesis configuration for agent-tools fuzz tests."""

import os
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Atheris fuzz target: JSON-RPC message parsing from connection layer.

Run:
Expand Down
4 changes: 4 additions & 0 deletions packages/device-connect-agent-tools/tests/fuzz/fuzz_schema.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Atheris fuzz target: MCP tool name parsing.

Run:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Property-based fuzz tests for JSON-RPC message parsing in connection layer.

Run:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Property-based fuzz tests for MCP tool name parsing.

Run:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Unit tests for device_connect_agent_tools.adapters.claude module.

Validates that the Claude Agent SDK adapter wraps Device Connect tool functions
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Unit tests for device_connect_agent_tools.connection module.

Tests connection management, config resolution, and RPC helpers
Expand Down
4 changes: 4 additions & 0 deletions packages/device-connect-agent-tools/tests/test_integration.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Integration tests for device-connect-agent-tools.

No dependency on device-connect-server — tests the standalone package.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Unit tests for device_connect_agent_tools.adapters.langchain module.

Validates that the LangChain adapter correctly wraps Device Connect tool functions
Expand Down
4 changes: 4 additions & 0 deletions packages/device-connect-agent-tools/tests/test_normalize.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Unit tests for device_connect_agent_tools._normalize."""
from device_connect_agent_tools._normalize import (
_normalize_events,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Unit tests for device_connect_agent_tools.adapters.strands module.

Validates that the Strands adapter correctly wraps Device Connect tool functions
Expand Down
4 changes: 4 additions & 0 deletions packages/device-connect-agent-tools/tests/test_tools_unit.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Unit tests for device_connect_agent_tools.tools module.

Tests discover_devices, invoke_device, invoke_device_with_fallback,
Expand Down
4 changes: 4 additions & 0 deletions packages/device-connect-edge/device_connect_edge/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Device Connect Edge — lightweight runtime for edge devices.

Build IoT devices with Python. Connect them over Zenoh or NATS. Communicate
Expand Down
4 changes: 4 additions & 0 deletions packages/device-connect-edge/device_connect_edge/device.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Helper for creating Device Connect devices.

Provides resilient messaging connectivity, automatic device registration with retries,
Expand Down
4 changes: 4 additions & 0 deletions packages/device-connect-edge/device_connect_edge/discovery.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Device-to-device discovery via presence announcements.

When no infrastructure (registry, etcd, router) is available, devices can
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Discovery provider protocol for unified device discovery.

Defines the ``DiscoveryProvider`` protocol that both D2D (local presence)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Device driver framework for Device Connect.

This module provides the foundation for implementing device-specific logic.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Device driver abstract base class with D2D communication.

This module defines the DeviceDriver ABC, which provides the foundation
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""In-process capability loading for Device Connect devices.

This module provides infrastructure for loading capabilities from disk
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Decorators for defining device functions and events.

This module provides decorators that mark methods as device functions or
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Lightweight transport wrapper for hardware-native topic access.

Exposes raw publish/subscribe on arbitrary topics using the device's
Expand Down
4 changes: 4 additions & 0 deletions packages/device-connect-edge/device_connect_edge/errors.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""Exception hierarchy for Device Connect.

This module defines the exception classes used throughout the Device Connect
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""
Messaging abstraction layer for Device Connect.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# Copyright (c) 2024-2026, Arm Limited and Contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0

"""
Abstract base class for messaging clients.

Expand Down
Loading
Loading