Metadata-Version: 2.4
Name: codecraftai-interop
Version: 1.5.1
Summary: Code Craft AI - Interop Package
License-Expression: LicenseRef-CodeCraftAI-Source-Available
License-File: LICENSE.md
Keywords: python
Author: Myron Walker
Author-email: myron.walker@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: POSIX
Requires-Dist: click (>=8.2.1,<9.0.0)
Requires-Dist: codecraftai-credentials (>=1.0.0,<2.0.0)
Requires-Dist: codecraftai-foundations (>=1.0.0,<2.0.0)
Requires-Dist: codecraftai-integration-runtime (>=1.0.0,<2.0.0)
Requires-Dist: codecraftai-networking (>=1.0.0,<2.0.0)
Requires-Dist: codecraftai-restclient-base (>=1.0.0,<2.0.0)
Requires-Dist: codecraftai-runtime (>=1.0.0,<2.0.0)
Requires-Dist: codecraftai-testbase (>=1.0.0,<2.0.0)
Requires-Dist: codecraftai-this-app (>=1.0.0,<2.0.0)
Requires-Dist: codecraftai-xmodules (>=1.0.0,<2.0.0)
Requires-Dist: paramiko (>=4.0.0,<5.0.0)
Requires-Dist: psutil (>=7.2.1,<8.0.0)
Requires-Dist: requests (>=2.32.3,<3.0.0)
Requires-Dist: rpyc (>=6.0.1,<7.0.0)
Project-URL: Issues, https://github.com/code-craft-ai-company/codecraftai-interop/issues
Project-URL: Repository, https://github.com/code-craft-ai-company/codecraftai-interop
Description-Content-Type: text/x-rst

==========================
Code Craft AI Interop
==========================

The ``codecraftai-interop`` package is the central interoperability layer in the ccai suite. It provides the base agent classes, protocol implementations, and manufacturer integrations that higher-level automation code uses to talk to the outside world. The package defines ``ISystemContext`` and ``INetworkClient`` under ``interfaces/`` as the seams other packages build against, and exposes an ``am-interop`` CLI command tree for operator-style interaction. It builds on ``codecraftai-foundations``, ``codecraftai-networking``, and ``codecraftai-credentials``, and is in turn consumed by ``codecraftai-landscaping`` and the ``codecraftai-interop-ext-*`` extension packages.

Highlights
==========

- Agent bases under ``agents/``: ``SystemAgentBase``, ``SerialAgentBase``, ``PowerAgentBase``, and ``LocalCommandAgent``.
- Protocol implementations under ``protocols/`` covering DNS and mDNS, SSH, serial over TCP, and power control via DLI.
- Aspect-oriented ``Aspects`` object with ``ActionPattern`` and related enums for uniform retry, timeout, and connection behaviour.
- ``ISystemContext`` and ``INetworkClient`` interfaces under ``interfaces/`` for downstream consumers.
- ``InteropLibraryTestJob`` under ``testing/`` — interop-tier base class that adds the landscape-activation lifecycle hooks over the single-host ``codecraftai-testbase.TestJob``.  Concrete subclasses live in packages that depend on ``codecraftai-landscaping`` (for example ``codecraftai-testplus.DistributedTestJob``).
- ``am-interop`` CLI command tree for operator-style interaction.

Repository Structure
====================

- ``development/`` - Runtime environment scripts.
- ``repository-setup/`` - Repository homing and setup scripts.
- ``source/packages/`` - Package source code.
- ``source/testroots/ccai/`` - TestBase test roots.
- ``source/examples/`` - Example usage scripts.
- ``specs/`` - Requirements, design, and task documentation.
- ``userguide/`` - Standards, conventions, and documentation.

Environment Setup
=================

When working in a Codex container:

.. code-block:: bash

   ./development/setup-agent-container

For local development:

.. code-block:: bash

   ./repository-setup/rehome-repository
   ./development/setup-environment

Running Tests
=============

Activate the virtual environment:

.. code-block:: bash

   source .venv/bin/activate

Run the single-host test suite:

.. code-block:: bash

   testbase testing run --root source/testroots/ccai --includes=ccai.tests.interop.singlehost --output=./.output

Standards and Conventions
=========================

- Naming conventions: ``userguide/10-02-naming-conventions.rst``
- Code organization: ``userguide/10-01-code-organization.rst``
- Coding standards: ``userguide/10-00-coding-standards.rst``

Additional Resources
====================

- User guide entry point: ``userguide/userguide.rst``
- Specifications: ``specs/core-interop/``

