annotate mrjunejune/README.md @ 279:b3b547563ec7

Add Google connector service and agent wiki Implement the C/Seobeo Google Drive and Gmail connector with encrypted OAuth storage, Zenbu authentication, browser testing, AI tool discovery, chunked HTTP decoding, and Bazel coverage. Consolidate repository guidance into progressive wiki documentation and enforce arena-first allocation for new first-party C code. Co-authored-by: Copilot <[email protected]> Copilot-Session: 84c338fd-0939-4bb3-b7f3-1062eb213e5d
author MrJuneJune <me@mrjunejune.com>
date Mon, 17 Aug 2026 22:22:36 -0700
parents b401627fc49e
children
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
261
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
31 For UI work, start the same Seobeo, Deita, inference bridge, and SSE path with
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
32 deterministic mock responses. This mode does not require Copilot authentication
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
33 or a LiteLLM key:
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
34
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
35 ```bash
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
36 bazel run //mrjunejune:run_inference_stack -- --mock
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
37 ```
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
38
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
39 Send `!hello`, `!response`, `!tool`, `!plan`, or `!error` to run a scripted
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
40 event sequence. Edit `mrjunejune/inference/mock_responses.json` to add commands,
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
41 ordered SSE event payloads, per-event timing, and response chunks. Custom event
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
42 types pass through Seobeo and are published by the page as
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
43 `mjj-jrpg-stream-event`, ready for future tool-call and plan-view components.
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
44 Mock conversations use a separate database under the inference state directory.
b401627fc49e Add JRPG mock flows and interactive previews
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 260
diff changeset
45
260
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
46 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
47 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
48 `$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
49 `~/.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
50 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
51 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
52 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
53
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
54 Anonymous inference is disabled unless
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
55 `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
56 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
57 limits and LiteLLM budget enabled.
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
58
1f9877b637e9 Add Copilot-powered cyberpunk JRPG chat
MrJuneJune <mrjunejune@users.noreply.github.com>
parents: 259
diff changeset
59 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
60 LiteLLM, JRPG assets, and C server:
259
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
61
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
62 ```bash
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
63 bazel build -c opt //mrjunejune:mrjunejune_server_bundle
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
64 ```
667156fcd3e3 Add dev-only cyberpunk JRPG page
MrJuneJune <me@mrjunejune.com>
parents: 247
diff changeset
65
241
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
66 ## WebP assets
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
67
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
68 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
69 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
70 bundle:
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
71
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
72 ```bash
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
73 bazel build //mrjunejune:generated_webp_assets
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
74 bazel build //mrjunejune:mrjunejune_server_bundle
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
75 ```
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
76
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
77 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
78 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
79 generated `.webp` URL from the site.
9c2eec61a152 [assets] Generate site images as WebP with Bazel
MrJuneJune <me@mrjunejune.com>
parents: 158
diff changeset
80
242
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
81 ## HLS player
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 `/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
84 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
85 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
86
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
87 ```text
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
88 /public/hls-sample/master.m3u8
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
89 ```
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
90
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
91 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
92 the restored FFmpeg CLI wrapper:
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
93
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
94 ```bash
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
95 bazel run //mrjunejune:generate_hls_sample
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
96 ```
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
97
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
98 ```bash
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
99 bazel test //mrjunejune/test:hls_player_test
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
100 bazel test //mrjunejune/test:theme_and_webp_test
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
101 ```
543df0fe7168 [tools] Add full HLS player support
MrJuneJune <me@mrjunejune.com>
parents: 241
diff changeset
102
244
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
103 ## LaTeX editor
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
104
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
105 `/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
106 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
107 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
108 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
109
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
110 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
111 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
112 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
113
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
114 ```bash
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
115 bazel test //mrjunejune/test:latex_renderer_test
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
116 bazel test //mrjunejune/test:latex_editor_test
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
117 ```
b8aa08503378 [tools] Add sandboxed online LaTeX editor
MrJuneJune <me@mrjunejune.com>
parents: 242
diff changeset
118
158
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
119 ## TODO
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
120
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
121 - Add caching layer
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
122 - Update talk to be part
1c0878eb17de [MrJuneJune] Readme file gets compiled in server side.
June Park <parkjune1995@gmail.com>
parents:
diff changeset
123 - Update test to automatically tests all paths for blogs.