monarchic-agent-protocol 0.1.14 → 0.1.16

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 (32) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +325 -24
  3. data/schemas/v1/agent_role.json +4 -1
  4. data/schemas/v1/artifact.json +18 -0
  5. data/schemas/v1/dataset_ref.json +2 -13
  6. data/schemas/v1/eval_result.json +1 -5
  7. data/schemas/v1/event.json +15 -42
  8. data/schemas/v1/execution_receipt.json +69 -0
  9. data/schemas/v1/experiment_spec.json +3 -16
  10. data/schemas/v1/failure_class.json +46 -0
  11. data/schemas/v1/failure_detail.json +33 -0
  12. data/schemas/v1/gate_result.json +16 -16
  13. data/schemas/v1/google.protobuf.Struct.schema.json +7 -0
  14. data/schemas/v1/monarchic.agent_protocol.v1.DatasetRef.schema.json +9 -0
  15. data/schemas/v1/monarchic.agent_protocol.v1.DeliveryContract.schema.json +9 -0
  16. data/schemas/v1/monarchic.agent_protocol.v1.EvalResult.schema.json +9 -0
  17. data/schemas/v1/monarchic.agent_protocol.v1.ExperimentSpec.schema.json +9 -0
  18. data/schemas/v1/monarchic.agent_protocol.v1.ObjectiveSpec.schema.json +9 -0
  19. data/schemas/v1/monarchic.agent_protocol.v1.RunContext.schema.json +9 -0
  20. data/schemas/v1/monarchic_agent_protocol.proto +995 -16
  21. data/schemas/v1/objective_spec.json +4 -15
  22. data/schemas/v1/plan.json +55 -0
  23. data/schemas/v1/plan_provenance.json +25 -0
  24. data/schemas/v1/plan_status.json +17 -0
  25. data/schemas/v1/plan_step.json +31 -0
  26. data/schemas/v1/provenance.json +1 -8
  27. data/schemas/v1/role_provenance.json +22 -0
  28. data/schemas/v1/run_outcome.json +388 -0
  29. data/schemas/v1/schema.json +54 -5
  30. data/schemas/v1/task.json +42 -21
  31. data/src/ruby/monarchic_agent_protocol_pb.rb +78 -2
  32. metadata +18 -2
