weave-python 0.58.0__tar.gz → 0.59.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.
- {weave_python-0.58.0 → weave_python-0.59.0}/PKG-INFO +1 -1
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/agent.py +94 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/.github/runs-on.yml +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/.github/workflows/format-lint.yaml +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/.github/workflows/generate.yaml +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/.github/workflows/gh-actions-lint.yaml +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/.github/workflows/release.yaml +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/.gitignore +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/.python-version +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/LICENSE +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/README.md +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/Taskfile.yaml +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/buf.gen.yaml +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/pyproject.toml +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/renovate.json +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/tools/sqlcgen/README.md +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/tools/sqlcgen/sqlcgen.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/tools/sqlcgen/test_sqlcgen.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/uv.lock +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/agent/v1/agent_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/agent/v1/agent_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/agent/v1/agent_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/agent/v1/agent_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/agent/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/agent/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/agent/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/agent/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/event_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/event_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/event_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/event_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/message_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/message_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/message_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/message_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/process_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/process_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/process_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/process_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/run_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/run_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/run_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/run_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/atc/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/auth/v1/auth_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/auth/v1/auth_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/auth/v1/auth_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/auth/v1/auth_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/auth/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/auth/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/auth/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/auth/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/chat/v1/chat_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/chat/v1/chat_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/chat/v1/chat_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/chat/v1/chat_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/chat/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/chat/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/chat/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/chat/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/consolidation/v1/consolidation_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/consolidation/v1/consolidation_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/consolidation/v1/consolidation_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/consolidation/v1/consolidation_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/consolidation/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/consolidation/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/consolidation/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/consolidation/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/gateway/v1/gateway_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/gateway/v1/gateway_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/gateway/v1/gateway_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/gateway/v1/gateway_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/gateway/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/gateway/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/gateway/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/gateway/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/ingestion/v1/ingestion_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/ingestion/v1/ingestion_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/ingestion/v1/ingestion_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/ingestion/v1/ingestion_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/ingestion/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/ingestion/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/ingestion/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/ingestion/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/model/v1/model_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/model/v1/model_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/model/v1/model_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/model/v1/model_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/model/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/model/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/model/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/model/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/organization_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/organization_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/organization_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/organization_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/project/v1/project_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/project/v1/project_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/project/v1/project_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/project/v1/project_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/project/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/project/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/project/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/project/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/provider/v1/provider_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/provider/v1/provider_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/provider/v1/provider_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/provider/v1/provider_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/provider/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/provider/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/provider/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/provider/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/retrieval/v1/retrieval_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/retrieval/v1/retrieval_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/retrieval/v1/retrieval_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/retrieval/v1/retrieval_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/retrieval/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/retrieval/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/retrieval/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/retrieval/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/task/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/task/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/task/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/task/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/task/v1/task_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/task/v1/task_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/task/v1/task_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/task/v1/task_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/workflow/v1/service_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/workflow/v1/service_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/workflow/v1/service_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/workflow/v1/service_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/workflow/v1/workflow_pb2.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/workflow/v1/workflow_pb2.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/workflow/v1/workflow_pb2_grpc.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/workflow/v1/workflow_pb2_grpc.pyi +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/atcdb/event.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/atcdb/inspection.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/atcdb/mailbox.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/atcdb/models.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/atcdb/run_template.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/atcdb/snapshot.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/atcdb/team.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/auth_identity.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/chat.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/consolidation.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/document_security.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/ingestion.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/model_catalog.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/models.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/organization.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/project.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/provider.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/retrieval.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/task.py +0 -0
- {weave_python-0.58.0 → weave_python-0.59.0}/weave/weavesql/weavedb/workflow.py +0 -0
|
@@ -13,6 +13,30 @@ import sqlalchemy.ext.asyncio
|
|
|
13
13
|
from weave.weavesql.weavedb import models
|
|
14
14
|
|
|
15
15
|
|
|
16
|
+
CLAIM_AGENT_RUN = """-- name: claim_agent_run \\:one
|
|
17
|
+
UPDATE weave.agent_runs
|
|
18
|
+
SET
|
|
19
|
+
status = :p1,
|
|
20
|
+
error_code = '',
|
|
21
|
+
safe_error_message = '',
|
|
22
|
+
started_at = COALESCE(started_at, :p2\\:\\:timestamptz),
|
|
23
|
+
finished_at = NULL
|
|
24
|
+
WHERE organization_id = :p3
|
|
25
|
+
AND id = :p4
|
|
26
|
+
AND status = :p5
|
|
27
|
+
RETURNING id, organization_id, agent_definition_id, agent_version_id, status, created_by_user_id, chat_session_id, workflow_run_id, workflow_step_run_id, input, output, error_code, safe_error_message, created_at, started_at, finished_at
|
|
28
|
+
"""
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@dataclasses.dataclass()
|
|
32
|
+
class ClaimAgentRunParams:
|
|
33
|
+
status: str
|
|
34
|
+
started_at: datetime.datetime
|
|
35
|
+
organization_id: uuid.UUID
|
|
36
|
+
agent_run_id: uuid.UUID
|
|
37
|
+
expected_status: str
|
|
38
|
+
|
|
39
|
+
|
|
16
40
|
CREATE_AGENT_DEFINITION = """-- name: create_agent_definition \\:one
|
|
17
41
|
INSERT INTO weave.agent_definitions (
|
|
18
42
|
id,
|
|
@@ -632,6 +656,40 @@ class Querier:
|
|
|
632
656
|
def __init__(self, conn: sqlalchemy.engine.Connection):
|
|
633
657
|
self._conn = conn
|
|
634
658
|
|
|
659
|
+
def claim_agent_run(
|
|
660
|
+
self, arg: ClaimAgentRunParams
|
|
661
|
+
) -> Optional[models.WeaveAgentRun]:
|
|
662
|
+
row = self._conn.execute(
|
|
663
|
+
sqlalchemy.text(CLAIM_AGENT_RUN),
|
|
664
|
+
{
|
|
665
|
+
"p1": arg.status,
|
|
666
|
+
"p2": arg.started_at,
|
|
667
|
+
"p3": arg.organization_id,
|
|
668
|
+
"p4": arg.agent_run_id,
|
|
669
|
+
"p5": arg.expected_status,
|
|
670
|
+
},
|
|
671
|
+
).first()
|
|
672
|
+
if row is None:
|
|
673
|
+
return None
|
|
674
|
+
return models.WeaveAgentRun(
|
|
675
|
+
id=row[0],
|
|
676
|
+
organization_id=row[1],
|
|
677
|
+
agent_definition_id=row[2],
|
|
678
|
+
agent_version_id=row[3],
|
|
679
|
+
status=row[4],
|
|
680
|
+
created_by_user_id=row[5],
|
|
681
|
+
chat_session_id=row[6],
|
|
682
|
+
workflow_run_id=row[7],
|
|
683
|
+
workflow_step_run_id=row[8],
|
|
684
|
+
input=row[9],
|
|
685
|
+
output=row[10],
|
|
686
|
+
error_code=row[11],
|
|
687
|
+
safe_error_message=row[12],
|
|
688
|
+
created_at=row[13],
|
|
689
|
+
started_at=row[14],
|
|
690
|
+
finished_at=row[15],
|
|
691
|
+
)
|
|
692
|
+
|
|
635
693
|
def create_agent_definition(
|
|
636
694
|
self, arg: CreateAgentDefinitionParams
|
|
637
695
|
) -> Optional[models.WeaveAgentDefinition]:
|
|
@@ -1360,6 +1418,42 @@ class AsyncQuerier:
|
|
|
1360
1418
|
def __init__(self, conn: sqlalchemy.ext.asyncio.AsyncConnection):
|
|
1361
1419
|
self._conn = conn
|
|
1362
1420
|
|
|
1421
|
+
async def claim_agent_run(
|
|
1422
|
+
self, arg: ClaimAgentRunParams
|
|
1423
|
+
) -> Optional[models.WeaveAgentRun]:
|
|
1424
|
+
row = (
|
|
1425
|
+
await self._conn.execute(
|
|
1426
|
+
sqlalchemy.text(CLAIM_AGENT_RUN),
|
|
1427
|
+
{
|
|
1428
|
+
"p1": arg.status,
|
|
1429
|
+
"p2": arg.started_at,
|
|
1430
|
+
"p3": arg.organization_id,
|
|
1431
|
+
"p4": arg.agent_run_id,
|
|
1432
|
+
"p5": arg.expected_status,
|
|
1433
|
+
},
|
|
1434
|
+
)
|
|
1435
|
+
).first()
|
|
1436
|
+
if row is None:
|
|
1437
|
+
return None
|
|
1438
|
+
return models.WeaveAgentRun(
|
|
1439
|
+
id=row[0],
|
|
1440
|
+
organization_id=row[1],
|
|
1441
|
+
agent_definition_id=row[2],
|
|
1442
|
+
agent_version_id=row[3],
|
|
1443
|
+
status=row[4],
|
|
1444
|
+
created_by_user_id=row[5],
|
|
1445
|
+
chat_session_id=row[6],
|
|
1446
|
+
workflow_run_id=row[7],
|
|
1447
|
+
workflow_step_run_id=row[8],
|
|
1448
|
+
input=row[9],
|
|
1449
|
+
output=row[10],
|
|
1450
|
+
error_code=row[11],
|
|
1451
|
+
safe_error_message=row[12],
|
|
1452
|
+
created_at=row[13],
|
|
1453
|
+
started_at=row[14],
|
|
1454
|
+
finished_at=row[15],
|
|
1455
|
+
)
|
|
1456
|
+
|
|
1363
1457
|
async def create_agent_definition(
|
|
1364
1458
|
self, arg: CreateAgentDefinitionParams
|
|
1365
1459
|
) -> Optional[models.WeaveAgentDefinition]:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/consolidation/v1/consolidation_pb2.py
RENAMED
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/consolidation/v1/consolidation_pb2.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/consolidation/v1/service_pb2_grpc.py
RENAMED
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/consolidation/v1/service_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/ingestion/v1/ingestion_pb2_grpc.py
RENAMED
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/ingestion/v1/ingestion_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/ingestion/v1/service_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/organization_pb2.py
RENAMED
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/organization_pb2.pyi
RENAMED
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/organization_pb2_grpc.py
RENAMED
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/organization_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/service_pb2_grpc.py
RENAMED
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/organization/v1/service_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/provider/v1/provider_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/retrieval/v1/retrieval_pb2_grpc.py
RENAMED
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/retrieval/v1/retrieval_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/retrieval/v1/service_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{weave_python-0.58.0 → weave_python-0.59.0}/weave/weaveapi/workflow/v1/workflow_pb2_grpc.pyi
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|