switchroom 0.16.4 → 0.16.5
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/dist/agent-scheduler/index.js +94 -87
- package/dist/auth-broker/index.js +80 -80
- package/dist/cli/autoaccept-poll.js +8 -8
- package/dist/cli/drive-write-pretool.mjs +10 -10
- package/dist/cli/notion-write-pretool.mjs +82 -82
- package/dist/cli/skill-validate-pretool.mjs +72 -72
- package/dist/cli/switchroom.js +450 -377
- package/dist/host-control/main.js +157 -157
- package/dist/vault/approvals/kernel-server.js +82 -82
- package/dist/vault/broker/server.js +83 -83
- package/package.json +1 -1
- package/profiles/_base/start.sh.hbs +10 -1
- package/telegram-plugin/dist/bridge/bridge.js +112 -112
- package/telegram-plugin/dist/gateway/gateway.js +277 -196
- package/telegram-plugin/dist/server.js +160 -160
- package/telegram-plugin/gateway/gateway.ts +20 -1
- package/telegram-plugin/gateway/model-command.ts +115 -4
- package/telegram-plugin/tests/model-command.test.ts +134 -0
package/package.json
CHANGED
|
@@ -811,9 +811,18 @@ if [ -n "$SWITCHROOM_LITELLM" ] && command -v switchroom >/dev/null 2>&1; then
|
|
|
811
811
|
fi
|
|
812
812
|
if [ -n "$sr_ll_ok" ]; then
|
|
813
813
|
# Newline-separated Name: Value pairs (claude CLI ANTHROPIC_CUSTOM_HEADERS format).
|
|
814
|
+
# Tags: agent:<name> for per-agent spend tracking; profile:<profile> for
|
|
815
|
+
# fleet-level cost breakdown by role. Per-turn tags (cron vs telegram) are
|
|
816
|
+
# NOT achievable here — ANTHROPIC_CUSTOM_HEADERS is fixed per process and
|
|
817
|
+
# the claude CLI sends no session id. Use scheduler.jsonl ↔ /spend/logs
|
|
818
|
+
# time-window correlation for cron attribution instead.
|
|
814
819
|
export ANTHROPIC_CUSTOM_HEADERS="x-litellm-api-key: Bearer $sr_ll_key
|
|
815
820
|
x-litellm-customer-id: $SWITCHROOM_AGENT_NAME
|
|
816
|
-
x-litellm-tags: agent:$SWITCHROOM_AGENT_NAME"
|
|
821
|
+
x-litellm-tags: agent:$SWITCHROOM_AGENT_NAME,profile:${SWITCHROOM_AGENT_PROFILE:-default}"
|
|
822
|
+
# Let Claude Code enumerate models from the LiteLLM gateway so non-Claude
|
|
823
|
+
# models configured in the proxy appear in the /model picker and can be
|
|
824
|
+
# selected via --model. Without this, the CLI only knows its bundled list.
|
|
825
|
+
export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY=1
|
|
817
826
|
else
|
|
818
827
|
# Fail-open: drop every routing var so the claude CLI talks to Anthropic
|
|
819
828
|
# directly on its OAuth credential (subscription path), unproxied.
|