@@ -65,6 +65,53 @@ class ContractOutputType(str, Enum):
6565 KerberoastableAccount : str = "kerberoastable_account"
6666
6767
68+ class PrimitiveType (str , Enum ):
69+ """The semantic type of a contract argument's value, independent of how the
70+ field renders in the UI (see ``ContractFieldType``) and independent of
71+ chaining specifically — an argument can carry a ``PrimitiveType`` and be
72+ filled by hand, exactly as it can be auto-linked from a prior step's
73+ matching output. Mirrors ``io.openaev.database.model.PrimitiveType``
74+ (the openaev platform's own enum) label-for-label; every value here must
75+ stay in sync with it.
76+ """
77+
78+ AccountWithPasswordNotRequired : str = "account_with_password_not_required"
79+ ActionOutput : str = "action_output"
80+ AdminUsername : str = "admin_username"
81+ AsreproastableAccount : str = "asreproastable_account"
82+ AssetGroupId : str = "asset_group_id"
83+ AssetId : str = "asset_id"
84+ ComputerName : str = "computer_name"
85+ CVE : str = "cve"
86+ DelegationAccount : str = "delegation_account"
87+ Document : str = "document"
88+ Domain : str = "domain"
89+ FileName : str = "file_name"
90+ FilePath : str = "file_path"
91+ GroupName : str = "group_name"
92+ Hash : str = "hash"
93+ Host : str = "host"
94+ IPv4 : str = "ipv4"
95+ IPv6 : str = "ipv6"
96+ IpSubnet : str = "ip_subnet"
97+ KerberoastableAccount : str = "kerberoastable_account"
98+ Key : str = "key"
99+ Number : str = "number"
100+ Password : str = "password"
101+ Permissions : str = "permissions"
102+ Port : str = "port"
103+ Service : str = "service"
104+ Severity : str = "severity"
105+ ShareName : str = "share_name"
106+ SID : str = "sid"
107+ TargetedAsset : str = "targeted-asset"
108+ Text : str = "text"
109+ Username : str = "username"
110+ Value : str = "value"
111+ VulnerabilityName : str = "vulnerability_name"
112+ VulnerabilityStatus : str = "vulnerability_status"
113+
114+
68115class ExpectationType (str , Enum ):
69116 text : str = "TEXT"
70117 document : str = "DOCUMENT"
@@ -131,6 +178,15 @@ class ContractElement(ABC):
131178 linkedFields : List [str ] = field (default_factory = list )
132179 mandatory : bool = False
133180 readOnly : bool = False
181+ # The argument's chaining/semantic type (``PrimitiveType``), e.g. "username"
182+ # or "host" — matches the platform's own ``argumentType`` field
183+ # (``io.openaev.database.model.ContractElement``) label-for-label so a
184+ # contract pushed from here needs no translation on the other end. Left
185+ # unset (``None``) for fields with no established type: the platform
186+ # normalizes a missing/null/empty value to ``PrimitiveType.Text`` on its
187+ # own, so omitting this is always safe and never a breaking change for
188+ # existing contracts.
189+ argumentType : Optional [PrimitiveType ] = None
134190
135191 @property
136192 @abstractmethod
0 commit comments