sondera-harness 0.6.0__py3-none-any.whl → 0.6.2__py3-none-any.whl
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.
- sondera/harness/sondera/_grpc.py +78 -5
- sondera/harness/sondera/harness.py +3 -18
- sondera/proto/sondera/core/v1/primitives_pb2.py +42 -42
- sondera/proto/sondera/core/v1/primitives_pb2.pyi +8 -2
- sondera/tui/app.tcss +460 -0
- sondera/types.py +22 -0
- {sondera_harness-0.6.0.dist-info → sondera_harness-0.6.2.dist-info}/METADATA +1 -1
- {sondera_harness-0.6.0.dist-info → sondera_harness-0.6.2.dist-info}/RECORD +12 -11
- {sondera_harness-0.6.0.dist-info → sondera_harness-0.6.2.dist-info}/WHEEL +0 -0
- {sondera_harness-0.6.0.dist-info → sondera_harness-0.6.2.dist-info}/entry_points.txt +0 -0
- {sondera_harness-0.6.0.dist-info → sondera_harness-0.6.2.dist-info}/licenses/LICENSE +0 -0
- {sondera_harness-0.6.0.dist-info → sondera_harness-0.6.2.dist-info}/top_level.txt +0 -0
sondera/harness/sondera/_grpc.py
CHANGED
|
@@ -11,13 +11,16 @@ from sondera.types import (
|
|
|
11
11
|
Adjudication,
|
|
12
12
|
AdjudicationRecord,
|
|
13
13
|
Agent,
|
|
14
|
+
Check,
|
|
14
15
|
Content,
|
|
15
16
|
Decision,
|
|
17
|
+
GuardrailContext,
|
|
16
18
|
Parameter,
|
|
17
19
|
PolicyAnnotation,
|
|
18
20
|
PolicyEngineMode,
|
|
19
21
|
PromptContent,
|
|
20
22
|
Role,
|
|
23
|
+
SourceCode,
|
|
21
24
|
Stage,
|
|
22
25
|
Tool,
|
|
23
26
|
ToolRequestContent,
|
|
@@ -81,6 +84,38 @@ def _convert_sdk_content_to_pb(content: Content) -> primitives_pb2.Content:
|
|
|
81
84
|
raise ValueError(f"Unsupported content type: {type(content)}")
|
|
82
85
|
|
|
83
86
|
|
|
87
|
+
def _convert_sdk_tool_to_pb(tool: Tool) -> primitives_pb2.Tool:
|
|
88
|
+
"""Convert SDK Tool to protobuf Tool."""
|
|
89
|
+
pb_params = [
|
|
90
|
+
primitives_pb2.Parameter(
|
|
91
|
+
name=param.name,
|
|
92
|
+
description=param.description,
|
|
93
|
+
type=param.type,
|
|
94
|
+
)
|
|
95
|
+
for param in tool.parameters
|
|
96
|
+
]
|
|
97
|
+
|
|
98
|
+
pb_source = (
|
|
99
|
+
primitives_pb2.SourceCode(
|
|
100
|
+
language=tool.source.language,
|
|
101
|
+
code=tool.source.code,
|
|
102
|
+
)
|
|
103
|
+
if tool.source
|
|
104
|
+
else None
|
|
105
|
+
)
|
|
106
|
+
|
|
107
|
+
return primitives_pb2.Tool(
|
|
108
|
+
id=tool.id,
|
|
109
|
+
name=tool.name,
|
|
110
|
+
description=tool.description,
|
|
111
|
+
parameters=pb_params,
|
|
112
|
+
parameters_json_schema=tool.parameters_json_schema,
|
|
113
|
+
response=tool.response,
|
|
114
|
+
response_json_schema=tool.response_json_schema,
|
|
115
|
+
source=pb_source,
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
|
|
84
119
|
def _convert_pb_adjudication_to_sdk(
|
|
85
120
|
adjudication: primitives_pb2.Adjudication,
|
|
86
121
|
) -> Adjudication:
|
|
@@ -95,8 +130,8 @@ def _convert_pb_adjudication_to_sdk(
|
|
|
95
130
|
# Convert annotations
|
|
96
131
|
annotations = [
|
|
97
132
|
PolicyAnnotation(
|
|
98
|
-
id=ann.id,
|
|
99
|
-
description=ann.description,
|
|
133
|
+
id=ann.id if ann.HasField("id") else "",
|
|
134
|
+
description=ann.description if ann.HasField("description") else "",
|
|
100
135
|
custom=dict(ann.custom),
|
|
101
136
|
)
|
|
102
137
|
for ann in adjudication.annotations
|
|
@@ -105,6 +140,7 @@ def _convert_pb_adjudication_to_sdk(
|
|
|
105
140
|
return Adjudication(
|
|
106
141
|
decision=decision_map[adjudication.decision],
|
|
107
142
|
reason=adjudication.reason,
|
|
143
|
+
policy_ids=list(adjudication.policy_ids),
|
|
108
144
|
annotations=annotations,
|
|
109
145
|
)
|
|
110
146
|
|
|
@@ -117,13 +153,33 @@ def _convert_pb_agent_to_sdk(pb_agent: primitives_pb2.Agent) -> Agent:
|
|
|
117
153
|
Parameter(name=p.name, description=p.description, type=p.type)
|
|
118
154
|
for p in pb_tool.parameters
|
|
119
155
|
]
|
|
156
|
+
|
|
157
|
+
# Handle optional source field
|
|
158
|
+
source = None
|
|
159
|
+
if pb_tool.HasField("source"):
|
|
160
|
+
source = SourceCode(
|
|
161
|
+
language=pb_tool.source.language,
|
|
162
|
+
code=pb_tool.source.code,
|
|
163
|
+
)
|
|
164
|
+
|
|
120
165
|
tools.append(
|
|
121
166
|
Tool(
|
|
122
|
-
id=
|
|
167
|
+
id=pb_tool.id if pb_tool.HasField("id") else None,
|
|
123
168
|
name=pb_tool.name,
|
|
124
169
|
description=pb_tool.description,
|
|
125
170
|
parameters=params,
|
|
126
|
-
|
|
171
|
+
parameters_json_schema=(
|
|
172
|
+
pb_tool.parameters_json_schema
|
|
173
|
+
if pb_tool.HasField("parameters_json_schema")
|
|
174
|
+
else None
|
|
175
|
+
),
|
|
176
|
+
response=pb_tool.response if pb_tool.HasField("response") else None,
|
|
177
|
+
response_json_schema=(
|
|
178
|
+
pb_tool.response_json_schema
|
|
179
|
+
if pb_tool.HasField("response_json_schema")
|
|
180
|
+
else None
|
|
181
|
+
),
|
|
182
|
+
source=source,
|
|
127
183
|
)
|
|
128
184
|
)
|
|
129
185
|
|
|
@@ -266,11 +322,28 @@ def _convert_pb_adjudicated_step_to_sdk(
|
|
|
266
322
|
raise ValueError("AdjudicatedStep must have an adjudication field")
|
|
267
323
|
adjudication = _convert_pb_adjudication_to_sdk(pb_adjudication)
|
|
268
324
|
|
|
325
|
+
# Convert guardrails
|
|
326
|
+
guardrails = None
|
|
327
|
+
if pb_adjudicated_step.HasField("guardrails"):
|
|
328
|
+
checks = {}
|
|
329
|
+
for name, pb_check in pb_adjudicated_step.guardrails.checks.items():
|
|
330
|
+
checks[name] = Check(
|
|
331
|
+
name=pb_check.name,
|
|
332
|
+
flagged=pb_check.flagged,
|
|
333
|
+
message=pb_check.message if pb_check.HasField("message") else None,
|
|
334
|
+
)
|
|
335
|
+
guardrails = GuardrailContext(checks=checks)
|
|
336
|
+
|
|
269
337
|
# Default mode to GOVERN since protobuf doesn't have this field
|
|
270
338
|
# In practice, this should be set based on the policy engine configuration
|
|
271
339
|
mode = PolicyEngineMode.GOVERN
|
|
272
340
|
|
|
273
|
-
return AdjudicatedStep(
|
|
341
|
+
return AdjudicatedStep(
|
|
342
|
+
mode=mode,
|
|
343
|
+
adjudication=adjudication,
|
|
344
|
+
step=trajectory_step,
|
|
345
|
+
guardrails=guardrails,
|
|
346
|
+
)
|
|
274
347
|
|
|
275
348
|
|
|
276
349
|
def _convert_pb_trajectory_to_sdk(
|
|
@@ -24,6 +24,7 @@ from sondera.harness.sondera._grpc import (
|
|
|
24
24
|
_convert_sdk_content_to_pb,
|
|
25
25
|
_convert_sdk_role_to_pb,
|
|
26
26
|
_convert_sdk_stage_to_pb,
|
|
27
|
+
_convert_sdk_tool_to_pb,
|
|
27
28
|
_convert_sdk_trajectory_status_to_pb,
|
|
28
29
|
)
|
|
29
30
|
from sondera.proto.sondera.core.v1 import primitives_pb2
|
|
@@ -337,24 +338,8 @@ class SonderaRemoteHarness(AbstractHarness):
|
|
|
337
338
|
AuthenticationError: If authentication fails
|
|
338
339
|
grpc.RpcError: If other gRPC error occurs
|
|
339
340
|
"""
|
|
340
|
-
# Convert SDK agent to protobuf
|
|
341
|
-
pb_tools = []
|
|
342
|
-
for tool in agent.tools:
|
|
343
|
-
pb_params = []
|
|
344
|
-
for param in tool.parameters:
|
|
345
|
-
pb_params.append(
|
|
346
|
-
primitives_pb2.Parameter(
|
|
347
|
-
name=param.name, description=param.description, type=param.type
|
|
348
|
-
)
|
|
349
|
-
)
|
|
350
|
-
|
|
351
|
-
pb_tool = primitives_pb2.Tool(
|
|
352
|
-
name=tool.name,
|
|
353
|
-
description=tool.description,
|
|
354
|
-
parameters=pb_params,
|
|
355
|
-
response=tool.response,
|
|
356
|
-
)
|
|
357
|
-
pb_tools.append(pb_tool)
|
|
341
|
+
# Convert SDK agent tools to protobuf
|
|
342
|
+
pb_tools = [_convert_sdk_tool_to_pb(tool) for tool in agent.tools]
|
|
358
343
|
|
|
359
344
|
request = harness_pb2.RegisterAgentRequest(
|
|
360
345
|
provider_id=agent.provider_id,
|
|
@@ -26,7 +26,7 @@ from google.protobuf import struct_pb2 as google_dot_protobuf_dot_struct__pb2
|
|
|
26
26
|
from google.protobuf import timestamp_pb2 as google_dot_protobuf_dot_timestamp__pb2
|
|
27
27
|
|
|
28
28
|
|
|
29
|
-
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n sondera/core/v1/primitives.proto\x12\x0fsondera.core.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\",\n\nSourceCode\x12\x10\n\x08language\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\"<\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"\
|
|
29
|
+
DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n sondera/core/v1/primitives.proto\x12\x0fsondera.core.v1\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\",\n\nSourceCode\x12\x10\n\x08language\x18\x01 \x01(\t\x12\x0c\n\x04\x63ode\x18\x02 \x01(\t\"<\n\tParameter\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12\x0c\n\x04type\x18\x03 \x01(\t\"\xce\x02\n\x04Tool\x12\x0f\n\x02id\x18\x06 \x01(\tH\x00\x88\x01\x01\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x02 \x01(\t\x12.\n\nparameters\x18\x03 \x03(\x0b\x32\x1a.sondera.core.v1.Parameter\x12#\n\x16parameters_json_schema\x18\x07 \x01(\tH\x01\x88\x01\x01\x12\x15\n\x08response\x18\x04 \x01(\tH\x02\x88\x01\x01\x12!\n\x14response_json_schema\x18\x08 \x01(\tH\x03\x88\x01\x01\x12\x30\n\x06source\x18\x05 \x01(\x0b\x32\x1b.sondera.core.v1.SourceCodeH\x04\x88\x01\x01\x42\x05\n\x03_idB\x19\n\x17_parameters_json_schemaB\x0b\n\t_responseB\x17\n\x15_response_json_schemaB\t\n\x07_source\"\x86\x01\n\x05\x41gent\x12\n\n\x02id\x18\x01 \x01(\t\x12\x13\n\x0bprovider_id\x18\x02 \x01(\t\x12\x0c\n\x04name\x18\x03 \x01(\t\x12\x13\n\x0b\x64\x65scription\x18\x04 \x01(\t\x12\x13\n\x0binstruction\x18\x05 \x01(\t\x12$\n\x05tools\x18\x06 \x03(\x0b\x32\x15.sondera.core.v1.Tool\"\x16\n\x06Prompt\x12\x0c\n\x04text\x18\x01 \x01(\t\"D\n\x0bToolRequest\x12\x0f\n\x07tool_id\x18\x01 \x01(\t\x12$\n\x04\x61rgs\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\"I\n\x0cToolResponse\x12\x0f\n\x07tool_id\x18\x01 \x01(\t\x12(\n\x08response\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value\"\xb2\x01\n\x07\x43ontent\x12)\n\x06prompt\x18\x01 \x01(\x0b\x32\x17.sondera.core.v1.PromptH\x00\x12\x34\n\x0ctool_request\x18\x02 \x01(\x0b\x32\x1c.sondera.core.v1.ToolRequestH\x00\x12\x36\n\rtool_response\x18\x03 \x01(\x0b\x32\x1d.sondera.core.v1.ToolResponseH\x00\x42\x0e\n\x0c\x63ontent_type\"\xb7\x01\n\x0eTrajectoryStep\x12%\n\x05stage\x18\x01 \x01(\x0e\x32\x16.sondera.core.v1.Stage\x12#\n\x04role\x18\x02 \x01(\x0e\x32\x15.sondera.core.v1.Role\x12.\n\ncreated_at\x18\x03 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12)\n\x07\x63ontent\x18\x04 \x01(\x0b\x32\x18.sondera.core.v1.Content\"\xf7\x03\n\nTrajectory\x12\n\n\x02id\x18\x01 \x01(\t\x12\x10\n\x08\x61gent_id\x18\x02 \x01(\t\x12\x31\n\x06status\x18\x03 \x01(\x0e\x32!.sondera.core.v1.TrajectoryStatus\x12;\n\x08metadata\x18\x04 \x03(\x0b\x32).sondera.core.v1.Trajectory.MetadataEntry\x12.\n\ncreated_at\x18\x05 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12.\n\nupdated_at\x18\x06 \x01(\x0b\x32\x1a.google.protobuf.Timestamp\x12\x33\n\nstarted_at\x18\x07 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x00\x88\x01\x01\x12\x31\n\x08\x65nded_at\x18\x08 \x01(\x0b\x32\x1a.google.protobuf.TimestampH\x01\x88\x01\x01\x12.\n\x05steps\x18\t \x03(\x0b\x32\x1f.sondera.core.v1.TrajectoryStep\x1aG\n\rMetadataEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.google.protobuf.Value:\x02\x38\x01\x42\r\n\x0b_started_atB\x0b\n\t_ended_at\"H\n\x05\x43heck\x12\x0c\n\x04name\x18\x01 \x01(\t\x12\x0f\n\x07\x66lagged\x18\x02 \x01(\x08\x12\x14\n\x07message\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\n\n\x08_message\"\x98\x01\n\x10GuardrailContext\x12=\n\x06\x63hecks\x18\x01 \x03(\x0b\x32-.sondera.core.v1.GuardrailContext.ChecksEntry\x1a\x45\n\x0b\x43hecksEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.sondera.core.v1.Check:\x02\x38\x01\"\xc4\x01\n\x11PolicyAnnotations\x12\x0f\n\x02id\x18\x01 \x01(\tH\x00\x88\x01\x01\x12\x18\n\x0b\x64\x65scription\x18\x02 \x01(\tH\x01\x88\x01\x01\x12>\n\x06\x63ustom\x18\x03 \x03(\x0b\x32..sondera.core.v1.PolicyAnnotations.CustomEntry\x1a-\n\x0b\x43ustomEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\t:\x02\x38\x01\x42\x05\n\x03_idB\x0e\n\x0c_description\"\x98\x01\n\x0c\x41\x64judication\x12+\n\x08\x64\x65\x63ision\x18\x01 \x01(\x0e\x32\x19.sondera.core.v1.Decision\x12\x0e\n\x06reason\x18\x02 \x01(\t\x12\x12\n\npolicy_ids\x18\x03 \x03(\t\x12\x37\n\x0b\x61nnotations\x18\x04 \x03(\x0b\x32\".sondera.core.v1.PolicyAnnotations\"\xac\x01\n\x0f\x41\x64judicatedStep\x12-\n\x04step\x18\x01 \x01(\x0b\x32\x1f.sondera.core.v1.TrajectoryStep\x12\x35\n\nguardrails\x18\x02 \x01(\x0b\x32!.sondera.core.v1.GuardrailContext\x12\x33\n\x0c\x61\x64judication\x18\x03 \x01(\x0b\x32\x1d.sondera.core.v1.Adjudication\"y\n\x15\x41\x64judicatedTrajectory\x12/\n\ntrajectory\x18\x01 \x01(\x0b\x32\x1b.sondera.core.v1.Trajectory\x12/\n\x05steps\x18\x02 \x03(\x0b\x32 .sondera.core.v1.AdjudicatedStep*\xd3\x01\n\x10TrajectoryStatus\x12!\n\x1dTRAJECTORY_STATUS_UNSPECIFIED\x10\x00\x12\x1d\n\x19TRAJECTORY_STATUS_PENDING\x10\x01\x12\x1d\n\x19TRAJECTORY_STATUS_RUNNING\x10\x02\x12\x1f\n\x1bTRAJECTORY_STATUS_COMPLETED\x10\x03\x12\x1f\n\x1bTRAJECTORY_STATUS_SUSPENDED\x10\x04\x12\x1c\n\x18TRAJECTORY_STATUS_FAILED\x10\x05*\x99\x01\n\x05Stage\x12\x15\n\x11STAGE_UNSPECIFIED\x10\x00\x12\x11\n\rSTAGE_PRE_RUN\x10\x01\x12\x13\n\x0fSTAGE_PRE_MODEL\x10\x02\x12\x14\n\x10STAGE_POST_MODEL\x10\x03\x12\x12\n\x0eSTAGE_PRE_TOOL\x10\x04\x12\x13\n\x0fSTAGE_POST_TOOL\x10\x05\x12\x12\n\x0eSTAGE_POST_RUN\x10\x06*[\n\x04Role\x12\x14\n\x10ROLE_UNSPECIFIED\x10\x00\x12\r\n\tROLE_USER\x10\x01\x12\x0e\n\nROLE_MODEL\x10\x02\x12\r\n\tROLE_TOOL\x10\x03\x12\x0f\n\x0bROLE_SYSTEM\x10\x04*b\n\x08\x44\x65\x63ision\x12\x18\n\x14\x44\x45\x43ISION_UNSPECIFIED\x10\x00\x12\x12\n\x0e\x44\x45\x43ISION_ALLOW\x10\x01\x12\x11\n\rDECISION_DENY\x10\x02\x12\x15\n\x11\x44\x45\x43ISION_ESCALATE\x10\x03\x62\x06proto3')
|
|
30
30
|
|
|
31
31
|
_globals = globals()
|
|
32
32
|
_builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
|
|
@@ -39,50 +39,50 @@ if not _descriptor._USE_C_DESCRIPTORS:
|
|
|
39
39
|
_globals['_GUARDRAILCONTEXT_CHECKSENTRY']._serialized_options = b'8\001'
|
|
40
40
|
_globals['_POLICYANNOTATIONS_CUSTOMENTRY']._loaded_options = None
|
|
41
41
|
_globals['_POLICYANNOTATIONS_CUSTOMENTRY']._serialized_options = b'8\001'
|
|
42
|
-
_globals['_TRAJECTORYSTATUS']._serialized_start=
|
|
43
|
-
_globals['_TRAJECTORYSTATUS']._serialized_end=
|
|
44
|
-
_globals['_STAGE']._serialized_start=
|
|
45
|
-
_globals['_STAGE']._serialized_end=
|
|
46
|
-
_globals['_ROLE']._serialized_start=
|
|
47
|
-
_globals['_ROLE']._serialized_end=
|
|
48
|
-
_globals['_DECISION']._serialized_start=
|
|
49
|
-
_globals['_DECISION']._serialized_end=
|
|
42
|
+
_globals['_TRAJECTORYSTATUS']._serialized_start=2622
|
|
43
|
+
_globals['_TRAJECTORYSTATUS']._serialized_end=2833
|
|
44
|
+
_globals['_STAGE']._serialized_start=2836
|
|
45
|
+
_globals['_STAGE']._serialized_end=2989
|
|
46
|
+
_globals['_ROLE']._serialized_start=2991
|
|
47
|
+
_globals['_ROLE']._serialized_end=3082
|
|
48
|
+
_globals['_DECISION']._serialized_start=3084
|
|
49
|
+
_globals['_DECISION']._serialized_end=3182
|
|
50
50
|
_globals['_SOURCECODE']._serialized_start=116
|
|
51
51
|
_globals['_SOURCECODE']._serialized_end=160
|
|
52
52
|
_globals['_PARAMETER']._serialized_start=162
|
|
53
53
|
_globals['_PARAMETER']._serialized_end=222
|
|
54
54
|
_globals['_TOOL']._serialized_start=225
|
|
55
|
-
_globals['_TOOL']._serialized_end=
|
|
56
|
-
_globals['_AGENT']._serialized_start=
|
|
57
|
-
_globals['_AGENT']._serialized_end=
|
|
58
|
-
_globals['_PROMPT']._serialized_start=
|
|
59
|
-
_globals['_PROMPT']._serialized_end=
|
|
60
|
-
_globals['_TOOLREQUEST']._serialized_start=
|
|
61
|
-
_globals['_TOOLREQUEST']._serialized_end=
|
|
62
|
-
_globals['_TOOLRESPONSE']._serialized_start=
|
|
63
|
-
_globals['_TOOLRESPONSE']._serialized_end=
|
|
64
|
-
_globals['_CONTENT']._serialized_start=
|
|
65
|
-
_globals['_CONTENT']._serialized_end=
|
|
66
|
-
_globals['_TRAJECTORYSTEP']._serialized_start=
|
|
67
|
-
_globals['_TRAJECTORYSTEP']._serialized_end=
|
|
68
|
-
_globals['_TRAJECTORY']._serialized_start=
|
|
69
|
-
_globals['_TRAJECTORY']._serialized_end=
|
|
70
|
-
_globals['_TRAJECTORY_METADATAENTRY']._serialized_start=
|
|
71
|
-
_globals['_TRAJECTORY_METADATAENTRY']._serialized_end=
|
|
72
|
-
_globals['_CHECK']._serialized_start=
|
|
73
|
-
_globals['_CHECK']._serialized_end=
|
|
74
|
-
_globals['_GUARDRAILCONTEXT']._serialized_start=
|
|
75
|
-
_globals['_GUARDRAILCONTEXT']._serialized_end=
|
|
76
|
-
_globals['_GUARDRAILCONTEXT_CHECKSENTRY']._serialized_start=
|
|
77
|
-
_globals['_GUARDRAILCONTEXT_CHECKSENTRY']._serialized_end=
|
|
78
|
-
_globals['_POLICYANNOTATIONS']._serialized_start=
|
|
79
|
-
_globals['_POLICYANNOTATIONS']._serialized_end=
|
|
80
|
-
_globals['_POLICYANNOTATIONS_CUSTOMENTRY']._serialized_start=
|
|
81
|
-
_globals['_POLICYANNOTATIONS_CUSTOMENTRY']._serialized_end=
|
|
82
|
-
_globals['_ADJUDICATION']._serialized_start=
|
|
83
|
-
_globals['_ADJUDICATION']._serialized_end=
|
|
84
|
-
_globals['_ADJUDICATEDSTEP']._serialized_start=
|
|
85
|
-
_globals['_ADJUDICATEDSTEP']._serialized_end=
|
|
86
|
-
_globals['_ADJUDICATEDTRAJECTORY']._serialized_start=
|
|
87
|
-
_globals['_ADJUDICATEDTRAJECTORY']._serialized_end=
|
|
55
|
+
_globals['_TOOL']._serialized_end=559
|
|
56
|
+
_globals['_AGENT']._serialized_start=562
|
|
57
|
+
_globals['_AGENT']._serialized_end=696
|
|
58
|
+
_globals['_PROMPT']._serialized_start=698
|
|
59
|
+
_globals['_PROMPT']._serialized_end=720
|
|
60
|
+
_globals['_TOOLREQUEST']._serialized_start=722
|
|
61
|
+
_globals['_TOOLREQUEST']._serialized_end=790
|
|
62
|
+
_globals['_TOOLRESPONSE']._serialized_start=792
|
|
63
|
+
_globals['_TOOLRESPONSE']._serialized_end=865
|
|
64
|
+
_globals['_CONTENT']._serialized_start=868
|
|
65
|
+
_globals['_CONTENT']._serialized_end=1046
|
|
66
|
+
_globals['_TRAJECTORYSTEP']._serialized_start=1049
|
|
67
|
+
_globals['_TRAJECTORYSTEP']._serialized_end=1232
|
|
68
|
+
_globals['_TRAJECTORY']._serialized_start=1235
|
|
69
|
+
_globals['_TRAJECTORY']._serialized_end=1738
|
|
70
|
+
_globals['_TRAJECTORY_METADATAENTRY']._serialized_start=1639
|
|
71
|
+
_globals['_TRAJECTORY_METADATAENTRY']._serialized_end=1710
|
|
72
|
+
_globals['_CHECK']._serialized_start=1740
|
|
73
|
+
_globals['_CHECK']._serialized_end=1812
|
|
74
|
+
_globals['_GUARDRAILCONTEXT']._serialized_start=1815
|
|
75
|
+
_globals['_GUARDRAILCONTEXT']._serialized_end=1967
|
|
76
|
+
_globals['_GUARDRAILCONTEXT_CHECKSENTRY']._serialized_start=1898
|
|
77
|
+
_globals['_GUARDRAILCONTEXT_CHECKSENTRY']._serialized_end=1967
|
|
78
|
+
_globals['_POLICYANNOTATIONS']._serialized_start=1970
|
|
79
|
+
_globals['_POLICYANNOTATIONS']._serialized_end=2166
|
|
80
|
+
_globals['_POLICYANNOTATIONS_CUSTOMENTRY']._serialized_start=2098
|
|
81
|
+
_globals['_POLICYANNOTATIONS_CUSTOMENTRY']._serialized_end=2143
|
|
82
|
+
_globals['_ADJUDICATION']._serialized_start=2169
|
|
83
|
+
_globals['_ADJUDICATION']._serialized_end=2321
|
|
84
|
+
_globals['_ADJUDICATEDSTEP']._serialized_start=2324
|
|
85
|
+
_globals['_ADJUDICATEDSTEP']._serialized_end=2496
|
|
86
|
+
_globals['_ADJUDICATEDTRAJECTORY']._serialized_start=2498
|
|
87
|
+
_globals['_ADJUDICATEDTRAJECTORY']._serialized_end=2619
|
|
88
88
|
# @@protoc_insertion_point(module_scope)
|
|
@@ -86,18 +86,24 @@ class Parameter(_message.Message):
|
|
|
86
86
|
def __init__(self, name: _Optional[str] = ..., description: _Optional[str] = ..., type: _Optional[str] = ...) -> None: ...
|
|
87
87
|
|
|
88
88
|
class Tool(_message.Message):
|
|
89
|
-
__slots__ = ("name", "description", "parameters", "response", "source")
|
|
89
|
+
__slots__ = ("id", "name", "description", "parameters", "parameters_json_schema", "response", "response_json_schema", "source")
|
|
90
|
+
ID_FIELD_NUMBER: _ClassVar[int]
|
|
90
91
|
NAME_FIELD_NUMBER: _ClassVar[int]
|
|
91
92
|
DESCRIPTION_FIELD_NUMBER: _ClassVar[int]
|
|
92
93
|
PARAMETERS_FIELD_NUMBER: _ClassVar[int]
|
|
94
|
+
PARAMETERS_JSON_SCHEMA_FIELD_NUMBER: _ClassVar[int]
|
|
93
95
|
RESPONSE_FIELD_NUMBER: _ClassVar[int]
|
|
96
|
+
RESPONSE_JSON_SCHEMA_FIELD_NUMBER: _ClassVar[int]
|
|
94
97
|
SOURCE_FIELD_NUMBER: _ClassVar[int]
|
|
98
|
+
id: str
|
|
95
99
|
name: str
|
|
96
100
|
description: str
|
|
97
101
|
parameters: _containers.RepeatedCompositeFieldContainer[Parameter]
|
|
102
|
+
parameters_json_schema: str
|
|
98
103
|
response: str
|
|
104
|
+
response_json_schema: str
|
|
99
105
|
source: SourceCode
|
|
100
|
-
def __init__(self, name: _Optional[str] = ..., description: _Optional[str] = ..., parameters: _Optional[_Iterable[_Union[Parameter, _Mapping]]] = ..., response: _Optional[str] = ..., source: _Optional[_Union[SourceCode, _Mapping]] = ...) -> None: ...
|
|
106
|
+
def __init__(self, id: _Optional[str] = ..., name: _Optional[str] = ..., description: _Optional[str] = ..., parameters: _Optional[_Iterable[_Union[Parameter, _Mapping]]] = ..., parameters_json_schema: _Optional[str] = ..., response: _Optional[str] = ..., response_json_schema: _Optional[str] = ..., source: _Optional[_Union[SourceCode, _Mapping]] = ...) -> None: ...
|
|
101
107
|
|
|
102
108
|
class Agent(_message.Message):
|
|
103
109
|
__slots__ = ("id", "provider_id", "name", "description", "instruction", "tools")
|
sondera/tui/app.tcss
ADDED
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
Screen {
|
|
2
|
+
layout: grid;
|
|
3
|
+
grid-size: 1;
|
|
4
|
+
grid-rows: 30% 70%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.panel {
|
|
8
|
+
height: 1fr;
|
|
9
|
+
padding: 1;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/* Summary panel - auto height */
|
|
13
|
+
.panel:first-child {
|
|
14
|
+
height: auto;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/* Summary widget styles */
|
|
18
|
+
Summary {
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
Summary .summary-section {
|
|
22
|
+
height: auto;
|
|
23
|
+
padding-bottom: 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
Summary .section-label {
|
|
27
|
+
width: 16;
|
|
28
|
+
padding-top: 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
Summary .stat {
|
|
32
|
+
width: 1fr;
|
|
33
|
+
height: auto;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
Summary .stat-label {
|
|
37
|
+
color: $text-muted;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
Summary Digits {
|
|
41
|
+
height: auto;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Trajectory status colors */
|
|
45
|
+
Summary .stat-running {
|
|
46
|
+
color: $primary;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
Summary .stat-suspended {
|
|
50
|
+
color: $warning;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
Summary .stat-completed {
|
|
54
|
+
color: $success;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
Summary .stat-pending {
|
|
58
|
+
color: $text-muted;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
Summary .stat-failed {
|
|
62
|
+
color: $error;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/* Policy colors */
|
|
66
|
+
Summary .stat-violations {
|
|
67
|
+
color: $error;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
Summary .stat-approved {
|
|
71
|
+
color: $success;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
.step {
|
|
76
|
+
border: solid $primary;
|
|
77
|
+
padding: 1;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.step-hovered {
|
|
81
|
+
border: solid $primary;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.step-highlight {
|
|
85
|
+
border: solid $primary;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.card {
|
|
89
|
+
width: 1fr;
|
|
90
|
+
height: 100%;
|
|
91
|
+
border: solid $primary;
|
|
92
|
+
padding: 1;
|
|
93
|
+
background: $surface;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
/* Main tabs */
|
|
97
|
+
#main-tabs {
|
|
98
|
+
height: 100%;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
#main-tabs ContentSwitcher {
|
|
102
|
+
height: 1fr;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
#main-tabs TabPane {
|
|
106
|
+
height: 100%;
|
|
107
|
+
padding: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
RecentTrajectories {
|
|
111
|
+
height: 100%;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
RecentTrajectories DataTable {
|
|
115
|
+
height: 100%;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
RecentAdjudications {
|
|
119
|
+
height: 100%;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
RecentAdjudications DataTable {
|
|
123
|
+
height: 100%;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
AgentList {
|
|
127
|
+
height: 100%;
|
|
128
|
+
border: solid $primary;
|
|
129
|
+
background: $surface;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
AgentList .header {
|
|
133
|
+
height: 3;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
AgentList .header-column {
|
|
137
|
+
width: 1fr;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
AgentItem {
|
|
141
|
+
border: solid $primary;
|
|
142
|
+
height: 10;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
AgentItem .column {
|
|
146
|
+
width: 1fr;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
Sparkline {
|
|
150
|
+
width: 100%;
|
|
151
|
+
margin: 2;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
ListView {
|
|
155
|
+
& > ListItem {
|
|
156
|
+
&.-highlight {
|
|
157
|
+
background: $block-hover-background;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
TrajectoryScreen {
|
|
163
|
+
layout: horizontal
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
#sidebar {
|
|
167
|
+
width: 0.33fr;
|
|
168
|
+
height: 100%;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
/* AgentScreen styles */
|
|
172
|
+
AgentScreen {
|
|
173
|
+
layout:horizontal ;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
#agent-screen-content {
|
|
177
|
+
height: 1fr;
|
|
178
|
+
padding: 1;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
#agent-card {
|
|
182
|
+
width: 0.4fr;
|
|
183
|
+
height: 100%;
|
|
184
|
+
border: solid $primary;
|
|
185
|
+
padding: 1;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
#agent-card-container {
|
|
189
|
+
height: 100%;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
#agent-details-grid {
|
|
193
|
+
grid-size: 2;
|
|
194
|
+
grid-columns: auto 1fr;
|
|
195
|
+
grid-rows: auto;
|
|
196
|
+
height: auto;
|
|
197
|
+
padding: 1;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
#agent-details-grid .label {
|
|
201
|
+
padding-right: 2;
|
|
202
|
+
color: $text-muted;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
#agent-details-grid .value {
|
|
206
|
+
padding-bottom: 1;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
#agent-details-grid .description,
|
|
210
|
+
#agent-details-grid .instruction {
|
|
211
|
+
max-height: 4;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.section-header {
|
|
215
|
+
padding: 1 0;
|
|
216
|
+
border-bottom: solid $primary;
|
|
217
|
+
margin-bottom: 1;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
#tools-list {
|
|
221
|
+
height: 1fr;
|
|
222
|
+
border: solid $secondary;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
#agent-tabs {
|
|
226
|
+
width: 0.6fr;
|
|
227
|
+
height: 100%;
|
|
228
|
+
border: solid $primary;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
#agent-trajectories-table {
|
|
232
|
+
height: 100%;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
/* ToolCard styles */
|
|
236
|
+
ToolCard {
|
|
237
|
+
border: solid $secondary;
|
|
238
|
+
height: auto;
|
|
239
|
+
padding: 1;
|
|
240
|
+
margin-bottom: 1;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.tool-card-content {
|
|
244
|
+
height: auto;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.tool-description {
|
|
248
|
+
padding-bottom: 1;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.tool-parameters {
|
|
252
|
+
color: $text-muted;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.tool-response {
|
|
256
|
+
color: $text-muted;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
/* AdjudicationScreen styles */
|
|
260
|
+
AdjudicationScreen {
|
|
261
|
+
layout: vertical;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.adjudication-content {
|
|
265
|
+
height: 1fr;
|
|
266
|
+
padding: 1;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
#adjudication-left-panel {
|
|
270
|
+
width: 0.6fr;
|
|
271
|
+
height: 100%;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
#violations-summary {
|
|
275
|
+
height: 0.45fr;
|
|
276
|
+
border: solid $primary;
|
|
277
|
+
padding: 1;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
#violations-list {
|
|
281
|
+
height: 0.55fr;
|
|
282
|
+
border: solid $primary;
|
|
283
|
+
padding: 1;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
#violation-panel {
|
|
287
|
+
width: 0.4fr;
|
|
288
|
+
height: 100%;
|
|
289
|
+
border: solid $primary;
|
|
290
|
+
padding: 1;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* ViolationsSummary styles */
|
|
294
|
+
ViolationsSummary .section-header {
|
|
295
|
+
padding: 1 0;
|
|
296
|
+
border-bottom: solid $primary;
|
|
297
|
+
margin-bottom: 1;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
ViolationsSummary .summary-row {
|
|
301
|
+
height: auto;
|
|
302
|
+
padding: 1 0;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
ViolationsSummary .summary-item {
|
|
306
|
+
width: 1fr;
|
|
307
|
+
height: auto;
|
|
308
|
+
padding: 0 1;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
ViolationsSummary .summary-digit {
|
|
312
|
+
width: 100%;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
ViolationsSummary .stat-violations {
|
|
316
|
+
color: $error;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
ViolationsSummary .stat-escalated {
|
|
320
|
+
color: $warning;
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
ViolationsSummary .stat-allowed {
|
|
324
|
+
color: $success;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
ViolationsSummary .digit-violations {
|
|
328
|
+
color: $error;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
ViolationsSummary .digit-escalated {
|
|
332
|
+
color: $warning;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
ViolationsSummary .digit-allowed {
|
|
336
|
+
color: $success;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
ViolationsSummary .agent-label,
|
|
340
|
+
ViolationsSummary .policy-label {
|
|
341
|
+
color: $text-muted;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
ViolationsSummary .empty-message {
|
|
345
|
+
color: $text-muted;
|
|
346
|
+
padding: 1;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
/* ViolationPanel styles */
|
|
350
|
+
ViolationPanel .section-header {
|
|
351
|
+
padding: 1 0;
|
|
352
|
+
border-bottom: solid $primary;
|
|
353
|
+
margin-bottom: 1;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
ViolationPanel .empty-message {
|
|
357
|
+
color: $text-muted;
|
|
358
|
+
padding: 2;
|
|
359
|
+
text-align: center;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
ViolationPanel .decision-badge {
|
|
363
|
+
padding: 1;
|
|
364
|
+
text-align: center;
|
|
365
|
+
text-style: bold;
|
|
366
|
+
margin-bottom: 1;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
ViolationPanel .decision-deny {
|
|
370
|
+
background: $error 30%;
|
|
371
|
+
color: $error;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
ViolationPanel .decision-escalate {
|
|
375
|
+
background: $warning 30%;
|
|
376
|
+
color: $warning;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
ViolationPanel .decision-allow {
|
|
380
|
+
background: $success 30%;
|
|
381
|
+
color: $success;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
#violation-details-grid {
|
|
385
|
+
grid-size: 2;
|
|
386
|
+
grid-columns: auto 1fr;
|
|
387
|
+
grid-rows: auto;
|
|
388
|
+
height: auto;
|
|
389
|
+
padding: 1;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
#violation-details-grid .label {
|
|
393
|
+
padding-right: 2;
|
|
394
|
+
color: $text-muted;
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
#violation-details-grid .value {
|
|
398
|
+
padding-bottom: 1;
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
ViolationPanel .reason-container {
|
|
402
|
+
height: auto;
|
|
403
|
+
padding: 1;
|
|
404
|
+
border: solid $secondary;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
ViolationPanel .reason-text {
|
|
408
|
+
height: auto;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/* Annotation styles */
|
|
412
|
+
ViolationPanel .annotations-container {
|
|
413
|
+
height: auto;
|
|
414
|
+
max-height: 20;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
ViolationPanel .annotation-card {
|
|
418
|
+
height: auto;
|
|
419
|
+
padding: 1;
|
|
420
|
+
margin-bottom: 1;
|
|
421
|
+
border: solid $secondary;
|
|
422
|
+
background: $surface-darken-1;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
ViolationPanel .annotation-id {
|
|
426
|
+
color: $primary;
|
|
427
|
+
padding-bottom: 1;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
ViolationPanel .annotation-description {
|
|
431
|
+
color: $text;
|
|
432
|
+
padding-bottom: 1;
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
ViolationPanel .annotation-custom-grid {
|
|
436
|
+
grid-size: 2;
|
|
437
|
+
grid-columns: auto 1fr;
|
|
438
|
+
grid-rows: auto;
|
|
439
|
+
height: auto;
|
|
440
|
+
padding-top: 1;
|
|
441
|
+
border-top: dashed $secondary;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
ViolationPanel .annotation-custom-grid .label {
|
|
445
|
+
padding-right: 2;
|
|
446
|
+
color: $text-muted;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
ViolationPanel .annotation-custom-grid .value {
|
|
450
|
+
color: $text;
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/* RecentViolations styles */
|
|
454
|
+
RecentViolations {
|
|
455
|
+
height: 100%;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
RecentViolations DataTable {
|
|
459
|
+
height: 100%;
|
|
460
|
+
}
|
sondera/types.py
CHANGED
|
@@ -213,6 +213,24 @@ class Decision(Enum):
|
|
|
213
213
|
ESCALATE = "escalate"
|
|
214
214
|
|
|
215
215
|
|
|
216
|
+
class Check(Model):
|
|
217
|
+
"""Single guardrail check result."""
|
|
218
|
+
|
|
219
|
+
name: str
|
|
220
|
+
"""Name of the guardrail check."""
|
|
221
|
+
flagged: bool
|
|
222
|
+
"""Whether the check was flagged."""
|
|
223
|
+
message: str | None = None
|
|
224
|
+
"""Optional message describing the check result."""
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
class GuardrailContext(Model):
|
|
228
|
+
"""Aggregated guardrail check results."""
|
|
229
|
+
|
|
230
|
+
checks: dict[str, Check] = Field(default_factory=dict)
|
|
231
|
+
"""Map of check name to check result."""
|
|
232
|
+
|
|
233
|
+
|
|
216
234
|
class PolicyAnnotation(Model):
|
|
217
235
|
"""Annotation from a policy evaluation."""
|
|
218
236
|
|
|
@@ -231,6 +249,8 @@ class Adjudication(Model):
|
|
|
231
249
|
"""Whether the input is allowed."""
|
|
232
250
|
reason: str
|
|
233
251
|
"""Reason for the adjudication decision."""
|
|
252
|
+
policy_ids: list[str] = Field(default_factory=list)
|
|
253
|
+
"""IDs of policies that contributed to this decision."""
|
|
234
254
|
annotations: list[PolicyAnnotation] = Field(default_factory=list)
|
|
235
255
|
"""Annotations from policy evaluations."""
|
|
236
256
|
|
|
@@ -259,6 +279,8 @@ class AdjudicatedStep(Model):
|
|
|
259
279
|
"""Adjudication of the input."""
|
|
260
280
|
step: TrajectoryStep
|
|
261
281
|
"""Step of the adjudication."""
|
|
282
|
+
guardrails: GuardrailContext | None = None
|
|
283
|
+
"""Guardrail check results for this step."""
|
|
262
284
|
|
|
263
285
|
@property
|
|
264
286
|
def is_denied(self) -> bool:
|
|
@@ -4,7 +4,7 @@ sondera/cli.py,sha256=owchF-eA6kttYGTSsLl0B7XJMmn9O2n2LFjpfYQvznQ,494
|
|
|
4
4
|
sondera/exceptions.py,sha256=vtuToFc5tSlzAyVYvayyOatKBcoenisDA1RN2yk9aSI,3584
|
|
5
5
|
sondera/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
6
|
sondera/settings.py,sha256=bLB98vT75aXKh5ihYnCd0dTk1AdfUUaGuPkyzhcldE0,459
|
|
7
|
-
sondera/types.py,sha256=
|
|
7
|
+
sondera/types.py,sha256=3rG4aeVM_Pfrv83aGSwnpKPwQmh72O6eqYijZnhown8,10216
|
|
8
8
|
sondera/adk/__init__.py,sha256=weoilnJyr8JNBv2HK6s3hhW-6rOBGBcNwwkKk1oHVFE,77
|
|
9
9
|
sondera/adk/analyze.py,sha256=IurwCWPZlNbMkIwi3TGWUu4k-w_VmKCkAnVFbfipbxY,7974
|
|
10
10
|
sondera/adk/plugin.py,sha256=HfVdbzp0bHc4YIs0MjNO-pwrMMex1AsKbQWoQNp7dmI,13047
|
|
@@ -14,8 +14,8 @@ sondera/harness/cedar/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3h
|
|
|
14
14
|
sondera/harness/cedar/harness.py,sha256=mkskBjz4REVhV79r_zgrRBQjwGqbKom7NlpJr8aM0P8,12128
|
|
15
15
|
sondera/harness/cedar/schema.py,sha256=jDAGdLciK3fQ-7yKrqeFkU4YHQg-KwWvTi1leEuYVxo,7766
|
|
16
16
|
sondera/harness/sondera/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
|
-
sondera/harness/sondera/_grpc.py,sha256=
|
|
18
|
-
sondera/harness/sondera/harness.py,sha256=
|
|
17
|
+
sondera/harness/sondera/_grpc.py,sha256=vLVJwJBtDwX-p8qZPfShpChKxdP3lSFoTV6QiL4dh7s,14708
|
|
18
|
+
sondera/harness/sondera/harness.py,sha256=Xg0zc6DZbYvAVceJMlC8fL6D-qX8J-xI1OqPHb-Taxk,31231
|
|
19
19
|
sondera/langgraph/__init__.py,sha256=F2eNoPp944tvGbf9a4etNh3-o49WOPrcs9EFVT0OYYw,473
|
|
20
20
|
sondera/langgraph/analyze.py,sha256=1n-1yKr7-kfdFNSBe9JozZ08oJeYvPqKkFttcQ4MXHI,20514
|
|
21
21
|
sondera/langgraph/exceptions.py,sha256=BRdh1gpELb3_WZ9Bh_UUwZsIOcIPrpQCD-7LnnAGeV4,501
|
|
@@ -42,8 +42,8 @@ sondera/proto/google/protobuf/wrappers_pb2_grpc.py,sha256=SO9GezWgSOXwclY-Jjo8lv
|
|
|
42
42
|
sondera/proto/sondera/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
43
43
|
sondera/proto/sondera/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
44
44
|
sondera/proto/sondera/core/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
45
|
-
sondera/proto/sondera/core/v1/primitives_pb2.py,sha256=
|
|
46
|
-
sondera/proto/sondera/core/v1/primitives_pb2.pyi,sha256=
|
|
45
|
+
sondera/proto/sondera/core/v1/primitives_pb2.py,sha256=q5BvZY4QIySmfUc5tGl2AiwAtYaZCbQgXcOuf3BaUfs,9492
|
|
46
|
+
sondera/proto/sondera/core/v1/primitives_pb2.pyi,sha256=yRiHab6ut8MzJDZHas2kXvvJUjbXwAjkQ75rpkmZHs4,12216
|
|
47
47
|
sondera/proto/sondera/core/v1/primitives_pb2_grpc.py,sha256=YNObfhmUBQVh_n-kRidSAi_V4sPLf2Mo9Jc7hEEHT2s,906
|
|
48
48
|
sondera/proto/sondera/harness/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
49
49
|
sondera/proto/sondera/harness/v1/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -55,6 +55,7 @@ sondera/strands/analyze.py,sha256=yT9_DGieoMIxy5DGma9EdeAl2FVnkFQkdqK8waTphB8,80
|
|
|
55
55
|
sondera/strands/harness.py,sha256=CazoBF-grM2D2Ipj68QdYW4BmWw9fdLVy3_ntcylXvs,13100
|
|
56
56
|
sondera/tui/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
57
|
sondera/tui/app.py,sha256=I6Pcyatr5pPqjYwmBZrdTSFY11oR9sWmG90gVbN9pqo,11521
|
|
58
|
+
sondera/tui/app.tcss,sha256=AE239R11BCuhKj8ZxvMYXduZw_-H11I7UkTDh72qdME,6562
|
|
58
59
|
sondera/tui/screens/__init__.py,sha256=-Yf_mYDWiEmA0lOCay01NhOVPOOCV6EnaFi8ZV7MkDk,186
|
|
59
60
|
sondera/tui/screens/adjudication.py,sha256=w-CTCu5X5qWASkRJxC_kqEaCvpcIiYSfqUfNu030OnY,7151
|
|
60
61
|
sondera/tui/screens/agent.py,sha256=xkMC37YIcDBJahQeZjI1Li8KmE90irF0-6VDvQGyuKY,6125
|
|
@@ -69,9 +70,9 @@ sondera/tui/widgets/tool_card.py,sha256=3yNQcc_umcan4V1S5GiEKd7l4YA_atibwn3HF0n6
|
|
|
69
70
|
sondera/tui/widgets/violation_panel.py,sha256=fowe4KWb13NXLX0_RAxEPdRqYeyGzlImpRs4_L9y1zI,2933
|
|
70
71
|
sondera/tui/widgets/violations_list.py,sha256=86qICAsQOC6kjQLs64WxK7u59vEJ8kvfiToLVlzFyHM,2866
|
|
71
72
|
sondera/tui/widgets/violations_summary.py,sha256=e2LwqlB1aS8sZ2gEC5clk7siA16NSgePU1mpv8T1iTc,4473
|
|
72
|
-
sondera_harness-0.6.
|
|
73
|
-
sondera_harness-0.6.
|
|
74
|
-
sondera_harness-0.6.
|
|
75
|
-
sondera_harness-0.6.
|
|
76
|
-
sondera_harness-0.6.
|
|
77
|
-
sondera_harness-0.6.
|
|
73
|
+
sondera_harness-0.6.2.dist-info/licenses/LICENSE,sha256=DmSfauhgrslTxZOcDAmcYqsqsKBkMqVh3PYdjPghNbU,1070
|
|
74
|
+
sondera_harness-0.6.2.dist-info/METADATA,sha256=rLrBiEELg0dIbXRdpJP_CFid6KBKIO79H-lrQXeY2K8,8899
|
|
75
|
+
sondera_harness-0.6.2.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
76
|
+
sondera_harness-0.6.2.dist-info/entry_points.txt,sha256=e9aHpIPUUlP5MPKORk7k6ekUfZLN3RyO1MEJa-nCzK4,44
|
|
77
|
+
sondera_harness-0.6.2.dist-info/top_level.txt,sha256=BR0X8Gq9CCpwbQg5evpQfy5zwp9fTuGnlJhXSNqQ_hA,8
|
|
78
|
+
sondera_harness-0.6.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|