Metadata-Version: 2.4
Name: codecraftai-credentials
Version: 1.2.0
Summary: Code Craft AI - Credentials 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: codecraftai-foundations (<2.0.0)
Project-URL: Issues, https://github.com/code-craft-ai-company/codecraftai-credentials/issues
Project-URL: Repository, https://github.com/code-craft-ai-company/codecraftai-credentials
Description-Content-Type: text/x-rst

============================
Code Craft AI Credentials
============================

The ``codecraftai-credentials`` package is the credentials vocabulary for the ccai suite. It defines a small hierarchy of credential classes rooted at ``BaseCredential`` and adds concrete types for the authentication styles the rest of the suite has to talk to. A ``CredentialManager`` loads credentials from configuration and exposes them by name so that protocol and REST clients (for example ``codecraftai-protocol-ssh``, ``codecraftai-restclient-github-public``, and ``codecraftai-gitlab``) can request the credential they need without hard-coding authentication details.

Highlights
==========

- ``BaseCredential`` root and ``CredentialManager`` for declarative credential lookup by name.
- SSH-oriented credential types: ``BasicCredential``, ``PublicKeyCredential``, and ``SshCredential``.
- Token-oriented types: ``ApiTokenCredential``, ``SecretTokenCredential``, ``PersonalApiTokenCredential``.
- Vendor-specific credentials: ``GithubTokenCredential``, ``GithubAppCredential``, ``AwsAccessKeyCredential``, and ``AzureClientSecretCredential``.
- ``WifiChoiceCredential`` for network-selection scenarios.
- Structurally satisfies the ``IBasicCredential`` ``typing.Protocol`` from ``codecraftai-foundations`` (the protocol is structural, so no explicit inheritance or runtime dependency is required).

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

- ``development/`` - Runtime environment scripts.
- ``repository-setup/`` - Repository homing and setup scripts.
- ``source/packages/`` - Package source code.
- ``source/tests/`` - ``unittest``-based tests.
- ``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 ``unittest`` tests:

.. code-block:: bash

   python -m unittest discover -s source/tests -p "test_*.py"

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``
- Design documentation: ``specs/design.md``
- Requirements: ``specs/requirements.md``

