cayu 0.2.0.dev0__tar.gz → 0.2.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {cayu-0.2.0.dev0 → cayu-0.2.1}/PKG-INFO +70 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/README.md +68 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/examples/aws/lambda_microvm_sidecar/cayu-lambda-microvm-sidecar-manifest.json +1 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/pyproject.toml +1 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/__init__.py +86 -0
- cayu-0.2.1/src/cayu/_clock.py +24 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/_server_contract_version.py +1 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/_validation.py +70 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/_version.py +1 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/artifacts/aws_s3.py +27 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/__init__.py +8 -2
- cayu-0.2.1/src/cayu/cli/_cloud_api.py +234 -0
- cayu-0.2.1/src/cayu/cli/_cloud_auth.py +475 -0
- cayu-0.2.1/src/cayu/cli/_cloud_evidence.py +169 -0
- cayu-0.2.1/src/cayu/cli/_cloud_private_state.py +39 -0
- cayu-0.2.1/src/cayu/cli/_cloud_project.py +807 -0
- cayu-0.2.1/src/cayu/cli/cloud.py +1323 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/scaffold.py +762 -29
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/session.py +13 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/core/agents.py +23 -4
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/core/events.py +25 -6
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/core/messages.py +4 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/core/thinking.py +5 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/core/tools.py +65 -6
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/core/workflows.py +10 -2
- cayu-0.2.0.dev0/src/cayu/data/dashboard_source/cayu-dashboard-source-0.2.0.dev0.zip → cayu-0.2.1/src/cayu/data/dashboard_source/cayu-dashboard-source-0.2.1.zip +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/data/default_model_catalog.json +15 -15
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/data/default_price_book.json +2 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/broker.py +10 -7
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/destinations.py +14 -7
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/grants.py +2 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/policy.py +6 -3
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/proxy_server.py +2 -8
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/embeddings.py +40 -17
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/environments/__init__.py +2 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/environments/base.py +17 -12
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/environments/bindings.py +736 -73
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/environments/factory.py +11 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/models.py +69 -15
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/reporting.py +31 -10
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/runner.py +34 -6
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/testing.py +27 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/guides/references.md +5 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/mcp/__init__.py +18 -0
- cayu-0.2.1/src/cayu/mcp/_exception_handoffs.py +121 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/mcp/_jsonrpc.py +124 -85
- cayu-0.2.1/src/cayu/mcp/_transport.py +687 -0
- cayu-0.2.1/src/cayu/mcp/base.py +630 -0
- cayu-0.2.1/src/cayu/mcp/http.py +3119 -0
- cayu-0.2.1/src/cayu/mcp/stdio.py +1810 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/mcp/tools.py +182 -32
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/observability/logging.py +2 -0
- cayu-0.2.1/src/cayu/providers/_reasoning_state.py +76 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/anthropic.py +121 -20
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/base.py +158 -7
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/bedrock.py +58 -3
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/chat_completions.py +266 -97
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/openai.py +28 -4
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/openai_subscription.py +23 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/vertex.py +49 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runners/_secrets.py +71 -9
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runners/_subprocess.py +118 -24
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runners/aws_lambda_microvm.py +126 -37
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runners/base.py +412 -14
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runners/docker.py +150 -23
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runners/e2b.py +98 -15
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runners/local.py +189 -25
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runners/microsandbox.py +158 -24
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/__init__.py +66 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_approval_support.py +21 -4
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_checkpoint_redaction.py +30 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_checkpoint_store.py +19 -0
- cayu-0.2.1/src/cayu/runtime/_child_session_identity.py +86 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_environment_lifecycle.py +243 -59
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_environment_operation_boundary.py +22 -8
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_event_projection.py +171 -5
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_model_errors.py +9 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_model_step_executor.py +129 -52
- cayu-0.2.1/src/cayu/runtime/_model_target.py +82 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_recovery_coordinator.py +242 -54
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_run_limits.py +53 -3
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_runtime_records.py +3 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_session_engine.py +2116 -144
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_session_request_boundary.py +50 -5
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_terminal_evidence.py +1 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_tool_argument_publication.py +14 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_tool_execution.py +5 -5
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_tool_results.py +2 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_tool_round_executor.py +96 -23
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_tool_round_recovery.py +10 -3
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_transcript.py +2 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/aggregates.py +134 -3
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/app.py +66 -20
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/approvals.py +92 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/budgets.py +59 -15
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/business_approvals.py +12 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/context.py +1178 -200
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/costs.py +17 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/dispatch.py +29 -5
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/egress.py +218 -32
- cayu-0.2.1/src/cayu/runtime/execution_profiles.py +742 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/hooks.py +6 -3
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/interactions.py +4 -1
- cayu-0.2.1/src/cayu/runtime/invocation.py +162 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/loop_policies.py +13 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/outcomes.py +20 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/pending_actions.py +5 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/retry_policy.py +9 -3
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/sessions.py +1753 -108
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/structured_output.py +12 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/tasks.py +54 -3
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/tool_result_projection.py +2 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/usage.py +73 -67
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/__init__.py +15 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/contracts.py +32 -0
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/agents-okcnsbZi.js → cayu-0.2.1/src/cayu/server/dashboard/assets/agents-CmrAWlYa.js +1 -1
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/artifacts-CG1gdhiO.js → cayu-0.2.1/src/cayu/server/dashboard/assets/artifacts-B5z06kWT.js +1 -1
- cayu-0.2.1/src/cayu/server/dashboard/assets/dashboard-Cr9vXkM4.js +1 -0
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/environments-CKtG87Sb.js → cayu-0.2.1/src/cayu/server/dashboard/assets/environments-w938CJyl.js +1 -1
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/evals-BXawxSsp.js → cayu-0.2.1/src/cayu/server/dashboard/assets/evals-Dhr7906f.js +1 -1
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/index-CUleEI78.js → cayu-0.2.1/src/cayu/server/dashboard/assets/index-CzZRk13o.js +2 -2
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/knowledge-Byz3tKQz.js → cayu-0.2.1/src/cayu/server/dashboard/assets/knowledge-_p27UOM1.js +1 -1
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/mutation-browser-Dj_a--Z_.js → cayu-0.2.1/src/cayu/server/dashboard/assets/mutation-browser-6kKEqQrT.js +1 -1
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/pending-actions-DNDumo18.js → cayu-0.2.1/src/cayu/server/dashboard/assets/pending-actions-Bd9iKHdU.js +1 -1
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/run-Cx8DL9CC.js → cayu-0.2.1/src/cayu/server/dashboard/assets/run-yaf6jzG9.js +2 -2
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/session-detail-BXqpMU7F.js → cayu-0.2.1/src/cayu/server/dashboard/assets/session-detail-DJACieiJ.js +2 -2
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/sessions-DLA45z1p.js → cayu-0.2.1/src/cayu/server/dashboard/assets/sessions-Ce5mwGM7.js +1 -1
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/system-6MhsFuzI.js → cayu-0.2.1/src/cayu/server/dashboard/assets/system-B_1L8Od7.js +1 -1
- cayu-0.2.1/src/cayu/server/dashboard/assets/tasks-BgCpXtSQ.js +1 -0
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/usage-DcNd8TYB.js → cayu-0.2.1/src/cayu/server/dashboard/assets/usage-DonqpzUJ.js +1 -1
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/workflow-DgrMgm4q.js → cayu-0.2.1/src/cayu/server/dashboard/assets/workflow-mJttI7j7.js +1 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/dashboard/index.html +1 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/routes.py +128 -5
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/service.py +1241 -103
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/__init__.py +6 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/_postgres_support.py +23 -16
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/_sqlite_support.py +69 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/budget_ledger.py +2 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/knowledge_sqlite.py +228 -14
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/memory.py +247 -18
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/migrations.py +13 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/postgres.py +1011 -231
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/sqlite.py +535 -115
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/testing.py +17 -7
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/_errors.py +6 -0
- cayu-0.2.1/src/cayu/tools/_operation_boundary.py +248 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/_resources.py +12 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/_runner.py +220 -13
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/commands.py +190 -20
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/files.py +411 -90
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/git.py +10 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/knowledge.py +926 -173
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/search.py +10 -1
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/subagents.py +277 -30
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/vaults/aws_secrets_manager.py +30 -11
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/vaults/base.py +11 -10
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/vaults/composite.py +9 -7
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/vaults/local_env.py +21 -10
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/vaults/redaction.py +5 -2
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/vaults/static.py +17 -9
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/webhooks/__init__.py +26 -6
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workflows/__init__.py +8 -0
- cayu-0.2.1/src/cayu/workflows/_step_identity.py +101 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workflows/journal.py +205 -21
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workflows/workflow.py +352 -57
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workspaces/runner.py +63 -11
- cayu-0.2.0.dev0/src/cayu/cli/cloud.py +0 -18
- cayu-0.2.0.dev0/src/cayu/mcp/base.py +0 -275
- cayu-0.2.0.dev0/src/cayu/mcp/http.py +0 -696
- cayu-0.2.0.dev0/src/cayu/mcp/stdio.py +0 -820
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/dashboard-bC3sbGfN.js +0 -1
- cayu-0.2.0.dev0/src/cayu/server/dashboard/assets/tasks-DmcdeMhx.js +0 -1
- cayu-0.2.0.dev0/src/cayu/tools/_operation_boundary.py +0 -131
- cayu-0.2.0.dev0/src/cayu/workflows/_step_identity.py +0 -37
- {cayu-0.2.0.dev0 → cayu-0.2.1}/.gitignore +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/LICENSE +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/NOTICE +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/examples/aws/lambda_microvm_sidecar/Dockerfile +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/examples/aws/lambda_microvm_sidecar/README.md +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/examples/aws/lambda_microvm_sidecar/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/examples/aws/lambda_microvm_sidecar/app.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/examples/aws/lambda_microvm_sidecar/entrypoint.sh +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/examples/aws/lambda_microvm_sidecar/requirements.txt +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/examples/aws/lambda_microvm_sidecar/supervisor.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/__main__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/_exception_groups.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/_exception_state.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/_filesystem_lock.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/_task_wait.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/artifacts/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/artifacts/_images.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/artifacts/attachments.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/artifacts/base.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/artifacts/local.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/artifacts/workspace.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/capabilities.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/__main__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/_output.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/_targets.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/auth.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/check.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/console.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/dashboard.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/evals.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/generate.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/guide.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/inspect.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/lambda_microvm.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/project.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/serve.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/storage.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/store_targets.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/cli/worker.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/core/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/core/billing.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/credentials.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/data/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/_remote_adapter.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/_resolution.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/adapter.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/aws_lambda_microvm_adapter.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/capabilities.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/credential_kinds.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/docker_adapter.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/e2b_adapter.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/errors.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/microsandbox_adapter.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/egress/proxy_exposure.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/entrypoint.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/environments/admission.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/environments/aws_filesystems.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/assertions.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/corpus.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/evidence.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/execution.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/execution_comparison.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/execution_reporting.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/internal/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/internal/runtime_acceptance.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/judges.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/portable_assertions.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/portable_evaluation.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/promotion.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/published.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/result_contract.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/store.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/evals/trajectory.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/guides/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/guides/application-anatomy.md +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/guides/authoring.md +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/guides/command_selectors.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/guides/diagnostics.md +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/guides/providers.md +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/guides/structured-output.md +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/guides/tool-effects.md +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/observability/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/observability/otel.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/_api_keys.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/_credential_boundary.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/_http.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/_sse.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/cache.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/providers/operations.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/proxies/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/proxies/base.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/proxies/passthrough.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runners/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runners/_cleanup.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runners/_diagnostics.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runners/_docker_cli.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runners/_redacted_output.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_approval_publication.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_assistant_tool_round_publication.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_binding_cleanup.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_completion_projection.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_diagnostics.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_environment_allocation.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_event_writer.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_interruption_coordinator.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_invocation_secrets.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_message_redaction.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_model_completion_publication.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_policy_evidence.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_resume_ledger.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_session_control.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_session_queries.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_structured_output_tool_round.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_tool_identity.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_tool_round_publication.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/_workflow_structured_output_handoff.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/checkpoints.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/checks.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/context_counting.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/errors.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/event_sinks.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/event_watchers.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/execution_units.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/manifest.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/mcp_manifest_policy.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/model_steps.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/provider_operations.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/public_authority.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/request_footprints.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/service_manifest.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/stop_policy.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/task_worker.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/tool_policy.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/tool_rounds.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/runtime/user_input.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/_capabilities.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/_diagnostics.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/auth.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/config.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/dashboard/LICENSE +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/dashboard/NOTICE +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/dashboard/REDISTRIBUTION.md +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/dashboard/THIRD_PARTY_LICENSES.md +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/dashboard/assets/esm-CjMQc2Y4.js +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/dashboard/assets/index-mEuJRVvV.css +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/dashboard/assets/rolldown-runtime-C0phanGV.js +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/dashboard/assets/shared-DzrPP__D.js +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/dashboard/assets/shared-PcbWWhBY.js +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/dashboard/assets/shared-TB_n1wF3.js +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/dashboard/logo.svg +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/evals_worker.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/settings.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/sse.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/server/static.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/_postgres_aggregates.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/_session_store_sql.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/_sqlite_aggregates.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/evals_postgres.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/evals_sqlite.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/event_watchers.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/jsonl_export.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/knowledge_indexer.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/storage/knowledge_review.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/_redaction.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/command_policy.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/git_command_policy.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/user_input.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/tools/web.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/vaults/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workflows/models.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workspaces/__init__.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workspaces/_guest_guard.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workspaces/_local_guard.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workspaces/_mutations.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workspaces/_tar.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workspaces/base.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workspaces/e2b.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workspaces/local.py +0 -0
- {cayu-0.2.0.dev0 → cayu-0.2.1}/src/cayu/workspaces/microsandbox.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: cayu
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.1
|
|
4
4
|
Summary: A Python runtime for production AI agents with durable sessions, controlled tool execution, context management, reviewed knowledge, recovery, evals, and replay.
|
|
5
5
|
Project-URL: Homepage, https://cayu.dev
|
|
6
6
|
Project-URL: Repository, https://github.com/cayu-dev/cayu
|
|
@@ -195,6 +195,74 @@ The scaffold is credential-free and includes:
|
|
|
195
195
|
Open the generated project, describe the requested job in the existing agent,
|
|
196
196
|
and keep its public test/eval seam intact.
|
|
197
197
|
|
|
198
|
+
### Deploy with Cayu Cloud
|
|
199
|
+
|
|
200
|
+
Cloud commands ship in the same `cayu` package; no additional CLI package is
|
|
201
|
+
required. Cayu Cloud is currently invite-only. Login-backed commands are pinned to
|
|
202
|
+
the production service at `https://cloud.cayu.dev`; users never select an API URL.
|
|
203
|
+
|
|
204
|
+
```bash
|
|
205
|
+
cayu cloud --help
|
|
206
|
+
cayu cloud login
|
|
207
|
+
cayu cloud whoami
|
|
208
|
+
cayu cloud init
|
|
209
|
+
cayu cloud deploy
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
Login uses WorkOS device authorization. It opens the browser when possible and always
|
|
213
|
+
prints a verification URL and one-time user code for SSH, containers, Cursor, Codex,
|
|
214
|
+
and Claude Code. The resulting Organization-scoped session is stored privately and
|
|
215
|
+
refreshed automatically; no WorkOS secret is embedded in Cayu. Use `--no-browser` when
|
|
216
|
+
a human will open the displayed URL on another device. Login selects the WorkOS session
|
|
217
|
+
over any previously persisted private context; a later `cayu cloud context use PATH`
|
|
218
|
+
deliberately switches back to that internal automation context. Private contexts and
|
|
219
|
+
explicit API credentials remain endpoint-bound operator mechanisms and do not change
|
|
220
|
+
the default customer endpoint.
|
|
221
|
+
|
|
222
|
+
`cayu cloud init` generates the small deployment descriptor from standard
|
|
223
|
+
`pyproject.toml` metadata and a configured Cayu server, worker, or console
|
|
224
|
+
script. Review the generated process topology before deploying it. Existing
|
|
225
|
+
descriptors are never replaced unless `--force` is explicit.
|
|
226
|
+
|
|
227
|
+
The default command packages the current local working directory and uploads it
|
|
228
|
+
directly to the selected Cayu Cloud Organization as an immutable source bundle.
|
|
229
|
+
It includes an applied patch and does not require GitHub, a clean worktree, a
|
|
230
|
+
commit, or a push. Git-ignored files and common local credential/cache paths are
|
|
231
|
+
omitted.
|
|
232
|
+
|
|
233
|
+
Deploy creates or updates the 8-63 character application slug declared in
|
|
234
|
+
`cayu-cloud.toml`. Slugs use lowercase letters, numbers, and interior hyphens.
|
|
235
|
+
`--application SLUG` overrides that create-or-update slug; check it carefully because
|
|
236
|
+
a valid typo creates a separate application.
|
|
237
|
+
|
|
238
|
+
Deploy output and local evidence redact runtime environment values. Cayu verifies the
|
|
239
|
+
evidence destination before Cloud mutation; if only the final evidence write fails after
|
|
240
|
+
a successful rollout, deploy still exits successfully with `evidence_id: null` and an
|
|
241
|
+
`evidence.status: unavailable` diagnostic.
|
|
242
|
+
|
|
243
|
+
To deploy an exact remote GitHub revision instead, pass its canonical URL and
|
|
244
|
+
40-character commit. For a private source, make authentication available to the
|
|
245
|
+
process that runs Cayu:
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
gh auth status --hostname github.com
|
|
249
|
+
# For noninteractive CI or an isolated Codex/Claude Code home:
|
|
250
|
+
GH_TOKEN="$GITHUB_TOKEN" cayu cloud deploy \
|
|
251
|
+
https://github.com/example/agent --revision COMMIT_SHA
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
GitHub CLI credentials stored in a desktop keychain may not be reachable after
|
|
255
|
+
changing `HOME`, even when `GH_CONFIG_DIR` points at an authenticated GitHub CLI
|
|
256
|
+
configuration. In that case, pass a short-lived `GH_TOKEN` explicitly. Cayu
|
|
257
|
+
does not persist the token in its Cloud context or include GitHub CLI stderr in
|
|
258
|
+
its JSON errors. Public GitHub repositories remain deployable without GitHub
|
|
259
|
+
authentication.
|
|
260
|
+
|
|
261
|
+
For CI and other noninteractive automation, the existing
|
|
262
|
+
`CAYU_CLOUD_API_KEY`, `CAYU_CLOUD_API_KEY_FILE`, and private Cloud-context
|
|
263
|
+
options remain available. Explicit automation credentials take precedence over
|
|
264
|
+
the saved interactive login.
|
|
265
|
+
|
|
198
266
|
### Run an agent
|
|
199
267
|
|
|
200
268
|
This compact example shows the core API. Real projects should put the same
|
|
@@ -105,6 +105,74 @@ The scaffold is credential-free and includes:
|
|
|
105
105
|
Open the generated project, describe the requested job in the existing agent,
|
|
106
106
|
and keep its public test/eval seam intact.
|
|
107
107
|
|
|
108
|
+
### Deploy with Cayu Cloud
|
|
109
|
+
|
|
110
|
+
Cloud commands ship in the same `cayu` package; no additional CLI package is
|
|
111
|
+
required. Cayu Cloud is currently invite-only. Login-backed commands are pinned to
|
|
112
|
+
the production service at `https://cloud.cayu.dev`; users never select an API URL.
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
cayu cloud --help
|
|
116
|
+
cayu cloud login
|
|
117
|
+
cayu cloud whoami
|
|
118
|
+
cayu cloud init
|
|
119
|
+
cayu cloud deploy
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Login uses WorkOS device authorization. It opens the browser when possible and always
|
|
123
|
+
prints a verification URL and one-time user code for SSH, containers, Cursor, Codex,
|
|
124
|
+
and Claude Code. The resulting Organization-scoped session is stored privately and
|
|
125
|
+
refreshed automatically; no WorkOS secret is embedded in Cayu. Use `--no-browser` when
|
|
126
|
+
a human will open the displayed URL on another device. Login selects the WorkOS session
|
|
127
|
+
over any previously persisted private context; a later `cayu cloud context use PATH`
|
|
128
|
+
deliberately switches back to that internal automation context. Private contexts and
|
|
129
|
+
explicit API credentials remain endpoint-bound operator mechanisms and do not change
|
|
130
|
+
the default customer endpoint.
|
|
131
|
+
|
|
132
|
+
`cayu cloud init` generates the small deployment descriptor from standard
|
|
133
|
+
`pyproject.toml` metadata and a configured Cayu server, worker, or console
|
|
134
|
+
script. Review the generated process topology before deploying it. Existing
|
|
135
|
+
descriptors are never replaced unless `--force` is explicit.
|
|
136
|
+
|
|
137
|
+
The default command packages the current local working directory and uploads it
|
|
138
|
+
directly to the selected Cayu Cloud Organization as an immutable source bundle.
|
|
139
|
+
It includes an applied patch and does not require GitHub, a clean worktree, a
|
|
140
|
+
commit, or a push. Git-ignored files and common local credential/cache paths are
|
|
141
|
+
omitted.
|
|
142
|
+
|
|
143
|
+
Deploy creates or updates the 8-63 character application slug declared in
|
|
144
|
+
`cayu-cloud.toml`. Slugs use lowercase letters, numbers, and interior hyphens.
|
|
145
|
+
`--application SLUG` overrides that create-or-update slug; check it carefully because
|
|
146
|
+
a valid typo creates a separate application.
|
|
147
|
+
|
|
148
|
+
Deploy output and local evidence redact runtime environment values. Cayu verifies the
|
|
149
|
+
evidence destination before Cloud mutation; if only the final evidence write fails after
|
|
150
|
+
a successful rollout, deploy still exits successfully with `evidence_id: null` and an
|
|
151
|
+
`evidence.status: unavailable` diagnostic.
|
|
152
|
+
|
|
153
|
+
To deploy an exact remote GitHub revision instead, pass its canonical URL and
|
|
154
|
+
40-character commit. For a private source, make authentication available to the
|
|
155
|
+
process that runs Cayu:
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
gh auth status --hostname github.com
|
|
159
|
+
# For noninteractive CI or an isolated Codex/Claude Code home:
|
|
160
|
+
GH_TOKEN="$GITHUB_TOKEN" cayu cloud deploy \
|
|
161
|
+
https://github.com/example/agent --revision COMMIT_SHA
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
GitHub CLI credentials stored in a desktop keychain may not be reachable after
|
|
165
|
+
changing `HOME`, even when `GH_CONFIG_DIR` points at an authenticated GitHub CLI
|
|
166
|
+
configuration. In that case, pass a short-lived `GH_TOKEN` explicitly. Cayu
|
|
167
|
+
does not persist the token in its Cloud context or include GitHub CLI stderr in
|
|
168
|
+
its JSON errors. Public GitHub repositories remain deployable without GitHub
|
|
169
|
+
authentication.
|
|
170
|
+
|
|
171
|
+
For CI and other noninteractive automation, the existing
|
|
172
|
+
`CAYU_CLOUD_API_KEY`, `CAYU_CLOUD_API_KEY_FILE`, and private Cloud-context
|
|
173
|
+
options remain available. Explicit automation credentials take precedence over
|
|
174
|
+
the saved interactive login.
|
|
175
|
+
|
|
108
176
|
### Run an agent
|
|
109
177
|
|
|
110
178
|
This compact example shows the core API. Real projects should put the same
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "cayu"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.1"
|
|
8
8
|
description = "A Python runtime for production AI agents with durable sessions, controlled tool execution, context management, reviewed knowledge, recovery, evals, and replay."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.11"
|
|
@@ -107,6 +107,7 @@ from cayu.environments import (
|
|
|
107
107
|
S3FilesAccessPointBinding,
|
|
108
108
|
SyncBinding,
|
|
109
109
|
SyncBindingContext,
|
|
110
|
+
SyncTargetWorkspacePlan,
|
|
110
111
|
WorkspaceBinding,
|
|
111
112
|
WorkspaceInstructions,
|
|
112
113
|
WorkspaceInstructionsConfig,
|
|
@@ -367,23 +368,31 @@ from cayu.mcp import (
|
|
|
367
368
|
DEFAULT_MCP_GRACEFUL_SHUTDOWN_TIMEOUT_S,
|
|
368
369
|
DEFAULT_MCP_MAX_LIST_ITEMS,
|
|
369
370
|
DEFAULT_MCP_MAX_LIST_PAGES,
|
|
371
|
+
DEFAULT_MCP_MAX_MESSAGE_BYTES,
|
|
372
|
+
DEFAULT_MCP_MAX_RESPONSE_BYTES,
|
|
370
373
|
DEFAULT_MCP_REQUEST_TIMEOUT_S,
|
|
371
374
|
DEFAULT_MCP_WRITE_TIMEOUT_S,
|
|
372
375
|
MCP_PROTOCOL_VERSION,
|
|
373
376
|
SUPPORTED_MCP_PROTOCOL_VERSIONS,
|
|
374
377
|
HttpMcpClient,
|
|
375
378
|
HttpMcpSession,
|
|
379
|
+
McpCallDeadlineExceededError,
|
|
376
380
|
McpClient,
|
|
381
|
+
McpIdleTimeoutError,
|
|
377
382
|
McpInitializeResult,
|
|
383
|
+
McpMessageTooLargeError,
|
|
384
|
+
McpPeerClosedError,
|
|
378
385
|
McpProtocolError,
|
|
379
386
|
McpResourceDefinition,
|
|
380
387
|
McpResourceResult,
|
|
388
|
+
McpResponseTooLargeError,
|
|
381
389
|
McpServerSpec,
|
|
382
390
|
McpSession,
|
|
383
391
|
McpToolAdapter,
|
|
384
392
|
McpToolDefinition,
|
|
385
393
|
McpToolResult,
|
|
386
394
|
McpToolset,
|
|
395
|
+
McpTransportLimits,
|
|
387
396
|
StdioMcpClient,
|
|
388
397
|
StdioMcpSession,
|
|
389
398
|
connect_mcp_toolset,
|
|
@@ -489,6 +498,8 @@ from cayu.runtime import (
|
|
|
489
498
|
DEFAULT_TOOL_RESULT_MAX_INLINE_BYTES,
|
|
490
499
|
DEFAULT_TOOL_RESULT_MAX_INLINE_TOKEN_ESTIMATE,
|
|
491
500
|
DEFAULT_TOOL_RESULT_PREVIEW_BYTES,
|
|
501
|
+
EXECUTION_PROFILE_METADATA_KEY,
|
|
502
|
+
EXECUTION_PROFILE_SCHEMA_VERSION,
|
|
492
503
|
INITIAL_TRANSCRIPT_PENDING_CHECKPOINT_KEY,
|
|
493
504
|
MAX_INCOMPLETE_SESSIONS_RECOVERY_CURSOR_BYTES,
|
|
494
505
|
MAX_PENDING_ACTION_RESULT_BYTES,
|
|
@@ -612,6 +623,24 @@ from cayu.runtime import (
|
|
|
612
623
|
EventWatcherRunResult,
|
|
613
624
|
EventWatcherState,
|
|
614
625
|
EventWatcherStore,
|
|
626
|
+
ExecutionProfileAdoptionIntent,
|
|
627
|
+
ExecutionProfileAdoptionRejected,
|
|
628
|
+
ExecutionProfileAuthorityDecision,
|
|
629
|
+
ExecutionProfileComponentClass,
|
|
630
|
+
ExecutionProfileComponentIdentity,
|
|
631
|
+
ExecutionProfileDecision,
|
|
632
|
+
ExecutionProfileDecisionKind,
|
|
633
|
+
ExecutionProfileIdentity,
|
|
634
|
+
ExecutionProfileIdentityAvailability,
|
|
635
|
+
ExecutionProfileIdentityStrength,
|
|
636
|
+
ExecutionProfileMigrationRequired,
|
|
637
|
+
ExecutionProfileMismatchError,
|
|
638
|
+
ExecutionProfilePolicy,
|
|
639
|
+
ExecutionProfilePolicyAction,
|
|
640
|
+
ExecutionProfilePolicyError,
|
|
641
|
+
ExecutionProfilePolicyRequest,
|
|
642
|
+
ExecutionProfilePolicyResult,
|
|
643
|
+
ExecutionProfileRejectionResult,
|
|
615
644
|
ForkSessionRequest,
|
|
616
645
|
IncompleteSessionRecoveryAction,
|
|
617
646
|
IncompleteSessionRecoveryRequest,
|
|
@@ -627,8 +656,13 @@ from cayu.runtime import (
|
|
|
627
656
|
InteractionLifecyclePublicationRejected,
|
|
628
657
|
InteractionStatus,
|
|
629
658
|
InteractionSummaryEvidence,
|
|
659
|
+
InteractionTransitionReceiptResult,
|
|
630
660
|
InteractionTransitionResult,
|
|
661
|
+
InteractionTransitionSpec,
|
|
631
662
|
InterruptSessionRequest,
|
|
663
|
+
InvocationOrigin,
|
|
664
|
+
InvocationOriginClaim,
|
|
665
|
+
InvocationOriginTrust,
|
|
632
666
|
KnowledgeInjectionPolicy,
|
|
633
667
|
LabelSelectorOperator,
|
|
634
668
|
LabelSelectorRequirement,
|
|
@@ -649,6 +683,7 @@ from cayu.runtime import (
|
|
|
649
683
|
ModelPrice,
|
|
650
684
|
ModelStepCostEstimate,
|
|
651
685
|
ModelStepIdentity,
|
|
686
|
+
ModelTarget,
|
|
652
687
|
NativeStructuredOutputUnsupported,
|
|
653
688
|
ObservedDeltaContextEstimator,
|
|
654
689
|
ParameterConstrainedToolPolicy,
|
|
@@ -725,10 +760,12 @@ from cayu.runtime import (
|
|
|
725
760
|
SessionBudgetInspection,
|
|
726
761
|
SessionBudgetStore,
|
|
727
762
|
SessionCostSummary,
|
|
763
|
+
SessionExecutionSource,
|
|
728
764
|
SessionIdentity,
|
|
729
765
|
SessionInspectionIdentity,
|
|
730
766
|
SessionInspectionSummary,
|
|
731
767
|
SessionInspectionUsageSummary,
|
|
768
|
+
SessionInvocation,
|
|
732
769
|
SessionLineageNode,
|
|
733
770
|
SessionLineageOrigin,
|
|
734
771
|
SessionLineageQuery,
|
|
@@ -737,6 +774,7 @@ from cayu.runtime import (
|
|
|
737
774
|
SessionMessageDeliveryBatch,
|
|
738
775
|
SessionMessageDeliveryMode,
|
|
739
776
|
SessionMessageQueueStatus,
|
|
777
|
+
SessionModelTransition,
|
|
740
778
|
SessionOperationalSnapshot,
|
|
741
779
|
SessionOrder,
|
|
742
780
|
SessionOutcome,
|
|
@@ -815,6 +853,7 @@ from cayu.runtime import (
|
|
|
815
853
|
TranscriptPage,
|
|
816
854
|
TranscriptQuery,
|
|
817
855
|
TranscriptRecord,
|
|
856
|
+
TranscriptSnapshot,
|
|
818
857
|
UnresolvedBillingIdentity,
|
|
819
858
|
UsageAggregateBreakdown,
|
|
820
859
|
UsageAggregateGroup,
|
|
@@ -893,6 +932,7 @@ from cayu.runtime import (
|
|
|
893
932
|
retry_decision,
|
|
894
933
|
run_task_worker,
|
|
895
934
|
run_to_completion,
|
|
935
|
+
session_invocation_for_run_request,
|
|
896
936
|
session_usage_summary,
|
|
897
937
|
strip_old_file_attachments,
|
|
898
938
|
taint_labels_from_metadata,
|
|
@@ -924,6 +964,8 @@ from cayu.storage import (
|
|
|
924
964
|
KnowledgeListItem,
|
|
925
965
|
KnowledgeListQuery,
|
|
926
966
|
KnowledgeListResult,
|
|
967
|
+
KnowledgePublicationConflict,
|
|
968
|
+
KnowledgePublicationReceipt,
|
|
927
969
|
KnowledgeQuery,
|
|
928
970
|
KnowledgeReviewWorkflow,
|
|
929
971
|
KnowledgeSearchMode,
|
|
@@ -937,6 +979,7 @@ from cayu.storage import (
|
|
|
937
979
|
SQLiteKnowledgeStore,
|
|
938
980
|
SQLiteSessionStore,
|
|
939
981
|
SQLiteTaskStore,
|
|
982
|
+
prepare_knowledge_publication,
|
|
940
983
|
)
|
|
941
984
|
from cayu.tools import (
|
|
942
985
|
ArtifactReader,
|
|
@@ -1098,6 +1141,8 @@ __all__ = [
|
|
|
1098
1141
|
"DEFAULT_MCP_GRACEFUL_SHUTDOWN_TIMEOUT_S",
|
|
1099
1142
|
"DEFAULT_MCP_MAX_LIST_ITEMS",
|
|
1100
1143
|
"DEFAULT_MCP_MAX_LIST_PAGES",
|
|
1144
|
+
"DEFAULT_MCP_MAX_MESSAGE_BYTES",
|
|
1145
|
+
"DEFAULT_MCP_MAX_RESPONSE_BYTES",
|
|
1101
1146
|
"DEFAULT_MCP_REQUEST_TIMEOUT_S",
|
|
1102
1147
|
"DEFAULT_MCP_WRITE_TIMEOUT_S",
|
|
1103
1148
|
"DEFAULT_MICROSANDBOX_CWD",
|
|
@@ -1144,6 +1189,8 @@ __all__ = [
|
|
|
1144
1189
|
"EVENT_ID_MAX_CHARS",
|
|
1145
1190
|
"EXECUTION_CAPABILITY_EVIDENCE_SCHEMA",
|
|
1146
1191
|
"EXECUTION_LIVE_EVIDENCE_MAX_TTL_SECONDS",
|
|
1192
|
+
"EXECUTION_PROFILE_METADATA_KEY",
|
|
1193
|
+
"EXECUTION_PROFILE_SCHEMA_VERSION",
|
|
1147
1194
|
"FILE_ATTACHMENT_TYPE",
|
|
1148
1195
|
"INITIAL_TRANSCRIPT_PENDING_CHECKPOINT_KEY",
|
|
1149
1196
|
"MAX_INCOMPLETE_SESSIONS_RECOVERY_CURSOR_BYTES",
|
|
@@ -1432,6 +1479,24 @@ __all__ = [
|
|
|
1432
1479
|
"ExecutionCapabilityClaim",
|
|
1433
1480
|
"ExecutionCapabilityEvidence",
|
|
1434
1481
|
"ExecutionEvidenceOverride",
|
|
1482
|
+
"ExecutionProfileAdoptionIntent",
|
|
1483
|
+
"ExecutionProfileAdoptionRejected",
|
|
1484
|
+
"ExecutionProfileAuthorityDecision",
|
|
1485
|
+
"ExecutionProfileComponentClass",
|
|
1486
|
+
"ExecutionProfileComponentIdentity",
|
|
1487
|
+
"ExecutionProfileDecision",
|
|
1488
|
+
"ExecutionProfileDecisionKind",
|
|
1489
|
+
"ExecutionProfileIdentity",
|
|
1490
|
+
"ExecutionProfileIdentityAvailability",
|
|
1491
|
+
"ExecutionProfileIdentityStrength",
|
|
1492
|
+
"ExecutionProfileMigrationRequired",
|
|
1493
|
+
"ExecutionProfileMismatchError",
|
|
1494
|
+
"ExecutionProfilePolicy",
|
|
1495
|
+
"ExecutionProfilePolicyAction",
|
|
1496
|
+
"ExecutionProfilePolicyError",
|
|
1497
|
+
"ExecutionProfilePolicyRequest",
|
|
1498
|
+
"ExecutionProfilePolicyResult",
|
|
1499
|
+
"ExecutionProfileRejectionResult",
|
|
1435
1500
|
"ExecutionRequirements",
|
|
1436
1501
|
"FileAttachment",
|
|
1437
1502
|
"FileAttachmentKind",
|
|
@@ -1469,9 +1534,14 @@ __all__ = [
|
|
|
1469
1534
|
"InteractionLifecyclePublicationRejected",
|
|
1470
1535
|
"InteractionStatus",
|
|
1471
1536
|
"InteractionSummaryEvidence",
|
|
1537
|
+
"InteractionTransitionReceiptResult",
|
|
1472
1538
|
"InteractionTransitionResult",
|
|
1539
|
+
"InteractionTransitionSpec",
|
|
1473
1540
|
"InterruptSessionRequest",
|
|
1474
1541
|
"InvalidArtifactIdError",
|
|
1542
|
+
"InvocationOrigin",
|
|
1543
|
+
"InvocationOriginClaim",
|
|
1544
|
+
"InvocationOriginTrust",
|
|
1475
1545
|
"KnowledgeActorType",
|
|
1476
1546
|
"KnowledgeChunk",
|
|
1477
1547
|
"KnowledgeEntry",
|
|
@@ -1485,6 +1555,8 @@ __all__ = [
|
|
|
1485
1555
|
"KnowledgeListItem",
|
|
1486
1556
|
"KnowledgeListQuery",
|
|
1487
1557
|
"KnowledgeListResult",
|
|
1558
|
+
"KnowledgePublicationConflict",
|
|
1559
|
+
"KnowledgePublicationReceipt",
|
|
1488
1560
|
"KnowledgeQuery",
|
|
1489
1561
|
"KnowledgeReviewWorkflow",
|
|
1490
1562
|
"KnowledgeSearchMode",
|
|
@@ -1515,7 +1587,9 @@ __all__ = [
|
|
|
1515
1587
|
"MaxToolCallsAssertionSpec",
|
|
1516
1588
|
"MaxTotalTokens",
|
|
1517
1589
|
"MaxTotalTokensAssertionSpec",
|
|
1590
|
+
"McpCallDeadlineExceededError",
|
|
1518
1591
|
"McpClient",
|
|
1592
|
+
"McpIdleTimeoutError",
|
|
1519
1593
|
"McpInitializeResult",
|
|
1520
1594
|
"McpManifestBaseline",
|
|
1521
1595
|
"McpManifestBaselineLoadResult",
|
|
@@ -1525,15 +1599,19 @@ __all__ = [
|
|
|
1525
1599
|
"McpManifestPolicyDecision",
|
|
1526
1600
|
"McpManifestPolicyError",
|
|
1527
1601
|
"McpManifestPublicationResult",
|
|
1602
|
+
"McpMessageTooLargeError",
|
|
1603
|
+
"McpPeerClosedError",
|
|
1528
1604
|
"McpProtocolError",
|
|
1529
1605
|
"McpResourceDefinition",
|
|
1530
1606
|
"McpResourceResult",
|
|
1607
|
+
"McpResponseTooLargeError",
|
|
1531
1608
|
"McpServerSpec",
|
|
1532
1609
|
"McpSession",
|
|
1533
1610
|
"McpToolAdapter",
|
|
1534
1611
|
"McpToolDefinition",
|
|
1535
1612
|
"McpToolResult",
|
|
1536
1613
|
"McpToolset",
|
|
1614
|
+
"McpTransportLimits",
|
|
1537
1615
|
"Message",
|
|
1538
1616
|
"MessageRole",
|
|
1539
1617
|
"MessageWindowContextPolicy",
|
|
@@ -1558,6 +1636,7 @@ __all__ = [
|
|
|
1558
1636
|
"ModelStepCostEstimate",
|
|
1559
1637
|
"ModelStepIdentity",
|
|
1560
1638
|
"ModelStreamEvent",
|
|
1639
|
+
"ModelTarget",
|
|
1561
1640
|
"NativeBinding",
|
|
1562
1641
|
"NativeStructuredOutputSchemaInvalid",
|
|
1563
1642
|
"NativeStructuredOutputUnsupported",
|
|
@@ -1725,12 +1804,14 @@ __all__ = [
|
|
|
1725
1804
|
"SessionBudgetStore",
|
|
1726
1805
|
"SessionCompleted",
|
|
1727
1806
|
"SessionCostSummary",
|
|
1807
|
+
"SessionExecutionSource",
|
|
1728
1808
|
"SessionFailed",
|
|
1729
1809
|
"SessionIdentity",
|
|
1730
1810
|
"SessionInspectionIdentity",
|
|
1731
1811
|
"SessionInspectionSummary",
|
|
1732
1812
|
"SessionInspectionUsageSummary",
|
|
1733
1813
|
"SessionInterrupted",
|
|
1814
|
+
"SessionInvocation",
|
|
1734
1815
|
"SessionLineageNode",
|
|
1735
1816
|
"SessionLineageOrigin",
|
|
1736
1817
|
"SessionLineageQuery",
|
|
@@ -1739,6 +1820,7 @@ __all__ = [
|
|
|
1739
1820
|
"SessionMessageDeliveryBatch",
|
|
1740
1821
|
"SessionMessageDeliveryMode",
|
|
1741
1822
|
"SessionMessageQueueStatus",
|
|
1823
|
+
"SessionModelTransition",
|
|
1742
1824
|
"SessionOperationalSnapshot",
|
|
1743
1825
|
"SessionOrder",
|
|
1744
1826
|
"SessionOutcome",
|
|
@@ -1786,6 +1868,7 @@ __all__ = [
|
|
|
1786
1868
|
"SubagentTool",
|
|
1787
1869
|
"SyncBinding",
|
|
1788
1870
|
"SyncBindingContext",
|
|
1871
|
+
"SyncTargetWorkspacePlan",
|
|
1789
1872
|
"TaintAwareToolPolicy",
|
|
1790
1873
|
"TarWriter",
|
|
1791
1874
|
"Task",
|
|
@@ -1864,6 +1947,7 @@ __all__ = [
|
|
|
1864
1947
|
"TranscriptPage",
|
|
1865
1948
|
"TranscriptQuery",
|
|
1866
1949
|
"TranscriptRecord",
|
|
1950
|
+
"TranscriptSnapshot",
|
|
1867
1951
|
"TrialRequestSpec",
|
|
1868
1952
|
"UnresolvedBillingIdentity",
|
|
1869
1953
|
"UsageAggregateBreakdown",
|
|
@@ -2023,6 +2107,7 @@ __all__ = [
|
|
|
2023
2107
|
"parallel",
|
|
2024
2108
|
"parse_public_authority_alias",
|
|
2025
2109
|
"pipeline",
|
|
2110
|
+
"prepare_knowledge_publication",
|
|
2026
2111
|
"pricing_profile_identity",
|
|
2027
2112
|
"project_assertion_evidence_view",
|
|
2028
2113
|
"promotable_run_input",
|
|
@@ -2047,6 +2132,7 @@ __all__ = [
|
|
|
2047
2132
|
"score_promotion_candidate",
|
|
2048
2133
|
"scripted_structured_output",
|
|
2049
2134
|
"secret_env_refs",
|
|
2135
|
+
"session_invocation_for_run_request",
|
|
2050
2136
|
"session_usage_summary",
|
|
2051
2137
|
"step",
|
|
2052
2138
|
"strip_old_file_attachments",
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from collections.abc import Callable
|
|
4
|
+
from datetime import UTC, datetime
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def normalize_utc_datetime(value: datetime, field_name: str) -> datetime:
|
|
8
|
+
if not isinstance(value, datetime):
|
|
9
|
+
raise TypeError(f"{field_name} must be a datetime.")
|
|
10
|
+
if value.tzinfo is None or value.utcoffset() is None:
|
|
11
|
+
raise ValueError(f"{field_name} must be timezone-aware.")
|
|
12
|
+
return value.astimezone(UTC)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
def utc_clock(clock: Callable[[], datetime] | None) -> Callable[[], datetime]:
|
|
16
|
+
if clock is None:
|
|
17
|
+
return lambda: datetime.now(UTC)
|
|
18
|
+
if not callable(clock):
|
|
19
|
+
raise TypeError("clock must be callable.")
|
|
20
|
+
|
|
21
|
+
def checked_clock() -> datetime:
|
|
22
|
+
return normalize_utc_datetime(clock(), "clock()")
|
|
23
|
+
|
|
24
|
+
return checked_clock
|
|
@@ -27,6 +27,67 @@ MIN_DURABLE_JSON_INTEGER = -(2**63)
|
|
|
27
27
|
MAX_DURABLE_JSON_INTEGER = 2**63 - 1
|
|
28
28
|
MAX_DURABLE_JSON_NESTING = 128
|
|
29
29
|
|
|
30
|
+
|
|
31
|
+
def revalidate_model_input(value: Any, *model_types: type[BaseModel]) -> Any:
|
|
32
|
+
"""Reconstruct an already-validated model while leaving raw input unchanged.
|
|
33
|
+
|
|
34
|
+
Pydantic normally accepts a model instance for a nested field by reference.
|
|
35
|
+
Public snapshot contracts use this helper in ``mode="before"`` validators
|
|
36
|
+
so caller-owned instances are detached and revalidated just like raw
|
|
37
|
+
mappings. Private model attributes are intentionally not preserved; values
|
|
38
|
+
whose runtime provenance is part of their contract need a dedicated copier.
|
|
39
|
+
"""
|
|
40
|
+
|
|
41
|
+
for model_type in model_types:
|
|
42
|
+
if isinstance(value, model_type):
|
|
43
|
+
return model_type.model_validate(_model_instance_python_input(value))
|
|
44
|
+
return value
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def revalidate_model_inputs(value: Any, *model_types: type[BaseModel]) -> Any:
|
|
48
|
+
"""Reconstruct validated models inside one iterable field input."""
|
|
49
|
+
|
|
50
|
+
if (
|
|
51
|
+
value is None
|
|
52
|
+
or isinstance(value, (str, bytes, bytearray, Mapping, BaseModel))
|
|
53
|
+
or not isinstance(value, Iterable)
|
|
54
|
+
):
|
|
55
|
+
return value
|
|
56
|
+
return tuple(revalidate_model_input(item, *model_types) for item in value)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
def _model_instance_python_input(value: BaseModel) -> dict[str, Any]:
|
|
60
|
+
"""Dump a model for validation without dropping excluded nested fields."""
|
|
61
|
+
|
|
62
|
+
nested_fields: dict[str, Any] = {}
|
|
63
|
+
for field_name, field_info in type(value).model_fields.items():
|
|
64
|
+
field_value = getattr(value, field_name)
|
|
65
|
+
if field_info.exclude or isinstance(field_value, (BaseModel, Mapping, list, tuple)):
|
|
66
|
+
nested_fields[field_name] = field_value
|
|
67
|
+
document = value.model_dump(
|
|
68
|
+
mode="python",
|
|
69
|
+
warnings=False,
|
|
70
|
+
exclude=set(nested_fields),
|
|
71
|
+
)
|
|
72
|
+
for field_name, field_value in nested_fields.items():
|
|
73
|
+
document[field_name] = (
|
|
74
|
+
dict(field_value)
|
|
75
|
+
if isinstance(field_value, Mapping)
|
|
76
|
+
else _nested_model_python_input(field_value)
|
|
77
|
+
)
|
|
78
|
+
return document
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
def _nested_model_python_input(value: Any) -> Any:
|
|
82
|
+
if isinstance(value, BaseModel):
|
|
83
|
+
return _model_instance_python_input(value)
|
|
84
|
+
if isinstance(value, list):
|
|
85
|
+
return [_nested_model_python_input(item) for item in value]
|
|
86
|
+
if isinstance(value, tuple):
|
|
87
|
+
return tuple(_nested_model_python_input(item) for item in value)
|
|
88
|
+
return value
|
|
89
|
+
|
|
90
|
+
|
|
30
91
|
_MAX_DURABLE_ERROR_FIELD_CHARS = 128
|
|
31
92
|
_MAX_DURABLE_ERROR_PATH_CHARS = 512
|
|
32
93
|
_DURABLE_ERROR_MESSAGES = {
|
|
@@ -567,7 +628,15 @@ class JsonUtf8SizeCounter:
|
|
|
567
628
|
if isinstance(value, date):
|
|
568
629
|
return self._string(value.isoformat())
|
|
569
630
|
if type(value) in {int, float}:
|
|
570
|
-
|
|
631
|
+
try:
|
|
632
|
+
rendered = str(value)
|
|
633
|
+
except (OverflowError, ValueError):
|
|
634
|
+
# CPython bounds decimal conversion of very large integers. A
|
|
635
|
+
# size preflight must fail closed instead of leaking that raw
|
|
636
|
+
# interpreter error past a caller expecting a bounded result.
|
|
637
|
+
self.encountered_unsupported_value = True
|
|
638
|
+
return False
|
|
639
|
+
return self._consume(len(rendered.encode("utf-8")))
|
|
571
640
|
if isinstance(value, BaseModel):
|
|
572
641
|
fields = type(value).model_fields
|
|
573
642
|
if not self._consume(2):
|
|
@@ -343,6 +343,8 @@ class S3ArtifactStore(ArtifactStore):
|
|
|
343
343
|
)
|
|
344
344
|
try:
|
|
345
345
|
await asyncio.to_thread(self._delete_keys, client, keys)
|
|
346
|
+
except ArtifactStoreUnavailableError:
|
|
347
|
+
raise
|
|
346
348
|
except Exception as exc:
|
|
347
349
|
raise ArtifactStoreUnavailableError(
|
|
348
350
|
"S3 artifact store could not delete artifact content."
|
|
@@ -433,10 +435,34 @@ class S3ArtifactStore(ArtifactStore):
|
|
|
433
435
|
return
|
|
434
436
|
|
|
435
437
|
def _delete_keys(self, client: Any, keys: tuple[str, ...]) -> None:
|
|
436
|
-
client.delete_objects(
|
|
438
|
+
response = client.delete_objects(
|
|
437
439
|
Bucket=self.bucket,
|
|
438
440
|
Delete={"Objects": [{"Key": key} for key in keys], "Quiet": True},
|
|
439
441
|
)
|
|
442
|
+
if not isinstance(response, Mapping):
|
|
443
|
+
raise ArtifactStoreUnavailableError("S3 DeleteObjects returned an invalid response.")
|
|
444
|
+
errors = response.get("Errors")
|
|
445
|
+
if errors is None or errors == []:
|
|
446
|
+
return
|
|
447
|
+
if not isinstance(errors, Sequence) or isinstance(errors, (str, bytes, bytearray)):
|
|
448
|
+
raise ArtifactStoreUnavailableError(
|
|
449
|
+
"S3 DeleteObjects returned an invalid per-object error collection."
|
|
450
|
+
)
|
|
451
|
+
safe_codes: list[str] = []
|
|
452
|
+
for error in errors[:3]:
|
|
453
|
+
code = error.get("Code") if isinstance(error, Mapping) else None
|
|
454
|
+
safe_code = (
|
|
455
|
+
code
|
|
456
|
+
if type(code) is str and re.fullmatch(r"[A-Za-z0-9._-]{1,64}", code)
|
|
457
|
+
else "Unknown"
|
|
458
|
+
)
|
|
459
|
+
if safe_code not in safe_codes:
|
|
460
|
+
safe_codes.append(safe_code)
|
|
461
|
+
error_label = "error" if len(errors) == 1 else "errors"
|
|
462
|
+
raise ArtifactStoreUnavailableError(
|
|
463
|
+
f"S3 DeleteObjects returned {len(errors)} per-object {error_label} "
|
|
464
|
+
f"(codes: {', '.join(safe_codes)})."
|
|
465
|
+
)
|
|
440
466
|
|
|
441
467
|
async def _get_client(self) -> Any:
|
|
442
468
|
if self._client is not None:
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import argparse
|
|
4
|
+
import sys
|
|
4
5
|
from collections.abc import Callable
|
|
5
6
|
|
|
6
7
|
from cayu._version import package_version
|
|
@@ -81,9 +82,14 @@ def _build_parser() -> argparse.ArgumentParser:
|
|
|
81
82
|
|
|
82
83
|
|
|
83
84
|
def main(argv: list[str] | None = None) -> int:
|
|
84
|
-
|
|
85
|
+
arguments = sys.argv[1:] if argv is None else argv
|
|
86
|
+
if arguments and arguments[0] == "cloud":
|
|
87
|
+
from cayu.cli.cloud import run_cloud_cli
|
|
88
|
+
|
|
89
|
+
return run_cloud_cli(arguments[1:])
|
|
85
90
|
|
|
86
|
-
|
|
91
|
+
parser = _build_parser()
|
|
92
|
+
args = parser.parse_args(arguments)
|
|
87
93
|
runner = getattr(args, "_runner", None)
|
|
88
94
|
if runner is not None:
|
|
89
95
|
return runner(args)
|