monarchic-agent-protocol 0.1.15 → 0.1.17
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.
- checksums.yaml +4 -4
- data/README.md +374 -51
- data/schemas/v1/agent_role.json +4 -1
- data/schemas/v1/artifact.json +18 -0
- data/schemas/v1/dataset_ref.json +2 -13
- data/schemas/v1/eval_result.json +1 -5
- data/schemas/v1/event.json +15 -42
- data/schemas/v1/execution_receipt.json +69 -0
- data/schemas/v1/experiment_spec.json +3 -16
- data/schemas/v1/failure_class.json +46 -0
- data/schemas/v1/failure_detail.json +33 -0
- data/schemas/v1/gate_result.json +16 -16
- data/schemas/v1/google.protobuf.Struct.schema.json +7 -0
- data/schemas/v1/monarchic.agent_protocol.v1.DatasetRef.schema.json +9 -0
- data/schemas/v1/monarchic.agent_protocol.v1.EvalResult.schema.json +9 -0
- data/schemas/v1/monarchic.agent_protocol.v1.ExperimentSpec.schema.json +9 -0
- data/schemas/v1/monarchic.agent_protocol.v1.ObjectiveSpec.schema.json +9 -0
- data/schemas/v1/monarchic.agent_protocol.v1.RunContext.schema.json +9 -0
- data/schemas/v1/monarchic_agent_protocol.proto +1205 -16
- data/schemas/v1/objective_spec.json +4 -15
- data/schemas/v1/plan.json +55 -0
- data/schemas/v1/plan_provenance.json +25 -0
- data/schemas/v1/plan_status.json +17 -0
- data/schemas/v1/plan_step.json +31 -0
- data/schemas/v1/provenance.json +1 -8
- data/schemas/v1/role_provenance.json +22 -0
- data/schemas/v1/schema.json +54 -6
- data/schemas/v1/task.json +42 -27
- data/src/ruby/monarchic_agent_protocol_pb.rb +116 -2
- metadata +16 -3
- data/schemas/v1/delivery_contract.json +0 -78
|
@@ -4,10 +4,7 @@
|
|
|
4
4
|
"title": "ObjectiveSpec",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": true,
|
|
7
|
-
"required": [
|
|
8
|
-
"metric_key",
|
|
9
|
-
"direction"
|
|
10
|
-
],
|
|
7
|
+
"required": ["metric_key", "direction"],
|
|
11
8
|
"properties": {
|
|
12
9
|
"metric_key": {
|
|
13
10
|
"type": "string",
|
|
@@ -15,11 +12,7 @@
|
|
|
15
12
|
},
|
|
16
13
|
"direction": {
|
|
17
14
|
"type": "string",
|
|
18
|
-
"enum": [
|
|
19
|
-
"maximize",
|
|
20
|
-
"minimize",
|
|
21
|
-
"target"
|
|
22
|
-
]
|
|
15
|
+
"enum": ["maximize", "minimize", "target"]
|
|
23
16
|
},
|
|
24
17
|
"target": {
|
|
25
18
|
"type": "number"
|
|
@@ -49,14 +42,10 @@
|
|
|
49
42
|
},
|
|
50
43
|
"anyOf": [
|
|
51
44
|
{
|
|
52
|
-
"required": [
|
|
53
|
-
"target"
|
|
54
|
-
]
|
|
45
|
+
"required": ["target"]
|
|
55
46
|
},
|
|
56
47
|
{
|
|
57
|
-
"required": [
|
|
58
|
-
"min_delta"
|
|
59
|
-
]
|
|
48
|
+
"required": ["min_delta"]
|
|
60
49
|
}
|
|
61
50
|
]
|
|
62
51
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://monarchic.ai/schema/v1/plan.json",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "Plan",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": true,
|
|
7
|
+
"required": [
|
|
8
|
+
"contract_version",
|
|
9
|
+
"plan_id",
|
|
10
|
+
"objective",
|
|
11
|
+
"status",
|
|
12
|
+
"created_at_ms",
|
|
13
|
+
"updated_at_ms",
|
|
14
|
+
"provenance",
|
|
15
|
+
"steps"
|
|
16
|
+
],
|
|
17
|
+
"properties": {
|
|
18
|
+
"contract_version": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"enum": ["v1"]
|
|
21
|
+
},
|
|
22
|
+
"plan_id": {
|
|
23
|
+
"type": "string",
|
|
24
|
+
"minLength": 1
|
|
25
|
+
},
|
|
26
|
+
"run_id": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"minLength": 1
|
|
29
|
+
},
|
|
30
|
+
"objective": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"minLength": 1
|
|
33
|
+
},
|
|
34
|
+
"status": {
|
|
35
|
+
"$ref": "plan_status.json"
|
|
36
|
+
},
|
|
37
|
+
"created_at_ms": {
|
|
38
|
+
"type": "integer",
|
|
39
|
+
"minimum": 0
|
|
40
|
+
},
|
|
41
|
+
"updated_at_ms": {
|
|
42
|
+
"type": "integer",
|
|
43
|
+
"minimum": 0
|
|
44
|
+
},
|
|
45
|
+
"provenance": {
|
|
46
|
+
"$ref": "plan_provenance.json"
|
|
47
|
+
},
|
|
48
|
+
"steps": {
|
|
49
|
+
"type": "array",
|
|
50
|
+
"items": {
|
|
51
|
+
"$ref": "plan_step.json"
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://monarchic.ai/schema/v1/plan_provenance.json",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "PlanProvenance",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": true,
|
|
7
|
+
"required": ["generated_by", "generated_at_ms"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"generated_by": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1
|
|
12
|
+
},
|
|
13
|
+
"policy_profile": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1
|
|
16
|
+
},
|
|
17
|
+
"generated_at_ms": {
|
|
18
|
+
"type": "integer",
|
|
19
|
+
"minimum": 0
|
|
20
|
+
},
|
|
21
|
+
"role": {
|
|
22
|
+
"$ref": "role_provenance.json"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://monarchic.ai/schema/v1/plan_status.json",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "PlanStatus",
|
|
5
|
+
"type": "string",
|
|
6
|
+
"enum": [
|
|
7
|
+
"unspecified",
|
|
8
|
+
"draft",
|
|
9
|
+
"planned",
|
|
10
|
+
"executing",
|
|
11
|
+
"complete",
|
|
12
|
+
"bounded",
|
|
13
|
+
"failed",
|
|
14
|
+
"cancelled",
|
|
15
|
+
"unknown"
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://monarchic.ai/schema/v1/plan_step.json",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "PlanStep",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": true,
|
|
7
|
+
"required": ["step_id", "description", "task_template"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"step_id": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1
|
|
12
|
+
},
|
|
13
|
+
"description": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1
|
|
16
|
+
},
|
|
17
|
+
"depends_on": {
|
|
18
|
+
"type": "array",
|
|
19
|
+
"items": {
|
|
20
|
+
"type": "string"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"task_template": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"additionalProperties": true
|
|
26
|
+
},
|
|
27
|
+
"failure": {
|
|
28
|
+
"$ref": "failure_detail.json"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
data/schemas/v1/provenance.json
CHANGED
|
@@ -4,14 +4,7 @@
|
|
|
4
4
|
"title": "Provenance",
|
|
5
5
|
"type": "object",
|
|
6
6
|
"additionalProperties": true,
|
|
7
|
-
"required": [
|
|
8
|
-
"prompt_sha256",
|
|
9
|
-
"code_sha256",
|
|
10
|
-
"runtime",
|
|
11
|
-
"runner",
|
|
12
|
-
"orchestrator",
|
|
13
|
-
"created_at"
|
|
14
|
-
],
|
|
7
|
+
"required": ["prompt_sha256", "code_sha256", "runtime", "runner", "orchestrator", "created_at"],
|
|
15
8
|
"properties": {
|
|
16
9
|
"prompt_sha256": {
|
|
17
10
|
"type": "string",
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "https://monarchic.ai/schema/v1/role_provenance.json",
|
|
3
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
|
+
"title": "RoleProvenance",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"additionalProperties": true,
|
|
7
|
+
"required": ["role_name", "template_hash", "render_hash"],
|
|
8
|
+
"properties": {
|
|
9
|
+
"role_name": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"minLength": 1
|
|
12
|
+
},
|
|
13
|
+
"template_hash": {
|
|
14
|
+
"type": "string",
|
|
15
|
+
"minLength": 1
|
|
16
|
+
},
|
|
17
|
+
"render_hash": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"minLength": 1
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
data/schemas/v1/schema.json
CHANGED
|
@@ -3,11 +3,59 @@
|
|
|
3
3
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
4
|
"title": "Monarchic AI Protocol v1",
|
|
5
5
|
"oneOf": [
|
|
6
|
-
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{
|
|
10
|
-
|
|
11
|
-
|
|
6
|
+
{
|
|
7
|
+
"$ref": "task.json"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"$ref": "artifact.json"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"$ref": "event.json"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"$ref": "gate_result.json"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"$ref": "failure_class.json"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"$ref": "plan_status.json"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"$ref": "failure_detail.json"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"$ref": "role_provenance.json"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
"$ref": "plan_provenance.json"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"$ref": "plan_step.json"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"$ref": "plan.json"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"$ref": "execution_receipt.json"
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"$ref": "run_context.json"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
"$ref": "dataset_ref.json"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"$ref": "experiment_spec.json"
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"$ref": "objective_spec.json"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"$ref": "eval_result.json"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"$ref": "provenance.json"
|
|
59
|
+
}
|
|
12
60
|
]
|
|
13
61
|
}
|
data/schemas/v1/task.json
CHANGED
|
@@ -3,9 +3,6 @@
|
|
|
3
3
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
4
4
|
"additionalProperties": true,
|
|
5
5
|
"patternProperties": {
|
|
6
|
-
"^(deliveryContract)$": {
|
|
7
|
-
"$ref": "monarchic.agent_protocol.v1.DeliveryContract.schema.json"
|
|
8
|
-
},
|
|
9
6
|
"^(experimentSpec)$": {
|
|
10
7
|
"$ref": "monarchic.agent_protocol.v1.ExperimentSpec.schema.json"
|
|
11
8
|
},
|
|
@@ -30,9 +27,6 @@
|
|
|
30
27
|
"constraints": {
|
|
31
28
|
"$ref": "google.protobuf.Struct.schema.json"
|
|
32
29
|
},
|
|
33
|
-
"delivery_contract": {
|
|
34
|
-
"$ref": "monarchic.agent_protocol.v1.DeliveryContract.schema.json"
|
|
35
|
-
},
|
|
36
30
|
"experiment_spec": {
|
|
37
31
|
"$ref": "monarchic.agent_protocol.v1.ExperimentSpec.schema.json"
|
|
38
32
|
},
|
|
@@ -52,6 +46,10 @@
|
|
|
52
46
|
"inputs": {
|
|
53
47
|
"$ref": "google.protobuf.Struct.schema.json"
|
|
54
48
|
},
|
|
49
|
+
"role_id": {
|
|
50
|
+
"default": "",
|
|
51
|
+
"type": "string"
|
|
52
|
+
},
|
|
55
53
|
"objective_spec": {
|
|
56
54
|
"$ref": "monarchic.agent_protocol.v1.ObjectiveSpec.schema.json"
|
|
57
55
|
},
|
|
@@ -66,20 +64,26 @@
|
|
|
66
64
|
"PRODUCT_OWNER",
|
|
67
65
|
"PROJECT_MANAGER",
|
|
68
66
|
"DEV",
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
|
|
67
|
+
"QA",
|
|
68
|
+
"REVIEWER",
|
|
69
|
+
"SECURITY",
|
|
70
|
+
"OPS",
|
|
71
|
+
"PUBLISHER",
|
|
72
|
+
"RESEARCHER",
|
|
73
|
+
"VERIFICATION",
|
|
74
|
+
"product_owner",
|
|
75
|
+
"project_manager",
|
|
76
|
+
"dev",
|
|
77
|
+
"qa",
|
|
78
|
+
"reviewer",
|
|
79
|
+
"security",
|
|
80
|
+
"ops",
|
|
81
|
+
"publisher",
|
|
82
|
+
"researcher",
|
|
83
|
+
"verification"
|
|
84
|
+
],
|
|
85
|
+
"type": "string"
|
|
86
|
+
},
|
|
83
87
|
{
|
|
84
88
|
"maximum": 2147483647,
|
|
85
89
|
"minimum": -2147483648,
|
|
@@ -90,17 +94,28 @@
|
|
|
90
94
|
"title": "Agent Role"
|
|
91
95
|
},
|
|
92
96
|
"run_context": {
|
|
93
|
-
"$ref": "
|
|
97
|
+
"$ref": "run_context.json"
|
|
94
98
|
},
|
|
95
|
-
"
|
|
96
|
-
"
|
|
97
|
-
"type": "string"
|
|
99
|
+
"objective_spec": {
|
|
100
|
+
"$ref": "objective_spec.json"
|
|
98
101
|
},
|
|
99
|
-
"
|
|
100
|
-
"
|
|
101
|
-
"type": "string"
|
|
102
|
+
"experiment_spec": {
|
|
103
|
+
"$ref": "experiment_spec.json"
|
|
102
104
|
}
|
|
103
105
|
},
|
|
106
|
+
"required": [
|
|
107
|
+
"version",
|
|
108
|
+
"task_id",
|
|
109
|
+
"goal"
|
|
110
|
+
],
|
|
111
|
+
"anyOf": [
|
|
112
|
+
{
|
|
113
|
+
"required": ["role_id"]
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
"required": ["role"]
|
|
117
|
+
}
|
|
118
|
+
],
|
|
104
119
|
"title": "Task",
|
|
105
120
|
"type": "object"
|
|
106
121
|
}
|