annotate mrjunejune/README.md @ 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
158
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
1 # Mrjunejune
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
2
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
3 My personal website where I post my blogs / about me and resume.
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
4
260
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
5 ## Copilot JRPG chat
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
6
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
7 `/jrpg` streams stateful turns through Seobeo and Deita to a local Python
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
8 Copilot SDK/CLI runtime. The SDK uses a loopback LiteLLM Proxy configured with
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
9 the `github_copilot` provider.
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
10
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
11 Python, Copilot CLI, LiteLLM, the web server, and their lockfiles are all
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
12 managed by Bazel. Do not create a virtualenv or install packages with pip.
259
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
13
260
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
14 Authenticate LiteLLM once with the GitHub Copilot device flow:
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
15
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
16 ```bash
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
17 export GITHUB_COPILOT_TOKEN_DIR="$HOME/.local/state/mrjunejune/inference/litellm-copilot"
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
18 bazel run //mrjunejune/inference:litellm_proxy -- \
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
19 --authenticate \
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
20 --token-dir "$GITHUB_COPILOT_TOKEN_DIR"
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
21 ```
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
22
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
23 Then start the complete local stack with one Bazel command:
259
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
24
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
25 ```bash
260
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
26 LITELLM_MASTER_KEY='<local proxy key>' \
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
27 MRJUNEJUNE_ALLOW_ANONYMOUS_INFERENCE=1 \
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
28 bazel run //mrjunejune:run_inference_stack
259
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
29 ```
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
30
260
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
31 Keep `GITHUB_COPILOT_TOKEN_DIR` exported when starting the stack so it reads the
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
32 same tokens. Without an override, both commands use
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
33 `$XDG_STATE_HOME/mrjunejune/inference/litellm-copilot`, or
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
34 `~/.local/state/mrjunejune/inference/litellm-copilot` when `XDG_STATE_HOME` is
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
35 unset. `MRJUNEJUNE_INFERENCE_STATE` moves all service-owned state. Internal
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
36 processes bind to loopback. Provider keys, OAuth tokens, conversation IDs,
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
37 prompts, and model output must not be committed or logged.
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
38
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
39 Anonymous inference is disabled unless
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
40 `MRJUNEJUNE_ALLOW_ANONYMOUS_INFERENCE=1` is explicitly set. Enabling it exposes
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
41 paid inference without user authentication; keep the Seobeo rate/concurrency
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
42 limits and LiteLLM budget enabled.
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
43
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
44 The production bundle includes the pinned Python environment, Copilot CLI,
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
45 LiteLLM, JRPG assets, and C server:
259
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
46
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
47 ```bash
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
48 bazel build -c opt //mrjunejune:mrjunejune_server_bundle
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
49 ```
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
50
241
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
51 ## WebP assets
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
52
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
53 Raster source images live under `mrjunejune/assets/png/` and `assets/png/`.
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
54 Bazel converts them to WebP before they enter the server runfiles or release
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
55 bundle:
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
56
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
57 ```bash
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
58 bazel build //mrjunejune:generated_webp_assets
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
59 bazel build //mrjunejune:mrjunejune_server_bundle
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
60 ```
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
61
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
62 The deployed site contains no PNG files. Add new PNG source assets to the
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
63 corresponding list in `mrjunejune/BUILD` or `assets/BUILD`, then reference the
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
64 generated `.webp` URL from the site.
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
65
242
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
66 ## HLS player
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
67
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
68 `/tools/hls_player` is a dependency-free JavaScript HLS player. It uses native
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
69 HLS where available and a MediaSource fallback for unencrypted VOD playlists
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
70 with fragmented MP4 segments. A VP9/Opus HLS sample is bundled at:
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
71
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
72 ```text
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
73 /public/hls-sample/master.m3u8
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
74 ```
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
75
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
76 The sample is generated from `mrjunejune/assets/video/sample_hls.mp4` through
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
77 the restored FFmpeg CLI wrapper:
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
78
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
79 ```bash
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
80 bazel run //mrjunejune:generate_hls_sample
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
81 ```
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
82
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
83 ```bash
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
84 bazel test //mrjunejune/test:hls_player_test
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
85 bazel test //mrjunejune/test:theme_and_webp_test
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
86 ```
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
87
244
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
88 ## LaTeX editor
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
89
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
90 `/tools/latex_editor` sends source to the C server, which compiles it with the
247
70f2a3dafc1c [build] Bundle offline Tectonic runtime
MrJuneJune <me@mrjunejune.com>
parents: 244
diff changeset
91 offline Tectonic runtime from `//third_party/tectonic:runtime` and returns the
70f2a3dafc1c [build] Bundle offline Tectonic runtime
MrJuneJune <me@mrjunejune.com>
parents: 244
diff changeset
92 PDF directly to the browser. Bazel pins the static compiler, prewarms common
70f2a3dafc1c [build] Bundle offline Tectonic runtime
MrJuneJune <me@mrjunejune.com>
parents: 244
diff changeset
93 packages, and includes both in the server runfiles and release bundle.
244
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
94
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
95 The compiler child uses restricted TeX file access, Linux Landlock, a seccomp
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
96 network filter, and CPU, memory, file-size, process, and wall-clock limits.
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
97 Compilation fails closed when the Linux sandbox cannot be applied.
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
98
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
99 ```bash
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
100 bazel test //mrjunejune/test:latex_renderer_test
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
101 bazel test //mrjunejune/test:latex_editor_test
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
102 ```
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
103
158
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
104 ## TODO
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
105
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
106 - Add caching layer
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
107 - Update talk to be part
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
108 - Update test to automatically tests all paths for blogs.