agentops-rpc 0.7.3__tar.gz → 0.7.4__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.
Files changed (102) hide show
  1. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/PKG-INFO +1 -1
  2. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/pyproject.toml +1 -1
  3. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/__init__.py +1 -2
  4. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/agents.py +3 -7
  5. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/capabilities.py +3 -0
  6. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/types.py +0 -5
  7. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/eval/grader.py +1 -0
  8. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/gateway/triggers.py +34 -12
  9. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/runs/runs.py +31 -24
  10. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc.egg-info/PKG-INFO +1 -1
  11. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/LICENSE +0 -0
  12. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/README.md +0 -0
  13. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/setup.cfg +0 -0
  14. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/__init__.py +0 -0
  15. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/agent_create.py +0 -0
  16. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/agent_settings.py +0 -0
  17. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/constants.py +0 -0
  18. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/deployment.py +0 -0
  19. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/hosted_agents.py +0 -0
  20. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/roster.py +0 -0
  21. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/run_settings.py +0 -0
  22. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/skill_resource.py +0 -0
  23. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/tools.py +0 -0
  24. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/triggers.py +0 -0
  25. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/agents/worker_catalog.py +0 -0
  26. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/base/__init__.py +0 -0
  27. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/base/build_stamp.py +0 -0
  28. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/base/protocol.py +0 -0
  29. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/config/__init__.py +0 -0
  30. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/config/worker_config.py +0 -0
  31. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/cost/__init__.py +0 -0
  32. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/cost/budgets.py +0 -0
  33. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/cost/usage.py +0 -0
  34. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/eval/__init__.py +0 -0
  35. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/eval/kb_pages.py +0 -0
  36. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/eval/knowledge_base.py +0 -0
  37. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/eval/quality.py +0 -0
  38. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/eval/scores.py +0 -0
  39. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/gateway/__init__.py +0 -0
  40. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/gateway/alerts.py +0 -0
  41. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/gateway/schedules.py +0 -0
  42. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/identity/__init__.py +0 -0
  43. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/identity/credentials.py +0 -0
  44. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/identity/integrations.py +0 -0
  45. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/incidents/__init__.py +0 -0
  46. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/incidents/insights.py +0 -0
  47. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/incidents/issues.py +0 -0
  48. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/memory/__init__.py +0 -0
  49. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/memory/agent/__init__.py +0 -0
  50. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/memory/agent/worker.py +0 -0
  51. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/model/__init__.py +0 -0
  52. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/model/discovery.py +0 -0
  53. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/model/gateway.py +0 -0
  54. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/onboarding/__init__.py +0 -0
  55. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/onboarding/checklist.py +0 -0
  56. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/rules/__init__.py +0 -0
  57. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/rules/types.py +0 -0
  58. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/runs/__init__.py +0 -0
  59. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/runs/a2a.py +0 -0
  60. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/runs/artifacts.py +0 -0
  61. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/runs/capture.py +0 -0
  62. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/runs/events.py +0 -0
  63. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/runs/replay.py +0 -0
  64. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/runs/security.py +0 -0
  65. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/runs/session.py +0 -0
  66. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/runs/titles.py +0 -0
  67. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/runs/types.py +0 -0
  68. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/wire/__init__.py +0 -0
  69. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/wire/frame_registry.py +0 -0
  70. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/wire/frames.py +0 -0
  71. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/wire/koperator.py +0 -0
  72. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/wire/koperator_contract.py +0 -0
  73. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/wire/outpost.py +0 -0
  74. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/wire/outpost_contract.py +0 -0
  75. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/wire/outpost_fingerprint.py +0 -0
  76. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc/wire/resolve.py +0 -0
  77. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc.egg-info/SOURCES.txt +0 -0
  78. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc.egg-info/dependency_links.txt +0 -0
  79. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc.egg-info/requires.txt +0 -0
  80. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/src/agentops_rpc.egg-info/top_level.txt +0 -0
  81. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_agent_create_models.py +0 -0
  82. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_agent_tools.py +0 -0
  83. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_agent_version.py +0 -0
  84. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_build_stamp.py +0 -0
  85. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_call_usage.py +0 -0
  86. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_criterion_definition.py +0 -0
  87. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_domain_layout.py +0 -0
  88. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_frame_schema.py +0 -0
  89. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_hosted_agent_mcp_servers.py +0 -0
  90. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_hosted_agent_scaling_models.py +0 -0
  91. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_integrations_schemas.py +0 -0
  92. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_koperator_contract.py +0 -0
  93. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_label_rules.py +0 -0
  94. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_outpost_contract.py +0 -0
  95. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_pair_grader_models.py +0 -0
  96. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_platform_base_evaluator.py +0 -0
  97. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_replay_models.py +0 -0
  98. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_run_titles.py +0 -0
  99. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_security_signals.py +0 -0
  100. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_use_case_model.py +0 -0
  101. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_worker_catalog_schema.py +0 -0
  102. {agentops_rpc-0.7.3 → agentops_rpc-0.7.4}/tests/test_worker_config_ops.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentops-rpc
