cai: init at 1.1.5-unstable-2026-06-05 (#532277)

This commit is contained in:
Fabian Affolter
2026-06-27 07:55:54 +00:00
committed by GitHub
8 changed files with 430 additions and 5 deletions
+131
View File
@@ -0,0 +1,131 @@
{
lib,
python3Packages,
fetchFromGitHub,
nix-update-script,
writableTmpDirAsHomeHook,
}:
python3Packages.buildPythonApplication (finalAttrs: {
pname = "cai";
version = "1.1.5-unstable-2026-06-05";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "aliasrobotics";
repo = "cai";
rev = "1c79507140845d0c57455e3b623e489680fd80e8";
hash = "sha256-LcU9GoUulpeAaaBZr2Mg/C+UmjZ74UL+SGqdB0P9JtA=";
};
pythonRemoveDeps = [
"cryptography"
"dotenv"
"openinference-instrumentation-openai"
"pypdf2"
];
pythonRelaxDeps = [ "openai" ];
build-system = with python3Packages; [ hatchling ];
dependencies = with python3Packages; [
cryptography
curl-cffi
dnspython
docker
fastapi
flask
folium
graphviz
griffe
litellm
mako
matplotlib
mcp
mkdocs
mkdocs-material
nest-asyncio
networkx
numpy
numpy
openai
openinference-instrumentation-openai
pandas
paramiko
prompt-toolkit
pydantic
pypdf
python-dotenv
questionary
requests
rich
textual
trafilatura
types-requests
typing-extensions
wasabi
websockets
];
nativeInstallCheckInputs = with python3Packages; [
inline-snapshot
litellm
pytest-asyncio
pytestCheckHook
writableTmpDirAsHomeHook
];
pythonImportsCheck = [ "cai" ];
disabledTestPaths = [
# Exclude examples
"examples/"
# API key is required
"tests/agents/test_agent_inference.py"
"tests/agents/test_agent_one_tool.py"
"tests/agents/test_blue_teamer_gctr.py"
"tests/api/test_api.py"
"tests/cli/test_cli_headless_cancellation.py"
"tests/commands/"
"tests/integration/"
"tests/refusals/"
"tests/test_unified_pattern.py"
"tools/tpm_test.py"
# openai 2.x API changes
"tests/cli/test_cli_streaming.py"
"tests/core/test_openai_chatcompletions.py"
"tests/core/test_openai_chatcompletions_stream.py"
"tests/mcp/test_runner_calls_mcp.py"
"tests/tracing/test_agent_tracing.py"
"tests/tracing/test_responses_tracing.py"
"tests/tracing/test_tracing.py"
"tests/tracing/test_tracing_errors.py"
"tests/tracing/test_tracing_errors_streamed.py"
"tests/voice/test_workflow.py"
# Missing symbols (version mismatch)
"tests/core/test_auto_compact.py"
"tests/core/test_context_optimization.py"
# Probing the live interpreter outside sandbox
"tests/continuous_ops/test_wizard_worker_python_bin.py"
# Tests requires live CTF infrastructure
"tests/ctfs/test_ctf.py"
# Other error
"tests/test_cli_print_deduplication.py"
"tests/tools/test_output_tool.py"
"tests/util/test_wait_hints_compact.py"
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Framework for AI Security";
homepage = "https://github.com/aliasrobotics/cai";
changelog = "https://github.com/aliasrobotics/cai/releases/tag/${finalAttrs.src.rev}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "cai";
};
})
@@ -0,0 +1,74 @@
{
lib,
buildPythonPackage,
claude-agent-sdk,
fetchFromGitHub,
hatchling,
nix-update-script,
openinference-instrumentation,
openinference-semantic-conventions,
opentelemetry-api,
opentelemetry-instrumentation,
opentelemetry-semantic-conventions,
pytest-asyncio,
pytest-timeout,
pytestCheckHook,
pyyaml,
sniffio,
typing-extensions,
wrapt,
}:
buildPythonPackage (finalAttrs: {
pname = "openinference-instrumentation-claude-agent-sdk";
version = "0.1.6";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "Arize-ai";
repo = "openinference";
tag = "python-openinference-instrumentation-claude-agent-sdk-v${finalAttrs.version}";
hash = "sha256-wmwqmN/rN521TaXVZfkaRzHPVhANSgKaBVc4rhXgIII=";
};
sourceRoot = "${finalAttrs.src.name}/python/instrumentation/${finalAttrs.pname}";
build-system = [ hatchling ];
dependencies = [
opentelemetry-api
opentelemetry-instrumentation
opentelemetry-semantic-conventions
openinference-semantic-conventions
openinference-instrumentation
typing-extensions
wrapt
];
optional-dependencies = {
instruments = [ claude-agent-sdk ];
};
nativeCheckInputs = [
pytest-asyncio
pytest-timeout
pytestCheckHook
pyyaml
sniffio
]
++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies);
pythonImportsCheck = [ "openinference.instrumentation.claude_agent_sdk" ];
passthru.updateScript = nix-update-script { };
meta = {
description = "OpenInference Claude Agent SDK Instrumentation";
homepage = "https://github.com/Arize-ai/openinference";
changelog = "https://github.com/Arize-ai/openinference/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
};
})
@@ -0,0 +1,84 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
httpx,
nix-update-script,
openai,
openinference-instrumentation,
openinference-semantic-conventions,
opentelemetry-api,
opentelemetry-instrumentation-httpx,
opentelemetry-instrumentation,
opentelemetry-semantic-conventions,
pytest-asyncio,
pytest-vcr,
pytestCheckHook,
respx,
typing-extensions,
wrapt,
}:
buildPythonPackage (finalAttrs: {
pname = "openinference-instrumentation-openai";
version = "0.1.52";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "Arize-ai";
repo = "openinference";
tag = "python-openinference-instrumentation-openai-v${finalAttrs.version}";
hash = "sha256-wmwqmN/rN521TaXVZfkaRzHPVhANSgKaBVc4rhXgIII=";
};
sourceRoot = "${finalAttrs.src.name}/python/instrumentation/${finalAttrs.pname}";
build-system = [ hatchling ];
dependencies = [
opentelemetry-api
opentelemetry-instrumentation
opentelemetry-semantic-conventions
openinference-semantic-conventions
openinference-instrumentation
typing-extensions
wrapt
];
optional-dependencies = {
instruments = [ openai ];
};
nativeCheckInputs = [
httpx
opentelemetry-instrumentation-httpx
pytest-asyncio
pytest-vcr
pytestCheckHook
respx
]
++ lib.flatten (builtins.attrValues finalAttrs.passthru.optional-dependencies);
pythonImportsCheck = [ "openinference.instrumentation.openai" ];
disabledTests = [
# Tests want to connect to OpenAI's API
"test_cached_tokens"
"test_input_value"
"test_openai"
"test_tool_calls"
];
passthru.updateScript = nix-update-script { };
meta = {
description = "OpenInference OpenAI SDK Instrumentation";
homepage = "https://github.com/Arize-ai/openinference";
changelog = "https://github.com/Arize-ai/openinference/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
};
})
@@ -0,0 +1,69 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
jsonschema,
nix-update-script,
openai,
openinference-semantic-conventions,
opentelemetry-api,
opentelemetry-sdk,
pytest-asyncio,
pytest-vcr,
pytestCheckHook,
typing-extensions,
wrapt,
}:
buildPythonPackage (finalAttrs: {
pname = "openinference-instrumentation";
version = "0.1.53";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "Arize-ai";
repo = "openinference";
tag = "python-openinference-instrumentation-v${finalAttrs.version}";
hash = "sha256-1FzAiO3Vxt2o9YCzwPfHOn4hwvOLDt9Luv3zQTJ6J2Q=";
};
sourceRoot = "${finalAttrs.src.name}/python/${finalAttrs.pname}";
build-system = [ hatchling ];
dependencies = [
opentelemetry-api
opentelemetry-sdk
openinference-semantic-conventions
typing-extensions
wrapt
];
nativeCheckInputs = [
jsonschema
openai
pytest-asyncio
pytest-vcr
pytestCheckHook
];
pythonImportsCheck = [ "openinference.instrumentation" ];
disabledTests = [
# Tests want to connect to OpenAI's API
"TestTracerLLMDecorator"
];
passthru.updateScript = nix-update-script { };
meta = {
description = "OpenTelemetry Instrumentation for AI Observability";
homepage = "https://github.com/Arize-ai/openinference";
changelog = "https://github.com/Arize-ai/openinference/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
};
})
@@ -0,0 +1,45 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
hatchling,
nix-update-script,
pytest-asyncio,
pytestCheckHook,
}:
buildPythonPackage (finalAttrs: {
pname = "openinference-semantic-conventions";
version = "0.1.30";
pyproject = true;
__structuredAttrs = true;
src = fetchFromGitHub {
owner = "Arize-ai";
repo = "openinference";
tag = "python-openinference-semantic-conventions-v${finalAttrs.version}";
hash = "sha256-MkgajZknHOw4/qra6uZ99rtpiylpHhOj8tDfLGUSU74=";
};
sourceRoot = "${finalAttrs.src.name}/python/${finalAttrs.pname}";
build-system = [ hatchling ];
nativeCheckInputs = [
pytest-asyncio
pytestCheckHook
];
pythonImportsCheck = [ "openinference.semconv" ];
passthru.updateScript = nix-update-script { };
meta = {
description = "OpenTelemetry Semantic Conventions for AI Observability";
homepage = "https://github.com/Arize-ai/openinference";
changelog = "https://github.com/Arize-ai/openinference/releases/tag/${finalAttrs.src.tag}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fab ];
};
})
@@ -1,4 +1,5 @@
{
lib,
buildPythonPackage,
hatchling,
httpx,
@@ -6,7 +7,9 @@
opentelemetry-instrumentation,
opentelemetry-util-http,
opentelemetry-test-utils,
opentelemetry-semantic-conventions,
pytestCheckHook,
pythonOlder,
respx,
}:
@@ -23,6 +26,7 @@ buildPythonPackage {
httpx
opentelemetry-api
opentelemetry-instrumentation
opentelemetry-semantic-conventions
opentelemetry-util-http
];
@@ -32,6 +36,8 @@ buildPythonPackage {
respx
];
doCheck = pythonOlder "3.14";
pythonImportsCheck = [ "opentelemetry.instrumentation.httpx" ];
meta = opentelemetry-instrumentation.meta // {
@@ -10,7 +10,7 @@
wrapt,
}:
buildPythonPackage rec {
buildPythonPackage (finalAttrs: {
pname = "opentelemetry-instrumentation";
version = "0.55b0";
pyproject = true;
@@ -19,11 +19,11 @@ buildPythonPackage rec {
src = fetchFromGitHub {
owner = "open-telemetry";
repo = "opentelemetry-python-contrib";
tag = "v${version}";
tag = "v${finalAttrs.version}";
hash = "sha256-UM9ezCh3TVwyj257O0rvTCIgfrddobWcVIgJmBUj/Vo=";
};
sourceRoot = "${src.name}/opentelemetry-instrumentation";
sourceRoot = "${finalAttrs.src.name}/opentelemetry-instrumentation";
build-system = [ hatchling ];
@@ -53,8 +53,8 @@ buildPythonPackage rec {
meta = {
description = "Instrumentation Tools & Auto Instrumentation for OpenTelemetry Python";
homepage = "https://github.com/open-telemetry/opentelemetry-python-contrib/tree/main/opentelemetry-instrumentation";
changelog = "https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v${version}";
changelog = "https://github.com/open-telemetry/opentelemetry-python-contrib/releases/tag/v${finalAttrs.src.tag}";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.natsukium ];
};
}
})
+16
View File
@@ -11956,6 +11956,22 @@ self: super: with self; {
}
);
openinference-instrumentation =
callPackage ../development/python-modules/openinference-instrumentation
{ };
openinference-instrumentation-claude-agent-sdk =
callPackage ../development/python-modules/openinference-instrumentation-claude-agent-sdk
{ };
openinference-instrumentation-openai =
callPackage ../development/python-modules/openinference-instrumentation-openai
{ };
openinference-semantic-conventions =
callPackage ../development/python-modules/openinference-semantic-conventions
{ };
openmm = toPythonModule (
pkgs.openmm.override {
python3Packages = self;