@@ -0,0 +1,69 @@
1
+ {
2
+ "$id": "https://monarchic.ai/schema/v1/execution_receipt.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "title": "ExecutionReceipt",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": [
8
+ "contract_version",
9
+ "run_id",
10
+ "plan_id",
11
+ "plan_hash",
12
+ "task_hashes",
13
+ "artifact_hashes",
14
+ "outcome_hash",
15
+ "status",
16
+ "generated_at_ms"
17
+ ],
18
+ "properties": {
19
+ "contract_version": {
20
+ "type": "string",
21
+ "enum": ["v1"]
22
+ },
23
+ "run_id": {
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "plan_id": {
28
+ "type": "string",
29
+ "minLength": 1
30
+ },
31
+ "plan_hash": {
32
+ "type": "string",
33
+ "minLength": 1
34
+ },
35
+ "task_hashes": {
36
+ "type": "array",
37
+ "items": {
38
+ "type": "string"
39
+ }
40
+ },
41
+ "artifact_hashes": {
42
+ "type": "array",
43
+ "items": {
44
+ "type": "string"
45
+ }
46
+ },
47
+ "outcome_hash": {
48
+ "type": "string",
49
+ "minLength": 1
50
+ },
51
+ "status": {
52
+ "$ref": "plan_status.json"
53
+ },
54
+ "failure": {
55
+ "anyOf": [
56
+ {
57
+ "$ref": "failure_detail.json"
58
+ },
59
+ {
60
+ "type": "null"
61
+ }
62
+ ]
63
+ },
64
+ "generated_at_ms": {
65
+ "type": "integer",
66
+ "minimum": 0
67
+ }
68
+ }
69
+ }
@@ -4,12 +4,7 @@
4
4
  "title": "ExperimentSpec",
5
5
  "type": "object",
6
6
  "additionalProperties": true,
7
- "required": [
8
- "experiment_id",
9
- "objective",
10
- "dataset_refs",
11
- "acceptance"
12
- ],
7
+ "required": ["experiment_id", "objective", "dataset_refs", "acceptance"],
13
8
  "properties": {
14
9
  "experiment_id": {
15
10
  "type": "string"
@@ -38,22 +33,14 @@
38
33
  "acceptance": {
39
34
  "type": "object",
40
35
  "additionalProperties": true,
41
- "required": [
42
- "metric",
43
- "direction",
44
- "threshold"
45
- ],
36
+ "required": ["metric", "direction", "threshold"],
46
37
  "properties": {
47
38
  "metric": {
48
39
  "type": "string"
49
40
  },
50
41
  "direction": {
51
42
  "type": "string",
52
- "enum": [
53
- "maximize",
54
- "minimize",
55
- "target"
56
- ]
43
+ "enum": ["maximize", "minimize", "target"]
57
44
  },
58
45
  "threshold": {
59
46
  "type": "number"
@@ -0,0 +1,46 @@
1
+ {
2
+ "$id": "https://monarchic.ai/schema/v1/failure_class.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "title": "FailureClass",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["category", "code", "retryable"],
8
+ "properties": {
9
+ "category": {
10
+ "type": "string",
11
+ "enum": [
12
+ "validation",
13
+ "dependency",
14
+ "environment",
15
+ "timeout",
16
+ "conflict",
17
+ "permission",
18
+ "resource",
19
+ "internal",
20
+ "unknown"
21
+ ]
22
+ },
23
+ "code": {
24
+ "type": "string",
25
+ "minLength": 1
26
+ },
27
+ "retryable": {
28
+ "type": "boolean"
29
+ },
30
+ "detail": {
31
+ "type": "string"
32
+ },
33
+ "scope": {
34
+ "type": "string",
35
+ "enum": ["task", "artifact", "gate", "runner", "orchestrator", "unknown"]
36
+ },
37
+ "source": {
38
+ "type": "string",
39
+ "minLength": 1
40
+ },
41
+ "next_action": {
42
+ "type": "string",
43
+ "minLength": 1
44
+ }
45
+ }
46
+ }
@@ -0,0 +1,33 @@
1
+ {
2
+ "$id": "https://monarchic.ai/schema/v1/failure_detail.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "title": "FailureDetail",
5
+ "type": "object",
6
+ "additionalProperties": true,
7
+ "required": ["class", "code", "message"],
8
+ "properties": {
9
+ "class": {
10
+ "type": "string",
11
+ "enum": [
12
+ "validation",
13
+ "execution",
14
+ "agent",
15
+ "infra",
16
+ "policy",
17
+ "unknown"
18
+ ]
19
+ },
20
+ "code": {
21
+ "type": "string",
22
+ "minLength": 1
23
+ },
24
+ "message": {
25
+ "type": "string",
26
+ "minLength": 1
27
+ },
28
+ "details": {
29
+ "type": "object",
30
+ "additionalProperties": true
31
+ }
32
+ }
33
+ }
@@ -1,30 +1,30 @@
1
1
  {
2
- "$id": "monarchic.agent_protocol.v1.GateResult.schema.json",
2
+ "$id": "https://monarchic.ai/schema/v1/gate_result.json",
3
3
  "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "title": "GateResult",
5
+ "type": "object",
4
6
  "additionalProperties": true,
7
+ "required": ["version", "gate", "status"],
5
8
  "properties": {
6
- "evidence": {
7
- "$ref": "google.protobuf.Struct.schema.json"
8
- },
9
- "extensions": {
10
- "$ref": "google.protobuf.Struct.schema.json"
9
+ "version": {
10
+ "type": "string",
11
+ "const": "v1"
11
12
  },
12
13
  "gate": {
13
- "default": "",
14
- "type": "string"
15
- },
16
- "reason": {
17
14
  "type": "string"
18
15
  },
19
16
  "status": {
20
- "default": "",
21
17
  "type": "string"
22
18
  },
23
- "version": {
24
- "default": "",
19
+ "reason": {
25
20
  "type": "string"
21
+ },
22
+ "failure_class": {
23
+ "$ref": "failure_class.json"
24
+ },
25
+ "evidence": {
26
+ "type": "object",
27
+ "additionalProperties": true
26
28
  }
27
- },
28
- "title": "Gate Result",
29
- "type": "object"
29
+ }
30
30
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "$id": "google.protobuf.Struct.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "title": "google.protobuf.Struct",
5
+ "type": "object",
6
+ "additionalProperties": true
7
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$id": "monarchic.agent_protocol.v1.DatasetRef.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "allOf": [
5
+ {
6
+ "$ref": "dataset_ref.json"
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$id": "monarchic.agent_protocol.v1.DeliveryContract.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "allOf": [
5
+ {
6
+ "$ref": "delivery_contract.json"
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$id": "monarchic.agent_protocol.v1.EvalResult.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "allOf": [
5
+ {
6
+ "$ref": "eval_result.json"
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$id": "monarchic.agent_protocol.v1.ExperimentSpec.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "allOf": [
5
+ {
6
+ "$ref": "experiment_spec.json"
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$id": "monarchic.agent_protocol.v1.ObjectiveSpec.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "allOf": [
5
+ {
6
+ "$ref": "objective_spec.json"
7
+ }
8
+ ]
9
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "$id": "monarchic.agent_protocol.v1.RunContext.schema.json",
3
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
4
+ "allOf": [
5
+ {
6
+ "$ref": "run_context.json"
7
+ }
8
+ ]
9
+ }