3
- Version: 0.7.3
3
+ Version: 0.7.4
4
4
  Summary: Shared Pydantic wire types for AgentOps SDK ↔ controlplane RPC.
5
5
  Author: Komodor Ltd.
6
6
  License-Expression: LicenseRef-Komodor-Proprietary
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "agentops-rpc"
3
- version = "0.7.3"
3
+ version = "0.7.4"
4
4
  description = "Shared Pydantic wire types for AgentOps SDK ↔ controlplane RPC."
5
5
  readme = "README.md"
6
6
  license = "LicenseRef-Komodor-Proprietary"
@@ -176,7 +176,7 @@ from .agents.triggers import (
176
176
  CreateAgentTriggerStatus,
177
177
  validate_triggers_distinct,
178
178
  )
179
- from .agents.types import AgentStatus, DeployStatus, ObserveOnlyPresence
179
+ from .agents.types import AgentStatus, DeployStatus
180
180
  from .agents.worker_catalog import (
181
181
  WorkerCatalogAuthMode,
182
182
  WorkerCatalogAuthModeField,
@@ -563,7 +563,6 @@ __all__ = [
563
563
  "SelfHostedAgentDeclareRequest",
564
564
  "AgentStatus",
565
565
  "DeployStatus",
566
- "ObserveOnlyPresence",
567
566
  "AgentCardCapability",
568
567
  "AgentFactSource",
569
568
  "AgentPlacement",
@@ -31,7 +31,7 @@ from .skill_resource import SKILL_MAIN_FILE as SKILL_MAIN_FILE # re-exported: d
31
31
  from .skill_resource import SkillResource as SkillResource # re-exported: definition lives in the leaf
32
32
  from .skill_resource import skill_slug as skill_slug # re-exported: definition lives in the leaf
33
33
  from .skill_resource import unsafe_resource_path as unsafe_resource_path # re-exported: definition lives in the leaf
34
- from .types import AgentStatus, ObserveOnlyPresence
34
+ from .types import AgentStatus
35
35
 
36
36
  # --- Agent label rules -------------------------------------------------------
37
37
  # Operator-set agent labels follow a Kubernetes-label-like syntax so they stay safe to
@@ -926,8 +926,6 @@ class AgentInstanceResponse(BaseModel):
926
926
  pod_state_detail: str | None = None
927
927
  # NULL for a draft that has never reported in; set once the first heartbeat lands.
928
928
  last_heartbeat_at: str | None = None
929
- # Set only for an observe-only agent; its ``last_heartbeat_at`` is then the time of its last report.
930
- presence: ObserveOnlyPresence | None = None
931
929
  # When and by whom the agent row was first created (wizard draft, token mint, or heartbeat).
932
930
  # NULL for agents created before this column was added.
933
931
  created_at: str | None = None
@@ -1140,8 +1138,8 @@ class FleetStatusResponse(BaseModel):
1140
1138
  """The fleet's live state: composition, capacity, backlog, reachability and version mix.
1141
1139
 
1142
1140
  **Composition** is exhaustive over the agents in scope — ``draft + online + idle +
1143
- offline_recent + offline_long + reporting + silent`` equals their count. ``reporting`` and
1144
- ``silent`` hold the observe-only agents, which no other figure here counts. ``draft`` is "never reported in" (no
1141
+ offline_recent + offline_long`` equals their count. An observe-only agent is bucketed like a runtime
1142
+ agent, and no other figure here counts it. ``draft`` is "never reported in" (no
1145
1143
  heartbeat ever), and merges the mid-deploy and deploy-failed refinements the agents list shows
1146
1144
  separately. ``idle`` is the agents list's idle status (a scale-to-zero agent with no live worker),
1147
1145
  always 0 while ``agent_scale_to_zero_enabled`` is off for the account.
@@ -1168,8 +1166,6 @@ class FleetStatusResponse(BaseModel):
1168
1166
  idle: int = 0
1169
1167
  offline_recent: int = 0
1170
1168
  offline_long: int = 0
1171
- reporting: int = 0
1172
- silent: int = 0
1173
1169
  live_replicas: int = 0
1174
1170
  busy_replicas: int = 0
1175
1171
  queued_runs: int = 0
@@ -44,6 +44,9 @@ class AgentCardCapability(StrEnum):
44
44
  #: expected answer and returns a ``correctness`` score, so it can be an experiment's evaluator. The platform Base Evaluator is
45
45
  #: still accepted without it until its worker advertises it; every other grader must.
46
46
  GRADER_OUTCOME_MATCH = "grader_outcome_match"
47
+ #: Read by ``optimize.experiments.shadow_grade``: a grader that takes ``grading_mode: outcome_match_fields`` and scores each
48
+ #: compared field of the answer on its own, so a shadow pair gets a verdict per output field (#16169).
49
+ GRADER_OUTCOME_MATCH_FIELDS = "grader_outcome_match_fields"
47
50
  #: Read by ``control.agents.roster`` (and by the incident wizard's specialist grid through it):
48
51
  #: an agent that runs a workflow's steps and delegates to specialists, rather than one that can
49
52
  #: be delegated to. Also the key ``shared/components/DelegatableWorkersPicker`` has always read.
@@ -23,11 +23,6 @@ from typing import Literal
23
23
  AgentStatus = Literal["online", "offline", "draft", "deploying", "deploy_failed", "unhealthy", "idle", "stopped"]
24
24
 
25
25
 
26
- class ObserveOnlyPresence(StrEnum):
27
- REPORTING = "reporting"
28
- SILENT = "silent"
29
-
30
-
31
26
  class DeployStatus(StrEnum):
32
27
  IN_PROGRESS = "in_progress"
33
28
  DONE = "done"
@@ -14,6 +14,7 @@ GRADER_BASE_CRITERIA_CAPABILITY = AgentCardCapability.GRADER_BASE_CRITERIA.value
14
14
  GRADER_CUSTOM_CRITERIA_CAPABILITY = AgentCardCapability.GRADER_CUSTOM_CRITERIA.value
15
15
  GRADER_RULES_FILE_CAPABILITY = AgentCardCapability.GRADER_RULES_FILE.value
16
16
  GRADER_OUTCOME_MATCH_CAPABILITY = AgentCardCapability.GRADER_OUTCOME_MATCH.value
17
+ GRADER_OUTCOME_MATCH_FIELDS_CAPABILITY = AgentCardCapability.GRADER_OUTCOME_MATCH_FIELDS.value
17
18
 
18
19
  CRITERION_DESCRIPTION_MAX = 500
19
20
  # The Base Evaluator puts this note and a space before a must-pass criterion's description, and the sum must fit
@@ -37,16 +37,31 @@ class SigningCredentialRef(BaseModel):
37
37
  name: str
38
38
 
39
39
 
40
+ ALERT_TEMPLATE_RULES = (
41
+ "A template is text with {variables} read from the alert payload: {$.a.b} reads exactly that path in the alert, "
42
+ "while {a.b} or {name} also looks in the whole payload and, for a bare name, at the one key with that name. A "
43
+ "variable the alert does not carry falls back to the provider preset. A value without braces is a deprecated "
44
+ "bare path, stored as {$.path}."
45
+ )
46
+ # The dedup key refuses the root and name lookups, so its fields carry this instead of the rules above.
47
+ ALERT_DEDUP_TEMPLATE_RULES = (
48
+ "Every variable must be an exact path, {$.a.b}, read in the alert itself; {a.b} and {name} are refused, because a "
49
+ "name found on the opening alert but not the closing one would split the incident. A variable the alert does not "
50
+ "carry falls back to the provider preset. A value without braces is a deprecated bare path, stored as {$.path}."
51
+ )
52
+
53
+
40
54
  class WebhookAlertConfig(BaseModel):
41
55
  """Alert-lifecycle configuration for a webhook endpoint.
42
56
 
43
57
  When present on a trigger's ``config_json.alert``, the gateway extracts structured alerts
44
58
  from inbound payloads using the specified provider's parsing logic.
45
59
 
46
- Each ``*_field`` is a dot-path override, and leaving one unset is meaningful: the provider's own
47
- extractor decides that field, following any later change to it. A path is resolved against the
48
- base object that provider reads — for an ``alerts[]`` envelope that is each alert, so
49
- ``fingerprint``, not ``alerts[].fingerprint``, which resolves to nothing.
60
+ Each ``*_field`` is a template override, and leaving one unset is meaningful: the provider's own
61
+ extractor decides that field, following any later change to it. ``{$.a.b}`` reads exactly that
62
+ path in the base object the provider reads — for an ``alerts[]`` envelope that is each alert, so
63
+ ``{$.fingerprint}``, not ``alerts[].fingerprint``. A value without braces is a deprecated bare
64
+ path, stored as ``{$.path}``.
50
65
 
51
66
  On update, an explicit ``null`` for the whole object **clears** the mapping; omitting it leaves
52
67
  the stored one untouched.
@@ -62,24 +77,31 @@ class WebhookAlertConfig(BaseModel):
62
77
  dedup_key_field: str | None = Field(
63
78
  default=None,
64
79
  description=(
65
- "Dot-path into the alert payload for the value that correlates repeat fires of the same alert into one "
66
- "incident. Unset, or a path absent from the payload, uses the provider preset's key."
80
+ "Template for the value that correlates repeat fires of the same alert into one incident, e.g. "
81
+ "{$.labels.service}-{$.fingerprint}. Unset uses the provider preset's key. " + ALERT_DEDUP_TEMPLATE_RULES
67
82
  ),
68
83
  )
69
84
  transition_field: str | None = Field(
70
85
  default=None,
71
86
  description=(
72
- "Dot-path into the alert payload for the value that signals the alert has resolved; resolved, ok, recovered, "
73
- "normal, closed, close, resolve and delete all count as a recovery. Unset uses the provider preset's signal."
87
+ "Template, one variable and no other text (e.g. {$.state}), for the value that signals the alert has resolved; "
88
+ "resolved, ok, recovered, normal, closed, close, resolve and delete all count as a recovery. Unset uses the "
89
+ "provider preset's signal. " + ALERT_TEMPLATE_RULES
74
90
  ),
75
91
  )
76
92
  title_field: str | None = Field(
77
93
  default=None,
78
- description="Dot-path into the alert payload for the incident's title. Unset uses the provider preset's title.",
94
+ description=(
95
+ "Template for the incident's title, e.g. {resourceName} ({namespace}): {issueDetails}; cut at 512 characters. "
96
+ "Unset uses the provider preset's title. " + ALERT_TEMPLATE_RULES
97
+ ),
79
98
  )
80
99
  severity_field: str | None = Field(
81
100
  default=None,
82
- description="Dot-path into the alert payload for the alert's severity. Unset uses the provider preset's severity.",
101
+ description=(
102
+ "Template, one variable and no other text (e.g. {$.labels.severity}), for the alert's severity. Unset uses the "
103
+ "provider preset's severity. " + ALERT_TEMPLATE_RULES
104
+ ),
83
105
  )
84
106
 
85
107
 
@@ -132,8 +154,8 @@ class CreateWebhookTriggerRequest(BaseModel):
132
154
  default=None,
133
155
  description=(
134
156
  "How AgentOps reads alerts from this endpoint's payloads: the provider whose format they follow, plus optional "
135
- "dot-path overrides for fields the payload carries elsewhere. A path is resolved against each alert of an "
136
- "alerts[] envelope, so fingerprint rather than alerts[].fingerprint."
157
+ "template overrides for fields the payload carries elsewhere. {$.path} is read against each alert of an "
158
+ "alerts[] envelope, so {$.fingerprint} rather than alerts[].fingerprint."
137
159
  ),
138
160
  )
139
161
 
@@ -29,6 +29,30 @@ class CreateRunRequest(BaseModel):
29
29
  time_limit_seconds: RequestedTimeBudgetSeconds = Field(default=None, description=_TIME_LIMIT_DESCRIPTION)
30
30
 
31
31
 
32
+ class RunInitiatorKind(StrEnum):
33
+ USER = "user"
34
+ CHANNEL_USER = "channel_user"
35
+ SERVICE_ACCOUNT = "service_account"
36
+ SCHEDULE = "schedule"
37
+ WEBHOOK = "webhook"
38
+ WORKFLOW = "workflow"
39
+ PLATFORM = "platform"
40
+ AGENT = "agent"
41
+ UNKNOWN = "unknown"
42
+
43
+
44
+ class RunInitiator(BaseModel):
45
+ kind: RunInitiatorKind
46
+ principal_id: str | None = None
47
+ ref: str | None = None
48
+ label: str | None = None
49
+
50
+ @field_validator("principal_id", "ref", "label")
51
+ @classmethod
52
+ def _bounded(cls, value: str | None) -> str | None:
53
+ return value[:200] if value is not None else None
54
+
55
+
32
56
  class RunSummary(BaseModel):
33
57
  run_id: str
34
58
  agent_id: str
@@ -55,6 +79,10 @@ class RunSummary(BaseModel):
55
79
  # Distinct from thread_id — that answers "who continued this conversation", this answers
56
80
  # "who delegated to me", which is what joins an orchestrator to the runs it fanned out.
57
81
  parent_run_id: str | None = None
82
+ # The top of this run's delegation chain (its own id on a root run) and who started that chain.
83
+ # Both None on a run from before they were stamped.
84
+ root_run_id: str | None = None
85
+ initiator: RunInitiator | None = None
58
86
  # Dual-deploy (A/B): which arm this run was created for ('primary'/'secondary'), and the id
59
87
  # linking it to the sibling run produced from the same input. Both None for an ordinary run
60
88
  # (agent has no live secondary).
@@ -343,30 +371,6 @@ class RunInvocation(BaseModel):
343
371
  return value[:200] if value is not None else None
344
372
 
345
373
 
346
- class RunInitiatorKind(StrEnum):
347
- USER = "user"
348
- CHANNEL_USER = "channel_user"
349
- SERVICE_ACCOUNT = "service_account"
350
- SCHEDULE = "schedule"
351
- WEBHOOK = "webhook"
352
- WORKFLOW = "workflow"
353
- PLATFORM = "platform"
354
- AGENT = "agent"
355
- UNKNOWN = "unknown"
356
-
357
-
358
- class RunInitiator(BaseModel):
359
- kind: RunInitiatorKind
360
- principal_id: str | None = None
361
- ref: str | None = None
362
- label: str | None = None
363
-
364
- @field_validator("principal_id", "ref", "label")
365
- @classmethod
366
- def _bounded(cls, value: str | None) -> str | None:
367
- return value[:200] if value is not None else None
368
-
369
-
370
374
  class RunOriginRefs(BaseModel):
371
375
  golden_run_ids: list[str] = Field(default_factory=list)
372
376
  scenario_run_ids: list[str] = Field(default_factory=list)
@@ -549,6 +553,9 @@ class RunDetail(BaseModel):
549
553
  thread_id: str = ""
550
554
  #: See ``RunSummary.parent_run_id`` — the run whose ``agent_invoke`` produced this one.
551
555
  parent_run_id: str | None = None
556
+ #: See ``RunSummary.root_run_id`` / ``RunSummary.initiator``.
557
+ root_run_id: str | None = None
558
+ initiator: RunInitiator | None = None
552
559
  #: See ``RunSummary.variant_role`` / ``RunSummary.comparison_pair_id`` — the dual-deploy arm
553
560
  #: this run was created for and the id linking it to its sibling run.
554
561
  variant_role: str | None = None
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agentops-rpc
3
- Version: 0.7.3
3
+ Version: 0.7.4
4
4
  Summary: Shared Pydantic wire types for AgentOps SDK ↔ controlplane RPC.
5
5
  Author: Komodor Ltd.
6
6
  License-Expression: LicenseRef-Komodor-Proprietary
File without changes
File without changes
File without changes