augur-sdk 0.1.0__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.
- augur_sdk/__init__.py +60 -0
- augur_sdk/_schema/__init__.py +93 -0
- augur_sdk/_schema/json/__init__.py +0 -0
- augur_sdk/_schema/json/capture_mode.schema.json +18 -0
- augur_sdk/_schema/json/coordinate_space.schema.json +19 -0
- augur_sdk/_schema/json/debug_session.schema.json +69 -0
- augur_sdk/_schema/json/decision_event.schema.json +48 -0
- augur_sdk/_schema/json/diagnostic_finding.schema.json +40 -0
- augur_sdk/_schema/json/failure_class.schema.json +21 -0
- augur_sdk/_schema/json/manifest.schema.json +95 -0
- augur_sdk/_schema/json/observation.schema.json +90 -0
- augur_sdk/_schema/json/provenance.schema.json +14 -0
- augur_sdk/_schema/json/replay_fixture.schema.json +72 -0
- augur_sdk/_schema/json/step_trace.schema.json +123 -0
- augur_sdk/_schema/json/trace.schema.json +16 -0
- augur_sdk/_version.py +7 -0
- augur_sdk/adapter.py +50 -0
- augur_sdk/bundle.py +353 -0
- augur_sdk/capture.py +99 -0
- augur_sdk/diagnostics/__init__.py +30 -0
- augur_sdk/diagnostics/engine.py +205 -0
- augur_sdk/diagnostics/packs/__init__.py +1 -0
- augur_sdk/diagnostics/packs/cua.py +353 -0
- augur_sdk/models.py +265 -0
- augur_sdk/py.typed +0 -0
- augur_sdk/recorder.py +88 -0
- augur_sdk/redaction.py +123 -0
- augur_sdk/session.py +250 -0
- augur_sdk/storage.py +157 -0
- augur_sdk/streaming.py +199 -0
- augur_sdk/validation.py +202 -0
- augur_sdk-0.1.0.dist-info/METADATA +322 -0
- augur_sdk-0.1.0.dist-info/RECORD +35 -0
- augur_sdk-0.1.0.dist-info/WHEEL +4 -0
- augur_sdk-0.1.0.dist-info/licenses/LICENSE +190 -0
augur_sdk/__init__.py
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"""Augur SDK — public surface.
|
|
2
|
+
|
|
3
|
+
Spec §6. The capture controller, event recorder, redaction pipeline, and
|
|
4
|
+
bundle writer are exposed here. Adapter authors should import from
|
|
5
|
+
`augur_sdk.adapter` and `augur_sdk.models`.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from augur_sdk._version import SUPPORTED_SCHEMA_RANGE, __version__
|
|
9
|
+
from augur_sdk.adapter import Adapter
|
|
10
|
+
from augur_sdk.capture import CaptureMode, resolve_capture_mode
|
|
11
|
+
from augur_sdk.models import (
|
|
12
|
+
Action,
|
|
13
|
+
BundleManifest,
|
|
14
|
+
BundleTrace,
|
|
15
|
+
DecisionEvent,
|
|
16
|
+
DiagnosticFinding,
|
|
17
|
+
Grounding,
|
|
18
|
+
Observation,
|
|
19
|
+
RecoveryDecision,
|
|
20
|
+
ReplayFixture,
|
|
21
|
+
StepTrace,
|
|
22
|
+
Verdict,
|
|
23
|
+
)
|
|
24
|
+
from augur_sdk.models import (
|
|
25
|
+
DebugSession as DebugSessionRecord,
|
|
26
|
+
)
|
|
27
|
+
from augur_sdk.redaction import (
|
|
28
|
+
DEFAULT_POLICY_ID,
|
|
29
|
+
DefaultRedactionPolicy,
|
|
30
|
+
RedactionPolicy,
|
|
31
|
+
)
|
|
32
|
+
from augur_sdk.session import DebugSession
|
|
33
|
+
from augur_sdk.storage import LocalFSStore, S3Store, Store
|
|
34
|
+
|
|
35
|
+
__all__ = [
|
|
36
|
+
"Action",
|
|
37
|
+
"Adapter",
|
|
38
|
+
"BundleManifest",
|
|
39
|
+
"BundleTrace",
|
|
40
|
+
"CaptureMode",
|
|
41
|
+
"DEFAULT_POLICY_ID",
|
|
42
|
+
"DebugSession",
|
|
43
|
+
"DebugSessionRecord",
|
|
44
|
+
"DecisionEvent",
|
|
45
|
+
"DefaultRedactionPolicy",
|
|
46
|
+
"DiagnosticFinding",
|
|
47
|
+
"Grounding",
|
|
48
|
+
"LocalFSStore",
|
|
49
|
+
"Observation",
|
|
50
|
+
"RecoveryDecision",
|
|
51
|
+
"RedactionPolicy",
|
|
52
|
+
"ReplayFixture",
|
|
53
|
+
"S3Store",
|
|
54
|
+
"StepTrace",
|
|
55
|
+
"Store",
|
|
56
|
+
"SUPPORTED_SCHEMA_RANGE",
|
|
57
|
+
"Verdict",
|
|
58
|
+
"__version__",
|
|
59
|
+
"resolve_capture_mode",
|
|
60
|
+
]
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
"""Vendored JSON Schema package.
|
|
2
|
+
|
|
3
|
+
Canonical Augur record schemas live here so the SDK has zero runtime
|
|
4
|
+
dependency on a sibling `augur-schema` package. The schemas are
|
|
5
|
+
byte-identical with the upstream `packages/schema/` in the main Augur
|
|
6
|
+
monorepo — keep them in sync when bumping versions.
|
|
7
|
+
|
|
8
|
+
See `docs/versioning.md` upstream for the schema versioning policy.
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
|
|
13
|
+
import json
|
|
14
|
+
from functools import cache
|
|
15
|
+
from importlib import resources
|
|
16
|
+
from pathlib import Path
|
|
17
|
+
from typing import Any
|
|
18
|
+
|
|
19
|
+
from jsonschema import Draft202012Validator
|
|
20
|
+
from jsonschema.exceptions import ValidationError
|
|
21
|
+
from referencing import Registry, Resource
|
|
22
|
+
from referencing.jsonschema import DRAFT202012
|
|
23
|
+
|
|
24
|
+
SCHEMA_VERSION = "0.1"
|
|
25
|
+
|
|
26
|
+
_SCHEMA_FILES: dict[str, str] = {
|
|
27
|
+
"manifest": "manifest.schema.json",
|
|
28
|
+
"trace": "trace.schema.json",
|
|
29
|
+
"debug_session": "debug_session.schema.json",
|
|
30
|
+
"step_trace": "step_trace.schema.json",
|
|
31
|
+
"observation": "observation.schema.json",
|
|
32
|
+
"decision_event": "decision_event.schema.json",
|
|
33
|
+
"replay_fixture": "replay_fixture.schema.json",
|
|
34
|
+
"diagnostic_finding": "diagnostic_finding.schema.json",
|
|
35
|
+
"coordinate_space": "coordinate_space.schema.json",
|
|
36
|
+
"provenance": "provenance.schema.json",
|
|
37
|
+
"capture_mode": "capture_mode.schema.json",
|
|
38
|
+
"failure_class": "failure_class.schema.json",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class SchemaError(Exception):
|
|
43
|
+
"""Wraps schema lookup and validation failures."""
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def schemas_dir() -> Path:
|
|
47
|
+
"""Return the on-disk path to the bundled JSON Schemas."""
|
|
48
|
+
return Path(resources.files("augur_sdk._schema") / "json") # type: ignore[arg-type]
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def list_schemas() -> list[str]:
|
|
52
|
+
return sorted(_SCHEMA_FILES)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@cache
|
|
56
|
+
def load_schema(name: str) -> dict[str, Any]:
|
|
57
|
+
filename = _SCHEMA_FILES.get(name, name)
|
|
58
|
+
path = schemas_dir() / filename
|
|
59
|
+
if not path.exists():
|
|
60
|
+
raise SchemaError(f"unknown schema: {name!r}")
|
|
61
|
+
with path.open() as f:
|
|
62
|
+
loaded: dict[str, Any] = json.load(f)
|
|
63
|
+
return loaded
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
@cache
|
|
67
|
+
def _registry() -> Registry:
|
|
68
|
+
"""Pre-register every schema by `$id` and filename so cross-schema
|
|
69
|
+
`$ref`s resolve without going to the network."""
|
|
70
|
+
resources_list: list[tuple[str, Resource[Any]]] = []
|
|
71
|
+
for short, filename in _SCHEMA_FILES.items():
|
|
72
|
+
schema = load_schema(short)
|
|
73
|
+
resource = DRAFT202012.create_resource(schema)
|
|
74
|
+
if "$id" in schema:
|
|
75
|
+
resources_list.append((schema["$id"], resource))
|
|
76
|
+
resources_list.append((filename, resource))
|
|
77
|
+
return Registry().with_resources(resources_list)
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
def validator_for(name: str) -> Draft202012Validator:
|
|
81
|
+
schema = load_schema(name)
|
|
82
|
+
return Draft202012Validator(schema, registry=_registry())
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
__all__ = [
|
|
86
|
+
"SCHEMA_VERSION",
|
|
87
|
+
"SchemaError",
|
|
88
|
+
"ValidationError",
|
|
89
|
+
"list_schemas",
|
|
90
|
+
"load_schema",
|
|
91
|
+
"schemas_dir",
|
|
92
|
+
"validator_for",
|
|
93
|
+
]
|
|
File without changes
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://augur.dev/schemas/0.1/capture_mode.schema.json",
|
|
4
|
+
"title": "CaptureMode",
|
|
5
|
+
"description": "Augur capture mode (spec §7). Ordered from least to most coverage.",
|
|
6
|
+
"type": "string",
|
|
7
|
+
"enum": [
|
|
8
|
+
"off",
|
|
9
|
+
"metadata",
|
|
10
|
+
"trace",
|
|
11
|
+
"screenshots",
|
|
12
|
+
"video",
|
|
13
|
+
"model_io",
|
|
14
|
+
"dispatch",
|
|
15
|
+
"replay",
|
|
16
|
+
"full"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://augur.dev/schemas/0.1/coordinate_space.schema.json",
|
|
4
|
+
"title": "CoordinateSpace",
|
|
5
|
+
"description": "Coordinate space registry (spec §4, §9, issue #9). Every coordinate MUST be tagged with one of these spaces so viewers can render overlays correctly across viewport sizes and device pixel ratios.",
|
|
6
|
+
"type": "string",
|
|
7
|
+
"enum": [
|
|
8
|
+
"viewport_css_px",
|
|
9
|
+
"device_px",
|
|
10
|
+
"screenshot_px",
|
|
11
|
+
"dom_client_rect"
|
|
12
|
+
],
|
|
13
|
+
"x-conversions": {
|
|
14
|
+
"note": "Conversion rules are non-normative here. See packages/sdk-python/src/augur_sdk/coordinates.py for the reference impl.",
|
|
15
|
+
"viewport_css_px<->device_px": "multiply by device_scale_factor on the source observation",
|
|
16
|
+
"viewport_css_px<->screenshot_px": "screenshots are captured at viewport scale by default; otherwise multiply by screenshot_scale",
|
|
17
|
+
"dom_client_rect": "Diagnostic-only space. MUST be paired with provenance=dom. Never a runtime input (spec §4)."
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://augur.dev/schemas/0.1/debug_session.schema.json",
|
|
4
|
+
"title": "DebugSession",
|
|
5
|
+
"description": "One CUA run from the debugger's point of view. Spec §8.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"debug_session_id",
|
|
10
|
+
"run_id",
|
|
11
|
+
"client",
|
|
12
|
+
"capture_mode",
|
|
13
|
+
"started_at",
|
|
14
|
+
"status"
|
|
15
|
+
],
|
|
16
|
+
"additionalProperties": false,
|
|
17
|
+
"properties": {
|
|
18
|
+
"schema_version": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "Augur schema version that this record conforms to. See docs/versioning.md.",
|
|
21
|
+
"pattern": "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$"
|
|
22
|
+
},
|
|
23
|
+
"debug_session_id": {
|
|
24
|
+
"type": "string",
|
|
25
|
+
"pattern": "^dbg_[A-Za-z0-9_\\-]+$"
|
|
26
|
+
},
|
|
27
|
+
"run_id": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "Adapter-supplied run id. Often `run_<uuid>` but the format is not enforced."
|
|
30
|
+
},
|
|
31
|
+
"client": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"required": ["name"],
|
|
34
|
+
"additionalProperties": false,
|
|
35
|
+
"properties": {
|
|
36
|
+
"name": {"type": "string", "description": "Adapter name, e.g. `mantis`."},
|
|
37
|
+
"version": {"type": "string"},
|
|
38
|
+
"git_sha": {"type": "string"}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"capture_mode": {"$ref": "capture_mode.schema.json"},
|
|
42
|
+
"started_at": {"type": "string", "format": "date-time"},
|
|
43
|
+
"ended_at": {"type": ["string", "null"], "format": "date-time"},
|
|
44
|
+
"status": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"enum": ["running", "succeeded", "failed", "cancelled", "halted"]
|
|
47
|
+
},
|
|
48
|
+
"artifact_root": {
|
|
49
|
+
"type": "string",
|
|
50
|
+
"description": "URI to the artifact root. file:// for local bundles, s3:// or https:// otherwise."
|
|
51
|
+
},
|
|
52
|
+
"trace_uri": {"type": "string"},
|
|
53
|
+
"live": {
|
|
54
|
+
"type": ["object", "null"],
|
|
55
|
+
"description": "Live attach endpoints. Only populated while the run is active (spec §7, Phase 4).",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"properties": {
|
|
58
|
+
"status_url": {"type": "string"},
|
|
59
|
+
"video_url": {"type": "string"},
|
|
60
|
+
"reasoning_url": {"type": "string"}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"tags": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"additionalProperties": {"type": "string"},
|
|
66
|
+
"description": "Free-form key/value tags (tenant, environment, plan signature, etc.)."
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://augur.dev/schemas/0.1/decision_event.schema.json",
|
|
4
|
+
"title": "DecisionEvent",
|
|
5
|
+
"description": "An ordered record from planner, verifier, recovery, routing, or dispatch layers (spec §8). Stored one-per-line in JSONL files under events/.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["ts", "layer", "kind", "summary"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"ts": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"format": "date-time",
|
|
13
|
+
"description": "ISO-8601 UTC timestamp."
|
|
14
|
+
},
|
|
15
|
+
"step_index": {
|
|
16
|
+
"type": "integer",
|
|
17
|
+
"minimum": 0,
|
|
18
|
+
"description": "Optional — events MAY be associated with a step or stand alone."
|
|
19
|
+
},
|
|
20
|
+
"layer": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": [
|
|
23
|
+
"planner",
|
|
24
|
+
"grounding",
|
|
25
|
+
"model",
|
|
26
|
+
"dispatch",
|
|
27
|
+
"verifier",
|
|
28
|
+
"step_recovery",
|
|
29
|
+
"routing",
|
|
30
|
+
"runner",
|
|
31
|
+
"adapter"
|
|
32
|
+
]
|
|
33
|
+
},
|
|
34
|
+
"kind": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"enum": ["decision", "observation", "error", "info", "metric"]
|
|
37
|
+
},
|
|
38
|
+
"summary": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "One-line human summary. The detail object carries the structured payload."
|
|
41
|
+
},
|
|
42
|
+
"detail": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"description": "Layer-specific structured payload. Schema is intentionally open here; adapters MAY define their own shapes.",
|
|
45
|
+
"additionalProperties": true
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://augur.dev/schemas/0.1/diagnostic_finding.schema.json",
|
|
4
|
+
"title": "DiagnosticFinding",
|
|
5
|
+
"description": "One output of the diagnostic rules engine. Spec §15.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["rule_id", "severity", "summary", "evidence"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"rule_id": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"description": "Stable rule identifier. Generic rules use `cua.*`; adapter packs MUST namespace under `<adapter>.*`.",
|
|
13
|
+
"pattern": "^[a-z][a-z0-9_]*(\\.[a-z][a-z0-9_]*)+$"
|
|
14
|
+
},
|
|
15
|
+
"severity": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"enum": ["info", "low", "medium", "high", "critical"]
|
|
18
|
+
},
|
|
19
|
+
"summary": {"type": "string"},
|
|
20
|
+
"recommendation": {"type": "string"},
|
|
21
|
+
"step_index": {"type": "integer", "minimum": 0},
|
|
22
|
+
"evidence": {
|
|
23
|
+
"type": "array",
|
|
24
|
+
"minItems": 1,
|
|
25
|
+
"description": "At least one evidence reference. Each MUST point at a bundle-relative path. Optional `#L<n>` or `#L<a>-L<b>` anchors are honored for log refs.",
|
|
26
|
+
"items": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"required": ["type", "ref"],
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"properties": {
|
|
31
|
+
"type": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"enum": ["log", "step", "event", "screenshot", "diff", "crop", "trace"]
|
|
34
|
+
},
|
|
35
|
+
"ref": {"type": "string"}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://augur.dev/schemas/0.1/failure_class.schema.json",
|
|
4
|
+
"title": "FailureClass",
|
|
5
|
+
"description": "Generic CUA failure taxonomy. Adapter-specific failure classes MUST namespace under `<adapter>.<class>` (e.g. `mantis.modal_signature_missing`). Open string so adapters can extend without a schema bump; the diagnostic rules engine owns the authoritative list per pack.",
|
|
6
|
+
"type": "string",
|
|
7
|
+
"examples": [
|
|
8
|
+
"no_state_change",
|
|
9
|
+
"click_outside_viewport",
|
|
10
|
+
"coordinate_space_mismatch",
|
|
11
|
+
"verifier_disagrees",
|
|
12
|
+
"dispatch_ok_state_fail",
|
|
13
|
+
"invalid_action_schema",
|
|
14
|
+
"missing_observation",
|
|
15
|
+
"infra_failure",
|
|
16
|
+
"model_timeout",
|
|
17
|
+
"som_clicked_container",
|
|
18
|
+
"tab_walk_target_absent"
|
|
19
|
+
],
|
|
20
|
+
"minLength": 1
|
|
21
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://augur.dev/schemas/0.1/manifest.schema.json",
|
|
4
|
+
"title": "BundleManifest",
|
|
5
|
+
"description": "Envelope for an Augur debug bundle. Spec §11. Lives at `manifest.json` at the bundle root.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"schema_version",
|
|
9
|
+
"bundle_format",
|
|
10
|
+
"run_id",
|
|
11
|
+
"debug_session_id",
|
|
12
|
+
"client",
|
|
13
|
+
"capture_mode",
|
|
14
|
+
"created_at",
|
|
15
|
+
"trace",
|
|
16
|
+
"step_count",
|
|
17
|
+
"paths"
|
|
18
|
+
],
|
|
19
|
+
"additionalProperties": false,
|
|
20
|
+
"properties": {
|
|
21
|
+
"schema_version": {
|
|
22
|
+
"type": "string",
|
|
23
|
+
"pattern": "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$",
|
|
24
|
+
"description": "Augur schema version that every record in this bundle conforms to."
|
|
25
|
+
},
|
|
26
|
+
"bundle_format": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"const": "augur-bundle",
|
|
29
|
+
"description": "Constant discriminator so consumers can sniff Augur bundles without parsing the rest."
|
|
30
|
+
},
|
|
31
|
+
"run_id": {"type": "string"},
|
|
32
|
+
"debug_session_id": {
|
|
33
|
+
"type": "string",
|
|
34
|
+
"pattern": "^dbg_[A-Za-z0-9_\\-]+$"
|
|
35
|
+
},
|
|
36
|
+
"client": {
|
|
37
|
+
"type": "object",
|
|
38
|
+
"required": ["name"],
|
|
39
|
+
"additionalProperties": false,
|
|
40
|
+
"properties": {
|
|
41
|
+
"name": {"type": "string"},
|
|
42
|
+
"version": {"type": "string"},
|
|
43
|
+
"git_sha": {"type": "string"}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"capture_mode": {"$ref": "capture_mode.schema.json"},
|
|
47
|
+
"created_at": {"type": "string", "format": "date-time"},
|
|
48
|
+
"redaction": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"required": ["policy_id"],
|
|
52
|
+
"properties": {
|
|
53
|
+
"policy_id": {"type": "string"},
|
|
54
|
+
"applied": {"type": "boolean", "default": true}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"trace": {
|
|
58
|
+
"type": "string",
|
|
59
|
+
"description": "Bundle-relative path to the trace document (see trace.schema.json).",
|
|
60
|
+
"const": "trace.json"
|
|
61
|
+
},
|
|
62
|
+
"step_count": {"type": "integer", "minimum": 0},
|
|
63
|
+
"paths": {
|
|
64
|
+
"type": "object",
|
|
65
|
+
"description": "Path-stability map. Producers MUST emit exactly these top-level paths so consumers can rely on them.",
|
|
66
|
+
"additionalProperties": false,
|
|
67
|
+
"required": ["steps", "screenshots", "events", "logs"],
|
|
68
|
+
"properties": {
|
|
69
|
+
"steps": {"type": "string", "const": "steps/"},
|
|
70
|
+
"screenshots": {"type": "string", "const": "screenshots/"},
|
|
71
|
+
"crops": {"type": "string", "const": "crops/"},
|
|
72
|
+
"diffs": {"type": "string", "const": "diffs/"},
|
|
73
|
+
"events": {"type": "string", "const": "events/"},
|
|
74
|
+
"logs": {"type": "string", "const": "logs/"},
|
|
75
|
+
"replay": {"type": "string", "const": "replay/"},
|
|
76
|
+
"diagnostics": {"type": "string", "const": "diagnostics/"},
|
|
77
|
+
"schema": {"type": "string", "const": "schema/"},
|
|
78
|
+
"agent": {"type": "string", "const": "AGENT.md"}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"signatures": {
|
|
82
|
+
"type": "object",
|
|
83
|
+
"description": "Optional content hashes for integrity. Keys are bundle-relative file paths; values are sha256 hex digests.",
|
|
84
|
+
"additionalProperties": {
|
|
85
|
+
"type": "string",
|
|
86
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
"missing": {
|
|
90
|
+
"type": "array",
|
|
91
|
+
"description": "Bundle-relative paths that are explicitly absent (e.g. screenshots before late-attach point). Consumers MUST treat anything not listed and not present as a producer bug.",
|
|
92
|
+
"items": {"type": "string"}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://augur.dev/schemas/0.1/observation.schema.json",
|
|
4
|
+
"title": "Observation",
|
|
5
|
+
"description": "A captured screenshot with enough metadata to render overlays correctly (spec §8).",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": [
|
|
8
|
+
"artifact",
|
|
9
|
+
"media_type",
|
|
10
|
+
"width",
|
|
11
|
+
"height",
|
|
12
|
+
"coordinate_space"
|
|
13
|
+
],
|
|
14
|
+
"additionalProperties": false,
|
|
15
|
+
"properties": {
|
|
16
|
+
"artifact": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "Bundle-relative path or signed URI to the image."
|
|
19
|
+
},
|
|
20
|
+
"media_type": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"enum": ["image/png", "image/jpeg", "image/webp"]
|
|
23
|
+
},
|
|
24
|
+
"width": {"type": "integer", "minimum": 1},
|
|
25
|
+
"height": {"type": "integer", "minimum": 1},
|
|
26
|
+
"coordinate_space": {"$ref": "coordinate_space.schema.json"},
|
|
27
|
+
"viewport": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"additionalProperties": false,
|
|
30
|
+
"required": ["width", "height"],
|
|
31
|
+
"properties": {
|
|
32
|
+
"width": {"type": "integer", "minimum": 1},
|
|
33
|
+
"height": {"type": "integer", "minimum": 1},
|
|
34
|
+
"device_scale_factor": {"type": "number", "minimum": 0, "default": 1}
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"url": {"type": "string"},
|
|
38
|
+
"title": {"type": "string"},
|
|
39
|
+
"scroll": {
|
|
40
|
+
"type": "object",
|
|
41
|
+
"additionalProperties": false,
|
|
42
|
+
"required": ["x", "y"],
|
|
43
|
+
"properties": {
|
|
44
|
+
"x": {"type": "integer"},
|
|
45
|
+
"y": {"type": "integer"}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"hashes": {
|
|
49
|
+
"type": "object",
|
|
50
|
+
"additionalProperties": false,
|
|
51
|
+
"properties": {
|
|
52
|
+
"sha256": {"type": "string", "pattern": "^[0-9a-f]{64}$"},
|
|
53
|
+
"phash_64": {
|
|
54
|
+
"type": "string",
|
|
55
|
+
"description": "64-bit perceptual hash, hex-encoded."
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"redaction": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"additionalProperties": false,
|
|
62
|
+
"required": ["applied"],
|
|
63
|
+
"properties": {
|
|
64
|
+
"applied": {"type": "boolean"},
|
|
65
|
+
"policy_id": {"type": "string"},
|
|
66
|
+
"regions": {
|
|
67
|
+
"type": "array",
|
|
68
|
+
"description": "Optional list of regions that were masked.",
|
|
69
|
+
"items": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"additionalProperties": false,
|
|
72
|
+
"required": ["x1", "y1", "x2", "y2"],
|
|
73
|
+
"properties": {
|
|
74
|
+
"x1": {"type": "integer"},
|
|
75
|
+
"y1": {"type": "integer"},
|
|
76
|
+
"x2": {"type": "integer"},
|
|
77
|
+
"y2": {"type": "integer"},
|
|
78
|
+
"label": {"type": "string"}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"missing": {
|
|
85
|
+
"type": "boolean",
|
|
86
|
+
"default": false,
|
|
87
|
+
"description": "True if this observation is a placeholder for a frame that was not captured (e.g. late attach). The `artifact` MUST still be present but the consumer MUST NOT render a screenshot."
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://augur.dev/schemas/0.1/provenance.schema.json",
|
|
4
|
+
"title": "Provenance",
|
|
5
|
+
"description": "How a coordinate or signal was derived (spec §4). The viewer MUST visually distinguish non-CUA diagnostic evidence (dom, diagnostic).",
|
|
6
|
+
"type": "string",
|
|
7
|
+
"enum": [
|
|
8
|
+
"screenshot",
|
|
9
|
+
"dom",
|
|
10
|
+
"human_override",
|
|
11
|
+
"replay_candidate",
|
|
12
|
+
"diagnostic"
|
|
13
|
+
]
|
|
14
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://augur.dev/schemas/0.1/replay_fixture.schema.json",
|
|
4
|
+
"title": "ReplayFixture",
|
|
5
|
+
"description": "Seed data for replaying a single step (spec §8, §10). The fixture MUST be self-contained relative to the bundle.",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"required": ["fixture_id", "step_id", "mode", "observation"],
|
|
8
|
+
"additionalProperties": false,
|
|
9
|
+
"properties": {
|
|
10
|
+
"fixture_id": {"type": "string"},
|
|
11
|
+
"step_id": {"type": "string"},
|
|
12
|
+
"mode": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"enum": [
|
|
15
|
+
"observation_replay",
|
|
16
|
+
"handler_replay",
|
|
17
|
+
"model_replay",
|
|
18
|
+
"sandbox_replay",
|
|
19
|
+
"shadow_replay"
|
|
20
|
+
]
|
|
21
|
+
},
|
|
22
|
+
"task": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"description": "Human-readable task/intent string passed back to the agent under test."
|
|
25
|
+
},
|
|
26
|
+
"observation": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"description": "Bundle-relative path to the observation PNG used as the replay input."
|
|
29
|
+
},
|
|
30
|
+
"prior_steps": {
|
|
31
|
+
"type": ["string", "null"],
|
|
32
|
+
"description": "Bundle-relative path to a JSON file containing the prior steps' summaries (action + verdict only)."
|
|
33
|
+
},
|
|
34
|
+
"expected": {
|
|
35
|
+
"type": "object",
|
|
36
|
+
"additionalProperties": false,
|
|
37
|
+
"properties": {
|
|
38
|
+
"action_type": {"type": "string"},
|
|
39
|
+
"acceptable_regions": {
|
|
40
|
+
"type": "array",
|
|
41
|
+
"items": {
|
|
42
|
+
"type": "object",
|
|
43
|
+
"required": ["x1", "y1", "x2", "y2"],
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"properties": {
|
|
46
|
+
"x1": {"type": "number"},
|
|
47
|
+
"y1": {"type": "number"},
|
|
48
|
+
"x2": {"type": "number"},
|
|
49
|
+
"y2": {"type": "number"},
|
|
50
|
+
"label": {"type": "string"}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"verdict_status": {
|
|
55
|
+
"type": "string",
|
|
56
|
+
"enum": ["passed", "failed", "recoverable", "skipped", "unknown"]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"captured_versions": {
|
|
61
|
+
"type": "object",
|
|
62
|
+
"additionalProperties": false,
|
|
63
|
+
"description": "Versions in effect when the fixture was captured. Replay output MUST also record the versions in effect at replay time so deltas can be attributed.",
|
|
64
|
+
"properties": {
|
|
65
|
+
"model": {"type": "string"},
|
|
66
|
+
"prompt": {"type": "string"},
|
|
67
|
+
"code_git_sha": {"type": "string"},
|
|
68
|
+
"grounder": {"type": "string"}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|