a11-kit 0.1.1__tar.gz
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.
- a11_kit-0.1.1/.clang-format +103 -0
- a11_kit-0.1.1/.clang-tidy +148 -0
- a11_kit-0.1.1/AGENTS.md +152 -0
- a11_kit-0.1.1/CMakeLists.txt +7 -0
- a11_kit-0.1.1/PKG-INFO +355 -0
- a11_kit-0.1.1/README.md +342 -0
- a11_kit-0.1.1/a11/__init__.py +118 -0
- a11_kit-0.1.1/a11/_asyncio.py +121 -0
- a11_kit-0.1.1/a11/_native.pyi +2439 -0
- a11_kit-0.1.1/a11/_native_options.py +106 -0
- a11_kit-0.1.1/a11/actions/__init__.py +35 -0
- a11_kit-0.1.1/a11/actions/_native_action.py +106 -0
- a11_kit-0.1.1/a11/actions/action.py +388 -0
- a11_kit-0.1.1/a11/actions/registry.py +8 -0
- a11_kit-0.1.1/a11/actions/tests/__init__.py +0 -0
- a11_kit-0.1.1/a11/actions/tests/test_action.py +768 -0
- a11_kit-0.1.1/a11/conftest.py +15 -0
- a11_kit-0.1.1/a11/data/README.md +348 -0
- a11_kit-0.1.1/a11/data/__init__.py +0 -0
- a11_kit-0.1.1/a11/data/msgpack_utils.py +269 -0
- a11_kit-0.1.1/a11/data/serialization.py +1475 -0
- a11_kit-0.1.1/a11/data/tests/test_serialization.py +247 -0
- a11_kit-0.1.1/a11/data/types.py +627 -0
- a11_kit-0.1.1/a11/net/__init__.py +9 -0
- a11_kit-0.1.1/a11/net/http2.py +104 -0
- a11_kit-0.1.1/a11/net/http_sse_wire_stream.py +59 -0
- a11_kit-0.1.1/a11/net/in_process_wire_stream.py +26 -0
- a11_kit-0.1.1/a11/net/signalling.py +80 -0
- a11_kit-0.1.1/a11/net/tests/__init__.py +0 -0
- a11_kit-0.1.1/a11/net/tests/test_in_process_wire_stream.py +159 -0
- a11_kit-0.1.1/a11/net/tests/test_native_network.py +211 -0
- a11_kit-0.1.1/a11/net/tests/test_wire_stream_with_recv.py +166 -0
- a11_kit-0.1.1/a11/net/webrtc_wire_stream.py +47 -0
- a11_kit-0.1.1/a11/net/websocket_wire_stream.py +46 -0
- a11_kit-0.1.1/a11/net/wire_stream.py +59 -0
- a11_kit-0.1.1/a11/nodes/__init__.py +0 -0
- a11_kit-0.1.1/a11/nodes/_native_async_node.py +653 -0
- a11_kit-0.1.1/a11/nodes/async_node.py +5 -0
- a11_kit-0.1.1/a11/nodes/tests/test_async_node.py +466 -0
- a11_kit-0.1.1/a11/py.typed +1 -0
- a11_kit-0.1.1/a11/sdk/__init__.py +0 -0
- a11_kit-0.1.1/a11/sdk/anthropic/__init__.py +0 -0
- a11_kit-0.1.1/a11/sdk/anthropic/client.py +51 -0
- a11_kit-0.1.1/a11/sdk/anthropic/generate_content_claude.py +490 -0
- a11_kit-0.1.1/a11/sdk/anthropic/generate_content_claude_schema.py +41 -0
- a11_kit-0.1.1/a11/service/__init__.py +0 -0
- a11_kit-0.1.1/a11/service/_native_session.py +58 -0
- a11_kit-0.1.1/a11/service/session.py +55 -0
- a11_kit-0.1.1/a11/service/tests/__init__.py +0 -0
- a11_kit-0.1.1/a11/service/tests/test_session.py +1025 -0
- a11_kit-0.1.1/a11/status.py +626 -0
- a11_kit-0.1.1/a11/stores/__init__.py +0 -0
- a11_kit-0.1.1/a11/stores/chunk_store.py +13 -0
- a11_kit-0.1.1/a11/stores/chunk_store_reader.py +74 -0
- a11_kit-0.1.1/a11/stores/chunk_store_writer.py +81 -0
- a11_kit-0.1.1/a11/stores/local_chunk_store.py +83 -0
- a11_kit-0.1.1/a11/stores/tests/__init__.py +0 -0
- a11_kit-0.1.1/a11/stores/tests/test_chunk_store.py +498 -0
- a11_kit-0.1.1/a11/stores/tests/test_chunk_store_reader.py +285 -0
- a11_kit-0.1.1/a11/stores/tests/test_chunk_store_writer.py +404 -0
- a11_kit-0.1.1/a11/tests/__init__.py +1 -0
- a11_kit-0.1.1/a11/tests/test_native_bindings.py +553 -0
- a11_kit-0.1.1/a11/tests/test_typing_package.py +36 -0
- a11_kit-0.1.1/a11/timing.py +66 -0
- a11_kit-0.1.1/cpp/CMakeLists.txt +571 -0
- a11_kit-0.1.1/cpp/a11/CMakeLists.txt +4 -0
- a11_kit-0.1.1/cpp/a11/actions/CMakeLists.txt +5 -0
- a11_kit-0.1.1/cpp/a11/actions/action.cc +1469 -0
- a11_kit-0.1.1/cpp/a11/actions/action.h +237 -0
- a11_kit-0.1.1/cpp/a11/actions/registry.cc +164 -0
- a11_kit-0.1.1/cpp/a11/actions/registry.h +52 -0
- a11_kit-0.1.1/cpp/a11/actions/schema.cc +161 -0
- a11_kit-0.1.1/cpp/a11/actions/schema.h +84 -0
- a11_kit-0.1.1/cpp/a11/concurrency/CMakeLists.txt +4 -0
- a11_kit-0.1.1/cpp/a11/concurrency/callback_scheduler.cc +61 -0
- a11_kit-0.1.1/cpp/a11/concurrency/callback_scheduler.h +39 -0
- a11_kit-0.1.1/cpp/a11/concurrency/executor.cc +84 -0
- a11_kit-0.1.1/cpp/a11/concurrency/executor.h +84 -0
- a11_kit-0.1.1/cpp/a11/concurrency/future.h +346 -0
- a11_kit-0.1.1/cpp/a11/data/CMakeLists.txt +6 -0
- a11_kit-0.1.1/cpp/a11/data/json.cc +543 -0
- a11_kit-0.1.1/cpp/a11/data/json.h +29 -0
- a11_kit-0.1.1/cpp/a11/data/msgpack.cc +375 -0
- a11_kit-0.1.1/cpp/a11/data/msgpack.h +54 -0
- a11_kit-0.1.1/cpp/a11/data/serialization.cc +537 -0
- a11_kit-0.1.1/cpp/a11/data/serialization.h +172 -0
- a11_kit-0.1.1/cpp/a11/data/types.cc +1044 -0
- a11_kit-0.1.1/cpp/a11/data/types.h +188 -0
- a11_kit-0.1.1/cpp/a11/net/CMakeLists.txt +21 -0
- a11_kit-0.1.1/cpp/a11/net/byte_chunking.cc +346 -0
- a11_kit-0.1.1/cpp/a11/net/byte_chunking.h +94 -0
- a11_kit-0.1.1/cpp/a11/net/channel_wire_stream.cc +834 -0
- a11_kit-0.1.1/cpp/a11/net/channel_wire_stream.h +98 -0
- a11_kit-0.1.1/cpp/a11/net/http2.cc +2805 -0
- a11_kit-0.1.1/cpp/a11/net/http2.h +255 -0
- a11_kit-0.1.1/cpp/a11/net/http_sse_wire_stream.cc +1249 -0
- a11_kit-0.1.1/cpp/a11/net/http_sse_wire_stream.h +206 -0
- a11_kit-0.1.1/cpp/a11/net/in_process_wire_stream.cc +656 -0
- a11_kit-0.1.1/cpp/a11/net/in_process_wire_stream.h +77 -0
- a11_kit-0.1.1/cpp/a11/net/internal/binary_channel.h +51 -0
- a11_kit-0.1.1/cpp/a11/net/internal/http2_websocket_channel.cc +601 -0
- a11_kit-0.1.1/cpp/a11/net/internal/http2_websocket_channel.h +36 -0
- a11_kit-0.1.1/cpp/a11/net/internal/rtc_binary_channel.cc +152 -0
- a11_kit-0.1.1/cpp/a11/net/signalling.cc +480 -0
- a11_kit-0.1.1/cpp/a11/net/signalling.h +113 -0
- a11_kit-0.1.1/cpp/a11/net/webrtc_wire_stream.cc +947 -0
- a11_kit-0.1.1/cpp/a11/net/webrtc_wire_stream.h +141 -0
- a11_kit-0.1.1/cpp/a11/net/websocket_signalling.cc +671 -0
- a11_kit-0.1.1/cpp/a11/net/websocket_signalling.h +103 -0
- a11_kit-0.1.1/cpp/a11/net/websocket_wire_stream.cc +269 -0
- a11_kit-0.1.1/cpp/a11/net/websocket_wire_stream.h +87 -0
- a11_kit-0.1.1/cpp/a11/net/wire_stream.cc +52 -0
- a11_kit-0.1.1/cpp/a11/net/wire_stream.h +68 -0
- a11_kit-0.1.1/cpp/a11/net/wire_stream_with_recv.cc +388 -0
- a11_kit-0.1.1/cpp/a11/net/wire_stream_with_recv.h +83 -0
- a11_kit-0.1.1/cpp/a11/nodes/CMakeLists.txt +4 -0
- a11_kit-0.1.1/cpp/a11/nodes/async_node.cc +326 -0
- a11_kit-0.1.1/cpp/a11/nodes/async_node.h +168 -0
- a11_kit-0.1.1/cpp/a11/nodes/node_map.cc +120 -0
- a11_kit-0.1.1/cpp/a11/nodes/node_map.h +57 -0
- a11_kit-0.1.1/cpp/a11/service/CMakeLists.txt +3 -0
- a11_kit-0.1.1/cpp/a11/service/session.cc +1675 -0
- a11_kit-0.1.1/cpp/a11/service/session.h +173 -0
- a11_kit-0.1.1/cpp/a11/status.cc +236 -0
- a11_kit-0.1.1/cpp/a11/status.h +40 -0
- a11_kit-0.1.1/cpp/a11/stores/CMakeLists.txt +5 -0
- a11_kit-0.1.1/cpp/a11/stores/chunk_store.h +74 -0
- a11_kit-0.1.1/cpp/a11/stores/chunk_store_reader.cc +545 -0
- a11_kit-0.1.1/cpp/a11/stores/chunk_store_reader.h +60 -0
- a11_kit-0.1.1/cpp/a11/stores/chunk_store_writer.cc +825 -0
- a11_kit-0.1.1/cpp/a11/stores/chunk_store_writer.h +85 -0
- a11_kit-0.1.1/cpp/a11/stores/local_chunk_store.cc +606 -0
- a11_kit-0.1.1/cpp/a11/stores/local_chunk_store.h +68 -0
- a11_kit-0.1.1/cpp/a11/time.cc +52 -0
- a11_kit-0.1.1/cpp/a11/time.h +28 -0
- a11_kit-0.1.1/cpp/cmake/a11Config.cmake.in +80 -0
- a11_kit-0.1.1/cpp/python/CMakeLists.txt +13 -0
- a11_kit-0.1.1/cpp/python/actions_bindings.cc +997 -0
- a11_kit-0.1.1/cpp/python/bindings.h +22 -0
- a11_kit-0.1.1/cpp/python/casters.h +15 -0
- a11_kit-0.1.1/cpp/python/core_bindings.cc +360 -0
- a11_kit-0.1.1/cpp/python/data_bindings.cc +917 -0
- a11_kit-0.1.1/cpp/python/http_bindings.cc +696 -0
- a11_kit-0.1.1/cpp/python/interop.cc +346 -0
- a11_kit-0.1.1/cpp/python/interop.h +260 -0
- a11_kit-0.1.1/cpp/python/module.cc +58 -0
- a11_kit-0.1.1/cpp/python/native_types.h +55 -0
- a11_kit-0.1.1/cpp/python/net_bindings.cc +792 -0
- a11_kit-0.1.1/cpp/python/nodes_bindings.cc +304 -0
- a11_kit-0.1.1/cpp/python/service_bindings.cc +527 -0
- a11_kit-0.1.1/cpp/python/stores_bindings.cc +509 -0
- a11_kit-0.1.1/cpp/python/webrtc_bindings.cc +576 -0
- a11_kit-0.1.1/cpp/tests/CMakeLists.txt +24 -0
- a11_kit-0.1.1/cpp/tests/action_test.cc +148 -0
- a11_kit-0.1.1/cpp/tests/async_node_test.cc +41 -0
- a11_kit-0.1.1/cpp/tests/byte_chunking_test.cc +140 -0
- a11_kit-0.1.1/cpp/tests/chunk_store_reader_test.cc +142 -0
- a11_kit-0.1.1/cpp/tests/chunk_store_writer_test.cc +199 -0
- a11_kit-0.1.1/cpp/tests/data_json_test.cc +63 -0
- a11_kit-0.1.1/cpp/tests/data_types_test.cc +51 -0
- a11_kit-0.1.1/cpp/tests/future_test.cc +70 -0
- a11_kit-0.1.1/cpp/tests/http2_test.cc +200 -0
- a11_kit-0.1.1/cpp/tests/http_sse_wire_stream_test.cc +244 -0
- a11_kit-0.1.1/cpp/tests/in_process_wire_stream_test.cc +113 -0
- a11_kit-0.1.1/cpp/tests/install_smoke/CMakeLists.txt +8 -0
- a11_kit-0.1.1/cpp/tests/install_smoke/smoke.cc +8 -0
- a11_kit-0.1.1/cpp/tests/local_chunk_store_test.cc +94 -0
- a11_kit-0.1.1/cpp/tests/session_test.cc +88 -0
- a11_kit-0.1.1/cpp/tests/signalling_test.cc +77 -0
- a11_kit-0.1.1/cpp/tests/testdata/localhost-cert.pem +20 -0
- a11_kit-0.1.1/cpp/tests/testdata/localhost-key.pem +28 -0
- a11_kit-0.1.1/cpp/tests/webrtc_wire_stream_test.cc +200 -0
- a11_kit-0.1.1/cpp/tests/websocket_signalling_test.cc +56 -0
- a11_kit-0.1.1/cpp/tests/websocket_wire_stream_test.cc +191 -0
- a11_kit-0.1.1/cpp/tests/wire_stream_with_recv_test.cc +112 -0
- a11_kit-0.1.1/cpp/thread/CMakeLists.txt +71 -0
- a11_kit-0.1.1/cpp/thread/tests/thread_test.cc +350 -0
- a11_kit-0.1.1/cpp/thread/thread/boost_primitives.cc +215 -0
- a11_kit-0.1.1/cpp/thread/thread/boost_primitives.h +116 -0
- a11_kit-0.1.1/cpp/thread/thread/cases.h +263 -0
- a11_kit-0.1.1/cpp/thread/thread/channel/waiter_state.cc +159 -0
- a11_kit-0.1.1/cpp/thread/thread/channel/waiter_state.h +60 -0
- a11_kit-0.1.1/cpp/thread/thread/channel.h +625 -0
- a11_kit-0.1.1/cpp/thread/thread/concurrency.h +28 -0
- a11_kit-0.1.1/cpp/thread/thread/executor.h +29 -0
- a11_kit-0.1.1/cpp/thread/thread/fiber.cc +288 -0
- a11_kit-0.1.1/cpp/thread/thread/fiber.h +243 -0
- a11_kit-0.1.1/cpp/thread/thread/select.cc +111 -0
- a11_kit-0.1.1/cpp/thread/thread/select.h +81 -0
- a11_kit-0.1.1/cpp/thread/thread/selectables.cc +116 -0
- a11_kit-0.1.1/cpp/thread/thread/selectables.h +128 -0
- a11_kit-0.1.1/cpp/thread/thread/thread_pool.cc +629 -0
- a11_kit-0.1.1/cpp/thread/thread/thread_pool.h +34 -0
- a11_kit-0.1.1/cpp/thread/thread/util.cc +47 -0
- a11_kit-0.1.1/cpp/thread/thread/util.h +26 -0
- a11_kit-0.1.1/pybind11_abseil/__init__.py +1 -0
- a11_kit-0.1.1/pyproject.toml +122 -0
- a11_kit-0.1.1/scripts/audit_wheel.py +111 -0
- a11_kit-0.1.1/scripts/bootstrap_wheel_deps.sh +151 -0
- a11_kit-0.1.1/scripts/build_wheels.py +99 -0
- a11_kit-0.1.1/scripts/freeze_hunt.py +70 -0
- a11_kit-0.1.1/scripts/generate_stubs.py +268 -0
- a11_kit-0.1.1/scripts/serialization.py +66 -0
- a11_kit-0.1.1/scripts/smoke_cmake_install.sh +13 -0
- a11_kit-0.1.1/uv.lock +862 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Google C/C++ Code Style settings
|
|
2
|
+
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
|
|
3
|
+
# Author: Kehan Xue, kehan.xue (at) gmail.com
|
|
4
|
+
|
|
5
|
+
Language: Cpp
|
|
6
|
+
BasedOnStyle: Google
|
|
7
|
+
AccessModifierOffset: -1
|
|
8
|
+
AlignAfterOpenBracket: Align
|
|
9
|
+
AlignConsecutiveAssignments: None
|
|
10
|
+
AlignOperands: Align
|
|
11
|
+
AllowAllArgumentsOnNextLine: true
|
|
12
|
+
AllowAllConstructorInitializersOnNextLine: true
|
|
13
|
+
AllowAllParametersOfDeclarationOnNextLine: false
|
|
14
|
+
AllowShortBlocksOnASingleLine: Empty
|
|
15
|
+
AllowShortCaseLabelsOnASingleLine: false
|
|
16
|
+
AllowShortFunctionsOnASingleLine: Inline
|
|
17
|
+
AllowShortIfStatementsOnASingleLine: Never # To avoid conflict, set this "Never" and each "if statement" should include brace when coding
|
|
18
|
+
AllowShortLambdasOnASingleLine: Inline
|
|
19
|
+
AllowShortLoopsOnASingleLine: false
|
|
20
|
+
AlwaysBreakAfterReturnType: None
|
|
21
|
+
AlwaysBreakTemplateDeclarations: Yes
|
|
22
|
+
BinPackArguments: true
|
|
23
|
+
BreakBeforeBraces: Custom
|
|
24
|
+
BraceWrapping:
|
|
25
|
+
AfterCaseLabel: false
|
|
26
|
+
AfterClass: false
|
|
27
|
+
AfterStruct: false
|
|
28
|
+
AfterControlStatement: Never
|
|
29
|
+
AfterEnum: false
|
|
30
|
+
AfterFunction: false
|
|
31
|
+
AfterNamespace: false
|
|
32
|
+
AfterUnion: false
|
|
33
|
+
AfterExternBlock: false
|
|
34
|
+
BeforeCatch: false
|
|
35
|
+
BeforeElse: false
|
|
36
|
+
BeforeLambdaBody: false
|
|
37
|
+
IndentBraces: false
|
|
38
|
+
SplitEmptyFunction: false
|
|
39
|
+
SplitEmptyRecord: false
|
|
40
|
+
SplitEmptyNamespace: false
|
|
41
|
+
BreakBeforeBinaryOperators: None
|
|
42
|
+
BreakBeforeTernaryOperators: true
|
|
43
|
+
BreakConstructorInitializers: BeforeColon
|
|
44
|
+
BreakInheritanceList: BeforeColon
|
|
45
|
+
ColumnLimit: 80
|
|
46
|
+
CompactNamespaces: false
|
|
47
|
+
ContinuationIndentWidth: 4
|
|
48
|
+
Cpp11BracedListStyle: true
|
|
49
|
+
DerivePointerAlignment: false # Make sure the * or & align on the left
|
|
50
|
+
EmptyLineBeforeAccessModifier: LogicalBlock
|
|
51
|
+
FixNamespaceComments: true
|
|
52
|
+
#IncludeBlocks: Regroup
|
|
53
|
+
IncludeCategories:
|
|
54
|
+
- Regex: '^"'
|
|
55
|
+
Priority: 3
|
|
56
|
+
SortPriority: 0
|
|
57
|
+
CaseSensitive: false
|
|
58
|
+
|
|
59
|
+
- Regex: '^<[^/]+[^(\.h)]>$'
|
|
60
|
+
Priority: 1
|
|
61
|
+
SortPriority: 0
|
|
62
|
+
CaseSensitive: false
|
|
63
|
+
|
|
64
|
+
- Regex: '^<[^/]+>$'
|
|
65
|
+
Priority: 2
|
|
66
|
+
SortPriority: 0
|
|
67
|
+
CaseSensitive: false
|
|
68
|
+
|
|
69
|
+
- Regex: '^<.+/.+>$'
|
|
70
|
+
Priority: 2
|
|
71
|
+
SortPriority: 0
|
|
72
|
+
CaseSensitive: false
|
|
73
|
+
IndentCaseLabels: true
|
|
74
|
+
IndentPPDirectives: None
|
|
75
|
+
IndentWidth: 2
|
|
76
|
+
KeepEmptyLinesAtTheStartOfBlocks: true
|
|
77
|
+
MaxEmptyLinesToKeep: 1
|
|
78
|
+
NamespaceIndentation: None
|
|
79
|
+
ObjCSpaceAfterProperty: false
|
|
80
|
+
ObjCSpaceBeforeProtocolList: true
|
|
81
|
+
PointerAlignment: Left
|
|
82
|
+
ReflowComments: false
|
|
83
|
+
SeparateDefinitionBlocks: Always # Only support since clang-format 14
|
|
84
|
+
SpaceAfterCStyleCast: false
|
|
85
|
+
SpaceAfterLogicalNot: false
|
|
86
|
+
SpaceAfterTemplateKeyword: true
|
|
87
|
+
SpaceBeforeAssignmentOperators: true
|
|
88
|
+
SpaceBeforeCpp11BracedList: false
|
|
89
|
+
SpaceBeforeCtorInitializerColon: true
|
|
90
|
+
SpaceBeforeInheritanceColon: true
|
|
91
|
+
SpaceBeforeParens: ControlStatements
|
|
92
|
+
SpaceBeforeRangeBasedForLoopColon: true
|
|
93
|
+
SpaceBeforeSquareBrackets: false
|
|
94
|
+
SpaceInEmptyParentheses: false
|
|
95
|
+
SpacesBeforeTrailingComments: 2
|
|
96
|
+
SpacesInAngles: false
|
|
97
|
+
SpacesInCStyleCastParentheses: false
|
|
98
|
+
SpacesInContainerLiterals: false
|
|
99
|
+
SpacesInParentheses: false
|
|
100
|
+
SpacesInSquareBrackets: false
|
|
101
|
+
Standard: c++11
|
|
102
|
+
TabWidth: 4
|
|
103
|
+
UseTab: Never
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Generated from CLion Inspection settings
|
|
2
|
+
---
|
|
3
|
+
Checks: '-*,
|
|
4
|
+
abseil-*,
|
|
5
|
+
bugprone-argument-comment,
|
|
6
|
+
bugprone-assert-side-effect,
|
|
7
|
+
bugprone-bad-signal-to-kill-thread,
|
|
8
|
+
bugprone-branch-clone,
|
|
9
|
+
bugprone-copy-constructor-init,
|
|
10
|
+
bugprone-dangling-handle,
|
|
11
|
+
bugprone-dynamic-static-initializers,
|
|
12
|
+
bugprone-fold-init-type,
|
|
13
|
+
bugprone-forward-declaration-namespace,
|
|
14
|
+
bugprone-forwarding-reference-overload,
|
|
15
|
+
bugprone-inaccurate-erase,
|
|
16
|
+
bugprone-incorrect-roundings,
|
|
17
|
+
bugprone-integer-division,
|
|
18
|
+
bugprone-lambda-function-name,
|
|
19
|
+
bugprone-macro-parentheses,
|
|
20
|
+
bugprone-macro-repeated-side-effects,
|
|
21
|
+
bugprone-misplaced-operator-in-strlen-in-alloc,
|
|
22
|
+
bugprone-misplaced-pointer-arithmetic-in-alloc,
|
|
23
|
+
bugprone-misplaced-widening-cast,
|
|
24
|
+
bugprone-move-forwarding-reference,
|
|
25
|
+
bugprone-multiple-statement-macro,
|
|
26
|
+
bugprone-no-escape,
|
|
27
|
+
bugprone-parent-virtual-call,
|
|
28
|
+
bugprone-posix-return,
|
|
29
|
+
bugprone-reserved-identifier,
|
|
30
|
+
bugprone-sizeof-container,
|
|
31
|
+
bugprone-sizeof-expression,
|
|
32
|
+
bugprone-spuriously-wake-up-functions,
|
|
33
|
+
bugprone-string-constructor,
|
|
34
|
+
bugprone-string-integer-assignment,
|
|
35
|
+
bugprone-string-literal-with-embedded-nul,
|
|
36
|
+
bugprone-suspicious-enum-usage,
|
|
37
|
+
bugprone-suspicious-include,
|
|
38
|
+
bugprone-suspicious-memset-usage,
|
|
39
|
+
bugprone-suspicious-missing-comma,
|
|
40
|
+
bugprone-suspicious-semicolon,
|
|
41
|
+
bugprone-suspicious-string-compare,
|
|
42
|
+
bugprone-suspicious-memory-comparison,
|
|
43
|
+
bugprone-suspicious-realloc-usage,
|
|
44
|
+
bugprone-swapped-arguments,
|
|
45
|
+
bugprone-terminating-continue,
|
|
46
|
+
bugprone-throw-keyword-missing,
|
|
47
|
+
bugprone-too-small-loop-variable,
|
|
48
|
+
bugprone-undefined-memory-manipulation,
|
|
49
|
+
bugprone-undelegated-constructor,
|
|
50
|
+
bugprone-unhandled-self-assignment,
|
|
51
|
+
bugprone-unused-raii,
|
|
52
|
+
bugprone-unused-return-value,
|
|
53
|
+
bugprone-use-after-move,
|
|
54
|
+
bugprone-virtual-near-miss,
|
|
55
|
+
cert-dcl21-cpp,
|
|
56
|
+
cert-dcl58-cpp,
|
|
57
|
+
cert-err34-c,
|
|
58
|
+
cert-err52-cpp,
|
|
59
|
+
cert-err60-cpp,
|
|
60
|
+
cert-flp30-c,
|
|
61
|
+
cert-msc50-cpp,
|
|
62
|
+
cert-msc51-cpp,
|
|
63
|
+
cert-str34-c,
|
|
64
|
+
cppcoreguidelines-interfaces-global-init,
|
|
65
|
+
cppcoreguidelines-narrowing-conversions,
|
|
66
|
+
cppcoreguidelines-pro-type-member-init,
|
|
67
|
+
cppcoreguidelines-pro-type-static-cast-downcast,
|
|
68
|
+
cppcoreguidelines-slicing,
|
|
69
|
+
google-default-arguments,
|
|
70
|
+
google-explicit-constructor,
|
|
71
|
+
google-runtime-operator,
|
|
72
|
+
hicpp-exception-baseclass,
|
|
73
|
+
hicpp-multiway-paths-covered,
|
|
74
|
+
misc-misplaced-const,
|
|
75
|
+
misc-new-delete-overloads,
|
|
76
|
+
misc-no-recursion,
|
|
77
|
+
misc-non-copyable-objects,
|
|
78
|
+
misc-throw-by-value-catch-by-reference,
|
|
79
|
+
misc-unconventional-assign-operator,
|
|
80
|
+
misc-uniqueptr-reset-release,
|
|
81
|
+
modernize-avoid-bind,
|
|
82
|
+
modernize-concat-nested-namespaces,
|
|
83
|
+
modernize-deprecated-headers,
|
|
84
|
+
modernize-deprecated-ios-base-aliases,
|
|
85
|
+
modernize-loop-convert,
|
|
86
|
+
modernize-make-shared,
|
|
87
|
+
modernize-make-unique,
|
|
88
|
+
modernize-pass-by-value,
|
|
89
|
+
modernize-raw-string-literal,
|
|
90
|
+
modernize-redundant-void-arg,
|
|
91
|
+
modernize-replace-auto-ptr,
|
|
92
|
+
modernize-replace-disallow-copy-and-assign-macro,
|
|
93
|
+
modernize-replace-random-shuffle,
|
|
94
|
+
modernize-return-braced-init-list,
|
|
95
|
+
modernize-shrink-to-fit,
|
|
96
|
+
modernize-unary-static-assert,
|
|
97
|
+
modernize-use-auto,
|
|
98
|
+
modernize-use-bool-literals,
|
|
99
|
+
modernize-use-emplace,
|
|
100
|
+
modernize-use-equals-default,
|
|
101
|
+
modernize-use-equals-delete,
|
|
102
|
+
modernize-use-nodiscard,
|
|
103
|
+
modernize-use-noexcept,
|
|
104
|
+
modernize-use-nullptr,
|
|
105
|
+
modernize-use-override,
|
|
106
|
+
modernize-use-transparent-functors,
|
|
107
|
+
modernize-use-uncaught-exceptions,
|
|
108
|
+
mpi-buffer-deref,
|
|
109
|
+
mpi-type-mismatch,
|
|
110
|
+
openmp-use-default-none,
|
|
111
|
+
performance-faster-string-find,
|
|
112
|
+
performance-for-range-copy,
|
|
113
|
+
performance-implicit-conversion-in-loop,
|
|
114
|
+
performance-inefficient-algorithm,
|
|
115
|
+
performance-inefficient-string-concatenation,
|
|
116
|
+
performance-inefficient-vector-operation,
|
|
117
|
+
performance-move-const-arg,
|
|
118
|
+
performance-move-constructor-init,
|
|
119
|
+
performance-no-automatic-move,
|
|
120
|
+
performance-noexcept-move-constructor,
|
|
121
|
+
performance-trivially-destructible,
|
|
122
|
+
performance-type-promotion-in-math-fn,
|
|
123
|
+
performance-unnecessary-copy-initialization,
|
|
124
|
+
performance-unnecessary-value-param,
|
|
125
|
+
portability-simd-intrinsics,
|
|
126
|
+
readability-avoid-const-params-in-decls,
|
|
127
|
+
readability-const-return-type,
|
|
128
|
+
readability-container-size-empty,
|
|
129
|
+
readability-convert-member-functions-to-static,
|
|
130
|
+
readability-delete-null-pointer,
|
|
131
|
+
readability-deleted-default,
|
|
132
|
+
readability-inconsistent-declaration-parameter-name,
|
|
133
|
+
readability-make-member-function-const,
|
|
134
|
+
readability-misleading-indentation,
|
|
135
|
+
readability-misplaced-array-index,
|
|
136
|
+
readability-non-const-parameter,
|
|
137
|
+
readability-redundant-control-flow,
|
|
138
|
+
readability-redundant-declaration,
|
|
139
|
+
readability-redundant-function-ptr-dereference,
|
|
140
|
+
readability-redundant-smartptr-get,
|
|
141
|
+
readability-redundant-string-cstr,
|
|
142
|
+
readability-redundant-string-init,
|
|
143
|
+
readability-simplify-subscript-expr,
|
|
144
|
+
readability-static-accessed-through-instance,
|
|
145
|
+
readability-static-definition-in-anonymous-namespace,
|
|
146
|
+
readability-string-compare,
|
|
147
|
+
readability-uniqueptr-delete-release,
|
|
148
|
+
readability-use-anyofallof'
|
a11_kit-0.1.1/AGENTS.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# A11 Engineering Guide
|
|
2
|
+
|
|
3
|
+
## Source of truth and layout
|
|
4
|
+
|
|
5
|
+
- `a11/` defines the current Python API and behavioural contract. `cpp/` is
|
|
6
|
+
its native implementation and should converge on the same semantics.
|
|
7
|
+
`actionengine/` is historical reference material, not the source of truth.
|
|
8
|
+
- Keep independently linkable C++ components (`core`, `data`, `concurrency`,
|
|
9
|
+
`stores`, `net`, `nodes`, `actions`, and `service`). Each `cpp/a11/<part>/`
|
|
10
|
+
owns its source list in its local `CMakeLists.txt`; the target and dependency
|
|
11
|
+
graph remain visible in `cpp/CMakeLists.txt`.
|
|
12
|
+
- Concurrency types live directly in `namespace a11`, even though their files
|
|
13
|
+
remain under `a11/concurrency/`. Do not recreate `a11::concurrency`.
|
|
14
|
+
- Public stateful Python runtime types reuse the bound native class objects;
|
|
15
|
+
do not add shadow Python implementations or facade subclasses for concrete
|
|
16
|
+
native types. Attach thin, asynchronous, idiomatic protocols to the bound
|
|
17
|
+
classes, while retaining deliberate virtual adapters such as
|
|
18
|
+
`LocalChunkStore` where Python subclass overrides must cross into C++.
|
|
19
|
+
- Pydantic-style validation, JSON, copy, and schema helpers augment native
|
|
20
|
+
binary and schema values; they must not introduce a second public data model.
|
|
21
|
+
Python serializers and deserializers continue to operate on those native
|
|
22
|
+
values.
|
|
23
|
+
|
|
24
|
+
## Concurrency architecture
|
|
25
|
+
|
|
26
|
+
- Thread is A11's scheduling substrate. In A11 code, explicitly spell
|
|
27
|
+
`thread::Mutex`, `thread::MutexLock`, `thread::CondVar`, and
|
|
28
|
+
`thread::SleepFor`. Mutex members are `mu`/`mu_`; condition variables are
|
|
29
|
+
`cv`/`cv_`.
|
|
30
|
+
- Protect shared state with Abseil annotations (`ABSL_GUARDED_BY`,
|
|
31
|
+
`ABSL_EXCLUSIVE_LOCKS_REQUIRED`, and `ABSL_LOCKS_EXCLUDED`) and keep
|
|
32
|
+
`-Wthread-safety` clean.
|
|
33
|
+
- Boost.Context/Fiber is an implementation detail of Thread. No header may
|
|
34
|
+
include or expose a Boost type. Fixed, stack-resident opaque storage is
|
|
35
|
+
preferred for small Boost-backed primitives; implementation size/alignment
|
|
36
|
+
assertions must guard it.
|
|
37
|
+
- The native `std::mutex`/`std::condition_variable` pair in Thread's Boost
|
|
38
|
+
scheduler is deliberate: it parks an OS worker when no fiber is runnable.
|
|
39
|
+
Do not replace that scheduler-internal pair with fiber-aware primitives.
|
|
40
|
+
A11 state and ordinary Thread APIs must use the fiber-aware primitives.
|
|
41
|
+
- Use fibers near user-facing synchronous-looking APIs where they improve
|
|
42
|
+
clarity. Use fair, bounded, stackless callback pumps for high-cardinality
|
|
43
|
+
internal state machines. `ChunkStoreReader` and `ChunkStoreWriter` share
|
|
44
|
+
stackless schedulers; never add a permanently allocated fiber per instance.
|
|
45
|
+
- Root-fiber stack size is configurable through
|
|
46
|
+
`THREAD_DEFAULT_FIBER_STACK_SIZE` and `thread::TreeOptions::stack_size`.
|
|
47
|
+
Avoid extra context switches and do not introduce unbounded queues.
|
|
48
|
+
- Thread changes require cooperative-concurrency tests: cancellation and tree
|
|
49
|
+
propagation, `Select`/`SelectUntil`, `SleepFor`, timed waits, FIFO behaviour,
|
|
50
|
+
deadlock resistance, waiter cleanup, and joined/detached fiber lifetime.
|
|
51
|
+
|
|
52
|
+
## C++ API and implementation rules
|
|
53
|
+
|
|
54
|
+
- Model ownership with `std::unique_ptr` and `std::shared_ptr`; use raw pointers
|
|
55
|
+
for temporary non-owning access. Prefer `make_unique`/`make_shared`, write
|
|
56
|
+
`ptr == nullptr` or `ptr != nullptr`, and apply `absl_nonnull`,
|
|
57
|
+
`absl_nullable`, or `absl_nullability_unknown` to raw-pointer contracts.
|
|
58
|
+
- Avoid reference counting where ownership is singular or scope-bound. Prefer
|
|
59
|
+
inline storage, contiguous data, `absl::InlinedVector`, bounded arenas, or a
|
|
60
|
+
stack-optimised pImpl when lifetime and size justify them.
|
|
61
|
+
- Thread is an accepted public A11 dependency. Keep direct members and inline
|
|
62
|
+
implementations when Thread was the only reason for a pImpl. Hide other
|
|
63
|
+
third-party implementation types with forward declarations or pImpl unless
|
|
64
|
+
they are intrinsically part of a public data contract.
|
|
65
|
+
- Use `absl::flat_hash_map` and `absl::flat_hash_set`. Use
|
|
66
|
+
`absl::node_hash_map` only when mapped-value addresses truly must remain
|
|
67
|
+
stable; pointer-valued flat maps already have stable pointees. Test lookup
|
|
68
|
+
iterators instead of using `.contains()`.
|
|
69
|
+
- Use unqualified `size_t`, not `std::size_t`.
|
|
70
|
+
- Virtual functions have no default arguments. Provide non-virtual convenience
|
|
71
|
+
overloads when defaults are useful.
|
|
72
|
+
- Initialise every aggregate field deliberately. Treat use-after-move,
|
|
73
|
+
implicit narrowing, and partially initialised state as correctness bugs.
|
|
74
|
+
|
|
75
|
+
## Abseil conventions
|
|
76
|
+
|
|
77
|
+
- Abseil `Status`, `StatusOr`, `Time`, and `Duration` are the native error and
|
|
78
|
+
timing types. Prefer `ABSL_RETURN_IF_ERROR` and `ABSL_ASSIGN_OR_RETURN`.
|
|
79
|
+
- For `absl::StatusOr<absl::Status>`, use `AssignStatus` to represent an outer
|
|
80
|
+
error; do not add a wrapper type or conflate it with the inner status value.
|
|
81
|
+
- Log through Abseil (`LOG(ERROR)`, `DLOG`, and checks), never `std::cerr`.
|
|
82
|
+
Add `AbslStringify` to custom value types used in diagnostics.
|
|
83
|
+
- Preserve structured A11 status details across C++, MessagePack/JSON, and
|
|
84
|
+
Python. Python callers must receive `a11.status.StatusException`, not a
|
|
85
|
+
generic or pybind11-specific exception.
|
|
86
|
+
|
|
87
|
+
## Networking
|
|
88
|
+
|
|
89
|
+
- WebSocket transport and WebSocket signalling use A11's nghttp2/HTTP2 stack.
|
|
90
|
+
libdatachannel is reserved for WebRTC data channels and peer connections.
|
|
91
|
+
- All channel transports use the Action Engine-compatible byte-chunking wire
|
|
92
|
+
format. Keep `ChannelFramingOptions` aligned with `ByteChunkingOptions`,
|
|
93
|
+
enforce message and pending-byte bounds, and retain out-of-order/interleaved
|
|
94
|
+
reassembly tests. WebRTC chunk sizes must remain below SCTP limits;
|
|
95
|
+
WebSocket chunking also prevents large messages from monopolising a stream.
|
|
96
|
+
|
|
97
|
+
## Python boundary
|
|
98
|
+
|
|
99
|
+
- Python-specific policy belongs only in `cpp/python/` and thin Python facade
|
|
100
|
+
modules. Core A11 and Thread must not know about the GIL, asyncio, pybind11,
|
|
101
|
+
or Python exception classes.
|
|
102
|
+
- Binding callbacks may arrive from fibers, libuv, or libdatachannel threads.
|
|
103
|
+
Acquire the GIL before touching Python, release it around blocking native
|
|
104
|
+
waits, marshal coroutine work to its captured asyncio loop, and retain Python
|
|
105
|
+
objects until completion without leaking references.
|
|
106
|
+
- Native `absl::Time`, `absl::Duration`, and `absl::Status` may back Python
|
|
107
|
+
convenience types, but arithmetic, exceptions, reprs, and async methods must
|
|
108
|
+
continue to feel native to Python.
|
|
109
|
+
- Synchronous binding methods returning `absl::Status` or `StatusOr` must use
|
|
110
|
+
the shared status boundary so failures raise `a11.status.StatusException`;
|
|
111
|
+
never expose a raw Abseil or pybind11 status exception to callers.
|
|
112
|
+
|
|
113
|
+
## Dependencies, installation, and wheels
|
|
114
|
+
|
|
115
|
+
- Non-system C++ dependencies are statically linked. Shared objects are allowed
|
|
116
|
+
only where a runtime/module boundary requires them; any such dependency must
|
|
117
|
+
use loader-relative RPATH/RUNPATH and never an absolute build-machine path.
|
|
118
|
+
- Abseil is pinned and fetched from upstream because A11 depends on current
|
|
119
|
+
status macros. Boost, OpenSSL, nghttp2, uvw/libuv, and libdatachannel targets
|
|
120
|
+
must pass the static-target checks. Installed CMake targets must pass the
|
|
121
|
+
out-of-tree smoke test.
|
|
122
|
+
- `scripts/build_wheels.py` builds architecture-specific CPython 3.11-3.15
|
|
123
|
+
wheels for macOS x86_64/arm64 and Linux x86_64/aarch64. Python 3.15 remains
|
|
124
|
+
enabled through cibuildwheel's `cpython-prerelease` group until it is stable.
|
|
125
|
+
Do not emit `universal2` wheels: Boost.Context contains architecture-specific
|
|
126
|
+
assembly.
|
|
127
|
+
- On macOS, build both macOS and Linux matrices; on Linux, Linux-only is valid.
|
|
128
|
+
The dependency bootstrap builds static archives per target architecture and
|
|
129
|
+
deployment target. scikit-build outputs stay in ABI-specific build trees;
|
|
130
|
+
generated extensions must never enter the sdist or leak into another ABI's
|
|
131
|
+
wheel.
|
|
132
|
+
- Every wheel must contain exactly one `a11/_native` extension and pass
|
|
133
|
+
`scripts/audit_wheel.py`, which rejects non-system loader dependencies,
|
|
134
|
+
absolute RPATH/RUNPATH entries, and universal wheels.
|
|
135
|
+
|
|
136
|
+
## Verification
|
|
137
|
+
|
|
138
|
+
- Use `build` as the normal native build tree:
|
|
139
|
+
|
|
140
|
+
```sh
|
|
141
|
+
cmake --build build-codex -j 8
|
|
142
|
+
ctest --test-dir build-codex --output-on-failure
|
|
143
|
+
.venv/bin/pytest -q
|
|
144
|
+
scripts/smoke_cmake_install.sh build-codex
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
- Format C++ with the root `.clang-format`; run the configured `.clang-tidy`
|
|
148
|
+
checks when the tool is available. Keep Python formatted with Black/Ruff and
|
|
149
|
+
regenerate `uv.lock` after dependency or Python-version changes.
|
|
150
|
+
- Add regression tests at the lowest useful layer. Remove or update tests that
|
|
151
|
+
assert obsolete pure-Python internals, while retaining language-native public
|
|
152
|
+
behaviour and cross-language callback/error tests.
|