Mercurial
diff mrjunejune/BUILD @ 260:1f9877b637e9
Add Copilot-powered cyberpunk JRPG chat
Integrate the production JRPG chat with Seobeo streaming, Deita persistence, and a Bazel-managed Copilot SDK and LiteLLM inference stack.
Co-authored-by: Copilot <[email protected]>
| author | MrJuneJune <mrjunejune@users.noreply.github.com> |
|---|---|
| date | Wed, 05 Aug 2026 09:19:41 -0700 |
| parents | 667156fcd3e3 |
| children | b401627fc49e |
line wrap: on
line diff
--- a/mrjunejune/BUILD Wed Aug 05 09:19:41 2026 -0700 +++ b/mrjunejune/BUILD Wed Aug 05 09:19:41 2026 -0700 @@ -156,7 +156,10 @@ filegroup( name = "public_files", srcs = glob( - ["src/public/*"], + [ + "src/public/*", + "src/public/jrpg/*", + ], exclude = ["src/public/*.png"], ) + [":generated_public_webp", ":hlsjs_runtime"], visibility = ["//visibility:public"], @@ -164,10 +167,7 @@ filegroup( name = "public_fonts_files", - srcs = glob( - ["src/public/fonts/*"], - exclude = ["src/public/fonts/pixel-mplus-12-regular.ttf"], - ), + srcs = glob(["src/public/fonts/*"]), visibility = ["//visibility:public"], ) @@ -175,25 +175,14 @@ name = "src_files", srcs = glob( ["src/**"], - exclude = [ - "src/**/*.png", - "src/jrpg/**", - "src/public/fonts/pixel-mplus-12-regular.ttf", - "src/public/jrpg/**", - ], + exclude = ["src/**/*.png"], ) + [":react_pages", ":shared_js_non_public", ":shared_js_file", ":rich_editor_js", ":design_system_components", ":design_system_styles", ":icons", ":generated_public_webp", ":hlsjs_runtime"], visibility = ["//mrjunejune/test:__pkg__"], ) filegroup( name = "src_files_development", - srcs = [ - ":src_files", - "src/public/fonts/pixel-mplus-12-regular.ttf", - ] + glob([ - "src/jrpg/**", - "src/public/jrpg/**", - ]), + srcs = [":src_files"], visibility = ["//mrjunejune/test:__pkg__"], ) @@ -216,6 +205,39 @@ visibility = ["//mrjunejune/test:__pkg__"], ) +cc_library( + name = "conversation_store", + srcs = ["conversation_store.c"], + hdrs = ["conversation_store.h"], + deps = [ + "//deita:deita", + "//dowa:dowa", + ], + linkopts = ["-lpthread"], + visibility = ["//mrjunejune/test:__pkg__"], +) + +cc_library( + name = "conversation_api", + srcs = ["conversation_api.c"], + hdrs = ["conversation_api.h"], + deps = [ + ":conversation_store", + ":inference_bridge", + "//dowa:dowa", + "//seobeo:seobeo", + ], +) + +cc_library( + name = "inference_bridge", + srcs = ["inference_bridge.c"], + hdrs = ["inference_bridge.h"], + deps = ["//dowa:dowa"], + linkopts = ["-lpthread"], + visibility = ["//mrjunejune/test:__pkg__"], +) + filegroup( name = "tectonic_runtime_data", srcs = select({ @@ -224,11 +246,26 @@ }), ) +filegroup( + name = "inference_runtime_data", + srcs = [ + "inference_sidecar_launcher.sh", + "inference_stack.sh", + "production_entrypoint.sh", + "//mrjunejune/inference:production_runtime_binaries", + "//mrjunejune/inference:litellm_config.yaml", + "@copilot_cli_linux_x86_64//:copilot", + "@python_3_11//:files", + "@python_3_11//:python3", + ], +) + # Server binary cc_binary( name = "mrjunejune_server", srcs = ["main.c"], deps = [ + ":conversation_api", "//seobeo:seobeo", "//markdown_converter:markdown_to_html_c", "//s3:s3", @@ -240,6 +277,7 @@ data = [ ":src_files", ":config_file", + ":inference_runtime_data", ":tectonic_runtime_data", "//:env_file", ], @@ -251,6 +289,7 @@ name = "mrjunejune_server_debug", srcs = ["main.c"], deps = [ + ":conversation_api", "//seobeo:seobeo_debug", "//markdown_converter:markdown_to_html_c", "//s3:s3", @@ -259,12 +298,12 @@ ], copts = [ "-D_GNU_SOURCE", - "-DMRJUNEJUNE_ENABLE_DEV_PAGES", ], linkopts = ["-lpthread"], data = [ ":src_files_development", ":config_file", + ":inference_runtime_data", ":tectonic_runtime_data", "//:env_file", ], @@ -276,6 +315,30 @@ actual = ":mrjunejune_server_debug", ) +sh_binary( + name = "run_inference_stack", + srcs = ["inference_stack.sh"], + args = [ + "$(location :mrjunejune_server)", + "$(location :inference_sidecar_launcher.sh)", + "$(location //mrjunejune/inference:copilot_sidecar_zip)", + "$(location @copilot_cli_linux_x86_64//:copilot)", + "$(location //mrjunejune/inference:litellm_proxy_zip)", + "$(location //mrjunejune/inference:litellm_config.yaml)", + "$(location @python_3_11//:python3)", + ], + data = [ + ":mrjunejune_server", + ":inference_sidecar_launcher.sh", + "//mrjunejune/inference:copilot_sidecar_zip", + "//mrjunejune/inference:litellm_config.yaml", + "//mrjunejune/inference:litellm_proxy_zip", + "@copilot_cli_linux_x86_64//:copilot", + "@python_3_11//:files", + "@python_3_11//:python3", + ], +) + filegroup( name = "config_file", srcs = [".config"],