fix(t3code): drop gateway symlink — subscription login per harness
Subscription auth (Claude Code, OpenCode) must live in each harness's own credential store; providers do not allow routing subscriptions through other tools. The keyless m3ta-gateway stays herdr-worker-only. Both harnesses now login interactively once after deploy (see module header).
This commit is contained in:
1 parent
c310ce57f4
commit
275546f0ee
1 file changed
+7
-38
@@ -10,14 +10,16 @@
|
||||
# The server binds 0.0.0.0, but the firewall admits the port for mesh
|
||||
# peers only — same posture as ai-memory and the hermes dashboard.
|
||||
#
|
||||
# One-time interactive steps after deploy (deliberately NOT declarative):
|
||||
# One-time interactive steps after deploy (deliberately NOT declarative —
|
||||
# subscription auth must live in each harness's own credential store and
|
||||
# may not be shared with other tools per provider ToS):
|
||||
# - Pair clients: `sudo -u m3tam3re t3 pair` (or take the pairing URL
|
||||
# from `journalctl -u t3code` after first start) and add the
|
||||
# environment in the T3 app via the printed URL/QR code.
|
||||
# - Claude Code login once: `sudo -u m3tam3re claude auth login`
|
||||
# (state persists in /home/m3tam3re/.claude).
|
||||
# - OpenCode needs no login: ~/.config/opencode/opencode.jsonc is
|
||||
# symlinked below to the keyless m3ta-gateway endpoint.
|
||||
# - Claude Code: `sudo -u m3tam3re claude auth login`
|
||||
# (persists in /home/m3tam3re/.claude).
|
||||
# - OpenCode: `sudo -u m3tam3re opencode auth login`
|
||||
# (subscription auth persists in OpenCode's own state dir).
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
@@ -26,32 +28,6 @@
|
||||
# NetBird mesh range of this fleet (kernel route: 100.81.0.0/16 dev wt0).
|
||||
netbirdRange = "100.81.0.0/16";
|
||||
port = config.m3ta.ports.get "t3code";
|
||||
|
||||
# Keyless LLM endpoint for harnesses spawned by T3 Code — the same
|
||||
# endpoint the herdr sandbox workers use (the proxy injects provider
|
||||
# keys server-side; budget caps live in the NetBird policy).
|
||||
cockpitOpencodeConfig = pkgs.writeText "opencode.jsonc" (builtins.toJSON {
|
||||
"$schema" = "https://opencode.ai/config.json";
|
||||
provider = {
|
||||
m3ta-gateway = {
|
||||
npm = "@ai-sdk/openai-compatible";
|
||||
name = "m3ta-gateway";
|
||||
options = {
|
||||
baseURL = "https://downy-cardamom.p.m3ta.dev/v1";
|
||||
apiKey = "none";
|
||||
};
|
||||
models = {
|
||||
claude-sonnet-5 = {
|
||||
name = "Claude Sonnet 5";
|
||||
};
|
||||
claude-opus-5 = {
|
||||
name = "Claude Opus 5";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
model = "m3ta-gateway/claude-sonnet-5";
|
||||
});
|
||||
in {
|
||||
# CLI on the system for interactive admin (t3 pair, t3 service status)
|
||||
# plus the harnesses T3 Code orchestrates. Login shells need them for
|
||||
@@ -62,13 +38,6 @@ in {
|
||||
pkgs.llm-agents.claude-code
|
||||
];
|
||||
|
||||
# OpenCode provider config for the cockpit user (mirrors herdr-sandbox).
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /home/m3tam3re/.config 0750 m3tam3re users -"
|
||||
"d /home/m3tam3re/.config/opencode 0750 m3tam3re users -"
|
||||
"L+ /home/m3tam3re/.config/opencode/opencode.jsonc - - - - ${cockpitOpencodeConfig}"
|
||||
];
|
||||
|
||||
# ── T3 Code server (system service, cockpit user) ────────────────────
|
||||
systemd.services.t3code = {
|
||||
description = "T3 Code server (interactive coding-agent cockpit)";
|
||||
|
||||
Reference in new issue
Block a user