lex-agentic-integration 0.1.0
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 +7 -0
- data/CHANGELOG.md +12 -0
- data/Gemfile +5 -0
- data/LICENSE +21 -0
- data/README.md +13 -0
- data/lex-agentic-integration.gemspec +30 -0
- data/lib/legion/extensions/agentic/integration/boundary/client.rb +15 -0
- data/lib/legion/extensions/agentic/integration/boundary/helpers/boundary.rb +90 -0
- data/lib/legion/extensions/agentic/integration/boundary/helpers/boundary_engine.rb +123 -0
- data/lib/legion/extensions/agentic/integration/boundary/helpers/constants.rb +44 -0
- data/lib/legion/extensions/agentic/integration/boundary/runners/cognitive_boundary.rb +100 -0
- data/lib/legion/extensions/agentic/integration/boundary/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/boundary.rb +19 -0
- data/lib/legion/extensions/agentic/integration/context/client.rb +26 -0
- data/lib/legion/extensions/agentic/integration/context/helpers/constants.rb +34 -0
- data/lib/legion/extensions/agentic/integration/context/helpers/context_manager.rb +150 -0
- data/lib/legion/extensions/agentic/integration/context/helpers/frame.rb +99 -0
- data/lib/legion/extensions/agentic/integration/context/runners/context.rb +94 -0
- data/lib/legion/extensions/agentic/integration/context/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/context.rb +19 -0
- data/lib/legion/extensions/agentic/integration/distributed_cognition/client.rb +19 -0
- data/lib/legion/extensions/agentic/integration/distributed_cognition/helpers/constants.rb +51 -0
- data/lib/legion/extensions/agentic/integration/distributed_cognition/helpers/distribution_engine.rb +159 -0
- data/lib/legion/extensions/agentic/integration/distributed_cognition/helpers/participant.rb +100 -0
- data/lib/legion/extensions/agentic/integration/distributed_cognition/runners/distributed_cognition.rb +107 -0
- data/lib/legion/extensions/agentic/integration/distributed_cognition/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/distributed_cognition.rb +19 -0
- data/lib/legion/extensions/agentic/integration/gestalt/client.rb +21 -0
- data/lib/legion/extensions/agentic/integration/gestalt/helpers/constants.rb +51 -0
- data/lib/legion/extensions/agentic/integration/gestalt/helpers/pattern.rb +90 -0
- data/lib/legion/extensions/agentic/integration/gestalt/helpers/pattern_store.rb +123 -0
- data/lib/legion/extensions/agentic/integration/gestalt/runners/gestalt.rb +82 -0
- data/lib/legion/extensions/agentic/integration/gestalt/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/gestalt.rb +19 -0
- data/lib/legion/extensions/agentic/integration/global_workspace/actors/competition.rb +45 -0
- data/lib/legion/extensions/agentic/integration/global_workspace/client.rb +29 -0
- data/lib/legion/extensions/agentic/integration/global_workspace/helpers/broadcast.rb +62 -0
- data/lib/legion/extensions/agentic/integration/global_workspace/helpers/competitor.rb +59 -0
- data/lib/legion/extensions/agentic/integration/global_workspace/helpers/constants.rb +65 -0
- data/lib/legion/extensions/agentic/integration/global_workspace/helpers/workspace.rb +188 -0
- data/lib/legion/extensions/agentic/integration/global_workspace/runners/global_workspace.rb +104 -0
- data/lib/legion/extensions/agentic/integration/global_workspace/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/global_workspace.rb +20 -0
- data/lib/legion/extensions/agentic/integration/integration/client.rb +19 -0
- data/lib/legion/extensions/agentic/integration/integration/helpers/constants.rb +62 -0
- data/lib/legion/extensions/agentic/integration/integration/helpers/integrated_representation.rb +106 -0
- data/lib/legion/extensions/agentic/integration/integration/helpers/integration_engine.rb +163 -0
- data/lib/legion/extensions/agentic/integration/integration/helpers/modal_signal.rb +62 -0
- data/lib/legion/extensions/agentic/integration/integration/runners/cognitive_integration.rb +105 -0
- data/lib/legion/extensions/agentic/integration/integration/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/integration.rb +20 -0
- data/lib/legion/extensions/agentic/integration/labyrinth/actors/thread_walker.rb +45 -0
- data/lib/legion/extensions/agentic/integration/labyrinth/client.rb +23 -0
- data/lib/legion/extensions/agentic/integration/labyrinth/helpers/constants.rb +39 -0
- data/lib/legion/extensions/agentic/integration/labyrinth/helpers/labyrinth.rb +138 -0
- data/lib/legion/extensions/agentic/integration/labyrinth/helpers/labyrinth_engine.rb +177 -0
- data/lib/legion/extensions/agentic/integration/labyrinth/helpers/node.rb +64 -0
- data/lib/legion/extensions/agentic/integration/labyrinth/runners/cognitive_labyrinth.rb +128 -0
- data/lib/legion/extensions/agentic/integration/labyrinth/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/labyrinth.rb +22 -0
- data/lib/legion/extensions/agentic/integration/map/actors/decay.rb +45 -0
- data/lib/legion/extensions/agentic/integration/map/client.rb +29 -0
- data/lib/legion/extensions/agentic/integration/map/helpers/cognitive_map_store.rb +179 -0
- data/lib/legion/extensions/agentic/integration/map/helpers/constants.rb +71 -0
- data/lib/legion/extensions/agentic/integration/map/helpers/graph_traversal.rb +124 -0
- data/lib/legion/extensions/agentic/integration/map/helpers/location.rb +71 -0
- data/lib/legion/extensions/agentic/integration/map/runners/cognitive_map.rb +95 -0
- data/lib/legion/extensions/agentic/integration/map/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/map.rb +20 -0
- data/lib/legion/extensions/agentic/integration/mosaic/client.rb +15 -0
- data/lib/legion/extensions/agentic/integration/mosaic/helpers/constants.rb +55 -0
- data/lib/legion/extensions/agentic/integration/mosaic/helpers/mosaic.rb +111 -0
- data/lib/legion/extensions/agentic/integration/mosaic/helpers/mosaic_engine.rb +124 -0
- data/lib/legion/extensions/agentic/integration/mosaic/helpers/tessera.rb +86 -0
- data/lib/legion/extensions/agentic/integration/mosaic/runners/cognitive_mosaic.rb +76 -0
- data/lib/legion/extensions/agentic/integration/mosaic/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/mosaic.rb +22 -0
- data/lib/legion/extensions/agentic/integration/mycelium/client.rb +19 -0
- data/lib/legion/extensions/agentic/integration/mycelium/helpers/constants.rb +52 -0
- data/lib/legion/extensions/agentic/integration/mycelium/helpers/fruiting_body.rb +50 -0
- data/lib/legion/extensions/agentic/integration/mycelium/helpers/hypha.rb +76 -0
- data/lib/legion/extensions/agentic/integration/mycelium/helpers/mycelial_node.rb +72 -0
- data/lib/legion/extensions/agentic/integration/mycelium/helpers/mycelium_engine.rb +151 -0
- data/lib/legion/extensions/agentic/integration/mycelium/runners/cognitive_mycelium.rb +73 -0
- data/lib/legion/extensions/agentic/integration/mycelium/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/mycelium.rb +23 -0
- data/lib/legion/extensions/agentic/integration/phenomenal_binding/client.rb +25 -0
- data/lib/legion/extensions/agentic/integration/phenomenal_binding/helpers/binding_engine.rb +156 -0
- data/lib/legion/extensions/agentic/integration/phenomenal_binding/helpers/binding_unit.rb +72 -0
- data/lib/legion/extensions/agentic/integration/phenomenal_binding/helpers/constants.rb +35 -0
- data/lib/legion/extensions/agentic/integration/phenomenal_binding/helpers/stream.rb +51 -0
- data/lib/legion/extensions/agentic/integration/phenomenal_binding/runners/phenomenal_binding.rb +110 -0
- data/lib/legion/extensions/agentic/integration/phenomenal_binding/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/phenomenal_binding.rb +20 -0
- data/lib/legion/extensions/agentic/integration/qualia/client.rb +19 -0
- data/lib/legion/extensions/agentic/integration/qualia/helpers/constants.rb +74 -0
- data/lib/legion/extensions/agentic/integration/qualia/helpers/quale.rb +103 -0
- data/lib/legion/extensions/agentic/integration/qualia/helpers/qualia_engine.rb +142 -0
- data/lib/legion/extensions/agentic/integration/qualia/runners/qualia.rb +67 -0
- data/lib/legion/extensions/agentic/integration/qualia/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/qualia.rb +19 -0
- data/lib/legion/extensions/agentic/integration/situation_model/client.rb +28 -0
- data/lib/legion/extensions/agentic/integration/situation_model/helpers/client.rb +23 -0
- data/lib/legion/extensions/agentic/integration/situation_model/helpers/constants.rb +40 -0
- data/lib/legion/extensions/agentic/integration/situation_model/helpers/situation_engine.rb +73 -0
- data/lib/legion/extensions/agentic/integration/situation_model/helpers/situation_event.rb +56 -0
- data/lib/legion/extensions/agentic/integration/situation_model/helpers/situation_model.rb +90 -0
- data/lib/legion/extensions/agentic/integration/situation_model/runners/situation_model.rb +99 -0
- data/lib/legion/extensions/agentic/integration/situation_model/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/situation_model.rb +21 -0
- data/lib/legion/extensions/agentic/integration/synthesis/client.rb +29 -0
- data/lib/legion/extensions/agentic/integration/synthesis/helpers/constants.rb +41 -0
- data/lib/legion/extensions/agentic/integration/synthesis/helpers/synthesis.rb +63 -0
- data/lib/legion/extensions/agentic/integration/synthesis/helpers/synthesis_engine.rb +213 -0
- data/lib/legion/extensions/agentic/integration/synthesis/helpers/synthesis_stream.rb +67 -0
- data/lib/legion/extensions/agentic/integration/synthesis/runners/cognitive_synthesis.rb +82 -0
- data/lib/legion/extensions/agentic/integration/synthesis/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/synthesis.rb +20 -0
- data/lib/legion/extensions/agentic/integration/tapestry/client.rb +15 -0
- data/lib/legion/extensions/agentic/integration/tapestry/helpers/constants.rb +46 -0
- data/lib/legion/extensions/agentic/integration/tapestry/helpers/loom_engine.rb +125 -0
- data/lib/legion/extensions/agentic/integration/tapestry/helpers/tapestry.rb +144 -0
- data/lib/legion/extensions/agentic/integration/tapestry/helpers/thread.rb +112 -0
- data/lib/legion/extensions/agentic/integration/tapestry/runners/cognitive_tapestry.rb +81 -0
- data/lib/legion/extensions/agentic/integration/tapestry/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/tapestry.rb +22 -0
- data/lib/legion/extensions/agentic/integration/tessellation/client.rb +19 -0
- data/lib/legion/extensions/agentic/integration/tessellation/helpers/constants.rb +72 -0
- data/lib/legion/extensions/agentic/integration/tessellation/helpers/mosaic.rb +99 -0
- data/lib/legion/extensions/agentic/integration/tessellation/helpers/tessellation_engine.rb +141 -0
- data/lib/legion/extensions/agentic/integration/tessellation/helpers/tile.rb +76 -0
- data/lib/legion/extensions/agentic/integration/tessellation/runners/cognitive_tessellation.rb +58 -0
- data/lib/legion/extensions/agentic/integration/tessellation/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/tessellation.rb +22 -0
- data/lib/legion/extensions/agentic/integration/version.rb +11 -0
- data/lib/legion/extensions/agentic/integration/zeitgeist/helpers/client.rb +17 -0
- data/lib/legion/extensions/agentic/integration/zeitgeist/helpers/cognitive_signal.rb +38 -0
- data/lib/legion/extensions/agentic/integration/zeitgeist/helpers/constants.rb +64 -0
- data/lib/legion/extensions/agentic/integration/zeitgeist/helpers/trend_window.rb +80 -0
- data/lib/legion/extensions/agentic/integration/zeitgeist/helpers/zeitgeist_engine.rb +157 -0
- data/lib/legion/extensions/agentic/integration/zeitgeist/runners/cognitive_zeitgeist.rb +99 -0
- data/lib/legion/extensions/agentic/integration/zeitgeist/version.rb +13 -0
- data/lib/legion/extensions/agentic/integration/zeitgeist.rb +22 -0
- data/lib/legion/extensions/agentic/integration.rb +34 -0
- data/spec/legion/extensions/agentic/integration/boundary/helpers/boundary_engine_spec.rb +165 -0
- data/spec/legion/extensions/agentic/integration/boundary/helpers/boundary_spec.rb +168 -0
- data/spec/legion/extensions/agentic/integration/boundary/helpers/constants_spec.rb +65 -0
- data/spec/legion/extensions/agentic/integration/boundary/runners/cognitive_boundary_spec.rb +111 -0
- data/spec/legion/extensions/agentic/integration/context/client_spec.rb +58 -0
- data/spec/legion/extensions/agentic/integration/context/helpers/constants_spec.rb +32 -0
- data/spec/legion/extensions/agentic/integration/context/helpers/context_manager_spec.rb +190 -0
- data/spec/legion/extensions/agentic/integration/context/helpers/frame_spec.rb +164 -0
- data/spec/legion/extensions/agentic/integration/context/runners/context_spec.rb +142 -0
- data/spec/legion/extensions/agentic/integration/distributed_cognition/client_spec.rb +21 -0
- data/spec/legion/extensions/agentic/integration/distributed_cognition/helpers/distribution_engine_spec.rb +149 -0
- data/spec/legion/extensions/agentic/integration/distributed_cognition/helpers/participant_spec.rb +116 -0
- data/spec/legion/extensions/agentic/integration/distributed_cognition/runners/distributed_cognition_spec.rb +102 -0
- data/spec/legion/extensions/agentic/integration/gestalt/client_spec.rb +53 -0
- data/spec/legion/extensions/agentic/integration/gestalt/helpers/constants_spec.rb +27 -0
- data/spec/legion/extensions/agentic/integration/gestalt/helpers/pattern_spec.rb +128 -0
- data/spec/legion/extensions/agentic/integration/gestalt/helpers/pattern_store_spec.rb +155 -0
- data/spec/legion/extensions/agentic/integration/gestalt/runners/gestalt_spec.rb +114 -0
- data/spec/legion/extensions/agentic/integration/global_workspace/client_spec.rb +49 -0
- data/spec/legion/extensions/agentic/integration/global_workspace/helpers/broadcast_spec.rb +83 -0
- data/spec/legion/extensions/agentic/integration/global_workspace/helpers/competitor_spec.rb +84 -0
- data/spec/legion/extensions/agentic/integration/global_workspace/helpers/workspace_spec.rb +174 -0
- data/spec/legion/extensions/agentic/integration/global_workspace/runners/global_workspace_spec.rb +118 -0
- data/spec/legion/extensions/agentic/integration/integration/cognitive_integration_spec.rb +7 -0
- data/spec/legion/extensions/agentic/integration/integration/helpers/integrated_representation_spec.rb +149 -0
- data/spec/legion/extensions/agentic/integration/integration/helpers/integration_engine_spec.rb +191 -0
- data/spec/legion/extensions/agentic/integration/integration/helpers/modal_signal_spec.rb +81 -0
- data/spec/legion/extensions/agentic/integration/labyrinth/client_spec.rb +122 -0
- data/spec/legion/extensions/agentic/integration/labyrinth/cognitive_labyrinth_spec.rb +19 -0
- data/spec/legion/extensions/agentic/integration/labyrinth/helpers/constants_spec.rb +72 -0
- data/spec/legion/extensions/agentic/integration/labyrinth/helpers/labyrinth_engine_spec.rb +222 -0
- data/spec/legion/extensions/agentic/integration/labyrinth/helpers/labyrinth_spec.rb +235 -0
- data/spec/legion/extensions/agentic/integration/labyrinth/helpers/node_spec.rb +157 -0
- data/spec/legion/extensions/agentic/integration/labyrinth/runners/cognitive_labyrinth_spec.rb +209 -0
- data/spec/legion/extensions/agentic/integration/map/client_spec.rb +89 -0
- data/spec/legion/extensions/agentic/integration/map/helpers/cognitive_map_store_spec.rb +321 -0
- data/spec/legion/extensions/agentic/integration/map/helpers/location_spec.rb +165 -0
- data/spec/legion/extensions/agentic/integration/map/runners/cognitive_map_spec.rb +190 -0
- data/spec/legion/extensions/agentic/integration/mosaic/client_spec.rb +16 -0
- data/spec/legion/extensions/agentic/integration/mosaic/helpers/constants_spec.rb +37 -0
- data/spec/legion/extensions/agentic/integration/mosaic/helpers/mosaic_engine_spec.rb +108 -0
- data/spec/legion/extensions/agentic/integration/mosaic/helpers/mosaic_spec.rb +120 -0
- data/spec/legion/extensions/agentic/integration/mosaic/helpers/tessera_spec.rb +92 -0
- data/spec/legion/extensions/agentic/integration/mosaic/runners/cognitive_mosaic_spec.rb +88 -0
- data/spec/legion/extensions/agentic/integration/mycelium/client_spec.rb +25 -0
- data/spec/legion/extensions/agentic/integration/mycelium/cognitive_mycelium_spec.rb +7 -0
- data/spec/legion/extensions/agentic/integration/mycelium/helpers/constants_spec.rb +28 -0
- data/spec/legion/extensions/agentic/integration/mycelium/helpers/fruiting_body_spec.rb +33 -0
- data/spec/legion/extensions/agentic/integration/mycelium/helpers/hypha_spec.rb +69 -0
- data/spec/legion/extensions/agentic/integration/mycelium/helpers/mycelial_node_spec.rb +79 -0
- data/spec/legion/extensions/agentic/integration/mycelium/helpers/mycelium_engine_spec.rb +136 -0
- data/spec/legion/extensions/agentic/integration/mycelium/runners/cognitive_mycelium_spec.rb +61 -0
- data/spec/legion/extensions/agentic/integration/phenomenal_binding/client_spec.rb +52 -0
- data/spec/legion/extensions/agentic/integration/phenomenal_binding/helpers/binding_engine_spec.rb +290 -0
- data/spec/legion/extensions/agentic/integration/phenomenal_binding/helpers/binding_unit_spec.rb +195 -0
- data/spec/legion/extensions/agentic/integration/phenomenal_binding/helpers/constants_spec.rb +92 -0
- data/spec/legion/extensions/agentic/integration/phenomenal_binding/helpers/stream_spec.rb +128 -0
- data/spec/legion/extensions/agentic/integration/phenomenal_binding/runners/phenomenal_binding_spec.rb +174 -0
- data/spec/legion/extensions/agentic/integration/qualia/client_spec.rb +21 -0
- data/spec/legion/extensions/agentic/integration/qualia/helpers/quale_spec.rb +168 -0
- data/spec/legion/extensions/agentic/integration/qualia/helpers/qualia_engine_spec.rb +174 -0
- data/spec/legion/extensions/agentic/integration/qualia/qualia_spec.rb +7 -0
- data/spec/legion/extensions/agentic/integration/qualia/runners_spec.rb +70 -0
- data/spec/legion/extensions/agentic/integration/situation_model/client_spec.rb +51 -0
- data/spec/legion/extensions/agentic/integration/situation_model/helpers/constants_spec.rb +56 -0
- data/spec/legion/extensions/agentic/integration/situation_model/helpers/situation_engine_spec.rb +203 -0
- data/spec/legion/extensions/agentic/integration/situation_model/helpers/situation_event_spec.rb +94 -0
- data/spec/legion/extensions/agentic/integration/situation_model/helpers/situation_model_spec.rb +235 -0
- data/spec/legion/extensions/agentic/integration/situation_model/runners/situation_model_spec.rb +204 -0
- data/spec/legion/extensions/agentic/integration/synthesis/client_spec.rb +26 -0
- data/spec/legion/extensions/agentic/integration/synthesis/helpers/constants_spec.rb +87 -0
- data/spec/legion/extensions/agentic/integration/synthesis/helpers/synthesis_engine_spec.rb +233 -0
- data/spec/legion/extensions/agentic/integration/synthesis/helpers/synthesis_spec.rb +101 -0
- data/spec/legion/extensions/agentic/integration/synthesis/helpers/synthesis_stream_spec.rb +116 -0
- data/spec/legion/extensions/agentic/integration/synthesis/runners/cognitive_synthesis_spec.rb +181 -0
- data/spec/legion/extensions/agentic/integration/tapestry/client_spec.rb +55 -0
- data/spec/legion/extensions/agentic/integration/tapestry/helpers/constants_spec.rb +88 -0
- data/spec/legion/extensions/agentic/integration/tapestry/helpers/loom_engine_spec.rb +225 -0
- data/spec/legion/extensions/agentic/integration/tapestry/helpers/tapestry_spec.rb +229 -0
- data/spec/legion/extensions/agentic/integration/tapestry/helpers/thread_spec.rb +211 -0
- data/spec/legion/extensions/agentic/integration/tapestry/runners/cognitive_tapestry_spec.rb +171 -0
- data/spec/legion/extensions/agentic/integration/tessellation/client_spec.rb +40 -0
- data/spec/legion/extensions/agentic/integration/tessellation/helpers/mosaic_spec.rb +99 -0
- data/spec/legion/extensions/agentic/integration/tessellation/helpers/tessellation_engine_spec.rb +145 -0
- data/spec/legion/extensions/agentic/integration/tessellation/helpers/tile_spec.rb +138 -0
- data/spec/legion/extensions/agentic/integration/zeitgeist/helpers/cognitive_signal_spec.rb +62 -0
- data/spec/legion/extensions/agentic/integration/zeitgeist/helpers/constants_spec.rb +73 -0
- data/spec/legion/extensions/agentic/integration/zeitgeist/helpers/trend_window_spec.rb +100 -0
- data/spec/legion/extensions/agentic/integration/zeitgeist/helpers/zeitgeist_engine_spec.rb +163 -0
- data/spec/legion/extensions/agentic/integration/zeitgeist/runners/cognitive_zeitgeist_spec.rb +165 -0
- data/spec/spec_helper.rb +46 -0
- metadata +320 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 7932995a4925fd067cb3f9c308ef3c3d78f3b1b231d62b15c4e9fc5963a970ec
|
|
4
|
+
data.tar.gz: 78a023175248ee9054ca4fbaa56c95de34b49915a64818f97b713cf914fbfc77
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: c346f01d4ede05e6e4ceab65e58807bbba6387c0b506485fdfa276a47b28db309e6dcf2f6cafd9a5a005efe2b37c64f1bd5070ed53a7407bdb79b4fec125ee64
|
|
7
|
+
data.tar.gz: ab2124216a9a6d73473ef334853efc82a9873e6747bff7a16f8e5312b07addd905897c88a8bfddc567057c163c4d38c1ff7b823c259f4b05b9d11fe9850c6cdc
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [Unreleased]
|
|
4
|
+
|
|
5
|
+
## [0.1.0] - 2026-03-18
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- Initial release as domain consolidation gem
|
|
9
|
+
- Consolidated source extensions into unified domain gem under `Legion::Extensions::Agentic::<Domain>`
|
|
10
|
+
- All sub-modules loaded from single entry point
|
|
11
|
+
- Full spec suite with zero failures
|
|
12
|
+
- RuboCop compliance across all files
|
data/Gemfile
ADDED
data/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Matthew Iverson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'lib/legion/extensions/agentic/integration/version'
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = 'lex-agentic-integration'
|
|
7
|
+
spec.version = Legion::Extensions::Agentic::Integration::VERSION
|
|
8
|
+
spec.authors = ['Esity']
|
|
9
|
+
spec.email = ['matthewdiverson@gmail.com']
|
|
10
|
+
|
|
11
|
+
spec.summary = 'LEX Agentic Integration'
|
|
12
|
+
spec.description = 'LEX agentic integration domain: cross-domain binding and synthesis'
|
|
13
|
+
spec.homepage = 'https://github.com/LegionIO/lex-agentic-integration'
|
|
14
|
+
spec.license = 'MIT'
|
|
15
|
+
spec.required_ruby_version = '>= 3.4'
|
|
16
|
+
|
|
17
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
|
18
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
|
19
|
+
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/main/CHANGELOG.md"
|
|
20
|
+
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
21
|
+
|
|
22
|
+
spec.files = Dir.chdir(__dir__) do
|
|
23
|
+
Dir.glob('{lib,spec}/**/*.rb') + %w[lex-agentic-integration.gemspec Gemfile LICENSE README.md CHANGELOG.md]
|
|
24
|
+
end
|
|
25
|
+
spec.require_paths = ['lib']
|
|
26
|
+
|
|
27
|
+
spec.add_development_dependency 'rspec', '~> 3.13'
|
|
28
|
+
spec.add_development_dependency 'rubocop', '~> 1.60'
|
|
29
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.26'
|
|
30
|
+
end
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'securerandom'
|
|
4
|
+
|
|
5
|
+
module Legion
|
|
6
|
+
module Extensions
|
|
7
|
+
module Agentic
|
|
8
|
+
module Integration
|
|
9
|
+
module Boundary
|
|
10
|
+
module Helpers
|
|
11
|
+
class Boundary
|
|
12
|
+
include Constants
|
|
13
|
+
|
|
14
|
+
attr_reader :id, :name, :boundary_type, :permeability, :violations,
|
|
15
|
+
:created_at
|
|
16
|
+
|
|
17
|
+
def initialize(name:, boundary_type: :cognitive, permeability: DEFAULT_PERMEABILITY)
|
|
18
|
+
@id = SecureRandom.uuid
|
|
19
|
+
@name = name
|
|
20
|
+
@boundary_type = boundary_type.to_sym
|
|
21
|
+
@permeability = permeability.to_f.clamp(0.0, 1.0)
|
|
22
|
+
@violations = 0
|
|
23
|
+
@created_at = Time.now.utc
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def integrity
|
|
27
|
+
base = 1.0 - (@violations * 0.05)
|
|
28
|
+
[base, 0.0].max.round(10)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def integrity_label
|
|
32
|
+
match = INTEGRITY_LABELS.find { |range, _| range.cover?(integrity) }
|
|
33
|
+
match ? match.last : :breached
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def permeability_label
|
|
37
|
+
match = PERMEABILITY_LABELS.find { |range, _| range.cover?(@permeability) }
|
|
38
|
+
match ? match.last : :sealed
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def breached?
|
|
42
|
+
@permeability >= BREACH_THRESHOLD || integrity < 0.2
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def open!(amount: PERMEABILITY_BOOST)
|
|
46
|
+
@permeability = (@permeability + amount).clamp(0.0, 1.0).round(10)
|
|
47
|
+
self
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def close!(amount: PERMEABILITY_BOOST)
|
|
51
|
+
@permeability = (@permeability - amount).clamp(0.0, 1.0).round(10)
|
|
52
|
+
self
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def violate!
|
|
56
|
+
@violations += 1
|
|
57
|
+
self
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
def repair!
|
|
61
|
+
@violations = [(@violations - 1), 0].max
|
|
62
|
+
self
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
def seal!
|
|
66
|
+
@permeability = 0.0
|
|
67
|
+
self
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def to_h
|
|
71
|
+
{
|
|
72
|
+
id: @id,
|
|
73
|
+
name: @name,
|
|
74
|
+
boundary_type: @boundary_type,
|
|
75
|
+
permeability: @permeability,
|
|
76
|
+
permeability_label: permeability_label,
|
|
77
|
+
integrity: integrity,
|
|
78
|
+
integrity_label: integrity_label,
|
|
79
|
+
breached: breached?,
|
|
80
|
+
violations: @violations,
|
|
81
|
+
created_at: @created_at
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
end
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Agentic
|
|
6
|
+
module Integration
|
|
7
|
+
module Boundary
|
|
8
|
+
module Helpers
|
|
9
|
+
class BoundaryEngine
|
|
10
|
+
include Constants
|
|
11
|
+
|
|
12
|
+
def initialize
|
|
13
|
+
@boundaries = {}
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def create_boundary(name:, boundary_type: :cognitive,
|
|
17
|
+
permeability: DEFAULT_PERMEABILITY)
|
|
18
|
+
prune_if_needed
|
|
19
|
+
boundary = Boundary.new(
|
|
20
|
+
name: name,
|
|
21
|
+
boundary_type: boundary_type,
|
|
22
|
+
permeability: permeability
|
|
23
|
+
)
|
|
24
|
+
@boundaries[boundary.id] = boundary
|
|
25
|
+
boundary
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def open_boundary(boundary_id:, amount: PERMEABILITY_BOOST)
|
|
29
|
+
boundary = @boundaries[boundary_id]
|
|
30
|
+
return nil unless boundary
|
|
31
|
+
|
|
32
|
+
boundary.open!(amount: amount)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def close_boundary(boundary_id:, amount: PERMEABILITY_BOOST)
|
|
36
|
+
boundary = @boundaries[boundary_id]
|
|
37
|
+
return nil unless boundary
|
|
38
|
+
|
|
39
|
+
boundary.close!(amount: amount)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def violate_boundary(boundary_id:)
|
|
43
|
+
boundary = @boundaries[boundary_id]
|
|
44
|
+
return nil unless boundary
|
|
45
|
+
|
|
46
|
+
boundary.violate!
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
def repair_boundary(boundary_id:)
|
|
50
|
+
boundary = @boundaries[boundary_id]
|
|
51
|
+
return nil unless boundary
|
|
52
|
+
|
|
53
|
+
boundary.repair!
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def seal_boundary(boundary_id:)
|
|
57
|
+
boundary = @boundaries[boundary_id]
|
|
58
|
+
return nil unless boundary
|
|
59
|
+
|
|
60
|
+
boundary.seal!
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def breached_boundaries
|
|
64
|
+
@boundaries.values.select(&:breached?)
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
def boundaries_by_type(boundary_type:)
|
|
68
|
+
bt = boundary_type.to_sym
|
|
69
|
+
@boundaries.values.select { |b| b.boundary_type == bt }
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def most_violated(limit: 5)
|
|
73
|
+
@boundaries.values.sort_by { |b| -b.violations }.first(limit)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def overall_integrity
|
|
77
|
+
return 1.0 if @boundaries.empty?
|
|
78
|
+
|
|
79
|
+
scores = @boundaries.values.map(&:integrity)
|
|
80
|
+
(scores.sum / scores.size).round(10)
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def overall_permeability
|
|
84
|
+
return 0.5 if @boundaries.empty?
|
|
85
|
+
|
|
86
|
+
perms = @boundaries.values.map(&:permeability)
|
|
87
|
+
(perms.sum / perms.size).round(10)
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def boundary_report
|
|
91
|
+
{
|
|
92
|
+
total_boundaries: @boundaries.size,
|
|
93
|
+
breached_count: breached_boundaries.size,
|
|
94
|
+
overall_integrity: overall_integrity,
|
|
95
|
+
overall_permeability: overall_permeability,
|
|
96
|
+
most_violated: most_violated(limit: 3).map(&:to_h)
|
|
97
|
+
}
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
def to_h
|
|
101
|
+
{
|
|
102
|
+
total_boundaries: @boundaries.size,
|
|
103
|
+
breached_count: breached_boundaries.size,
|
|
104
|
+
overall_integrity: overall_integrity,
|
|
105
|
+
overall_permeability: overall_permeability
|
|
106
|
+
}
|
|
107
|
+
end
|
|
108
|
+
|
|
109
|
+
private
|
|
110
|
+
|
|
111
|
+
def prune_if_needed
|
|
112
|
+
return if @boundaries.size < MAX_BOUNDARIES
|
|
113
|
+
|
|
114
|
+
least_violated = @boundaries.values.min_by(&:violations)
|
|
115
|
+
@boundaries.delete(least_violated.id) if least_violated
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
end
|
|
121
|
+
end
|
|
122
|
+
end
|
|
123
|
+
end
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Agentic
|
|
6
|
+
module Integration
|
|
7
|
+
module Boundary
|
|
8
|
+
module Helpers
|
|
9
|
+
module Constants
|
|
10
|
+
MAX_BOUNDARIES = 100
|
|
11
|
+
MAX_VIOLATIONS = 500
|
|
12
|
+
|
|
13
|
+
DEFAULT_PERMEABILITY = 0.5
|
|
14
|
+
PERMEABILITY_BOOST = 0.05
|
|
15
|
+
PERMEABILITY_DECAY = 0.03
|
|
16
|
+
BREACH_THRESHOLD = 0.8
|
|
17
|
+
|
|
18
|
+
PERMEABILITY_LABELS = {
|
|
19
|
+
(0.8..) => :open,
|
|
20
|
+
(0.6...0.8) => :permeable,
|
|
21
|
+
(0.4...0.6) => :selective,
|
|
22
|
+
(0.2...0.4) => :guarded,
|
|
23
|
+
(..0.2) => :sealed
|
|
24
|
+
}.freeze
|
|
25
|
+
|
|
26
|
+
INTEGRITY_LABELS = {
|
|
27
|
+
(0.8..) => :intact,
|
|
28
|
+
(0.6...0.8) => :stable,
|
|
29
|
+
(0.4...0.6) => :stressed,
|
|
30
|
+
(0.2...0.4) => :compromised,
|
|
31
|
+
(..0.2) => :breached
|
|
32
|
+
}.freeze
|
|
33
|
+
|
|
34
|
+
BOUNDARY_TYPES = %i[
|
|
35
|
+
cognitive emotional social informational
|
|
36
|
+
temporal authority privacy
|
|
37
|
+
].freeze
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Agentic
|
|
6
|
+
module Integration
|
|
7
|
+
module Boundary
|
|
8
|
+
module Runners
|
|
9
|
+
module CognitiveBoundary
|
|
10
|
+
include Helpers::Constants
|
|
11
|
+
|
|
12
|
+
include Legion::Extensions::Helpers::Lex if defined?(Legion::Extensions::Helpers::Lex)
|
|
13
|
+
|
|
14
|
+
def create_boundary(name:, engine: nil, boundary_type: :cognitive,
|
|
15
|
+
permeability: DEFAULT_PERMEABILITY, **)
|
|
16
|
+
eng = engine || default_engine
|
|
17
|
+
boundary = eng.create_boundary(name: name, boundary_type: boundary_type,
|
|
18
|
+
permeability: permeability)
|
|
19
|
+
{ success: true, boundary: boundary.to_h }
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def open_boundary(boundary_id:, engine: nil, amount: PERMEABILITY_BOOST, **)
|
|
23
|
+
eng = engine || default_engine
|
|
24
|
+
result = eng.open_boundary(boundary_id: boundary_id, amount: amount)
|
|
25
|
+
return { success: false, error: 'boundary not found' } unless result
|
|
26
|
+
|
|
27
|
+
{ success: true, boundary: result.to_h }
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def close_boundary(boundary_id:, engine: nil, amount: PERMEABILITY_BOOST, **)
|
|
31
|
+
eng = engine || default_engine
|
|
32
|
+
result = eng.close_boundary(boundary_id: boundary_id, amount: amount)
|
|
33
|
+
return { success: false, error: 'boundary not found' } unless result
|
|
34
|
+
|
|
35
|
+
{ success: true, boundary: result.to_h }
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
def violate_boundary(boundary_id:, engine: nil, **)
|
|
39
|
+
eng = engine || default_engine
|
|
40
|
+
result = eng.violate_boundary(boundary_id: boundary_id)
|
|
41
|
+
return { success: false, error: 'boundary not found' } unless result
|
|
42
|
+
|
|
43
|
+
{ success: true, boundary: result.to_h }
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def repair_boundary(boundary_id:, engine: nil, **)
|
|
47
|
+
eng = engine || default_engine
|
|
48
|
+
result = eng.repair_boundary(boundary_id: boundary_id)
|
|
49
|
+
return { success: false, error: 'boundary not found' } unless result
|
|
50
|
+
|
|
51
|
+
{ success: true, boundary: result.to_h }
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def seal_boundary(boundary_id:, engine: nil, **)
|
|
55
|
+
eng = engine || default_engine
|
|
56
|
+
result = eng.seal_boundary(boundary_id: boundary_id)
|
|
57
|
+
return { success: false, error: 'boundary not found' } unless result
|
|
58
|
+
|
|
59
|
+
{ success: true, boundary: result.to_h }
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def breached_boundaries(engine: nil, **)
|
|
63
|
+
eng = engine || default_engine
|
|
64
|
+
breached = eng.breached_boundaries.map(&:to_h)
|
|
65
|
+
{ success: true, breached: breached, count: breached.size }
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def boundaries_by_type(boundary_type:, engine: nil, **)
|
|
69
|
+
eng = engine || default_engine
|
|
70
|
+
boundaries = eng.boundaries_by_type(boundary_type: boundary_type).map(&:to_h)
|
|
71
|
+
{ success: true, boundaries: boundaries, count: boundaries.size }
|
|
72
|
+
end
|
|
73
|
+
|
|
74
|
+
def overall_integrity(engine: nil, **)
|
|
75
|
+
eng = engine || default_engine
|
|
76
|
+
{ success: true, integrity: eng.overall_integrity }
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def overall_permeability(engine: nil, **)
|
|
80
|
+
eng = engine || default_engine
|
|
81
|
+
{ success: true, permeability: eng.overall_permeability }
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
def boundary_report(engine: nil, **)
|
|
85
|
+
eng = engine || default_engine
|
|
86
|
+
{ success: true, report: eng.boundary_report }
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
private
|
|
90
|
+
|
|
91
|
+
def default_engine
|
|
92
|
+
@default_engine ||= Helpers::BoundaryEngine.new
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative 'boundary/version'
|
|
4
|
+
require_relative 'boundary/helpers/constants'
|
|
5
|
+
require_relative 'boundary/helpers/boundary'
|
|
6
|
+
require_relative 'boundary/helpers/boundary_engine'
|
|
7
|
+
require_relative 'boundary/runners/cognitive_boundary'
|
|
8
|
+
require_relative 'boundary/client'
|
|
9
|
+
|
|
10
|
+
module Legion
|
|
11
|
+
module Extensions
|
|
12
|
+
module Agentic
|
|
13
|
+
module Integration
|
|
14
|
+
module Boundary
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require 'legion/extensions/agentic/integration/context/helpers/constants'
|
|
4
|
+
require 'legion/extensions/agentic/integration/context/helpers/frame'
|
|
5
|
+
require 'legion/extensions/agentic/integration/context/helpers/context_manager'
|
|
6
|
+
require 'legion/extensions/agentic/integration/context/runners/context'
|
|
7
|
+
|
|
8
|
+
module Legion
|
|
9
|
+
module Extensions
|
|
10
|
+
module Agentic
|
|
11
|
+
module Integration
|
|
12
|
+
module Context
|
|
13
|
+
class Client
|
|
14
|
+
include Runners::Context
|
|
15
|
+
|
|
16
|
+
attr_reader :context_manager
|
|
17
|
+
|
|
18
|
+
def initialize(context_manager: nil, **)
|
|
19
|
+
@context_manager = context_manager || Helpers::ContextManager.new
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Legion
|
|
4
|
+
module Extensions
|
|
5
|
+
module Agentic
|
|
6
|
+
module Integration
|
|
7
|
+
module Context
|
|
8
|
+
module Helpers
|
|
9
|
+
module Constants
|
|
10
|
+
MAX_FRAMES = 50
|
|
11
|
+
MAX_FRAME_STACK = 10
|
|
12
|
+
FRAME_DECAY = 0.02
|
|
13
|
+
FRAME_STRENGTH_FLOOR = 0.05
|
|
14
|
+
SWITCH_COST = 0.15
|
|
15
|
+
SWITCH_COOLDOWN = 5
|
|
16
|
+
FAMILIARITY_ALPHA = 0.12
|
|
17
|
+
DEFAULT_FAMILIARITY = 0.3
|
|
18
|
+
RELEVANCE_THRESHOLD = 0.2
|
|
19
|
+
MAX_CUES_PER_FRAME = 30
|
|
20
|
+
MAX_HISTORY = 200
|
|
21
|
+
|
|
22
|
+
FRAME_LABELS = {
|
|
23
|
+
(0.8..) => :dominant,
|
|
24
|
+
(0.5...0.8) => :active,
|
|
25
|
+
(0.2...0.5) => :background,
|
|
26
|
+
(..0.2) => :fading
|
|
27
|
+
}.freeze
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|