coreason-manifest 0.5.1__py3-none-any.whl → 0.6.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.
- coreason_manifest/__init__.py +20 -0
- coreason_manifest/recipes.py +161 -0
- {coreason_manifest-0.5.1.dist-info → coreason_manifest-0.6.0.dist-info}/METADATA +1 -1
- {coreason_manifest-0.5.1.dist-info → coreason_manifest-0.6.0.dist-info}/RECORD +7 -6
- {coreason_manifest-0.5.1.dist-info → coreason_manifest-0.6.0.dist-info}/WHEEL +0 -0
- {coreason_manifest-0.5.1.dist-info → coreason_manifest-0.6.0.dist-info}/licenses/LICENSE +0 -0
- {coreason_manifest-0.5.1.dist-info → coreason_manifest-0.6.0.dist-info}/licenses/NOTICE +0 -0
coreason_manifest/__init__.py
CHANGED
|
@@ -35,6 +35,17 @@ from .models import (
|
|
|
35
35
|
Step,
|
|
36
36
|
)
|
|
37
37
|
from .policy import PolicyEnforcer
|
|
38
|
+
from .recipes import (
|
|
39
|
+
AgentNode,
|
|
40
|
+
CouncilConfig,
|
|
41
|
+
Edge,
|
|
42
|
+
GraphTopology,
|
|
43
|
+
HumanNode,
|
|
44
|
+
LogicNode,
|
|
45
|
+
Node,
|
|
46
|
+
RecipeManifest,
|
|
47
|
+
VisualMetadata,
|
|
48
|
+
)
|
|
38
49
|
from .validator import SchemaValidator
|
|
39
50
|
|
|
40
51
|
__all__ = [
|
|
@@ -42,9 +53,15 @@ __all__ = [
|
|
|
42
53
|
"AgentDependencies",
|
|
43
54
|
"AgentInterface",
|
|
44
55
|
"AgentMetadata",
|
|
56
|
+
"AgentNode",
|
|
45
57
|
"AgentTopology",
|
|
58
|
+
"CouncilConfig",
|
|
59
|
+
"Edge",
|
|
60
|
+
"GraphTopology",
|
|
61
|
+
"HumanNode",
|
|
46
62
|
"IntegrityChecker",
|
|
47
63
|
"IntegrityCompromisedError",
|
|
64
|
+
"LogicNode",
|
|
48
65
|
"ManifestConfig",
|
|
49
66
|
"ManifestEngine",
|
|
50
67
|
"ManifestEngineAsync",
|
|
@@ -52,8 +69,11 @@ __all__ = [
|
|
|
52
69
|
"ManifestLoader",
|
|
53
70
|
"ManifestSyntaxError",
|
|
54
71
|
"ModelConfig",
|
|
72
|
+
"Node",
|
|
55
73
|
"PolicyEnforcer",
|
|
56
74
|
"PolicyViolationError",
|
|
75
|
+
"RecipeManifest",
|
|
57
76
|
"SchemaValidator",
|
|
58
77
|
"Step",
|
|
78
|
+
"VisualMetadata",
|
|
59
79
|
]
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# Copyright (c) 2025 CoReason, Inc.
|
|
2
|
+
#
|
|
3
|
+
# This software is proprietary and dual-licensed.
|
|
4
|
+
# Licensed under the Prosperity Public License 3.0 (the "License").
|
|
5
|
+
# A copy of the license is available at https://prosperitylicense.com/versions/3.0.0
|
|
6
|
+
# For details, see the LICENSE file.
|
|
7
|
+
# Commercial use beyond a 30-day trial requires a separate license.
|
|
8
|
+
#
|
|
9
|
+
# Source Code: https://github.com/CoReason-AI/coreason_maco
|
|
10
|
+
|
|
11
|
+
from typing import Annotated, Any, Dict, List, Literal, Optional, Union
|
|
12
|
+
|
|
13
|
+
from pydantic import BaseModel, ConfigDict, Field
|
|
14
|
+
|
|
15
|
+
from .models import VersionStr
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
class CouncilConfig(BaseModel):
|
|
19
|
+
"""Configuration for 'Architectural Triangulation'.
|
|
20
|
+
|
|
21
|
+
Attributes:
|
|
22
|
+
strategy: The strategy for the council (e.g., 'consensus').
|
|
23
|
+
voters: List of agents or models that vote.
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
model_config = ConfigDict(extra="forbid")
|
|
27
|
+
|
|
28
|
+
strategy: str = Field(default="consensus", description="The strategy for the council, e.g., 'consensus'.")
|
|
29
|
+
voters: List[str] = Field(..., description="List of agents or models that vote.")
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
class VisualMetadata(BaseModel):
|
|
33
|
+
"""Data explicitly for the UI.
|
|
34
|
+
|
|
35
|
+
Attributes:
|
|
36
|
+
label: The label to display for the node.
|
|
37
|
+
x_y_coordinates: The X and Y coordinates for the node on the canvas.
|
|
38
|
+
icon: The icon to represent the node.
|
|
39
|
+
animation_style: The animation style for the node.
|
|
40
|
+
"""
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(extra="forbid")
|
|
43
|
+
|
|
44
|
+
label: Optional[str] = Field(None, description="The label to display for the node.")
|
|
45
|
+
x_y_coordinates: Optional[List[float]] = Field(
|
|
46
|
+
None, description="The X and Y coordinates for the node on the canvas."
|
|
47
|
+
)
|
|
48
|
+
icon: Optional[str] = Field(None, description="The icon to represent the node.")
|
|
49
|
+
animation_style: Optional[str] = Field(None, description="The animation style for the node.")
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
class BaseNode(BaseModel):
|
|
53
|
+
"""Base model for all node types.
|
|
54
|
+
|
|
55
|
+
Attributes:
|
|
56
|
+
id: Unique identifier for the node.
|
|
57
|
+
council_config: Optional configuration for architectural triangulation.
|
|
58
|
+
visual: Visual metadata for the UI.
|
|
59
|
+
"""
|
|
60
|
+
|
|
61
|
+
model_config = ConfigDict(extra="forbid")
|
|
62
|
+
|
|
63
|
+
id: str = Field(..., description="Unique identifier for the node.")
|
|
64
|
+
council_config: Optional[CouncilConfig] = Field(
|
|
65
|
+
None, description="Optional configuration for architectural triangulation."
|
|
66
|
+
)
|
|
67
|
+
visual: Optional[VisualMetadata] = Field(None, description="Visual metadata for the UI.")
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
class AgentNode(BaseNode):
|
|
71
|
+
"""A node that calls a specific atomic agent.
|
|
72
|
+
|
|
73
|
+
Attributes:
|
|
74
|
+
type: The type of the node (must be 'agent').
|
|
75
|
+
agent_name: The name of the atomic agent to call.
|
|
76
|
+
"""
|
|
77
|
+
|
|
78
|
+
type: Literal["agent"] = Field("agent", description="Discriminator for AgentNode.")
|
|
79
|
+
agent_name: str = Field(..., description="The name of the atomic agent to call.")
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
class HumanNode(BaseNode):
|
|
83
|
+
"""A node that pauses execution for user input/approval.
|
|
84
|
+
|
|
85
|
+
Attributes:
|
|
86
|
+
type: The type of the node (must be 'human').
|
|
87
|
+
timeout_seconds: Optional timeout in seconds for the user interaction.
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
type: Literal["human"] = Field("human", description="Discriminator for HumanNode.")
|
|
91
|
+
timeout_seconds: Optional[int] = Field(None, description="Optional timeout in seconds for the user interaction.")
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class LogicNode(BaseNode):
|
|
95
|
+
"""A node that executes pure Python logic.
|
|
96
|
+
|
|
97
|
+
Attributes:
|
|
98
|
+
type: The type of the node (must be 'logic').
|
|
99
|
+
code: The Python logic code to execute.
|
|
100
|
+
"""
|
|
101
|
+
|
|
102
|
+
type: Literal["logic"] = Field("logic", description="Discriminator for LogicNode.")
|
|
103
|
+
code: str = Field(..., description="The Python logic code to execute.")
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
# Discriminated Union for polymorphism
|
|
107
|
+
Node = Annotated[
|
|
108
|
+
Union[AgentNode, HumanNode, LogicNode], Field(discriminator="type", description="Polymorphic node definition.")
|
|
109
|
+
]
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
class Edge(BaseModel):
|
|
113
|
+
"""Represents a connection between two nodes.
|
|
114
|
+
|
|
115
|
+
Attributes:
|
|
116
|
+
source_node_id: The ID of the source node.
|
|
117
|
+
target_node_id: The ID of the target node.
|
|
118
|
+
condition: Optional Python expression for conditional branching.
|
|
119
|
+
"""
|
|
120
|
+
|
|
121
|
+
model_config = ConfigDict(extra="forbid")
|
|
122
|
+
|
|
123
|
+
source_node_id: str = Field(..., description="The ID of the source node.")
|
|
124
|
+
target_node_id: str = Field(..., description="The ID of the target node.")
|
|
125
|
+
condition: Optional[str] = Field(None, description="Optional Python expression for conditional branching.")
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
class GraphTopology(BaseModel):
|
|
129
|
+
"""The topology definition of the recipe.
|
|
130
|
+
|
|
131
|
+
Attributes:
|
|
132
|
+
nodes: List of nodes in the graph.
|
|
133
|
+
edges: List of edges connecting the nodes.
|
|
134
|
+
"""
|
|
135
|
+
|
|
136
|
+
model_config = ConfigDict(extra="forbid")
|
|
137
|
+
|
|
138
|
+
nodes: List[Node] = Field(..., description="List of nodes in the graph.")
|
|
139
|
+
edges: List[Edge] = Field(..., description="List of edges connecting the nodes.")
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
class RecipeManifest(BaseModel):
|
|
143
|
+
"""The executable specification for the MACO engine.
|
|
144
|
+
|
|
145
|
+
Attributes:
|
|
146
|
+
id: Unique identifier for the recipe.
|
|
147
|
+
version: Version of the recipe.
|
|
148
|
+
name: Human-readable name of the recipe.
|
|
149
|
+
description: Detailed description of the recipe.
|
|
150
|
+
inputs: Schema defining global variables this recipe accepts.
|
|
151
|
+
graph: The topology definition of the workflow.
|
|
152
|
+
"""
|
|
153
|
+
|
|
154
|
+
model_config = ConfigDict(extra="forbid")
|
|
155
|
+
|
|
156
|
+
id: str = Field(..., description="Unique identifier for the recipe.")
|
|
157
|
+
version: VersionStr = Field(..., description="Version of the recipe.")
|
|
158
|
+
name: str = Field(..., description="Human-readable name of the recipe.")
|
|
159
|
+
description: Optional[str] = Field(None, description="Detailed description of the recipe.")
|
|
160
|
+
inputs: Dict[str, Any] = Field(..., description="Schema defining global variables this recipe accepts.")
|
|
161
|
+
graph: GraphTopology = Field(..., description="The topology definition of the workflow.")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: coreason_manifest
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.6.0
|
|
4
4
|
Summary: This package is the definitive source of truth. If it isn't in the manifest, it doesn't exist. If it violates the manifest, it doesn't run.
|
|
5
5
|
License: # The Prosperity Public License 3.0.0
|
|
6
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
coreason_manifest/__init__.py,sha256=
|
|
1
|
+
coreason_manifest/__init__.py,sha256=wDlmlYxr29P_fX5Et6pP-jcMtQe6eTzKvpUrh7zFMOM,1857
|
|
2
2
|
coreason_manifest/engine.py,sha256=ENAkRuGFd1uY_5u4EYEsTZUMrqw5HgijKtkF9lk-E-c,8199
|
|
3
3
|
coreason_manifest/errors.py,sha256=CKFWSucncoPLYUJcsuXtLIfneyr2d89oHRTiWPT4psU,1437
|
|
4
4
|
coreason_manifest/integrity.py,sha256=CMBaa2A8DpC9hDSO-aj-YOzss6if1CajaeLEmTC703c,5344
|
|
@@ -8,14 +8,15 @@ coreason_manifest/models.py,sha256=EuaE1Wl5T8f_eI9vF1VFp5hd0y9C7E52zAjB52EulKw,7
|
|
|
8
8
|
coreason_manifest/policies/compliance.rego,sha256=-drMuno6YkGOXKjvdLWawCZWK8iUxY7OcXpoXa_9Oyo,3035
|
|
9
9
|
coreason_manifest/policies/tbom.json,sha256=rSn4V44_IdFqCC86J3Jc31qQKTV4J5BdmyO0CI4iOu0,167
|
|
10
10
|
coreason_manifest/policy.py,sha256=vvEivq5HSjv-bMSrZ5VMM3eTomYFp39SBtuFajG9RU4,5009
|
|
11
|
+
coreason_manifest/recipes.py,sha256=tMNOE-JYJtG6NYRH1a-IoCLD4gXo7qoTb8dypLkmHC0,5849
|
|
11
12
|
coreason_manifest/schemas/__init__.py,sha256=9TMs6jWKCIewAKkj-u0tq9c6N_-0CU6b5s9q6MTS6v4,17
|
|
12
13
|
coreason_manifest/schemas/agent.schema.json,sha256=VigUX3ltX7YaW9P7n0DNYGNOf8C6VCuXNy71u3LB9i4,6812
|
|
13
14
|
coreason_manifest/server.py,sha256=ezuk-4sABF92U4cY1ppYJGJf8q6yeoteVlrwnmk7Jis,4253
|
|
14
15
|
coreason_manifest/utils/__init__.py,sha256=Q9gXiBtX3mD9GTu4z0JDHSHkbXC-MRHagrOaOmRH_1Q,435
|
|
15
16
|
coreason_manifest/utils/logger.py,sha256=A7E6Hd_Jk1XDUajNEJQl-WtUv9M2LT76b4_TsbxnILw,1227
|
|
16
17
|
coreason_manifest/validator.py,sha256=v33EzKroRwLEjZeuRRpTB7cqB38op3DV2EZpZhJ80a0,2240
|
|
17
|
-
coreason_manifest-0.
|
|
18
|
-
coreason_manifest-0.
|
|
19
|
-
coreason_manifest-0.
|
|
20
|
-
coreason_manifest-0.
|
|
21
|
-
coreason_manifest-0.
|
|
18
|
+
coreason_manifest-0.6.0.dist-info/METADATA,sha256=nkC0JpE_Itg26p5U7-mS8KizLv-lBc9eZM2FrB3oioM,7421
|
|
19
|
+
coreason_manifest-0.6.0.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
|
|
20
|
+
coreason_manifest-0.6.0.dist-info/licenses/LICENSE,sha256=3tYb7ZQe7sVXcbNmX22fDESFjOSIlCZodUGpZMkuSlk,3063
|
|
21
|
+
coreason_manifest-0.6.0.dist-info/licenses/NOTICE,sha256=tqzUyP9VTCGxoHLgBI0AC1i0G7m_PSyESFL8Jwuw0dA,610
|
|
22
|
+
coreason_manifest-0.6.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|