databricks-agentbricks 0.10.0__tar.gz → 0.11.0__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.
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/PKG-INFO +70 -6
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/README.md +69 -5
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/pyproject.toml +1 -1
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/deploy.py +45 -8
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/memory.py +2 -0
- databricks_agentbricks-0.11.0/src/databricks_agentbricks/cli/memory_changes.py +257 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/models.py +25 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/telemetry.py +7 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/app_probe.py +6 -5
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/apps_client.py +30 -12
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/databricks_cli.py +14 -2
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/terminal_relay.py +3 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/diagnostics.py +33 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/model_upgrade.py +12 -3
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/presentation/help.py +25 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/presentation/render.py +13 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/deploy_service.py +53 -31
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/deployment/deploy_state.py +9 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-bricks-workflow/SKILL.md +2 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-bricks-workflow/references/deployment.md +2 -1
- databricks_agentbricks-0.11.0/src/databricks_agentbricks/templates/agent-bricks-workflow/references/model-upgrades.md +47 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-bricks-workflow/references/state-and-tools.md +17 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/pyproject.toml +1 -1
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/pyproject.toml +1 -1
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/pyproject.toml +1 -1
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-openai/pyproject.toml +1 -1
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/_api_client.py +62 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/model_upgrades/optimization.py +244 -172
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/.gitignore +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/NOTICE +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/agent_hint.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/__main__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/app.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/auth.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/dev.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/doctor.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/endpoint.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/experimental.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/init.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/mcp.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/permissions.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/pipeline.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/prompts.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/sandbox.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/sessions.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/tools.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/cli/tracing.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/agent_details_client.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/api_client_provider.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/apps_user_auth_client.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/conversation_store_client.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/legacy_runtime_store.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/local_ports.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/local_tracing_client.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/managed_runtime_store.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/mlflow_trace_client.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/output_tail.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/tracing_client.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/clients/workspace_identity.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/errors.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/presentation/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/presentation/deploy.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/presentation/dev.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/presentation/endpoint.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/presentation/group.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/presentation/loadtest.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/presentation/permissions.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/presentation/reporter.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/presentation/theme.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/presentation/tracing.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/projects/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/projects/agent_project.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/projects/app_manifest.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/projects/config.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/projects/resolver.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/projects/types.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/py.typed +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/reporting.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/deployment/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/deployment/app_provisioner.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/deployment/config.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/deployment/model_binding_provisioner.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/deployment/names.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/deployment/provisioners.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/deployment/tool_access.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/deployment/tool_access_provisioner.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/dev_service.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/endpoint_service.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/invoke/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/invoke/auth.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/invoke/request.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/invoke/transport.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/loadtest/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/loadtest/_locustfile.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/loadtest/plan.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/loadtest/request.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/loadtest/runner.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/loadtest/streaming.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/tracing/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/tracing/targets.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/services/tracing_service.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/skills.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/telemetry/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/telemetry/scrub.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-bricks-migrate/SKILL.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/.env.example +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/.gitignore +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/AGENTKIT_CONTRACT.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/AGENTS.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/CLAUDE.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/README.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/agent/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/agent/agent.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/agent/mcps.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/agent/tools/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/agent/tools/sample_tool.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/agent/tools/send_message.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/app.yaml +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/runtime/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/runtime/adapter.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/runtime/main.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/tests/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/tests/test_agent.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/tests/test_runtime.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-langgraph/tests/test_workspace.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/.env.example +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/.gitignore +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/AGENTKIT_CONTRACT.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/AGENTS.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/CLAUDE.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/README.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/agent/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/agent/agent.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/agent/checkpoints.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/agent/mcps.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/agent/tools/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/agent/tools/sample_tool.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/agent/tools/send_message.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/app.yaml +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/runtime/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/runtime/adapter.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/runtime/main.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/tests/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/tests/test_agent.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/tests/test_checkpoints.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/tests/test_runtime.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/agent-openai/tests/test_workspace.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/.env.example +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/.gitignore +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/README.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/agent/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/agent/agent.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/app.yaml +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/runtime/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/runtime/main.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-langgraph/tests/test_runtime.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-openai/.env.example +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-openai/.gitignore +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-openai/README.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-openai/agent/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-openai/agent/agent.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-openai/app.yaml +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-openai/runtime/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-openai/runtime/main.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/custom-agent-openai/tests/test_runtime.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/sandbox_mcp.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/sandbox_mcp_langgraph.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/CHAT_APP.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/runtime/main.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/runtime/ui.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/tests/test_demo_ui.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/agentbricks-mark.png +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/app.js +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/index.html +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/markdown-it-15.0.2.min.js +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-langgraph/ui/styles.css +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-openai/CHAT_APP.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-openai/runtime/main.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-openai/runtime/ui.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-openai/tests/test_demo_ui.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-openai/ui/agentbricks-mark.png +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-openai/ui/app.js +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-openai/ui/index.html +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-openai/ui/markdown-it-15.0.2.min.js +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentbricks/templates/ui/agent-openai/ui/styles.css +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/_pagination.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/_permissions.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/client.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/langgraph/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/langgraph/genie.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/langgraph/history.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/langgraph/mcp.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/langgraph/memory.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/langgraph/messages.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/langgraph/responses.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/langgraph/session_store.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/memory_store.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/model_upgrades/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/models.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/openai/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/openai/genie.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/openai/history.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/openai/mcp.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/openai/memory.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/openai/models.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/openai/sessions.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/py.typed +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/ARCHITECTURE.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/README.md +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/app.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/auth.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/cors.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/durability/__init__.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/durability/execution.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/durability/heartbeat.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/durability/lakebase_runtime_store.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/durability/recovery.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/durability/store.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/errors.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/execution.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/genie.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/mcp_auth.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/model_services.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/prompt_registry.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/runtime.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/session_store_client.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/store.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/tool_manifest.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/tracing.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/types.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/runtime/workspace.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/session_store.py +0 -0
- {databricks_agentbricks-0.10.0 → databricks_agentbricks-0.11.0}/src/databricks_agentkit/timefmt.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: databricks-agentbricks
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.11.0
|
|
4
4
|
Summary: Agent Bricks CLI and AgentKit SDK for custom agents on Databricks
|
|
5
5
|
Author-email: Databricks <agent-feedback@databricks.com>
|
|
6
6
|
License-File: NOTICE
|
|
@@ -890,7 +890,10 @@ Use the permission commands below as the store creator or a workspace admin to r
|
|
|
890
890
|
## Model and prompt upgrades (experimental)
|
|
891
891
|
|
|
892
892
|
`agentbricks experimental models` and `agentbricks experimental prompts` find the best model and
|
|
893
|
-
prompt for each LLM call in your agent and swap them in.
|
|
893
|
+
prompt for each LLM call in your agent and swap them in. Use them when a new model launches, or when
|
|
894
|
+
you want the same quality for less: you supply an eval set and how much quality, latency, and cost
|
|
895
|
+
matter, and the search tries each candidate model per LLM call, rewrites the prompts for it, and
|
|
896
|
+
recommends the combination that scores best on your whole agent. They live under `experimental` because
|
|
894
897
|
their flags and output may still change between releases without a deprecation period. The
|
|
895
898
|
agent.toml tables they write live under `[experimental]` too.
|
|
896
899
|
|
|
@@ -911,17 +914,56 @@ agentbricks experimental models status # the job's state, then its recomm
|
|
|
911
914
|
agentbricks experimental models apply # switch to it
|
|
912
915
|
```
|
|
913
916
|
|
|
917
|
+
The `agent.eval:...` references name things in your project. A minimal `agent/eval.py`:
|
|
918
|
+
|
|
919
|
+
```python
|
|
920
|
+
import mlflow
|
|
921
|
+
|
|
922
|
+
from agent.agent import answer # your agent's own entry point, called synchronously
|
|
923
|
+
|
|
924
|
+
mlflow.langchain.autolog() # traces token usage, which cost scoring needs; use your framework's autolog
|
|
925
|
+
|
|
926
|
+
|
|
927
|
+
def predict(inputs):
|
|
928
|
+
return answer(inputs["question"]) # wrap an async agent in asyncio.run(...)
|
|
929
|
+
|
|
930
|
+
|
|
931
|
+
TRAIN = [
|
|
932
|
+
{
|
|
933
|
+
"inputs": {"question": "Plan 3 days in Tokyo in late March"},
|
|
934
|
+
"expectations": {"expected_response": "..."},
|
|
935
|
+
},
|
|
936
|
+
# ... a few dozen records that look like real traffic
|
|
937
|
+
]
|
|
938
|
+
VAL = [...] # same shape, held out; the winner and the summary's medians come from these
|
|
939
|
+
|
|
940
|
+
|
|
941
|
+
def mentions_expected(inputs, expectations, answer):
|
|
942
|
+
return float(expectations["expected_response"].lower() in str(answer).lower())
|
|
943
|
+
|
|
944
|
+
|
|
945
|
+
SCORERS = [mentions_expected] # or MLflow scorers, e.g. mlflow.genai.scorers.Correctness()
|
|
946
|
+
```
|
|
947
|
+
|
|
948
|
+
Each of the agent's LLM calls must call its role's model service, `resolve_model_service("<role>")`
|
|
949
|
+
from `databricks_agentkit.runtime.tool_manifest`, so the search can route it to each candidate.
|
|
950
|
+
|
|
914
951
|
By default `models upgrade` uploads the project to your workspace and runs the search as a
|
|
915
952
|
serverless Databricks job, because a search can take hours. `--run-on local` runs it in your
|
|
916
953
|
terminal instead, which needs the `upgrade` extra and the agent's dependencies installed. Each call
|
|
917
954
|
takes longer from a laptop than on a serverless job, and a record slower than `--latency-gate` (60
|
|
918
955
|
seconds by default) scores 0, so raise it if a local run warns that records went over the gate. The job imports the `predict_fn`,
|
|
919
956
|
eval data, and scorers you name from the project (the same inputs `optimize_prompts_and_models`
|
|
920
|
-
takes, below) and runs each eval record once per candidate, against
|
|
921
|
-
|
|
957
|
+
takes, below) and runs each eval record once per candidate, against temporary clones of the model
|
|
958
|
+
services: one per service and model it may use, `<service>_exp_<id>_<model>`, created up front and
|
|
959
|
+
deleted when the search ends. Each clone always serves its one model, so switching candidates
|
|
960
|
+
redirects calls to another clone instead of waiting for a service's model to change. Each LLM call must use its role's service, `resolve_model_service("<role>")`, which reads the
|
|
922
961
|
`AGENT_MODEL_SERVICE_<ROLE>` env var that deploy (and the job, before importing your code) sets.
|
|
923
|
-
GEPA also rewrites every prompt bound with `prompts bind` for each candidate model
|
|
924
|
-
|
|
962
|
+
GEPA also rewrites every prompt bound with `prompts bind` for each candidate model, so you don't
|
|
963
|
+
pass prompt URIs unless you want a different set. Pass `--prompt` to pick specific prompts instead,
|
|
964
|
+
or `--models-only` to leave prompts alone. A `--prompt` URI must name an alias
|
|
965
|
+
(`prompts:/main.my_agent.writer@production`), not a version (`.../writer/3`): apply moves the
|
|
966
|
+
alias to the rewritten version, so an agent that loads a fixed version would never see it. `models apply` switches
|
|
925
967
|
to the best quality / latency / cost trade-off and registers any rewritten prompts (prior versions
|
|
926
968
|
keep `@production_previous`). `models rollback` undoes the whole last apply: it switches every
|
|
927
969
|
model back and moves each prompt's alias back to its prior version. Apply refuses recommendations
|
|
@@ -930,6 +972,11 @@ recorded when the recommendation was applied. If rollback fails partway through,
|
|
|
930
972
|
to finish the remaining changes. Each search owns its temporary clones, so overlapping jobs can
|
|
931
973
|
evaluate different models independently.
|
|
932
974
|
|
|
975
|
+
When the search finishes, the summary shows each role's current and recommended model, the change in
|
|
976
|
+
the combined score, and how the median quality, latency, and cost per request moved from the
|
|
977
|
+
current setup to the recommendation on the validation records, for example
|
|
978
|
+
`Median cost per request $0.0040 → $0.0010 (-75%)`. `models status` shows the same summary later.
|
|
979
|
+
|
|
933
980
|
The search is `databricks_agentkit.model_upgrades`, which you can also call directly (for example
|
|
934
981
|
from a notebook) to tune several model services and MLflow Prompt Registry prompts together:
|
|
935
982
|
|
|
@@ -1658,3 +1705,20 @@ sync/streaming/background transport selector is manual.
|
|
|
1658
1705
|
Developing Agent Bricks CLI (`agentbricks`), AgentKit, the runtime, and templates - plus the local dev loop and how to
|
|
1659
1706
|
test unreleased changes on `agentbricks dev` and `agentbricks deploy`, is covered in
|
|
1660
1707
|
[CONTRIBUTING.md](CONTRIBUTING.md).
|
|
1708
|
+
|
|
1709
|
+
The deployment workflow tracks phases and readiness internally; these observations are not
|
|
1710
|
+
logged as separate telemetry fields. Network errors are retried within the existing readiness budget; if the final probe remains unreachable,
|
|
1711
|
+
the deployed app has unverified readiness rather than a reported application failure. These
|
|
1712
|
+
observations do not validate model or tool behavior.
|
|
1713
|
+
|
|
1714
|
+
Command outcomes can be interpreted from the existing command path, exit code, error category,
|
|
1715
|
+
and options. Pending waits (`deployments wait` exit 75) and background submissions
|
|
1716
|
+
(`deploy --no-wait`) should not be counted as deployment failures. Deployment operation UUIDs
|
|
1717
|
+
stay in local state and the background worker; they are not uploaded. The separate uploaded
|
|
1718
|
+
`invocation_id` identifies one command and joins details-link arrivals to it.
|
|
1719
|
+
See [outcome interpretation](CONTRIBUTING.md#interpreting-command-and-deployment-outcomes) for
|
|
1720
|
+
failure-rate denominators and coverage limits.
|
|
1721
|
+
|
|
1722
|
+
Local runs track parent interruption and child exit status internally. A child-only SIGINT or
|
|
1723
|
+
explicit exit 130 remains a runtime failure; it is not treated as a confirmed user cancellation.
|
|
1724
|
+
Caught parent interruptions use the existing interruption category and omit failure text.
|
|
@@ -847,7 +847,10 @@ Use the permission commands below as the store creator or a workspace admin to r
|
|
|
847
847
|
## Model and prompt upgrades (experimental)
|
|
848
848
|
|
|
849
849
|
`agentbricks experimental models` and `agentbricks experimental prompts` find the best model and
|
|
850
|
-
prompt for each LLM call in your agent and swap them in.
|
|
850
|
+
prompt for each LLM call in your agent and swap them in. Use them when a new model launches, or when
|
|
851
|
+
you want the same quality for less: you supply an eval set and how much quality, latency, and cost
|
|
852
|
+
matter, and the search tries each candidate model per LLM call, rewrites the prompts for it, and
|
|
853
|
+
recommends the combination that scores best on your whole agent. They live under `experimental` because
|
|
851
854
|
their flags and output may still change between releases without a deprecation period. The
|
|
852
855
|
agent.toml tables they write live under `[experimental]` too.
|
|
853
856
|
|
|
@@ -868,17 +871,56 @@ agentbricks experimental models status # the job's state, then its recomm
|
|
|
868
871
|
agentbricks experimental models apply # switch to it
|
|
869
872
|
```
|
|
870
873
|
|
|
874
|
+
The `agent.eval:...` references name things in your project. A minimal `agent/eval.py`:
|
|
875
|
+
|
|
876
|
+
```python
|
|
877
|
+
import mlflow
|
|
878
|
+
|
|
879
|
+
from agent.agent import answer # your agent's own entry point, called synchronously
|
|
880
|
+
|
|
881
|
+
mlflow.langchain.autolog() # traces token usage, which cost scoring needs; use your framework's autolog
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
def predict(inputs):
|
|
885
|
+
return answer(inputs["question"]) # wrap an async agent in asyncio.run(...)
|
|
886
|
+
|
|
887
|
+
|
|
888
|
+
TRAIN = [
|
|
889
|
+
{
|
|
890
|
+
"inputs": {"question": "Plan 3 days in Tokyo in late March"},
|
|
891
|
+
"expectations": {"expected_response": "..."},
|
|
892
|
+
},
|
|
893
|
+
# ... a few dozen records that look like real traffic
|
|
894
|
+
]
|
|
895
|
+
VAL = [...] # same shape, held out; the winner and the summary's medians come from these
|
|
896
|
+
|
|
897
|
+
|
|
898
|
+
def mentions_expected(inputs, expectations, answer):
|
|
899
|
+
return float(expectations["expected_response"].lower() in str(answer).lower())
|
|
900
|
+
|
|
901
|
+
|
|
902
|
+
SCORERS = [mentions_expected] # or MLflow scorers, e.g. mlflow.genai.scorers.Correctness()
|
|
903
|
+
```
|
|
904
|
+
|
|
905
|
+
Each of the agent's LLM calls must call its role's model service, `resolve_model_service("<role>")`
|
|
906
|
+
from `databricks_agentkit.runtime.tool_manifest`, so the search can route it to each candidate.
|
|
907
|
+
|
|
871
908
|
By default `models upgrade` uploads the project to your workspace and runs the search as a
|
|
872
909
|
serverless Databricks job, because a search can take hours. `--run-on local` runs it in your
|
|
873
910
|
terminal instead, which needs the `upgrade` extra and the agent's dependencies installed. Each call
|
|
874
911
|
takes longer from a laptop than on a serverless job, and a record slower than `--latency-gate` (60
|
|
875
912
|
seconds by default) scores 0, so raise it if a local run warns that records went over the gate. The job imports the `predict_fn`,
|
|
876
913
|
eval data, and scorers you name from the project (the same inputs `optimize_prompts_and_models`
|
|
877
|
-
takes, below) and runs each eval record once per candidate, against
|
|
878
|
-
|
|
914
|
+
takes, below) and runs each eval record once per candidate, against temporary clones of the model
|
|
915
|
+
services: one per service and model it may use, `<service>_exp_<id>_<model>`, created up front and
|
|
916
|
+
deleted when the search ends. Each clone always serves its one model, so switching candidates
|
|
917
|
+
redirects calls to another clone instead of waiting for a service's model to change. Each LLM call must use its role's service, `resolve_model_service("<role>")`, which reads the
|
|
879
918
|
`AGENT_MODEL_SERVICE_<ROLE>` env var that deploy (and the job, before importing your code) sets.
|
|
880
|
-
GEPA also rewrites every prompt bound with `prompts bind` for each candidate model
|
|
881
|
-
|
|
919
|
+
GEPA also rewrites every prompt bound with `prompts bind` for each candidate model, so you don't
|
|
920
|
+
pass prompt URIs unless you want a different set. Pass `--prompt` to pick specific prompts instead,
|
|
921
|
+
or `--models-only` to leave prompts alone. A `--prompt` URI must name an alias
|
|
922
|
+
(`prompts:/main.my_agent.writer@production`), not a version (`.../writer/3`): apply moves the
|
|
923
|
+
alias to the rewritten version, so an agent that loads a fixed version would never see it. `models apply` switches
|
|
882
924
|
to the best quality / latency / cost trade-off and registers any rewritten prompts (prior versions
|
|
883
925
|
keep `@production_previous`). `models rollback` undoes the whole last apply: it switches every
|
|
884
926
|
model back and moves each prompt's alias back to its prior version. Apply refuses recommendations
|
|
@@ -887,6 +929,11 @@ recorded when the recommendation was applied. If rollback fails partway through,
|
|
|
887
929
|
to finish the remaining changes. Each search owns its temporary clones, so overlapping jobs can
|
|
888
930
|
evaluate different models independently.
|
|
889
931
|
|
|
932
|
+
When the search finishes, the summary shows each role's current and recommended model, the change in
|
|
933
|
+
the combined score, and how the median quality, latency, and cost per request moved from the
|
|
934
|
+
current setup to the recommendation on the validation records, for example
|
|
935
|
+
`Median cost per request $0.0040 → $0.0010 (-75%)`. `models status` shows the same summary later.
|
|
936
|
+
|
|
890
937
|
The search is `databricks_agentkit.model_upgrades`, which you can also call directly (for example
|
|
891
938
|
from a notebook) to tune several model services and MLflow Prompt Registry prompts together:
|
|
892
939
|
|
|
@@ -1615,3 +1662,20 @@ sync/streaming/background transport selector is manual.
|
|
|
1615
1662
|
Developing Agent Bricks CLI (`agentbricks`), AgentKit, the runtime, and templates - plus the local dev loop and how to
|
|
1616
1663
|
test unreleased changes on `agentbricks dev` and `agentbricks deploy`, is covered in
|
|
1617
1664
|
[CONTRIBUTING.md](CONTRIBUTING.md).
|
|
1665
|
+
|
|
1666
|
+
The deployment workflow tracks phases and readiness internally; these observations are not
|
|
1667
|
+
logged as separate telemetry fields. Network errors are retried within the existing readiness budget; if the final probe remains unreachable,
|
|
1668
|
+
the deployed app has unverified readiness rather than a reported application failure. These
|
|
1669
|
+
observations do not validate model or tool behavior.
|
|
1670
|
+
|
|
1671
|
+
Command outcomes can be interpreted from the existing command path, exit code, error category,
|
|
1672
|
+
and options. Pending waits (`deployments wait` exit 75) and background submissions
|
|
1673
|
+
(`deploy --no-wait`) should not be counted as deployment failures. Deployment operation UUIDs
|
|
1674
|
+
stay in local state and the background worker; they are not uploaded. The separate uploaded
|
|
1675
|
+
`invocation_id` identifies one command and joins details-link arrivals to it.
|
|
1676
|
+
See [outcome interpretation](CONTRIBUTING.md#interpreting-command-and-deployment-outcomes) for
|
|
1677
|
+
failure-rate denominators and coverage limits.
|
|
1678
|
+
|
|
1679
|
+
Local runs track parent interruption and child exit status internally. A child-only SIGINT or
|
|
1680
|
+
explicit exit 130 remains a runtime failure; it is not treated as a confirmed user cancellation.
|
|
1681
|
+
Caught parent interruptions use the existing interruption category and omit failure text.
|
|
@@ -24,6 +24,7 @@ import signal
|
|
|
24
24
|
import subprocess
|
|
25
25
|
import sys
|
|
26
26
|
import time
|
|
27
|
+
import uuid
|
|
27
28
|
from typing import Any, Callable, Optional
|
|
28
29
|
|
|
29
30
|
import click
|
|
@@ -39,6 +40,12 @@ from databricks_agentbricks.clients.conversation_store_client import (
|
|
|
39
40
|
)
|
|
40
41
|
from databricks_agentbricks.clients.databricks_cli import _databricks
|
|
41
42
|
from databricks_agentbricks.clients.tracing_client import TracingClient
|
|
43
|
+
from databricks_agentbricks.diagnostics import (
|
|
44
|
+
CommandDiagnostics,
|
|
45
|
+
FailureStage,
|
|
46
|
+
Outcome,
|
|
47
|
+
operation_uuid,
|
|
48
|
+
)
|
|
42
49
|
from databricks_agentbricks.presentation import render
|
|
43
50
|
from databricks_agentbricks.presentation.deploy import (
|
|
44
51
|
deploy_result_payload,
|
|
@@ -88,6 +95,7 @@ from databricks_agentbricks.services.invoke.auth import WorkspaceOAuthAuthentica
|
|
|
88
95
|
# EX_TEMPFAIL from sysexits.h when the deploy is still running so the caller knows to wait again.
|
|
89
96
|
_WAIT_TIMEOUT_S = 100
|
|
90
97
|
_EX_TEMPFAIL = 75
|
|
98
|
+
_DEPLOY_OPERATION_ENV = "AGENTBRICKS_DEPLOY_OPERATION_ID"
|
|
91
99
|
_DEPLOYMENT_OUTCOMES: dict[str | None, telemetry.DeploymentOutcome] = {
|
|
92
100
|
None: "DEPLOYMENT_OUTCOME_UNSPECIFIED",
|
|
93
101
|
deploy_state.RUNNING: "DEPLOYMENT_OUTCOME_RUNNING",
|
|
@@ -102,8 +110,14 @@ def build_deploy_service(obj, *, background: bool = False) -> DeployService:
|
|
|
102
110
|
A deploy records its progress in the project's state file through a reporter that wraps the
|
|
103
111
|
terminal one; ``background`` marks the detached child of `deploy --no-wait`.
|
|
104
112
|
"""
|
|
113
|
+
diagnostics = getattr(obj, "diagnostics", None) or CommandDiagnostics()
|
|
114
|
+
obj.diagnostics = diagnostics
|
|
105
115
|
api_client_provider = obj.api_client_provider
|
|
106
|
-
state_tracker = DeployStateTracker(
|
|
116
|
+
state_tracker = DeployStateTracker(
|
|
117
|
+
result_payload=deploy_result_payload,
|
|
118
|
+
background=background,
|
|
119
|
+
operation_id=diagnostics.operation_id,
|
|
120
|
+
)
|
|
107
121
|
reporter = DeployStateReporter(ClickReporter(), state_tracker)
|
|
108
122
|
apps_client = AppsClient(obj.profile, runner=_databricks, on_busy=reporter.note)
|
|
109
123
|
apps_user_auth_client = AppsUserAuthClient(obj.profile)
|
|
@@ -130,6 +144,7 @@ def build_deploy_service(obj, *, background: bool = False) -> DeployService:
|
|
|
130
144
|
model_binding_provisioner=ModelBindingProvisioner(api_client_provider, reporter),
|
|
131
145
|
reporter=reporter,
|
|
132
146
|
state_tracker=state_tracker,
|
|
147
|
+
diagnostics=diagnostics,
|
|
133
148
|
app_probe=AppProbe(WorkspaceOAuthAuthenticator(obj.profile).authorization_header),
|
|
134
149
|
)
|
|
135
150
|
|
|
@@ -165,7 +180,11 @@ def _background_argv(obj, request: DeployRequest) -> list[str]:
|
|
|
165
180
|
|
|
166
181
|
|
|
167
182
|
def spawn_background_deploy(
|
|
168
|
-
argv: list[str],
|
|
183
|
+
argv: list[str],
|
|
184
|
+
*,
|
|
185
|
+
log: pathlib.Path,
|
|
186
|
+
popen: Optional[Callable[..., Any]] = None,
|
|
187
|
+
operation_id: str | None = None,
|
|
169
188
|
) -> int:
|
|
170
189
|
"""Start ``argv`` detached from this terminal, writing its output to ``log``; return its pid.
|
|
171
190
|
|
|
@@ -180,13 +199,17 @@ def spawn_background_deploy(
|
|
|
180
199
|
)
|
|
181
200
|
else:
|
|
182
201
|
kwargs["start_new_session"] = True
|
|
202
|
+
child_env = {**os.environ, "PYTHONUNBUFFERED": "1", "AGENTBRICKS_DISABLE_AGENT_HINT": "1"}
|
|
203
|
+
child_env.pop(_DEPLOY_OPERATION_ENV, None)
|
|
204
|
+
if correlation := operation_uuid(operation_id):
|
|
205
|
+
child_env[_DEPLOY_OPERATION_ENV] = correlation
|
|
183
206
|
with log.open("wb") as out:
|
|
184
207
|
process = (popen or subprocess.Popen)(
|
|
185
208
|
argv,
|
|
186
209
|
stdin=subprocess.DEVNULL,
|
|
187
210
|
stdout=out,
|
|
188
211
|
stderr=subprocess.STDOUT,
|
|
189
|
-
env=
|
|
212
|
+
env=child_env,
|
|
190
213
|
close_fds=True,
|
|
191
214
|
**kwargs,
|
|
192
215
|
)
|
|
@@ -302,6 +325,11 @@ def deploy(
|
|
|
302
325
|
--no-wait and then `agentbricks deployments wait`.
|
|
303
326
|
"""
|
|
304
327
|
telemetry.begin_deployment(background_child=background_child)
|
|
328
|
+
diagnostics = getattr(obj, "diagnostics", None) or CommandDiagnostics()
|
|
329
|
+
obj.diagnostics = diagnostics
|
|
330
|
+
diagnostics.operation_id = (
|
|
331
|
+
operation_uuid(os.environ.get(_DEPLOY_OPERATION_ENV)) if background_child else None
|
|
332
|
+
) or str(uuid.uuid4())
|
|
305
333
|
if allowed_origin and clear_allowed_origins:
|
|
306
334
|
raise click.UsageError("Use --allowed-origin or --clear-allowed-origins, not both.")
|
|
307
335
|
request = DeployRequest(
|
|
@@ -318,14 +346,22 @@ def deploy(
|
|
|
318
346
|
service = build_deploy_service(obj, background=background_child)
|
|
319
347
|
if no_wait and not background_child:
|
|
320
348
|
# Fail fast in the foreground on anything quick to check; the child repeats these checks.
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
349
|
+
with diagnostics.phase(FailureStage.PREFLIGHT):
|
|
350
|
+
prepared = service.prepare(request)
|
|
351
|
+
service.check_auth()
|
|
352
|
+
workspace = service.workspace_identity()
|
|
324
353
|
source_dir = pathlib.Path(source)
|
|
325
354
|
log = deploy_state.log_path(source_dir, prepared.name)
|
|
326
|
-
pid = spawn_background_deploy(
|
|
355
|
+
pid = spawn_background_deploy(
|
|
356
|
+
_background_argv(obj, request), log=log, operation_id=diagnostics.operation_id
|
|
357
|
+
)
|
|
327
358
|
state_file = deploy_state.record_background_start(
|
|
328
|
-
source_dir,
|
|
359
|
+
source_dir,
|
|
360
|
+
prepared.name,
|
|
361
|
+
pid=pid,
|
|
362
|
+
now=time.time(),
|
|
363
|
+
operation_id=diagnostics.operation_id,
|
|
364
|
+
workspace=workspace,
|
|
329
365
|
)
|
|
330
366
|
telemetry.set_deployment_outcome("DEPLOYMENT_OUTCOME_RUNNING")
|
|
331
367
|
present_background_started(
|
|
@@ -337,6 +373,7 @@ def deploy(
|
|
|
337
373
|
AgentDetailsClient(obj.api_client_provider).get_url(prepared.name),
|
|
338
374
|
),
|
|
339
375
|
)
|
|
376
|
+
diagnostics.outcome = Outcome.SUBMITTED
|
|
340
377
|
return
|
|
341
378
|
started = time.monotonic()
|
|
342
379
|
try:
|
|
@@ -9,6 +9,7 @@ from typing import Any
|
|
|
9
9
|
|
|
10
10
|
import click
|
|
11
11
|
|
|
12
|
+
from databricks_agentbricks.cli.memory_changes import changes
|
|
12
13
|
from databricks_agentbricks.cli.permissions import store_permissions
|
|
13
14
|
from databricks_agentbricks.cli.pipeline import pipeline
|
|
14
15
|
from databricks_agentbricks.errors import AgentCliError
|
|
@@ -83,6 +84,7 @@ def entries() -> None:
|
|
|
83
84
|
|
|
84
85
|
|
|
85
86
|
memory.add_command(pipeline)
|
|
87
|
+
memory.add_command(changes)
|
|
86
88
|
|
|
87
89
|
|
|
88
90
|
# --- bind a store to an agent project (agent.toml) --------------------------
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
"""Read immutable memory versions and their provenance."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import difflib
|
|
6
|
+
import sys
|
|
7
|
+
|
|
8
|
+
import click
|
|
9
|
+
from rich import box
|
|
10
|
+
from rich.panel import Panel
|
|
11
|
+
from rich.text import Text
|
|
12
|
+
|
|
13
|
+
from databricks_agentbricks.errors import AgentCliError
|
|
14
|
+
from databricks_agentbricks.presentation import render
|
|
15
|
+
from databricks_agentkit import timefmt
|
|
16
|
+
|
|
17
|
+
_SOURCE_PREFIX = "MANAGED_MEMORY_ENTRY_SOURCE_TYPE_"
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
def _source_type(ctx, param, value):
|
|
21
|
+
if value is None:
|
|
22
|
+
return None
|
|
23
|
+
source = value.strip().upper().removeprefix(_SOURCE_PREFIX)
|
|
24
|
+
if source not in {"AGENT", "DREAMER", "UNSPECIFIED"}:
|
|
25
|
+
raise click.BadParameter("Choose agent, dreamer, unspecified, or a full source enum.")
|
|
26
|
+
return _SOURCE_PREFIX + source
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
def _interactive() -> bool:
|
|
30
|
+
return sys.stdin.isatty() and sys.stdout.isatty()
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def _reference(change) -> str:
|
|
34
|
+
# Session ids are caller-chosen, run and request ids are generated; naming the kind keeps a
|
|
35
|
+
# column of mixed ids readable.
|
|
36
|
+
if change.get("session_id"):
|
|
37
|
+
return f"session:{change['session_id']}"
|
|
38
|
+
if change.get("pipeline_run"):
|
|
39
|
+
return f"run:{change['pipeline_run'].rsplit('/', 1)[-1]}"
|
|
40
|
+
if change.get("request_id"):
|
|
41
|
+
return f"request:{change['request_id']}"
|
|
42
|
+
return "—"
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
def _actors(client, store, change) -> str:
|
|
46
|
+
# List rows carry no actor; it is only on the entry versions of the change itself.
|
|
47
|
+
change_id = change.get("name", "").rsplit("/", 1)[-1]
|
|
48
|
+
entries = client.get_memory_change(store, change_id).get("entries", [])
|
|
49
|
+
return ", ".join(sorted({e["actor_id"] for e in entries if e.get("actor_id")})) or "—"
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def _counts(change) -> Text:
|
|
53
|
+
return Text.assemble(
|
|
54
|
+
(f"+{change.get('entries_added', 0)}", render.SUCCESS),
|
|
55
|
+
" ",
|
|
56
|
+
(f"~{change.get('entries_updated', 0)}", render.WARNING),
|
|
57
|
+
" ",
|
|
58
|
+
(f"-{change.get('entries_deleted', 0)}", render.ERROR),
|
|
59
|
+
)
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
def _previous_version(client, store, entry):
|
|
63
|
+
"""The version of `entry` that this change replaced, or None at the start of its history."""
|
|
64
|
+
previous_id = entry.get("previous_change_id")
|
|
65
|
+
if not previous_id:
|
|
66
|
+
return None
|
|
67
|
+
previous = client.get_memory_change(store, previous_id)
|
|
68
|
+
for version in previous.get("entries", []):
|
|
69
|
+
if version.get("memory_entry") == entry.get("memory_entry"):
|
|
70
|
+
return version
|
|
71
|
+
# Diffing against nothing would show the whole entry as new, which is wrong.
|
|
72
|
+
raise AgentCliError(
|
|
73
|
+
f"Change {previous_id} has no version of {entry.get('memory_entry')}; cannot diff."
|
|
74
|
+
)
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def _diff_panel(entry, previous) -> Panel:
|
|
78
|
+
# The entry's fields above already name the previous change.
|
|
79
|
+
title = f"{entry.get('path') or 'Entry'} diff"
|
|
80
|
+
is_delete = entry.get("change_type", "").endswith("_DELETE")
|
|
81
|
+
if "content" not in entry and previous is not None and not is_delete:
|
|
82
|
+
# Without this version's content there is nothing to compare; an all-removed diff would
|
|
83
|
+
# read as a delete.
|
|
84
|
+
body = Text("This version carries no content to compare.", style=render.DIM)
|
|
85
|
+
else:
|
|
86
|
+
old = ((previous or {}).get("content") or "").splitlines()
|
|
87
|
+
new = (entry.get("content") or "").splitlines()
|
|
88
|
+
styles = {"-": render.ERROR, "+": render.SUCCESS, " ": render.DIM}
|
|
89
|
+
# ndiff also emits "?" hint lines that point inside a changed line; skip them.
|
|
90
|
+
lines = [
|
|
91
|
+
Text(line, style=styles[line[0]])
|
|
92
|
+
for line in difflib.ndiff(old, new)
|
|
93
|
+
if line[0] in styles
|
|
94
|
+
]
|
|
95
|
+
body = Text("\n").join(lines) if lines else Text("No content.", style=render.DIM)
|
|
96
|
+
return Panel(body, title=title, title_align="left", border_style=render.DIM, box=box.ROUNDED)
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
@click.group()
|
|
100
|
+
def changes() -> None:
|
|
101
|
+
"""Inspect memory write history.
|
|
102
|
+
|
|
103
|
+
List returns change metadata a page at a time; get returns one whole change, including its
|
|
104
|
+
immutable entry versions. JSON preserves the API response, including list's continuation
|
|
105
|
+
token.
|
|
106
|
+
"""
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
@changes.command("list")
|
|
110
|
+
@click.option("--store", required=True, help="Store id or resource name.")
|
|
111
|
+
@click.option("--actor-id", default=None, help="Only changes touching this actor's entries.")
|
|
112
|
+
@click.option(
|
|
113
|
+
"--source-type",
|
|
114
|
+
callback=_source_type,
|
|
115
|
+
default=None,
|
|
116
|
+
help="Origin: agent, dreamer, unspecified, or a full source enum. Omit for all sources.",
|
|
117
|
+
)
|
|
118
|
+
@click.option(
|
|
119
|
+
"--path",
|
|
120
|
+
"--path-prefix",
|
|
121
|
+
"path_prefix",
|
|
122
|
+
default=None,
|
|
123
|
+
help="Literal entry-path prefix (not an exact path or filesystem path).",
|
|
124
|
+
)
|
|
125
|
+
@click.option(
|
|
126
|
+
"--memory-entry-id",
|
|
127
|
+
default=None,
|
|
128
|
+
help="Only changes touching this entry id: one entry's version history.",
|
|
129
|
+
)
|
|
130
|
+
@click.option(
|
|
131
|
+
"--page-size",
|
|
132
|
+
type=click.IntRange(1, 100),
|
|
133
|
+
default=10,
|
|
134
|
+
show_default=True,
|
|
135
|
+
help="Maximum changes per page.",
|
|
136
|
+
)
|
|
137
|
+
@click.option(
|
|
138
|
+
"--page-token",
|
|
139
|
+
default=None,
|
|
140
|
+
help="Continue from a next_page_token returned by -o json, with the same store and filters.",
|
|
141
|
+
)
|
|
142
|
+
@click.pass_obj
|
|
143
|
+
def changes_list(
|
|
144
|
+
obj, store, actor_id, source_type, path_prefix, memory_entry_id, page_size, page_token
|
|
145
|
+
) -> None:
|
|
146
|
+
"""List change metadata, newest first, without entry contents.
|
|
147
|
+
|
|
148
|
+
On a terminal, text output offers the next page; otherwise it prints one page. The actor
|
|
149
|
+
column costs one extra request per listed change. Actor, path, and entry filters must match the same touched entry. Counts describe the whole
|
|
150
|
+
change. For one entry's history, including after it was deleted, pass --memory-entry-id with
|
|
151
|
+
the final segment of its memory_entry name.
|
|
152
|
+
"""
|
|
153
|
+
client = obj.client()
|
|
154
|
+
interactive = obj.output != "json" and _interactive()
|
|
155
|
+
while True:
|
|
156
|
+
data = client.list_memory_changes(
|
|
157
|
+
store,
|
|
158
|
+
actor_id=actor_id,
|
|
159
|
+
source_type=source_type,
|
|
160
|
+
path_prefix=path_prefix,
|
|
161
|
+
memory_entry_id=memory_entry_id,
|
|
162
|
+
page_size=page_size,
|
|
163
|
+
page_token=page_token,
|
|
164
|
+
)
|
|
165
|
+
if obj.output == "json":
|
|
166
|
+
render.emit_json(data)
|
|
167
|
+
return
|
|
168
|
+
rows = [
|
|
169
|
+
[
|
|
170
|
+
Text(change.get("name", "").rsplit("/", 1)[-1]),
|
|
171
|
+
Text(change.get("source_type", "").removeprefix(_SOURCE_PREFIX)),
|
|
172
|
+
Text(_actors(client, store, change)),
|
|
173
|
+
Text(_reference(change)),
|
|
174
|
+
_counts(change),
|
|
175
|
+
timefmt.absolute(change.get("create_time")),
|
|
176
|
+
]
|
|
177
|
+
for change in data.get("memory_changes", [])
|
|
178
|
+
]
|
|
179
|
+
render.resource_table(
|
|
180
|
+
"Memory Changes",
|
|
181
|
+
[
|
|
182
|
+
("Change ID", "left"),
|
|
183
|
+
("Source", "left"),
|
|
184
|
+
("Actor", "left"),
|
|
185
|
+
("Reference", "left"),
|
|
186
|
+
("Entries", "left"),
|
|
187
|
+
("Created", "left"),
|
|
188
|
+
],
|
|
189
|
+
rows,
|
|
190
|
+
no_wrap=[0],
|
|
191
|
+
)
|
|
192
|
+
page_token = data.get("next_page_token")
|
|
193
|
+
if not page_token:
|
|
194
|
+
return
|
|
195
|
+
if not interactive:
|
|
196
|
+
click.echo("More changes available. Run in a terminal to page through them.")
|
|
197
|
+
return
|
|
198
|
+
if not click.confirm("Show next page?", default=False):
|
|
199
|
+
return
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
@changes.command("get")
|
|
203
|
+
@click.argument("change_id")
|
|
204
|
+
@click.option("--store", required=True, help="Store id or resource name.")
|
|
205
|
+
@click.pass_obj
|
|
206
|
+
def changes_get(obj, change_id, store) -> None:
|
|
207
|
+
"""Get one change: its header and the entry versions it wrote, including content.
|
|
208
|
+
|
|
209
|
+
Text output shows each entry's content as a line diff against the version named by its
|
|
210
|
+
previous_change_id, at the cost of one extra request per entry; JSON returns the change as
|
|
211
|
+
stored. A missing predecessor marks the start of recorded history. Restoring an older version
|
|
212
|
+
requires a new entry update; these commands only read history.
|
|
213
|
+
"""
|
|
214
|
+
client = obj.client()
|
|
215
|
+
data = client.get_memory_change(store, change_id)
|
|
216
|
+
if obj.output == "json":
|
|
217
|
+
render.emit_json(data)
|
|
218
|
+
return
|
|
219
|
+
entries = data.get("entries", [])
|
|
220
|
+
# Read every predecessor before printing, so a failed read cannot leave a partial page.
|
|
221
|
+
previous = [_previous_version(client, store, entry) for entry in entries]
|
|
222
|
+
fields = {
|
|
223
|
+
"Name": data.get("name"),
|
|
224
|
+
"Source": data.get("source_type"),
|
|
225
|
+
"Session": data.get("session_id"),
|
|
226
|
+
"Pipeline run": data.get("pipeline_run"),
|
|
227
|
+
"Request": data.get("request_id"),
|
|
228
|
+
"Principal": data.get("principal"),
|
|
229
|
+
"Session store": data.get("session_store"),
|
|
230
|
+
"Sessions read": data.get("sessions_read"),
|
|
231
|
+
"Entries": _counts(data),
|
|
232
|
+
"Created": timefmt.absolute(data.get("create_time")),
|
|
233
|
+
"Updated": timefmt.absolute(data.get("update_time")),
|
|
234
|
+
}
|
|
235
|
+
render.detail("Memory Change", change_id, _literal_fields(fields))
|
|
236
|
+
for index, entry in enumerate(entries):
|
|
237
|
+
fields = {
|
|
238
|
+
"Memory entry": entry.get("memory_entry"),
|
|
239
|
+
"Actor": entry.get("actor_id"),
|
|
240
|
+
"Path": entry.get("path"),
|
|
241
|
+
"Type": entry.get("change_type"),
|
|
242
|
+
"Session": entry.get("session_id"),
|
|
243
|
+
"Previous change ID": entry.get("previous_change_id"),
|
|
244
|
+
"Description": entry.get("description"),
|
|
245
|
+
"Summary": entry.get("summary"),
|
|
246
|
+
"Created": timefmt.absolute(entry.get("create_time")),
|
|
247
|
+
}
|
|
248
|
+
render.detail("Entry", entry.get("path") or "—", _literal_fields(fields))
|
|
249
|
+
# The diff carries every line of the content, so there is no separate content field.
|
|
250
|
+
render.console().print()
|
|
251
|
+
render.console().print(_diff_panel(entry, previous[index]))
|
|
252
|
+
click.echo(f"{len(entries)} entry versions.")
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
def _literal_fields(fields):
|
|
256
|
+
# Memory text may contain brackets that Rich would otherwise interpret as markup.
|
|
257
|
+
return {key: Text(value) if isinstance(value, str) else value for key, value in fields.items()}
|