Open C++ Libraries.org develop
Loading...
Searching...
No Matches
remarks_fwd.hpp
1// SPDX-License-Identifier: BSL-1.0
2// Copyright 2025-2026, Amlal El Mahrouss (amlal@nekernel.org)
3// Distributed under the Boost Software License, Version 1.0. (See accompanying
4// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5// Official repository: https://github.com/open-cpp-libraries/core
6
7#ifndef OCL_REMARKS_FMT
8#define OCL_REMARKS_FMT
9
10#include <ocl/detail/config.hpp>
11
12#define OCL_REMARKS_MAGIC 0x4C4D5245
13#define OCL_REMARKS_VERSION 0x00010000
14
15namespace ocl::remarks
16{
17
18 struct remarks_manifest_hdr;
19
20 enum
21 {
22 llm_vendor_unknown = 0,
23 llm_vendor_openai = 100,
24 llm_vendor_google = 101,
25 llm_vendor_microsoft_ai = 102,
26 llm_vendor_anthropic = 103,
27 llm_vendor_custom_start = 1000,
28 };
29
30 enum
31 {
32 llm_kind_unknown = 0,
33 llm_kind_video = 200,
34 llm_kind_text,
35 llm_kind_code,
36 llm_kind_agent,
37 };
38
40 struct __ocl_packed__ remarks_manifest_hdr final
41 {
42 int64_t magic_{OCL_REMARKS_MAGIC};
43 int64_t version_{OCL_REMARKS_VERSION};
44
45 int32_t vendor_id_{llm_vendor_unknown};
46 int32_t class_id_{0};
47 int32_t flags_{0};
48 int32_t kind_{llm_kind_unknown};
49 };
50
52 inline bool remarks_manifest_is_valid(const remarks_manifest_hdr& hdr)
53 {
54 return hdr.magic_ == OCL_REMARKS_MAGIC && hdr.version_ == OCL_REMARKS_VERSION;
55 }
56
58 template <int32_t V>
59 inline bool remarks_manifest_is_llm_vendor(const remarks_manifest_hdr& hdr)
60 {
61 return hdr.vendor_id_ == V;
62 }
63
64} // namespace ocl::remarks
65
66#endif // ifndef OCL_REMARKS_FMT
The remarks manifest structure, which stores LLM information about a file.
Definition remarks_fwd.hpp:41