billion-context 0.1.41 → 0.1.43
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.
- package/README.md +52 -1
- package/dist/index.js +891 -250
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -91,6 +91,13 @@ How the client is pointed at the proxy (set automatically in the child env):
|
|
|
91
91
|
| claude | `HTTPS_PROXY` | `NODE_EXTRA_CA_CERTS` |
|
|
92
92
|
| codex | `HTTPS_PROXY` | `SSL_CERT_FILE` |
|
|
93
93
|
|
|
94
|
+
`NODE_EXTRA_CA_CERTS` *appends* to the built-in trust store, so it points at
|
|
95
|
+
the MITM root alone (`root-ca.pem`). `SSL_CERT_FILE` *replaces* the default
|
|
96
|
+
CA bundle, so for codex it points at `combined-ca.pem` — a bundle containing
|
|
97
|
+
the MITM root **plus** the system/Node public roots — keeping pip/git/curl
|
|
98
|
+
style TLS (blind-tunnelled, real certificates) working inside the child env
|
|
99
|
+
(#152).
|
|
100
|
+
|
|
94
101
|
The real upstream HTTPS hosts are **discovered by reading** (never editing)
|
|
95
102
|
the client's own config, so whatever you already have set up keeps working:
|
|
96
103
|
|
|
@@ -107,7 +114,8 @@ now auto-proxied too. Both schemes are covered with no config edits:
|
|
|
107
114
|
- **HTTPS upstreams → cert MITM.** The MITM CA cert is the proxy's own root
|
|
108
115
|
(`~/.local/share/billion-context/ca/root-ca.pem`, generated lazily); the
|
|
109
116
|
client must trust it — pi/claude honor `NODE_EXTRA_CA_CERTS`, codex honors
|
|
110
|
-
`SSL_CERT_FILE
|
|
117
|
+
`SSL_CERT_FILE` (which points at `combined-ca.pem`, see above). Compression
|
|
118
|
+
is injected on the intercepted TLS stream.
|
|
111
119
|
- **HTTP upstreams → `/bili/` baseURL rewrite** (since plaintext can't be
|
|
112
120
|
MITM'd). The launcher rewrites the client's base URL through the client's own
|
|
113
121
|
mechanism, leaving its config files untouched: codex via `-c key=value` flags,
|
|
@@ -644,6 +652,49 @@ recommended** for many concurrent conversations because of the collision
|
|
|
644
652
|
risk — until pi grows its own session-id signal. For pi multi-agent use,
|
|
645
653
|
pass an explicit `x-acp-session` header per conversation to avoid collisions.
|
|
646
654
|
|
|
655
|
+
### Codex subagents get their own compression namespace (#150)
|
|
656
|
+
|
|
657
|
+
Codex subagents (e.g. the `guardian_subagent` approval reviewer) reuse the
|
|
658
|
+
main conversation's `session_id`, so on the wire they look like the same
|
|
659
|
+
session. Without care their requests inherit the main conversation's
|
|
660
|
+
compression state — a subagent turn can get its context folded (losing the
|
|
661
|
+
verbatim user authorization it must read back) and the two roles' usage
|
|
662
|
+
estimates pollute each other.
|
|
663
|
+
|
|
664
|
+
billion-context detects this via the `instructions` field: subagent requests
|
|
665
|
+
carry their own role prompt. The **first** instructions seen for a
|
|
666
|
+
conversation anchor the main namespace (stable even if the main prompt
|
|
667
|
+
drifts); any other instructions value maps to a separate `|sub:` namespace
|
|
668
|
+
with its own empty compression state. Subagent requests are self-contained
|
|
669
|
+
replays, so the fresh namespace is lossless — and the web UI's session list
|
|
670
|
+
shows the two namespaces as separate sessions sharing the same client label.
|
|
671
|
+
|
|
672
|
+
### Sessions depend on the proxy (#151)
|
|
673
|
+
|
|
674
|
+
Compression state (blocks, summaries, original message cache) lives **in the
|
|
675
|
+
proxy**, not in the client. The client's own local history is the full
|
|
676
|
+
uncompressed view. Two consequences:
|
|
677
|
+
|
|
678
|
+
- If you point the client back at the real upstream (or stop the proxy), the
|
|
679
|
+
client replays its **full local history** every turn. After a long
|
|
680
|
+
compressed session this can exceed the model's context window
|
|
681
|
+
(`context_window_exceeded`).
|
|
682
|
+
- There is no way to "unpack" a compression block into the client's local
|
|
683
|
+
history — the client never saw the compressed form.
|
|
684
|
+
|
|
685
|
+
**Migrating off the proxy:** export the session and paste it into a fresh
|
|
686
|
+
conversation as a handoff:
|
|
687
|
+
|
|
688
|
+
```bash
|
|
689
|
+
bili export # list persisted sessions (id, label, blocks)
|
|
690
|
+
bili export <id|label> # print a Markdown handoff (block summaries)
|
|
691
|
+
bili export <id> --full # include the original messages per block
|
|
692
|
+
bili export <id> --full --output handoff.md
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
Then start a new conversation in the client (direct to upstream) and paste
|
|
696
|
+
the handoff doc as the opening context.
|
|
697
|
+
|
|
647
698
|
## Status
|
|
648
699
|
|
|
649
700
|
Early. Protocol handling and compression work against mock tests (146 passing). Real-model integration testing is the next milestone. Expect rough edges.
|