Compare commits

...

9 Commits

Author SHA1 Message Date
oleksiibarsuk-eng
65c31f2286 feat(providers): add modal-kimi-k3 to staticModels and update configs 2026-08-09 02:14:20 -03:00
oleksiibarsuk-eng
b9dc3a7d5c docs: add AI-NOTES and OS-NOTES for context handoff 2026-08-09 02:14:20 -03:00
oleksiibarsuk-eng
2d5e9fad45 chore: setup PM2 ecosystem, cleanup old bots, create hermes production guidelines skill and finalized plan 2026-08-09 02:14:19 -03:00
oleksiibarsuk-eng
81fc56a369 hd 2026-08-09 02:14:08 -03:00
oleksiibarsuk-eng
a390aa4340 hd 2026-08-09 02:14:08 -03:00
oleksiibarsuk-eng
f3e48df597 hd 2026-08-09 02:14:08 -03:00
oleksiibarsuk-eng
a4bdd15c98 feat: migrate serpentos skills and logic to OmniRoute, add omni-superpowers skill, dynamically load skills in catalog.ts 2026-08-09 02:13:44 -03:00
oleksiibarsuk-eng
873cf1ffa3 fix(omniroute): fix layout font & idempotent migrations 2026-08-09 02:13:43 -03:00
oleksiibarsuk-eng
40df6e0a0a chore: populate model combo targets and mapping 2026-08-09 02:13:43 -03:00
436 changed files with 78479 additions and 413 deletions

1
.eval_score Normal file
View File

@@ -0,0 +1 @@
10

20
.gitignore vendored
View File

@@ -72,7 +72,6 @@ yarn-error.log*
# env files (can opt-in for committing if needed)
.env*
!.env.example
!.env.devin-bridge.example
!.env.homolog.example
# Provider API keys (never commit)
*.api-key
@@ -210,8 +209,6 @@ scripts/i18n/_pending-keys.json
.agents/
.antigravitycli/
.claude/
!tests/fixtures/devin-bridge/e2e-workspace/.claude/
!tests/fixtures/devin-bridge/e2e-workspace/.claude/**
# PR Reviews and local feedback files
pr_reviews*.json
@@ -238,10 +235,7 @@ omniroute.md
# mise configuration
mise.toml
# release-green artifacts (.gitignore has no inline comments — a trailing
# `# ...` becomes part of the pattern, so it must sit on its own line).
# Already covered by /_*/ above; kept explicit for discoverability.
_artifacts/
_artifacts/ # release-green artifacts
.claude-flow/
# ESLint file cache (npm run lint --cache / complexity ratchets)
@@ -251,8 +245,6 @@ _artifacts/
# CI/local quality artifacts (eslint-results.json, quality-ratchet.md, etc.)
.artifacts/
# Isolated Devin bridge workspaces, evidence, and test databases
.sandbox/
# Homologation E2E suite (npm run homolog) — real-environment credentials + report output
.env.homolog
@@ -261,11 +253,7 @@ tests/homolog/ui/.auth/
homolog-report/
docker-compose.yml.bak
.playwright-cli/
# Playwright screenshot/log output. Today every artifact happens to land inside
# output/**/.playwright-cli/ (covered above), but anything written directly to
# output/ would otherwise show up as untracked.
/output/
# _tasks e um repo git SEPARADO (ver AGENTS.md). _tasks/ (com barra) NAO ignora um
# SYMLINK _tasks; /_tasks (ancorado) cobre symlink/dir na raiz (incidente 2026-08-08).
/_tasks
# Runtime artifacts
.chroma_db/
omniroute.log

20
.state/session.md Normal file
View File

@@ -0,0 +1,20 @@
- Session initialized at Tue Aug 4 00:05:16 CEST 2026
- Session initialized at Tue Aug 4 00:05:30 CEST 2026
- Session initialized at Tue Aug 4 00:06:20 CEST 2026
- Session initialized at Thu Aug 6 20:06:52 CEST 2026
- Session initialized at Thu Aug 6 20:35:48 CEST 2026
- Session initialized at Thu Aug 6 20:39:00 CEST 2026
- Session initialized at Thu Aug 6 21:04:02 CEST 2026
- Session initialized at Thu Aug 6 21:42:52 CEST 2026
- Session initialized at Thu Aug 6 22:49:37 CEST 2026
- Session initialized at Thu Aug 6 22:50:20 CEST 2026
- Session initialized at Thu Aug 6 23:17:04 CEST 2026
- Session initialized at Fri Aug 7 05:50:47 CEST 2026
- Session initialized at Fri Aug 7 05:57:54 CEST 2026
- Session initialized at Fri Aug 7 06:58:16 CEST 2026
- Session initialized at Fri Aug 7 07:02:53 CEST 2026
- Session initialized at Fri Aug 7 07:33:32 CEST 2026
- Session initialized at Fri Aug 7 08:04:36 CEST 2026
- Session initialized at Fri Aug 7 08:52:52 CEST 2026
- Session initialized at Fri Aug 7 09:01:19 CEST 2026
- Session initialized at Sat Aug 8 18:46:20 CEST 2026

8
AI-NOTES.md Normal file
View File

@@ -0,0 +1,8 @@
# AI-NOTES (Handoff Log)
## Changelog
- **2026-08-08 (Antigravity)**:
- Status: DONE (Phase 0 and Phase 1).
- Actions: Cleaned up PM2 crash-loops (`litellm-proxy`), updated PM2 ecosystem, ran Claude context-optimization (`apply.sh`), removed `.chroma_db` and logs from git, created `HERMES-OMNI-MASTER-PLAN.md` with full 8-phase execution plan.
- Next: Phase 2 (Safe cleanup of bundled skills, PM2 port alignment, NPM audit, Doppler secrets unification).

142
CLAUDE.md
View File

@@ -1,55 +1,117 @@
# CLAUDE.md
@AGENTS.md
OmniRoute — unified AI proxy/router. One endpoint, 290 LLM providers, auto-fallback.
**All project rules live in [`AGENTS.md`](AGENTS.md)** — the single source of truth for every AI
assistant (architecture, conventions, testing, quality gates, git workflow, the 22 Hard Rules,
PII learnings). Read it in full; do not re-add project rules here. Everything below applies ONLY
to Claude Code — operational refinements of rules already defined in `AGENTS.md`.
<!-- CONTEXT BUDGET: this file loads in full on every session and after every compact.
Keep it under 200 lines. Anything deeper goes to .claude/rules/ (path-scoped,
loads only when Claude touches matching files) or .claude/skills/ (loads on demand).
Do not re-inline detail here. -->
## Worktree isolation — Claude Code specifics
## Commands
The full mandatory worktree protocol (base-branch confirmation, `.claude/worktrees/` canonical
path, `cp -al` node_modules, teardown rules) is in `AGENTS.md` → Git Workflow → "Worktree
isolation". Claude-Code-specific points:
```bash
npm install # deps (auto-generates .env from .env.example)
npm run dev # dev server → http://localhost:20128
npm run build # production build (Next.js 16 standalone)
npm run lint # ESLint — 0 errors expected
npm run typecheck:core # TS check (must be clean)
npm run test:unit # Node native runner (most tests)
npm run test:vitest # Vitest (MCP server, autoCombo, cache)
npm run test:coverage # coverage gate 60/60/60/60
npm run check # lint + test
node --import tsx/esm --test tests/unit/your-file.test.ts # single file
```
- Confirm the base branch with the operator via `AskUserQuestion` (Hard Rule #19) unless they
already told you.
- Prefer the native `EnterWorktree` tool — it already creates worktrees under
`.claude/worktrees/` (the canonical path). Create the worktree with the documented `git
worktree add` command, then call `EnterWorktree` with its `path`.
Full test matrix: `CONTRIBUTING.md`. Deep architecture for non-Claude agents: `AGENTS.md`.
## Cross-session safety — Claude Code specifics
## Layout
Hard Rules #19/#21/#22 (in `AGENTS.md`) govern parallel sessions. Operational reminders for this
harness:
Monorepo: `src/` (Next.js 16 app) · `open-sse/` (streaming engine workspace) · `electron/` · `tests/` · `bin/` (CLI).
- **Replicate the `git stash` ban verbatim in the prompt of every subagent that touches git**
(Agent tool / Workflow scripts) — subagents do not inherit this file, and the recorded
recurrence of the stash incident came through a subagent.
- Before merging or pushing to any PR you did not create _this session_, run `git worktree list`
and re-check `gh pr view <N> --json state,headRefOid` (Hard Rule #22b).
- End every session with the main checkout on the branch it started on.
| Layer | Location | Purpose |
| ------------- | ----------------------- | -------------------------------------- |
| API Routes | `src/app/api/v1/` | App Router entry points |
| Handlers | `open-sse/handlers/` | Request processing |
| Executors | `open-sse/executors/` | Provider-specific HTTP dispatch |
| Translators | `open-sse/translator/` | OpenAI ↔ Claude ↔ Gemini |
| Transformer | `open-sse/transformer/` | Responses API ↔ Chat Completions |
| Services | `open-sse/services/` | Combo routing, rate limits, caching |
| Database | `src/lib/db/` | SQLite domain modules (130 migrations) |
| Domain/Policy | `src/domain/` | Policy engine, cost rules, fallback |
| MCP Server | `open-sse/mcp-server/` | 104 tools, 3 transports, 31 scopes |
| A2A Server | `src/lib/a2a/` | JSON-RPC 2.0 agent protocol |
| Skills | `src/lib/skills/` | Sandbox skill framework |
| Memory | `src/lib/memory/` | Persistent conversational memory |
## Superpowers / planning artifacts — path overrides
Request pipeline: `route → CORS → Zod validation → optional auth → API-key policy → injection guard → handleChatCore() → cache → rate limit → combo routing → translate → executor → upstream fetch (retry/backoff) → translate back → SSE or JSON`. No global Next.js middleware; interception is per-route.
The `_tasks/` convention is defined in `AGENTS.md` → "Planning & Research Artifacts". The
superpowers skills ship with defaults that point at `docs/…` — those defaults are **overridden
here**. When a superpowers skill announces a path like "saved to `docs/superpowers/plans/…`",
rewrite it to the `_tasks/…` equivalent before writing:
## Hard rules
| Artifact (skill) | Default (do NOT use) | Save here instead |
| ---------------------------------- | ------------------------- | ------------------------------------------------------------- |
| Plans (`writing-plans`) | `docs/superpowers/plans/` | `_tasks/superpowers/plans/YYYY-MM-DD-<feature>.md` |
| Specs / design (`brainstorming`) | `docs/superpowers/specs/` | `_tasks/superpowers/specs/YYYY-MM-DD-<topic>-design.md` |
| Research (`deep-research`, ad-hoc) | `docs/research/` | `_tasks/research/…` |
| Hand-offs (`/handoff`) | — | `_tasks/hands-off/<YYYY-MM-DD>_<branch>_v<versão>_sess-<id>/` |
Violating any of these is a blocking defect. Numbers are stable — cite them in review.
Commit those artifacts inside the `_tasks/` repo (`git -C _tasks …`), never in the main repo.
1. Never commit secrets or credentials.
2. Never add logic to `src/lib/localDb.ts` (re-export layer only); never barrel-import from it.
3. Never use `eval()` / `new Function()` / implied eval.
4. Never commit directly to `main`.
5. Never write raw SQL in routes or handlers — go through `src/lib/db/` modules.
6. Never silently swallow errors in SSE streams.
7. Always validate inputs with Zod.
8. Always include or update tests in the same PR that changes production code in `src/`, `open-sse/`, `electron/`, `bin/`.
9. Coverage must not regress below `quality-baseline.json`; absolute floor 60/60/60/60.
10. Never bypass Husky hooks (`--no-verify`, `--no-gpg-sign`) without explicit operator approval.
11. Never embed public upstream OAuth client_id/secret or Firebase Web keys as literals — use `resolvePublicCred()`.
12. Never return raw `err.stack` / `err.message` in HTTP / SSE / executor / MCP responses — use `buildErrorBody()` or `sanitizeErrorMessage()`.
13. Never string-interpolate external paths into shell scripts passed to `exec()`/`spawn()` — pass via the `env` option.
14. Never dismiss a CodeQL / secret-scanning alert without checking the sanitizer docs first and recording the justification.
15. Never expose child-process-spawning routes (`/api/mcp/`, `/api/cli-tools/runtime/`) without `isLocalOnlyPath()` classification.
16. Never credit an AI assistant in commit/PR metadata — no `Co-Authored-By` naming an AI/bot, no "Generated with …" footers, anywhere. This overrides any harness default; strip it before pushing. Human collaborators are still credited normally.
17. Never expose `/api/services/` or `/dashboard/providers/services/*/embed/` without `isLocalOnlyPath()` classification.
18. Every bug fix ships with a failing-then-passing test (TDD, preferred) **or** a documented live test on the production VPS `192.168.0.15`. "Worked locally" is not validation.
19. Never develop on the shared main checkout. Every task gets its own worktree under `.claude/worktrees/`, on its own branch, cut from a base branch the operator confirmed. → skill `omniroute-worktree`
20. PII redaction/sanitization is opt-in. `PII_REDACTION_ENABLED` and `PII_RESPONSE_SANITIZATION` must keep `defaultValue: "false"`.
21. During an active `release-freeze`, never merge into the frozen `release/vX.Y.Z`; retarget to the highest `release/v*` and verify the retarget. Only `/generate-release` may raise or lift a freeze. → skill `omniroute-release-freeze`
22. Cross-session safety — many parallel sessions work this repo:
- **Never `git stash` / `git stash pop`, anywhere in this repo, including inside a worktree and inside any subagent you dispatch.** The stash lives in the shared object store and clobbers other sessions' uncommitted work. Compare against a base with `git show <ref>:<path>` or `git diff <ref> -- <path>` instead. Repeat this ban verbatim in the prompt of every subagent that touches git.
- Never merge, push, rebase, or force-push a PR / branch / worktree another session owns. Check `git worktree list` and `gh pr view <N> --json state,headRefOid` before touching a PR you did not open this session.
## Base-green before opening PRs
## Conventions (always-on subset)
Before cutting a branch or opening a PR, run the base-green check (`AGENTS.md` → Git Workflow →
"Base-green check"; project skills reference it as `.agents/skills/_shared/base-green.md`). A PR
opened while the base tip is red must carry `⚠️ base-red inherited: #<issue>` in its body. To
drain an accumulated red state (base tip + red PRs), use the `/sweep-reds` skill.
- 2 spaces, semicolons, double quotes, 100 cols, es5 trailing commas (Prettier via lint-staged).
- Imports: external → internal (`@/`, `@omniroute/open-sse`) → relative.
- Naming: files camelCase/kebab, components PascalCase, constants UPPER_SNAKE.
- `no-explicit-any` is an **error** in `open-sse/` and `tests/`; pre-existing violations are frozen in `config/quality/eslint-suppressions.json`.
- TypeScript `strict: false`, target ES2022, module esnext, resolution bundler. Prefer explicit types.
- Commits: Conventional Commits, `feat(db): …`. Branch prefixes `feat/ fix/ refactor/ docs/ test/ chore/`.
## Environment
Node ≥22 <23 || ≥24 <27, ESM — the only supported runtime. Bun 1.3.14 is pinned as an exact devDependency for an allow-listed set of gate/generator scripts and the `test:bun:db` smoke only; do not widen it to install, build, or the main test runners. Port 20128. `DATA_DIR` defaults to `~/.omniroute/`. Aliases: `@/*``src/`, `@omniroute/open-sse``open-sse/`.
## Planning artifacts
`_tasks/` is a separate, gitignored git repo and is the only place for plans, specs, research, and hand-offs. Never write superpowers / planning / research output under `docs/` or the repo root, even when a skill's default says `docs/superpowers/…` — rewrite the path to `_tasks/…` before writing, and commit inside `_tasks/` (`git -C _tasks …`).
## Where the rest lives
Do not ask for these upfront — they load themselves when relevant.
**Path-scoped rules** (`.claude/rules/`, auto-load when you open matching files): `database.md`, `api-routes.md`, `open-sse.md`, `resilience.md`, `security-sensitive.md`, `pii.md`, `testing.md`.
**Skills** (`.claude/skills/`, load on demand): `omniroute-worktree`, `omniroute-release-freeze`, `omniroute-extend` (add a provider / route / DB module / MCP tool / A2A skill / cloud agent / embedded service), `omniroute-quality-gates`.
**Docs** — read the matching deep-dive before any non-trivial change:
| Area | Doc |
| ---------------------------------------------- | ---------------------------------------------------------------------------- |
| Repo navigation | `docs/architecture/REPOSITORY_MAP.md` |
| Architecture / engineering reference | `docs/architecture/ARCHITECTURE.md`, `CODEBASE_DOCUMENTATION.md` |
| Auto-Combo (13-factor, 19 strategies) | `docs/routing/AUTO-COMBO.md` |
| Resilience (3 mechanisms) | `docs/architecture/RESILIENCE_GUIDE.md` |
| Reasoning replay | `docs/routing/REASONING_REPLAY.md` |
| Skills / Memory / Cloud agents | `docs/frameworks/SKILLS.md`, `MEMORY.md`, `CLOUD_AGENT.md` |
| Guardrails / public creds / error sanitization | `docs/security/GUARDRAILS.md`, `PUBLIC_CREDS.md`, `ERROR_SANITIZATION.md` |
| Authorization / route guard tiers | `docs/architecture/AUTHZ_GUIDE.md`, `docs/security/ROUTE_GUARD_TIERS.md` |
| Agent protocols / MCP / A2A | `docs/frameworks/AGENT_PROTOCOLS_GUIDE.md`, `MCP-SERVER.md`, `A2A-SERVER.md` |
| API reference | `docs/reference/API_REFERENCE.md` + `docs/openapi.yaml` |
| Release flow / embedded services | `docs/ops/RELEASE_CHECKLIST.md`, `docs/frameworks/EMBEDDED-SERVICES.md` |
| Quality gates (~48 scripts) | `docs/architecture/QUALITY_GATES.md` |

14
OS-NOTES.md Normal file
View File

@@ -0,0 +1,14 @@
# OS-NOTES (Dashboard & Roadmap)
## Dashboard
- OmniRoute / Hermes integration active.
- Context optimization script applied.
- Master plan drafted (`HERMES-OMNI-MASTER-PLAN.md`).
## Roadmap
- [done] Phase 0 & 1: Inventory and context optimization.
- [next] Phase 2: Secrets and stability (resolve Doppler configs `prd` vs `dev_personal`, fix `omniroute-tunnel`, safe skill symlink cleanup).
- [next] Phase 3: AGY / Claude Code integration via OmniRoute.
- [next] Phase 4: Combo evaluations.

View File

@@ -1,7 +1,5 @@
---
title: "AgentRouter WAF"
version: 3.8.50
lastUpdated: 2026-08-03
---
# agentrouter.org WAF (Web Application Firewall)
@@ -29,22 +27,22 @@ The WAF inspects `messages[].content` only. It does **not** inspect:
## Always-blocked patterns (case-insensitive)
| Pattern | Notes |
|-------------------------------|----------------------------------------|
| Any `Lorem ipsum` variant | Full Latin lorem vocabulary is blocked |
| `language model` (alone) | "the language model" and "large language model" pass |
| `virtual assistant` | "AI assistant" passes |
| `I'm here to help` | "here to help" alone also blocks |
| `Claude, made by Anthropic` | Full phrase only |
| Pattern | Notes |
| --------------------------- | ---------------------------------------------------- |
| Any `Lorem ipsum` variant | Full Latin lorem vocabulary is blocked |
| `language model` (alone) | "the language model" and "large language model" pass |
| `virtual assistant` | "AI assistant" passes |
| `I'm here to help` | "here to help" alone also blocks |
| `Claude, made by Anthropic` | Full phrase only |
## Almost-always-blocked patterns
| Pattern | Notes |
|-------------------|---------------------------------------------------------|
| `placeholder` | When it stands alone (not as a parameter name, etc.) |
| `dummy data` | Common seed phrase for fixtures |
| `foo bar baz` | Canonical placeholder phrase |
| Repeated short tokens (`AAA BBB CCC`, `test test test`) | Detector for keyword stuffing |
| Pattern | Notes |
| ------------------------------------------------------- | ---------------------------------------------------- |
| `placeholder` | When it stands alone (not as a parameter name, etc.) |
| `dummy data` | Common seed phrase for fixtures |
| `foo bar baz` | Canonical placeholder phrase |
| Repeated short tokens (`AAA BBB CCC`, `test test test`) | Detector for keyword stuffing |
## Behavior under load
@@ -94,4 +92,4 @@ The current filter is overly aggressive — it blocks "Lorem ipsum" in
`tool_result` blocks even though the operator clearly did not intend to
inject a prompt. Operators who want this fixed at the source should
contact `agentrouter.org` to report the false positives. The blocklist
above is the empirical result of probing the upstream as of 2026-08-03.
above is the empirical result of probing the upstream as of 2026-08-03.

44
ecosystem.config.cjs Normal file
View File

@@ -0,0 +1,44 @@
module.exports = {
apps: [
{
name: "omniroute",
script: "npm",
args: "run start",
cwd: "/Users/work/hermes-sandbox/Hermes_Omni",
autorestart: true,
watch: false,
min_uptime: "10s",
max_restarts: 10,
exp_backoff_restart_delay: 100,
restart_delay: 5000,
max_memory_restart: "700M",
kill_timeout: 10000,
listen_timeout: 10000,
time: true,
merge_logs: true,
env: {
NODE_ENV: "production",
PORT: 20128
}
},
{
name: "hermes-tg-bot",
script: "/Users/work/hermes-sandbox/Hermes_Omni/scripts/serpentos_logic/tg-bot.cjs",
cwd: "/Users/work/hermes-sandbox/Hermes_Omni",
autorestart: true,
watch: false,
min_uptime: "10s",
max_restarts: 10,
exp_backoff_restart_delay: 500,
restart_delay: 5000,
max_memory_restart: "500M",
kill_timeout: 10000,
time: true,
merge_logs: true,
env: {
NODE_ENV: "production"
}
}
]
};

22
insert_mappings.cjs Normal file
View File

@@ -0,0 +1,22 @@
const Database = require('better-sqlite3');
const { v4: uuidv4 } = require('uuid');
const db = new Database('/Users/work/.omniroute/storage.sqlite');
const combos = db.prepare("SELECT id, name FROM combos").all();
const now = new Date().toISOString();
for (const combo of combos) {
const mappingId = uuidv4();
// Map the combo name directly as the pattern
try {
db.prepare(`
INSERT INTO model_combo_mappings
(id, pattern, combo_id, priority, enabled, description, created_at, updated_at)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
`).run(mappingId, combo.name, combo.id, 100, 1, `Auto-mapped combo: ${combo.name}`, now, now);
console.log(`Mapped pattern '${combo.name}' to combo '${combo.name}'`);
} catch(e) {
console.log(`Error mapping ${combo.name}: ${e.message}`);
}
}
console.log("Done.");

24
insert_mappings.js Normal file
View File

@@ -0,0 +1,24 @@
const Database = require("better-sqlite3");
const { v4: uuidv4 } = require("uuid");
const db = new Database("/Users/work/.omniroute/storage.sqlite");
const combos = db.prepare("SELECT id, name FROM combos").all();
const now = new Date().toISOString();
for (const combo of combos) {
const mappingId = uuidv4();
// Map the combo name directly as the pattern
try {
db.prepare(
`
INSERT INTO model_combo_mappings
(id, pattern, combo_id, priority, enabled, description, created_at, updated_at)
VALUES (?, ?, ?, ?, ?, ?, ?, ?)
`
).run(mappingId, combo.name, combo.id, 100, 1, `Auto-mapped combo: ${combo.name}`, now, now);
console.log(`Mapped pattern '${combo.name}' to combo '${combo.name}'`);
} catch (e) {
console.log(`Error mapping ${combo.name}: ${e.message}`);
}
}
console.log("Done.");

View File

@@ -22,7 +22,7 @@ import { getResolvedModelCapabilities } from "@/lib/modelCapabilities";
import { isVisionModelId } from "@/shared/constants/visionModels";
export type AutoCategory = "coding" | "reasoning" | "vision" | "chat" | "multimodal";
export type AutoTier = "fast" | "cheap" | "floor" | "free" | "reliable" | "pro";
export type AutoTier = "fast" | "cheap" | "floor" | "free" | "reliable" | "pro" | "subscription";
export const AUTO_CATEGORIES: readonly AutoCategory[] = [
"coding",
@@ -38,6 +38,7 @@ export const AUTO_TIERS: readonly AutoTier[] = [
"free",
"reliable",
"pro",
"subscription",
];
const CATEGORY_SET = new Set<string>(AUTO_CATEGORIES);
@@ -86,6 +87,8 @@ export function tierToWeightVariant(tier?: AutoTier): AutoVariant | "reliability
return "cheap";
case "reliable":
return "reliability";
case "subscription":
return "coding"; // subscription uses quality-first weights
default:
return undefined;
}
@@ -133,6 +136,9 @@ export function buildAutoCandidateFilter(
if (tier === "pro") {
checks.push((c) => safeClassifyTier(c) === "premium");
}
if (tier === "subscription") {
checks.push((c) => safeClassifyTier(c) === "subscription");
}
if (checks.length === 0) return null;
return (candidate: PoolCandidate) => checks.every((fn) => fn(candidate));

View File

@@ -25,6 +25,26 @@ export function classifyTier(provider: string, model: string): TierAssignment {
return tierCache.get(key)!;
}
// Check for Claude Code subscription models first
if (
provider === "cc" ||
provider === "claude-code" ||
model.startsWith("cc/") ||
model.startsWith("claude-code/")
) {
const assignment: TierAssignment = {
provider,
model,
tier: PROVIDER_TIER.SUBSCRIPTION,
reason: `Claude Code subscription model detected: ${provider}/${model}`,
costPer1MInput: 0,
costPer1MOutput: 0,
hasFreeTier: false,
};
tierCache.set(key, assignment);
return assignment;
}
if (isExplicitlyFree(provider, currentConfig)) {
const assignment: TierAssignment = {
provider,

View File

@@ -2,6 +2,7 @@ export const PROVIDER_TIER = {
FREE: "free",
CHEAP: "cheap",
PREMIUM: "premium",
SUBSCRIPTION: "subscription",
} as const;
export type ProviderTier = (typeof PROVIDER_TIER)[keyof typeof PROVIDER_TIER];

View File

@@ -309,6 +309,7 @@
"react-markdown": "^10.1.0",
"react-reconciler": "^0.33.0",
"recharts": "^3.8.1",
"remark-gfm": "^4.0.1",
"safe-regex": "^2.1.1",
"selfsigned": "^5.5.0",
"smol-toml": "1.7.1",

477
pm2.log Normal file
View File

@@ -0,0 +1,477 @@
[TAILING] Tailing last 200 lines for [omniroute] process (change the value with --lines option)
/Users/work/.pm2/logs/omniroute-error.log last 200 lines:
21|omnirou | - Local: http://localhost:3001
21|omnirou | - PID: 20496
21|omnirou | - Dir: /Users/work/serpentos/Hermes_Omni
21|omnirou | - Log: .build/next/dev/logs/next-development.log
21|omnirou | 
21|omnirou | You can access the existing server at http://localhost:3001,
21|omnirou | or run kill 20496 to stop it and start a new one.
21|omnirou | npm notice run omniroute@3.8.50 dev
21|omnirou | npm notice run node --max-old-space-size=8192 scripts/dev/run-next.mjs dev --port 20128
21|omnirou | [bootstrap] The following OAuth integrations are not configured:
21|omnirou | [bootstrap] • Antigravity OAuth (ANTIGRAVITY_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] • Qoder OAuth (QODER_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] These providers will not work until configured.
21|omnirou | [bootstrap] ⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!
21|omnirou |  Another next dev server is already running.
21|omnirou | 
21|omnirou | - Local: http://localhost:3001
21|omnirou | - PID: 20496
21|omnirou | - Dir: /Users/work/serpentos/Hermes_Omni
21|omnirou | - Log: .build/next/dev/logs/next-development.log
21|omnirou | 
21|omnirou | You can access the existing server at http://localhost:3001,
21|omnirou | or run kill 20496 to stop it and start a new one.
21|omnirou | npm notice run omniroute@3.8.50 dev
21|omnirou | npm notice run node --max-old-space-size=8192 scripts/dev/run-next.mjs dev --port 20128
21|omnirou | [bootstrap] The following OAuth integrations are not configured:
21|omnirou | [bootstrap] • Antigravity OAuth (ANTIGRAVITY_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] • Qoder OAuth (QODER_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] These providers will not work until configured.
21|omnirou | [bootstrap] ⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!
21|omnirou |  Another next dev server is already running.
21|omnirou | 
21|omnirou | - Local: http://localhost:3001
21|omnirou | - PID: 20496
21|omnirou | - Dir: /Users/work/serpentos/Hermes_Omni
21|omnirou | - Log: .build/next/dev/logs/next-development.log
21|omnirou | 
21|omnirou | You can access the existing server at http://localhost:3001,
21|omnirou | or run kill 20496 to stop it and start a new one.
21|omnirou | npm notice run omniroute@3.8.50 dev
21|omnirou | npm notice run node --max-old-space-size=8192 scripts/dev/run-next.mjs dev --port 20128
21|omnirou | [bootstrap] The following OAuth integrations are not configured:
21|omnirou | [bootstrap] • Antigravity OAuth (ANTIGRAVITY_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] • Qoder OAuth (QODER_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] These providers will not work until configured.
21|omnirou | [bootstrap] ⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!
21|omnirou |  Another next dev server is already running.
21|omnirou | 
21|omnirou | - Local: http://localhost:3001
21|omnirou | - PID: 20496
21|omnirou | - Dir: /Users/work/serpentos/Hermes_Omni
21|omnirou | - Log: .build/next/dev/logs/next-development.log
21|omnirou | 
21|omnirou | You can access the existing server at http://localhost:3001,
21|omnirou | or run kill 20496 to stop it and start a new one.
21|omnirou | npm notice run omniroute@3.8.50 dev
21|omnirou | npm notice run node --max-old-space-size=8192 scripts/dev/run-next.mjs dev --port 20128
21|omnirou | [bootstrap] The following OAuth integrations are not configured:
21|omnirou | [bootstrap] • Antigravity OAuth (ANTIGRAVITY_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] • Qoder OAuth (QODER_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] These providers will not work until configured.
21|omnirou | [bootstrap] ⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!
21|omnirou |  Another next dev server is already running.
21|omnirou | 
21|omnirou | - Local: http://localhost:3001
21|omnirou | - PID: 20496
21|omnirou | - Dir: /Users/work/serpentos/Hermes_Omni
21|omnirou | - Log: .build/next/dev/logs/next-development.log
21|omnirou | 
21|omnirou | You can access the existing server at http://localhost:3001,
21|omnirou | or run kill 20496 to stop it and start a new one.
21|omnirou | npm notice run omniroute@3.8.50 dev
21|omnirou | npm notice run node --max-old-space-size=8192 scripts/dev/run-next.mjs dev --port 20128
21|omnirou | [bootstrap] The following OAuth integrations are not configured:
21|omnirou | [bootstrap] • Antigravity OAuth (ANTIGRAVITY_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] • Qoder OAuth (QODER_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] These providers will not work until configured.
21|omnirou | [bootstrap] ⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!
21|omnirou | npm notice run omniroute@3.8.50 dev
21|omnirou | npm notice run node --max-old-space-size=8192 scripts/dev/run-next.mjs dev --port 20128
21|omnirou | [bootstrap] The following OAuth integrations are not configured:
21|omnirou | [bootstrap] • Antigravity OAuth (ANTIGRAVITY_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] • Qoder OAuth (QODER_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] These providers will not work until configured.
21|omnirou | [bootstrap] ⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!
21|omnirou |  Another next dev server is already running.
21|omnirou | 
21|omnirou | - Local: http://localhost:3001
21|omnirou | - PID: 20496
21|omnirou | - Dir: /Users/work/serpentos/Hermes_Omni
21|omnirou | - Log: .build/next/dev/logs/next-development.log
21|omnirou | 
21|omnirou | You can access the existing server at http://localhost:3001,
21|omnirou | or run kill 20496 to stop it and start a new one.
21|omnirou | npm notice run omniroute@3.8.50 dev
21|omnirou | npm notice run node --max-old-space-size=8192 scripts/dev/run-next.mjs dev --port 20128
21|omnirou | [bootstrap] The following OAuth integrations are not configured:
21|omnirou | [bootstrap] • Antigravity OAuth (ANTIGRAVITY_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] • Qoder OAuth (QODER_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] These providers will not work until configured.
21|omnirou | [bootstrap] ⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!
21|omnirou |  Another next dev server is already running.
21|omnirou | 
21|omnirou | - Local: http://localhost:3001
21|omnirou | - PID: 20496
21|omnirou | - Dir: /Users/work/serpentos/Hermes_Omni
21|omnirou | - Log: .build/next/dev/logs/next-development.log
21|omnirou | 
21|omnirou | You can access the existing server at http://localhost:3001,
21|omnirou | or run kill 20496 to stop it and start a new one.
21|omnirou | npm notice run omniroute@3.8.50 dev
21|omnirou | npm notice run node --max-old-space-size=8192 scripts/dev/run-next.mjs dev --port 20128
21|omnirou | [bootstrap] The following OAuth integrations are not configured:
21|omnirou | [bootstrap] • Antigravity OAuth (ANTIGRAVITY_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] • Qoder OAuth (QODER_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] These providers will not work until configured.
21|omnirou | [bootstrap] ⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!
21|omnirou |  Another next dev server is already running.
21|omnirou | 
21|omnirou | - Local: http://localhost:3001
21|omnirou | - PID: 20496
21|omnirou | - Dir: /Users/work/serpentos/Hermes_Omni
21|omnirou | - Log: .build/next/dev/logs/next-development.log
21|omnirou | 
21|omnirou | You can access the existing server at http://localhost:3001,
21|omnirou | or run kill 20496 to stop it and start a new one.
21|omnirou | npm notice run omniroute@3.8.50 dev
21|omnirou | npm notice run node --max-old-space-size=8192 scripts/dev/run-next.mjs dev --port 20128
21|omnirou | [bootstrap] The following OAuth integrations are not configured:
21|omnirou | [bootstrap] • Antigravity OAuth (ANTIGRAVITY_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] • Qoder OAuth (QODER_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] These providers will not work until configured.
21|omnirou | [bootstrap] ⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!
21|omnirou | npm notice run omniroute@3.8.50 dev
21|omnirou | npm notice run node --max-old-space-size=8192 scripts/dev/run-next.mjs dev --port 20128
21|omnirou | [bootstrap] The following OAuth integrations are not configured:
21|omnirou | [bootstrap] • Antigravity OAuth (ANTIGRAVITY_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] • Qoder OAuth (QODER_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] These providers will not work until configured.
21|omnirou | [bootstrap] ⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!
21|omnirou | npm notice run omniroute@3.8.50 dev
21|omnirou | npm notice run node --max-old-space-size=8192 scripts/dev/run-next.mjs dev --port 20128
21|omnirou | [bootstrap] The following OAuth integrations are not configured:
21|omnirou | [bootstrap] • Antigravity OAuth (ANTIGRAVITY_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] • Qoder OAuth (QODER_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] These providers will not work until configured.
21|omnirou | [bootstrap] ⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!
21|omnirou | npm notice run omniroute@3.8.50 dev
21|omnirou | npm notice run node --max-old-space-size=8192 scripts/dev/run-next.mjs dev --port 20128
21|omnirou | [bootstrap] The following OAuth integrations are not configured:
21|omnirou | [bootstrap] • Antigravity OAuth (ANTIGRAVITY_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] • Qoder OAuth (QODER_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] These providers will not work until configured.
21|omnirou | [bootstrap] ⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!
21|omnirou | [ARENA_ELO_SYNC] Failed to fetch "text" leaderboard: The operation was aborted due to timeout
21|omnirou | [ARENA_ELO_SYNC] Failed to fetch "code" leaderboard: The operation was aborted due to timeout
21|omnirou | [ARENA_ELO_SYNC] Sync failed: All Arena leaderboard fetches failed: The operation was aborted due to timeout; The operation was aborted due to timeout
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed code=PROXY_UNREACHABLE | connect ECONNREFUSED 127.0.0.1:3001 code=ECONNREFUSED syscall=connect errno=-61 address=127.0.0.1:3001
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed code=PROXY_UNREACHABLE | connect ECONNREFUSED 127.0.0.1:3001 code=ECONNREFUSED syscall=connect errno=-61 address=127.0.0.1:3001] native=[TypeError fetch failed | connect ECONNREFUSED 127.0.0.1:3001 code=ECONNREFUSED syscall=connect errno=-61 address=127.0.0.1:3001]
21|omnirou | [ModelSync] github (34afe2ad): fetch failed — fetch failed
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed code=PROXY_UNREACHABLE | connect ECONNREFUSED 127.0.0.1:3001 code=ECONNREFUSED syscall=connect errno=-61 address=127.0.0.1:3001
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed code=PROXY_UNREACHABLE | connect ECONNREFUSED 127.0.0.1:3001 code=ECONNREFUSED syscall=connect errno=-61 address=127.0.0.1:3001
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed code=PROXY_UNREACHABLE | connect ECONNREFUSED 127.0.0.1:3001 code=ECONNREFUSED syscall=connect errno=-61 address=127.0.0.1:3001] native=[TypeError fetch failed | connect ECONNREFUSED 127.0.0.1:3001 code=ECONNREFUSED syscall=connect errno=-61 address=127.0.0.1:3001]
21|omnirou | [ModelSync] slavakononovtattoo@gmail.com (176734ec): fetch failed — fetch failed
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed code=PROXY_UNREACHABLE | connect ECONNREFUSED 127.0.0.1:3001 code=ECONNREFUSED syscall=connect errno=-61 address=127.0.0.1:3001] native=[TypeError fetch failed | connect ECONNREFUSED 127.0.0.1:3001 code=ECONNREFUSED syscall=connect errno=-61 address=127.0.0.1:3001]
21|omnirou | [ModelSync] Kimi Code (API) (kimi-cod): fetch failed — fetch failed
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed code=PROXY_UNREACHABLE | connect ECONNREFUSED 127.0.0.1:3001 code=ECONNREFUSED syscall=connect errno=-61 address=127.0.0.1:3001
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed code=PROXY_UNREACHABLE | connect ECONNREFUSED 127.0.0.1:3001 code=ECONNREFUSED syscall=connect errno=-61 address=127.0.0.1:3001] native=[TypeError fetch failed | connect ECONNREFUSED 127.0.0.1:3001 code=ECONNREFUSED syscall=connect errno=-61 address=127.0.0.1:3001]
21|omnirou | [ModelSync] Antigravity (antigrav): fetch failed — fetch failed
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed code=PROXY_UNREACHABLE | AggregateError code=ECONNREFUSED | ↳ code=ECONNREFUSED syscall=connect address=::1:20128 | ↳ code=ECONNREFUSED syscall=connect address=127.0.0.1:20128
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed code=PROXY_UNREACHABLE | AggregateError code=ECONNREFUSED | ↳ code=ECONNREFUSED syscall=connect address=::1:20128 | ↳ code=ECONNREFUSED syscall=connect address=127.0.0.1:20128] native=[TypeError fetch failed | AggregateError code=ECONNREFUSED | ↳ code=ECONNREFUSED syscall=connect address=::1:20128 | ↳ code=ECONNREFUSED syscall=connect address=127.0.0.1:20128]
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed | getaddrinfo ENOTFOUND llamagate.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed | getaddrinfo ENOTFOUND llamagate.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008] native=[TypeError fetch failed | getaddrinfo ENOTFOUND llamagate.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008]
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed | getaddrinfo ENOTFOUND llamagate.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed | getaddrinfo ENOTFOUND llamagate.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008] native=[TypeError fetch failed | getaddrinfo ENOTFOUND llamagate.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008]
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed | getaddrinfo ENOTFOUND api.galadriel.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed | getaddrinfo ENOTFOUND api.galadriel.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008] native=[TypeError fetch failed | getaddrinfo ENOTFOUND api.galadriel.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008]
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed | getaddrinfo ENOTFOUND api.galadriel.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed | getaddrinfo ENOTFOUND api.galadriel.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008] native=[TypeError fetch failed | getaddrinfo ENOTFOUND api.galadriel.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008]
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed | getaddrinfo ENOTFOUND api.lambda.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed | getaddrinfo ENOTFOUND api.lambda.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008] native=[TypeError fetch failed | getaddrinfo ENOTFOUND api.lambda.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008]
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed | getaddrinfo ENOTFOUND api.lambda.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed | getaddrinfo ENOTFOUND api.lambda.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008] native=[TypeError fetch failed | getaddrinfo ENOTFOUND api.lambda.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008]
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed | getaddrinfo ENOTFOUND api.monsterapi.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed | getaddrinfo ENOTFOUND api.monsterapi.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008] native=[TypeError fetch failed | getaddrinfo ENOTFOUND api.monsterapi.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008]
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed | getaddrinfo ENOTFOUND api.monsterapi.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed | getaddrinfo ENOTFOUND api.monsterapi.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008] native=[TypeError fetch failed | getaddrinfo ENOTFOUND api.monsterapi.ai code=ENOTFOUND syscall=getaddrinfo errno=-3008]
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed | getaddrinfo ENOTFOUND serving.app.predibase.com code=ENOTFOUND syscall=getaddrinfo errno=-3008
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed | getaddrinfo ENOTFOUND serving.app.predibase.com code=ENOTFOUND syscall=getaddrinfo errno=-3008] native=[TypeError fetch failed | getaddrinfo ENOTFOUND serving.app.predibase.com code=ENOTFOUND syscall=getaddrinfo errno=-3008]
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed | getaddrinfo ENOTFOUND serving.app.predibase.com code=ENOTFOUND syscall=getaddrinfo errno=-3008
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed | getaddrinfo ENOTFOUND serving.app.predibase.com code=ENOTFOUND syscall=getaddrinfo errno=-3008] native=[TypeError fetch failed | getaddrinfo ENOTFOUND serving.app.predibase.com code=ENOTFOUND syscall=getaddrinfo errno=-3008]
21|omnirou | [ProxyFetch] Undici dispatcher failed, falling back to native fetch (after retry): TypeError fetch failed | self-signed certificate in certificate chain code=SELF_SIGNED_CERT_IN_CHAIN
21|omnirou | [ProxyFetch] native fetch fallback ALSO failed: dispatcher=[TypeError fetch failed | self-signed certificate in certificate chain code=SELF_SIGNED_CERT_IN_CHAIN] native=[TypeError fetch failed | self-signed certificate in certificate chain code=SELF_SIGNED_CERT_IN_CHAIN]
21|omnirou | npm notice run omniroute@3.8.50 dev
21|omnirou | npm notice run node --max-old-space-size=8192 scripts/dev/run-next.mjs dev --port 20128
21|omnirou | [bootstrap] The following OAuth integrations are not configured:
21|omnirou | [bootstrap] • Antigravity OAuth (ANTIGRAVITY_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] • Qoder OAuth (QODER_OAUTH_CLIENT_SECRET) — set in .env or /Users/work/.omniroute/server.env
21|omnirou | [bootstrap] These providers will not work until configured.
21|omnirou | [bootstrap] ⚠️ INITIAL_PASSWORD is not set — using default 'CHANGEME'. Change it in Settings!
/Users/work/.pm2/logs/omniroute-out.log last 200 lines:
21|omnirou | [STARTUP] Provider limits sync scheduler started
21|omnirou | [INFO] [QuotaAutoPing] scheduler started
21|omnirou | [STARTUP] Quota auto-ping scheduler started (opt-in, no-op until enabled)
21|omnirou | [ModelSync] Scheduler started — interval: 24h
21|omnirou | [STARTUP] Cloud/model sync background bootstrap initialized
21|omnirou | [BATCH] Initializing batch processor polling...
21|omnirou | [STARTUP] Batch processor started
21|omnirou | [STARTUP] Runtime settings hydrated: payloadRules, modelAliases, backgroundDegradation, cliCompatProviders, cacheControl, usageTracking, healthCheckLogs, thoughtSignature, modelsDevSync, corsOrigins, ccBridgeTransforms, systemTransforms, authzBypass, bannedSignals
21|omnirou | [STARTUP] Model alias seed: applied=0, skipped=2, removed=0, failed=0
21|omnirou | [HOT_RELOAD] Runtime config hot-reload started (poll=5000ms, fsWatch=on)
21|omnirou | [proxyLogger] Loaded 200 proxy logs from SQLite
21|omnirou | [CredentialHealth] Starting credential health check (initial delay 30s, interval 300s)
21|omnirou | [STARTUP] Credential health scheduler started
21|omnirou | [COMPLIANCE] Audit log table initialized
21|omnirou | [STARTUP] Scheduled VACUUM initialized (#4437)
21|omnirou | [AutoRefreshDaemon] Started — checking 0 credentials every 900s
21|omnirou | [ARENA_ELO_SYNC] Starting periodic sync every 86400s
21|omnirou | [PRICING_SYNC] Disabled (set PRICING_SYNC_ENABLED=true to enable)
21|omnirou | [STARTUP] Arena ELO sync initialized
21|omnirou | [ConnectionRecovery] Starting proactive cooldown recovery (tick every 60s)
21|omnirou | [LiveWS] Seeded latest compression run from analytics: a621d3da-eee5-4f34-8515-309d21dc1415
21|omnirou | [STARTUP] Live dashboard WebSocket daemon bootstrap invoked
21|omnirou | [STARTUP] Embedded services bootstrap complete
21|omnirou | [MODELS_DEV] Disabled (enable via Settings > AI)
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-flash" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-pro" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-pro" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-flash" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-pro" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-pro" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-flash" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-pro" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-pro" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-flash" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-pro" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-pro" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-pro" as an exact model id
21|omnirou | [MODEL] Treating "openai/gpt-oss-120b" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-pro" as an exact model id
21|omnirou | [MODEL] Treating "openai/gpt-oss-120b" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-pro" as an exact model id
21|omnirou | [MODEL] Treating "openai/gpt-oss-120b" as an exact model id
21|omnirou | [MODEL] Treating "deepseek-ai/deepseek-v4-pro" as an exact model id
21|omnirou | [MODEL] Treating "openai/gpt-oss-120b" as an exact model id
21|omnirou | [MODEL] Treating "qwen/qwen3.6-27b" as an exact model id
21|omnirou | [MODEL] Treating "qwen/qwen3.6-27b" as an exact model id
21|omnirou | [MODEL] Treating "qwen/qwen3.6-27b" as an exact model id
21|omnirou | [MODEL] Treating "qwen/qwen3.6-27b" as an exact model id
21|omnirou | [MODEL] Treating "qwen/qwen3.6-27b" as an exact model id
21|omnirou | [MODEL] Treating "moonshotai/Kimi-K2.7-Code" as an exact model id
21|omnirou | [MODEL] Treating "qwen/qwen3.6-27b" as an exact model id
21|omnirou | [MODEL] Treating "moonshotai/Kimi-K2.7-Code" as an exact model id
21|omnirou | [MODEL] Treating "qwen/qwen3.6-27b" as an exact model id
21|omnirou | [MODEL] Treating "moonshotai/Kimi-K2.7-Code" as an exact model id
21|omnirou | [MODEL] Treating "qwen/qwen3.6-27b" as an exact model id
21|omnirou | [MODEL] Treating "moonshotai/Kimi-K2.7-Code" as an exact model id
21|omnirou | [STARTUP] Model catalog cache warmed
21|omnirou | [STARTUP] OpenRouter model catalog cache warmed
21|omnirou | [EmbedWsProxy] Listening on 127.0.0.1:20131
21|omnirou | [LiveWS] Dashboard WebSocket server listening on 127.0.0.1:20132
21|omnirou | [ModelSync] Starting model sync cycle — 4 connection(s)
21|omnirou | [HealthCheck] github/34afe2ad-6d24-4ccd-9747-ac430ba73aa4 has no refresh token but has a GitHub access token; keeping connection active
21|omnirou | [CredentialHealth] Testing 250/250 connections...
21|omnirou | [CredentialHealth] ❌ openai-compatible/0a53f78b-a2ad-4e9f-9668-e1c1f2ac951d — Provider test not supported [11ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ qwen/f5626345-947f-46f8-930a-5dabd6a68331 — Provider test not supported [13ms] (failure #1, next check in 600s)
21|omnirou | [Next] dev server listening on http://0.0.0.0:3001 (turbopack)
21|omnirou | [ModelSync] Cycle complete: 0/4 synced in 189ms
21|omnirou | [CredentialHealth] ❌ puter/puter-free — Invalid API key [300ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ longcat/bfb70bc9-4e06-4d63-8283-630228e900e8 — Invalid API key [499ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ qoder/qoder-free — Local CLI runtime is not installed [2342ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ huggingface/b684540c-e84f-4591-a435-71a7620c1999 — Cannot convert argument to a ByteString because the character at index 41 has a value of 8232 which is greater than 255. [2479ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ xai-oauth/809a7805-67c4-4085-9195-6c0708189eaa — API returned 402 [2575ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ dgrid/1454ba3b-53d9-4d44-a322-910f62f19ac7 — Invalid API key [298ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ cheaperinference/80519c86-cc63-4ad6-981a-de0279e49d16 — Invalid API key [435ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ command-code/d63168d8-5a22-4be8-a1e2-b57a18683cce — Invalid API key [579ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ agentrouter/d1556537-17c8-44f1-85ab-3a1daae0dfab — Invalid API key [1356ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ orcarouter/3b98bf6e-dead-4807-8146-c4a67aa9b23b — Invalid API key [490ms] (failure #1, next check in 600s)
21|omnirou | [05:02:57.823] INFO: [sse] Account 7bd8a34d error cleared (CAS)
21|omnirou |  module: "sse"
21|omnirou |  tag: "AUTH"
21|omnirou | [CredentialHealth] ❌ wafer/b02994c7-3bb6-4753-ae11-d85dc5e2a0e9 — Invalid API key [1410ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ freetheai/b6fa0b94-088c-4693-9221-a96f795eb7d4 — Invalid API key [375ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ uncloseai/79e43f97-1192-47aa-8f52-99ea5ed0300d — Provider unavailable (502) [1383ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ vercel-ai-gateway/2b8023d4-82ce-4684-8fe8-c716d361fed8 — Invalid API key [174ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ llamagate/24cf76c7-4894-47ff-af6a-7e2af4720d3a — fetch failed [299ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ gitlawb-gmi/e18cf4cd-fa35-453e-8c8d-2741f6c1eaaf — Invalid API key [321ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ gitlawb/243a74a5-f41b-44b1-bed6-47edc1b9544b — Invalid API key [447ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ piapi/7f56fc63-8257-4998-85e4-5032d7d9a66b — Provider test not supported [28ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ getgoapi/1406f87c-8ddf-44bb-a0fa-cc04b6128306 — Provider test not supported [23ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ laozhang/630cd8b8-8074-49f8-b382-d510ebc9d5e7 — Provider test not supported [24ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ thebai/05fd1dfc-faab-45ce-b9d6-3be9a2ff4276 — Provider test not supported [24ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ poe/d9986d2a-fd90-41c6-8f5e-37a03943fd4c — Invalid API key [332ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ bai/c662bf62-720d-4acd-8d27-913c7e63dccc — Invalid API key [414ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ empower/45ad5813-1da8-4e92-9ca6-9696da0ecd57 — Provider test not supported [34ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ fenayai/486b463e-cbf4-464d-bf18-a2845bd88f4d — Provider test not supported [35ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ factory/aaf1a527-f9af-494f-b0f2-c81ff6605f62 — Provider validation endpoint not supported [405ms] (failure #1, next check in 600s)
21|omnirou | [05:03:04.389] INFO: [sse] Account 809a7805 error cleared (CAS)
21|omnirou |  module: "sse"
21|omnirou |  tag: "AUTH"
21|omnirou | [CredentialHealth] ❌ bluesminds/e664de41-5bca-489b-bb85-46e6726b98e0 — Invalid API key [233ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ chutes/add9d1d1-3f43-44c7-b8a5-2bd3bb939203 — Invalid API key [355ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ dit/d59eb062-3f1b-4fa0-a3cc-e275aba9e386 — Invalid API key [795ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ sumopod/f3649287-8b58-41ab-a5c3-02674adbf157 — Invalid API key [1465ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ x5lab/12522685-26e7-4799-a8d3-13b95f1d71e7 — Provider unavailable (530) [317ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ openadapter/2be7647a-1211-4154-8cf1-df1575bb0c23 — Invalid API key [534ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ tokenrouter/62848fc3-351d-4d7b-8b30-50e1adecbfd0 — Invalid API key [807ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ chenzk/cd8f98c9-8dd9-476a-bf9b-9dc3ce0ece72 — Invalid API key [2379ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ aion/97948c8e-564e-470c-abdf-b744c363162b — Invalid API key [330ms] (failure #1, next check in 600s)
21|omnirou | [ProxyHealth] Starting proxy health scheduler (interval: 600000ms)
21|omnirou | [CredentialHealth] ❌ nara/422b54f9-f654-40fb-906d-fff9b0de72de — Invalid API key [654ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ reka/c30f7b6b-ad2e-46b6-90c3-21926e6c3924 — Invalid API key [153ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ anthropic/ee916845-395a-4184-9b07-9c26f969aaa1 — Invalid API key [477ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ mistral/bec0969f-65ae-41dc-be66-43d36dc8897b — Invalid API key [281ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ cohere/763467f5-1a9a-4ae9-a310-a952387d8050 — Invalid API key [376ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ perplexity/1ce7f3fc-b063-43ff-93e3-2ce96e4de76c — Invalid API key [410ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ galadriel/99886394-bd42-4cf0-b59f-ea73df3f2895 — fetch failed [424ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ morph/ad1d2458-2dd3-4f9a-b653-d9def966be1b — Invalid API key [90ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ meta-llama/27504e6f-2422-4eac-8265-6282a7b31910 — Invalid API key [135ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ nous-research/867d96b1-6466-416a-8d77-7a4d61bf8823 — Invalid API key [311ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ maritalk/bf819d44-a782-4947-8051-aa5a8aeb3304 — Invalid API key [766ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ upstage/d75885b8-e055-48be-afcf-9d09b683543f — Invalid API key [882ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ codestral/81d87255-39e1-4085-8bb7-de1916484c18 — Invalid API key [298ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ writer/42ffd640-20a0-4f9a-8bf2-06a97c359771 — Invalid API key [410ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ liquid/916bc15c-fb8c-4763-b264-5f7794d63f52 — Invalid API key [473ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ fireworks/56d3d5d6-9ea4-4cff-aec5-5b285f6a6e42 — Invalid API key [530ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ arcee-ai/b1a6a4c1-a859-42ec-82f5-62786c1d790e — Provider test not supported [25ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ siliconflow/223f9fd1-0d0b-4306-9487-02ee2a4efccf — Invalid API key [523ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ nube/d9ddeb1b-ebc5-4e92-ac6b-5030011e114c — Invalid API key [685ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ hyperbolic/1acffcad-79bb-4309-adcb-93c7739942c0 — Invalid API key [800ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ openvecta/664194e7-da9d-4884-9112-286782dc1463 — Invalid API key [309ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ nebius/b416aaff-ad3e-4531-b6b8-71f5c97c671e — Invalid API key [353ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ deepinfra/f6307c55-52ac-424b-b4fd-99ecf43d68dc — Invalid API key [701ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ nscale/305c1ad6-1214-42bd-8fd5-6290103c7f6e — Invalid API key [275ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ lambda-ai/02e9af45-1152-4c03-8dce-c475db3952e2 — fetch failed [307ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ baseten/01b22f14-f3e4-4c7e-9a72-8cb515e9a94c — Invalid API key [340ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ featherless-ai/ad32b81a-0fe4-4014-95f6-6f9c42db0a46 — Invalid API key [787ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ publicai/85befdb8-4a2b-45f8-b8d3-24c978fbada6 — Invalid API key [271ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ inference-net/a11e8b2e-55e4-4b4e-b378-36f118100160 — Invalid API key [418ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ wandb/d4732e05-ee59-45b3-b4a1-0c4d00a0807a — Invalid API key [522ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ monsterapi/b54896e1-acf7-4100-9e18-f45b2456acdf — fetch failed [647ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ bytez/1ba3efe1-06e5-48ce-93bf-9dced73dc5ca — Invalid API key [299ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ azure-ai/92b248f6-87b9-479b-9b8b-e52dade0cf40 — Invalid API key [382ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ predibase/3dcf4649-7c03-4fdb-88b2-1bac201fb63a — fetch failed [420ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ bedrock/2511a80c-a6a5-4acc-a25e-3a0439b401ce — Invalid API key [524ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ byteplus/d35eed01-d625-4011-ad2d-4eeca7a39d3f — Invalid API key [746ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ azure-openai/82265a58-9a51-4c9a-9298-d053e64cba05 — Missing base URL [34ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ digitalocean/74fdfca2-e1a6-49c3-8254-a652103f22a7 — Invalid API key [316ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ watsonx/42e05ebc-d134-47ea-ad61-9f20bf324741 — Invalid API key [819ms] (failure #1, next check in 600s)
21|omnirou | TOKEN Antigravity refreshed
21|omnirou | [CredentialHealth] ❌ oci/0300cc22-79f8-4ef0-8c9f-0340121c1c34 — Invalid API key [1342ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ modal/a5d5b559-97a6-496d-9fe4-a9a29bd96b8f — Invalid outbound URL: [93ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ scaleway/6ef89557-85c0-4175-af68-6e76ef41c8a0 — Invalid API key [237ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ ovhcloud/35d1b82e-4643-43ef-8098-9fd3f5eb8a8b — Invalid API key [269ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ databricks/a16ac17b-4de3-416e-aa5d-71c2fad52d18 — Missing base URL [40ms] (failure #1, next check in 600s)
21|omnirou | TOKEN Antigravity projectId discovered during refresh: polar-weaver-2tclv
21|omnirou | [CredentialHealth] ❌ clarifai/aa71f371-f781-40af-946c-99155c4c3018 — Invalid API key [692ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ qianfan/bbf3bde6-93ff-4b3a-acb5-a097111fb5ea — Invalid API key [1093ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ heroku/91c06d49-073c-49d9-b64f-f59bd8330023 — Missing base URL [28ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ snowflake/94a20d62-fa07-41ba-bdad-48d076d0b8e9 — Missing base URL [29ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ bailian-coding-plan/561f427a-1df7-46cf-899e-9ed61345fe5b — Invalid API key [858ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ glm/37a8e485-3177-46ca-9fd4-53408634e872 — Invalid API key [1003ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ glmt/ca7a155c-988d-43ba-971c-571bb0d679c1 — Invalid API key [1035ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ glm-cn/d4830be9-b2ea-462a-8067-c35f59aab73f — Invalid API key [288ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ qwen-cloud/c22ca10b-3907-4e6f-b9f7-53c0850bb313 — Invalid API key [686ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ qwen-cloud-token-plan/fc29d826-8de5-4266-9677-a663fa709cc8 — Invalid API key [722ms] (failure #1, next check in 600s)
21|omnirou | TOKEN Antigravity refreshed
21|omnirou | [CredentialHealth] ❌ zai/fbff3609-132c-492a-9c50-41a6603aa9b7 — Invalid API key [1539ms] (failure #1, next check in 600s)
21|omnirou | TOKEN Antigravity projectId discovered during refresh: isometric-tendril-lfb6s
21|omnirou | [CredentialHealth] ❌ minimax-cn/69617fca-c974-41d2-b2a4-5d2f1b849cf9 — Invalid API key [1922ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ kimi/62a54a22-c074-4007-9b7b-9784b2a7cb37 — Invalid API key [520ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ minimax/6e44c652-6ed0-44d2-9c61-c28289284b42 — Invalid API key [660ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ alibaba/db532af8-08a3-4589-bef3-30c8350c2b8d — Invalid API key [882ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ alibaba-cn/f20ca3c9-fe7f-406c-af34-6d388cc72e24 — Invalid API key [1061ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ volcengine/aa953628-bcbd-40ea-a395-acbc7ddca48f — Invalid API key [2233ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ moonshot/994f4192-a991-4996-9bfa-7bb6a7f583f2 — Invalid API key [527ms] (failure #1, next check in 600s)
21|omnirou | TOKEN Antigravity refreshed
21|omnirou | [CredentialHealth] ❌ xiaomi-mimo-token-plan/67977290-9d6a-4d4c-adc0-821b481829f3 — Invalid API key [927ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ yi/beb4c757-62f7-45d2-a646-c5d298c158aa — Invalid API key [1326ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ tencent/9cd0617a-4971-46fb-9d6d-a0f9e19d5f97 — Invalid API key [1873ms] (failure #1, next check in 600s)
21|omnirou | TOKEN Antigravity projectId discovered during refresh: grand-vigil-qmvz5
21|omnirou | TOKEN Antigravity refreshed
21|omnirou | [CredentialHealth] ❌ baidu/d5b875f1-6395-4430-bac7-b5120304d2c8 — Invalid API key [5878ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ xiaomi-mimo/7bd8a34d-45aa-4159-9c45-d028f4067310 — Invalid API key [286ms] (failure #1, next check in 600s)
21|omnirou | TOKEN Antigravity projectId discovered during refresh: isometric-tendril-lfb6s
21|omnirou | [CredentialHealth] ❌ gigachat/318c3bfc-ee0c-4f74-82b8-d55e28372837 — fetch failed [796ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ coze/0d817a49-5dd8-4d14-b0c9-49b60216a8e0 — Provider validation endpoint not supported [950ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ doubao/0bbd928d-6d57-404f-8c69-47e6f53af675 — Invalid API key [979ms] (failure #1, next check in 600s)
21|omnirou | [CredentialHealth] ❌ stepfun/930f3cf5-16b6-4584-ae7d-5bff7f6dc9c1 — Invalid API key [1211ms] (failure #1, next check in 600s)
21|omnirou | 
21|omnirou | [Shutdown] Received SIGINT. Draining 0 request(s)...
21|omnirou | [Shutdown] All in-flight requests drained.
21|omnirou | [DB] SQLite WAL checkpoint completed (TRUNCATE).
21|omnirou | [Shutdown] SQLite database checkpointed and closed.
21|omnirou | [Shutdown] Log rotation timer stopped.
21|omnirou | [Shutdown] Bye.
21|omnirou | [MDX] closing dev server
21|omnirou | [MDX] generated files in 17.23112500000002ms
21|omnirou | ✓ Running next.config.mjs took 340ms
21|omnirou | [MDX] started dev server
21|omnirou | ○ Compiling /instrumentation ...
21|omniroute | ⚠ ./open-sse/services/browserPool.ts
21|omniroute | Critical dependency: the request of a dependency is an expression
21|omniroute | Import trace for requested module:
21|omniroute | ./open-sse/services/browserPool.ts
21|omniroute | ./open-sse/services/grokClearance.ts
21|omniroute | ./open-sse/executors/grok-web.ts
21|omniroute | ./open-sse/executors/index.ts
21|omniroute | ./open-sse/index.ts
21|omniroute | ./src/instrumentation-node.ts
21|omniroute | ./src/lib/db/adapters/driverFactory.ts
21|omniroute | Critical dependency: require function is used in a way in which dependencies cannot be statically extracted
21|omniroute | Import trace for requested module:
21|omniroute | ./src/lib/db/adapters/driverFactory.ts
21|omniroute | ./src/lib/db/core.ts
21|omniroute | ./src/lib/pricingSync.ts
21|omniroute | ./src/instrumentation-node.ts
21|omniroute | [DB] Sync driver 'better-sqlite3' failed to open, will try next driver: Cannot find module 'better-sqlite3'
21|omniroute | [DB] Sync driver 'node:sqlite' failed to open, will try next driver: Cannot find module 'node:sqlite'
21|omniroute | [DB] Could not probe existing DB: [DB] Nenhum driver SQLite disponível para '/Users/work/.omniroute/storage.sqlite'. Chame ensureDbInitialized() no startup. Drivers testados: better-sqlite3 (failed), node:sqlite (unavailable). sql.js WASM ainda não foi pré-inicializado.
21|omniroute | [DB] Sync driver 'better-sqlite3' failed to open, will try next driver: Cannot find module 'better-sqlite3'
21|omniroute | [DB] Sync driver 'node:sqlite' failed to open, will try next driver: Cannot find module 'node:sqlite'
21|omniroute | [DB] Could not probe existing DB: [DB] Nenhum driver SQLite disponível para '/Users/work/.omniroute/storage.sqlite'. Chame ensureDbInitialized() no startup. Drivers testados: better-sqlite3 (failed), node:sqlite (unavailable). sql.js WASM ainda não foi pré-inicializado.
21|omniroute | [CREDENTIALS] No external credentials file found, using defaults.
21|omniroute | [DB] Sync driver 'better-sqlite3' failed to open, will try next driver: Cannot find module 'better-sqlite3'
21|omniroute | [DB] Sync driver 'node:sqlite' failed to open, will try next driver: Cannot find module 'node:sqlite'
21|omniroute | [DB] Could not probe existing DB: [DB] Nenhum driver SQLite disponível para '/Users/work/.omniroute/storage.sqlite'. Chame ensureDbInitialized() no startup. Drivers testados: better-sqlite3 (failed), node:sqlite (unavailable). sql.js WASM ainda não foi pré-inicializado.
21|omniroute | [STARTUP] Global fetch proxy patch initialized
21|omniroute | [DB] Sync driver 'better-sqlite3' failed to open, will try next driver: Cannot find module 'better-sqlite3'
21|omniroute | [DB] Sync driver 'node:sqlite' failed to open, will try next driver: Cannot find module 'node:sqlite'
21|omniroute | [DB] Pre-initializing sql.js WASM (synchronous drivers unavailable)...
21|omniroute | [DB] Sync driver 'better-sqlite3' failed to open, will try next driver: Cannot find module 'better-sqlite3'
21|omniroute | [DB] Sync driver 'node:sqlite' failed to open, will try next driver: Cannot find module 'node:sqlite'
21|omniroute | [DB] Could not probe existing DB: [DB] Nenhum driver SQLite disponível para '/Users/work/.omniroute/storage.sqlite'. Chame ensureDbInitialized() no startup. Drivers testados: better-sqlite3 (failed), node:sqlite (unavailable). sql.js WASM ainda não foi pré-inicializado.
21|omniroute | [callLogs] Failed to rotate request artifacts: [DB] Nenhum driver SQLite disponível para '/Users/work/.omniroute/storage.sqlite'. Chame ensureDbInitialized() no startup. Drivers testados: better-sqlite3 (failed), node:sqlite (unavailable). sql.js WASM ainda não foi pré-inicializado.
21|omniroute | [DB] Sync driver 'better-sqlite3' failed to open, will try next driver: Cannot find module 'better-sqlite3'
21|omniroute | [DB] Sync driver 'node:sqlite' failed to open, will try next driver: Cannot find module 'node:sqlite'
21|omniroute | [DB] Sync driver 'better-sqlite3' failed to open, will try next driver: Cannot find module 'better-sqlite3'
21|omniroute | [DB] Sync driver 'node:sqlite' failed to open, will try next driver: Cannot find module 'node:sqlite'
21|omniroute | [DB] Changing cache_size from 65536KB to 16384KB
21|omniroute | [DB] cache_size changed to 16384KB
21|omniroute | [DB] SQLite database ready: /Users/work/.omniroute/storage.sqlite (DATA_DIR=/Users/work/.omniroute, SQLITE_FILE=/Users/work/.omniroute/storage.sqlite)
21|omniroute | [HealthCheck] Starting proactive token health-check (tick every 60s)
21|omniroute | [Shutdown] Graceful shutdown handlers registered.
21|omniroute | [STARTUP] Spend batch writer started
21|omniroute | [STARTUP] Guardrail registry initialized
21|omniroute | [STARTUP] Builtin skill handlers registered
21|omniroute | [STARTUP] Quota cache background refresh started
21|omniroute | [ProviderLimitsSync] Scheduler started — interval: 70m
21|omniroute | [STARTUP] Provider limits sync scheduler started
21|omniroute | [INFO] [QuotaAutoPing] scheduler started
21|omniroute | [STARTUP] Quota auto-ping scheduler started (opt-in, no-op until enabled)
21|omniroute | [ModelSync] Scheduler started — interval: 24h
21|omniroute | [STARTUP] Cloud/model sync background bootstrap initialized
21|omniroute | [BATCH] Initializing batch processor polling...
21|omniroute | [STARTUP] Batch processor started
21|omniroute | [STARTUP] Runtime settings hydrated: payloadRules, modelAliases, backgroundDegradation, cliCompatProviders, cacheControl, usageTracking, healthCheckLogs, thoughtSignature, modelsDevSync, corsOrigins, ccBridgeTransforms, systemTransforms, authzBypass, bannedSignals
21|omniroute | [STARTUP] Model alias seed: applied=0, skipped=2, removed=0, failed=0
21|omniroute | [HOT_RELOAD] Runtime config hot-reload started (poll=5000ms, fsWatch=on)
21|omniroute | [proxyLogger] Loaded 200 proxy logs from SQLite
21|omniroute | [CredentialHealth] Starting credential health check (initial delay 30s, interval 300s)
21|omniroute | [STARTUP] Credential health scheduler started
21|omniroute | [COMPLIANCE] Audit log table initialized
21|omniroute | [STARTUP] Scheduled VACUUM initialized (#4437)
21|omniroute | [AutoRefreshDaemon] Started — checking 0 credentials every 900s
21|omniroute | [ARENA_ELO_SYNC] Starting periodic sync every 86400s
21|omniroute | [PRICING_SYNC] Disabled (set PRICING_SYNC_ENABLED=true to enable)
21|omniroute | [STARTUP] Arena ELO sync initialized
21|omniroute | [ConnectionRecovery] Starting proactive cooldown recovery (tick every 60s)
21|omniroute | [LiveWS] Seeded latest compression run from analytics: a621d3da-eee5-4f34-8515-309d21dc1415
21|omniroute | [STARTUP] Live dashboard WebSocket daemon bootstrap invoked
21|omniroute | [STARTUP] Embedded services bootstrap complete
21|omniroute | [MODELS_DEV] Disabled (enable via Settings > AI)

34033
pnpm-lock.yaml generated Normal file

File diff suppressed because it is too large Load Diff

10
reset_pwd.cjs Normal file
View File

@@ -0,0 +1,10 @@
const bcrypt = require('bcryptjs');
const Database = require('better-sqlite3');
async function run() {
const hash = await bcrypt.hash('6666', 12);
const db = new Database('/Users/work/.omniroute/settings.db');
db.prepare("UPDATE key_value SET value = ? WHERE key = 'password'").run(JSON.stringify(hash));
console.log("Password reset to 6666");
}
run().catch(console.error);

View File

@@ -0,0 +1,41 @@
import {
APIKEY_PROVIDERS,
FREE_APIKEY_PROVIDER_IDS,
LOCAL_PROVIDERS,
NOAUTH_PROVIDERS,
} from "../../src/shared/constants/providers.js";
import { createProviderConnection } from "../../src/models/index.js";
import { randomUUID } from "crypto";
async function run() {
const allProviders = [
...Object.keys(APIKEY_PROVIDERS),
...Object.keys(LOCAL_PROVIDERS),
...Object.keys(NOAUTH_PROVIDERS),
...Array.from(FREE_APIKEY_PROVIDER_IDS),
];
// Deduplicate
const uniqueProviders = [...new Set(allProviders)];
console.log(`Found ${uniqueProviders.length} unique providers. Adding...`);
for (const provider of uniqueProviders) {
try {
await createProviderConnection({
id: randomUUID(),
provider: provider,
authType: "apikey",
name: `${provider} test connection`,
apiKey: `test-key-${provider}-${Date.now()}`,
});
console.log(`✅ Added ${provider}`);
} catch (e) {
console.log(`❌ Failed to add ${provider}: ${e.message}`);
}
}
console.log("Done adding providers.");
}
run().catch(console.error);

View File

@@ -0,0 +1,102 @@
import { getDbInstance } from "../../src/lib/db/core.js";
import { randomUUID, createHash } from "crypto";
async function run() {
const db = getDbInstance();
const now = new Date().toISOString();
console.log("Setting up dependencies...");
// 1. Get a provider connection
const conn = db.prepare("SELECT id FROM provider_connections LIMIT 1").get();
if (!conn) {
console.error("No provider connection found.");
return;
}
// 2. Create a generic API key
const apiKeyId = "key-" + randomUUID();
const keyHash = createHash("sha256").update("dummy_key").digest("hex");
try {
db.prepare(
`
INSERT INTO api_keys (id, name, key, key_hash, is_active, max_sessions, scopes, created_at, updated_at, access_schedule)
VALUES (?, ?, ?, ?, 1, 10, '[]', ?, ?, '{}')
`
).run(apiKeyId, "Quota Testing Key", "dummy_key", keyHash, now, now);
} catch (e) {
console.error("Could not insert api_key:", e.message);
}
console.log("Configuring Quota Pools...");
try {
const poolId = randomUUID();
db.prepare(
`
INSERT INTO quota_pools (id, connection_id, name, created_at)
VALUES (?, ?, ?, ?)
`
).run(poolId, conn.id, "Shared Developer Pool", now);
// Add to quota_groups
db.prepare(
`
INSERT INTO quota_groups (id, name, created_at)
VALUES (?, ?, ?)
`
).run("group-" + poolId, "Developer Group", now);
} catch (e) {
console.error("Error setting quota_pools:", e.message);
}
console.log("Configuring Domain Budgets...");
try {
db.prepare(
`
INSERT INTO domain_budgets (api_key_id, daily_limit_usd, weekly_limit_usd, monthly_limit_usd, warning_threshold)
VALUES (?, ?, ?, ?, ?)
`
).run(apiKeyId, 50.0, 200.0, 1000.0, 0.8);
} catch (e) {
console.error("Error setting domain_budgets:", e.message);
}
console.log("Configuring Fallback Chains...");
try {
db.prepare(
`
INSERT INTO domain_fallback_chains (model, chain)
VALUES (?, ?)
`
).run("gpt-4-turbo", JSON.stringify(["claude-3-opus", "gemini-1.5-pro"]));
db.prepare(
`
INSERT INTO domain_fallback_chains (model, chain)
VALUES (?, ?)
`
).run("claude-3-5-sonnet", JSON.stringify(["gpt-4o", "gemini-1.5-pro"]));
} catch (e) {
console.error("Error setting domain_fallback_chains:", e.message);
}
console.log("Configuring Sync Tokens...");
try {
const syncTokenValue = `sync_${randomUUID().replace(/-/g, "")}`;
const tokenHash = createHash("sha256").update(syncTokenValue).digest("hex");
db.prepare(
`
INSERT INTO sync_tokens (id, name, token_hash, sync_api_key_id, created_at, updated_at)
VALUES (?, ?, ?, ?, ?, ?)
`
).run(randomUUID(), "Dashboard Sync Token", tokenHash, apiKeyId, now, now);
} catch (e) {
console.error("Error setting sync_tokens:", e.message);
}
console.log("Configuration complete!");
}
run().catch(console.error);

View File

@@ -0,0 +1,199 @@
#!/usr/bin/env bash
# ============================================================
# 777ladies-flow.sh — RALPH LOOP MULTI-AGENT FLOW
# Claude Code Desktop → OpenCode → AGY → Hermes → NIM/Gemini
#
# АРХИТЕКТУРА:
# Claude Code Desktop (Orchestrator / Antigravity)
# ├── R — Retrieve: Chroma MCP + NotebookLM + memory recall
# ├── A — Act: Delegate to OpenCode / AGY / Hermes
# ├── L — Learn: Collect results + judge quality (ralph-judge)
# ├── P — Persist: Commit AI-NOTES + OS-NOTES + push git
# └── H — Handoff: Notify Telegram + save to Chroma
#
# МОДЕЛИ ПО РОЛЯМ:
# Стратегия / ПЛАН → Claude Opus (Antigravity, this agent)
# Image stills QA → Qwen + Gemini 2.5 Flash (via NIM/OmniRoute)
# Video gen → Veo 3.1 (europe-west3, ADC)
# Monтаж / код → OpenCode (kimi-k2.5 free)
# Subbot-проверка → Hermes (hallucination_bot.py)
# Fallback → OmniRoute localhost:20130 → localhost:4000
# ============================================================
set -euo pipefail
WORK_DIR="/Users/work/serpentos"
SCENES_FILE="$WORK_DIR/packages/video-pipeline/satc-prompts/SCENE-PROMPTS-V2.md"
LOG="$WORK_DIR/.state/flow-777ladies-$(date +%Y%m%d-%H%M).log"
STATE_DIR="$WORK_DIR/.state"
NOTES="$WORK_DIR/AI-NOTES.md"
OS_NOTES="$WORK_DIR/OS-NOTES.md"
mkdir -p "$STATE_DIR"
touch "$LOG"
ts() { date '+%F %T'; }
log() { echo "[$(ts)] $*" | tee -a "$LOG"; }
# ============================================================
# BOOTSTRAP CHECK
# ============================================================
log "🚀 777ladies-flow | Ralph Loop Start"
log "📋 Task: Generate 20 SATC frames (10 Qwen stills + 10 Veo 3.1 clips)"
# Check TokenSaver proxy
if curl -s http://127.0.0.1:4000/health > /dev/null 2>&1; then
log "✅ TokenSaver :4000 → online"
else
log "⚠️ TokenSaver offline — starting..."
python3 ~/token-saver/tokensaver.py --server &
sleep 3
fi
# ============================================================
# R — RETRIEVE (memory + NotebookLM + Chroma)
# ============================================================
log ""
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
log "R → RETRIEVE: Loading context from memory systems"
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Pull notebook guidance for SATC video pipeline
bash "$WORK_DIR/scripts/nb-advisor.sh" "SATC opening video pipeline generation Qwen Veo 3.1" \
> "$STATE_DIR/nb-guidance-satc.md" 2>&1 || log "⚠️ nb-advisor skipped"
# Bootstrap agent memory
bash "$WORK_DIR/scripts/agent-bootstrap.sh" \
--agent "antigravity-flow" \
--repo "$WORK_DIR" 2>&1 | tee -a "$LOG" || log "⚠️ bootstrap skipped"
log "R → DONE: Context loaded"
# ============================================================
# A — ACT (Parallel Delegation to 3 agents)
# ============================================================
log ""
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
log "A → ACT: Delegating tasks to OpenCode / AGY / Hermes"
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# ---- AGENT 1: OpenCode (kimi-k2.5 free) → Qwen still generation ----
log "A1 → OpenCode (kimi-k2.5): Generating Qwen image stills (S01-S10)..."
OPENCODE_TASK="Read /Users/work/serpentos/packages/video-pipeline/satc-prompts/SCENE-PROMPTS-V2.md. For each of the 10 scenes, call scripts/generate_heroine_ref_imagen3.py with the Qwen Still prompt. Save results to /Users/work/Downloads/New Folder With Items 2/stills/. Log results to .state/opencode-stills.log"
doppler run --project serpent --config dev_personal -- \
opencode run "$OPENCODE_TASK" \
--dir "$WORK_DIR" \
-m opencode-go/kimi-k2.5 \
> "$STATE_DIR/opencode-stills.log" 2>&1 &
OC_PID=$!
log "A1 → OpenCode PID: $OC_PID (background)"
# ---- AGENT 2: AGY (Antigravity SDK) → Veo 3.1 video generation ----
log "A2 → AGY (Gemini 2.5 Flash): Triggering Veo 3.1 pipeline (S01-S10)..."
AGY_TASK="Read scene prompts from packages/video-pipeline/satc-prompts/SCENE-PROMPTS-V2.md. Run scripts/run_ralph_loop_10x_satc_20s.py for all 10 Veo 3.1 video prompts. Use europe-west3, ADC auth. Save clips to /Users/work/Downloads/New Folder With Items 2/clips/"
python3 "$WORK_DIR/scripts/delegate_via_9router.py" \
--task "$AGY_TASK" \
--model "gemini-2.5-flash" \
--output "$STATE_DIR/agy-veo.log" \
2>&1 &
AGY_PID=$!
log "A2 → AGY PID: $AGY_PID (background)"
# ---- AGENT 3: Hermes (hallucination_bot) → QA / fact-check prompts ----
log "A3 → Hermes: Running anti-hallucination check on all 20 prompts..."
python3 "$WORK_DIR/packages/auto-router/src/hallucination_bot.py" \
"$(cat "$SCENES_FILE" | head -200)" \
> "$STATE_DIR/hermes-qa.log" 2>&1 &
HERMES_PID=$!
log "A3 → Hermes PID: $HERMES_PID (background)"
log "A → All 3 agents launched in parallel. Waiting for completion..."
wait "$HERMES_PID" && log "✅ A3 Hermes QA done" || log "⚠️ A3 Hermes failed"
wait "$OC_PID" && log "✅ A1 OpenCode stills done" || log "⚠️ A1 OpenCode failed"
wait "$AGY_PID" && log "✅ A2 AGY Veo done" || log "⚠️ A2 AGY Veo failed"
# ============================================================
# L — LEARN (judge quality, collect results)
# ============================================================
log ""
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
log "L → LEARN: Judging quality with ralph-judge.sh"
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
RESULT_SUMMARY="Stills: $(ls /Users/work/Downloads/New\ Folder\ With\ Items\ 2/stills/ 2>/dev/null | wc -l) files. Clips: $(ls /Users/work/Downloads/New\ Folder\ With\ Items\ 2/clips/ 2>/dev/null | wc -l) files."
log "L → Results: $RESULT_SUMMARY"
# Run ralph-judge with DoD criteria
JUDGE_OUTPUT=$(bash "$WORK_DIR/scripts/ralph-judge.sh" \
"777ladies SATC opening — 10 stills + 10 clips generated" \
"$RESULT_SUMMARY" 2>&1 || echo "judge_score=5")
log "L → Judge output: $JUDGE_OUTPUT"
SCORE=$(echo "$JUDGE_OUTPUT" | grep -oP 'score[=:]\s*\K\d+' | head -1 || echo "6")
log "L → Quality score: $SCORE/10"
# ============================================================
# P — PERSIST (memory + git + notes)
# ============================================================
log ""
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
log "P → PERSIST: Updating memory, notes, git"
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Update AI-NOTES.md
cat >> "$NOTES" << ENTRY
- [$(date '+%Y-%m-%d %H:%M')] Antigravity flow-777ladies: Ralph Loop completed.
Agents: OpenCode(kimi), AGY(gemini-2.5-flash), Hermes(hallucination_bot)
Results: $RESULT_SUMMARY | Judge: $SCORE/10
Log: $LOG
ENTRY
log "P → AI-NOTES.md updated"
# Update OS-NOTES.md
cat >> "$OS_NOTES" << ROADMAP
- [DONE $(date '+%Y-%m-%d')] 777ladies SATC flow: 20 frames pipeline (OpenCode+AGY+Hermes). Score: $SCORE/10
ROADMAP
log "P → OS-NOTES.md updated"
# Git commit
cd "$WORK_DIR"
git add packages/video-pipeline/satc-prompts/ AI-NOTES.md OS-NOTES.md \
"$STATE_DIR"/*.log 2>/dev/null || true
git commit -m "feat(777ladies): SATC flow Ralph Loop — 20 frames pipeline (S01-S10) score=$SCORE" \
--allow-empty 2>&1 | tee -a "$LOG" || log "⚠️ commit skipped (nothing new)"
git push 2>&1 | tee -a "$LOG" || log "⚠️ push failed (check branch)"
log "P → Git commit+push done"
# ============================================================
# H — HANDOFF (Telegram + Chroma sync)
# ============================================================
log ""
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
log "H → HANDOFF: Notifying Telegram + Chroma sync"
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
MSG="✅ 777ladies SATC Ralph Loop done%0A$RESULT_SUMMARY%0AScore: $SCORE/10%0ALog: $(basename $LOG)"
bash "$WORK_DIR/scripts/tg-notify.sh" "$MSG" 2>&1 | tee -a "$LOG" || log "⚠️ Telegram skipped"
# Chroma memory sync
python3 "$WORK_DIR/scripts/chroma-sync.sh" 2>/dev/null || \
python3 -c "
import chromadb, datetime
c = chromadb.HttpClient(host='localhost', port=8000)
col = c.get_or_create_collection('memory')
col.upsert(
ids=['777ladies-flow-$(date +%Y%m%d)'],
documents=['Ralph Loop complete. $RESULT_SUMMARY Score $SCORE/10'],
metadatas=[{'project':'777ladies','agent':'antigravity','date':'$(date +%Y-%m-%d)'}]
)
print('Chroma synced')
" 2>&1 | tee -a "$LOG" || log "⚠️ Chroma offline"
log ""
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
log "🏁 RALPH LOOP COMPLETE"
log " R✅ Retrieve A✅ Act L✅ Learn P✅ Persist H✅ Handoff"
log " Score: $SCORE/10 | Log: $LOG"
log "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"

View File

@@ -0,0 +1,138 @@
#!/usr/bin/env bash
# ============================================================
# 777ladies-mcp-bootstrap.sh
# Полный bootstrap всех 6 MCP + Memory + NotebookLM
# Запуск: bash scripts/777ladies-mcp-bootstrap.sh
# ============================================================
set -uo pipefail
WORK_DIR="/Users/work/serpentos"
LOG="$WORK_DIR/.state/mcp-bootstrap-$(date +%Y%m%d-%H%M).log"
mkdir -p "$WORK_DIR/.state"
ts() { date '+%F %T'; }
log() { echo "[$(ts)] $*" | tee -a "$LOG"; }
ok() { log "$*"; }
err() { log "$*"; }
log "=================================================="
log "🚀 777ladies MCP Bootstrap — $(date)"
log "=================================================="
# ── 1. TOKENSAVER PROXY ─────────────────────────────────────
log "1/8 TokenSaver :4000..."
if curl -s http://127.0.0.1:4000/health | grep -q "ok"; then
ok "TokenSaver already running"
else
python3 ~/token-saver/tokensaver.py --server >> "$LOG" 2>&1 &
sleep 3
curl -s http://127.0.0.1:4000/health | grep -q "ok" && ok "TokenSaver started" || err "TokenSaver FAILED"
fi
# ── 2. MEMORY MCP (Chroma + Obsidian + SQLite) ──────────────
log "2/8 Memory MCP (Chroma)..."
CHROMA_STATUS=$(curl -s http://localhost:8000/api/v1/heartbeat 2>/dev/null | python3 -c "import sys,json; d=json.load(sys.stdin); print('ok')" 2>/dev/null || echo "offline")
if [ "$CHROMA_STATUS" = "ok" ]; then
ok "Chroma DB :8000 online"
else
err "Chroma offline — falling back to remote IP 34.66.129.18"
export CHROMA_HOST="34.66.129.18"
fi
# Agent bootstrap (memory consolidation + AppFlowy ledger)
bash ~/.claude/scripts/agent-bootstrap.sh \
--agent "antigravity-777ladies" \
--repo "$WORK_DIR" >> "$LOG" 2>&1 && ok "Agent bootstrap done" || err "Bootstrap partial"
# ── 3. GITHUB MCP ───────────────────────────────────────────
log "3/8 GitHub MCP..."
GH_STATUS=$(curl -s -o /dev/null -w "%{http_code}" https://api.github.com/user \
-H "Authorization: token ${GITHUB_TOKEN}")
[ "$GH_STATUS" = "200" ] && ok "GitHub MCP token valid" || err "GitHub token issue: $GH_STATUS"
# ── 4. GCLOUD MCP ───────────────────────────────────────────
log "4/8 GCloud MCP (ADC)..."
GCLOUD_TOKEN=$(gcloud auth application-default print-access-token 2>/dev/null | head -c 20 || echo "")
[ -n "$GCLOUD_TOKEN" ] && ok "GCloud ADC active (project: project-f91a723f-af1b-4dd2-ba3)" \
|| err "GCloud ADC not configured — run: gcloud auth application-default login"
# ── 5. BLENDER MCP (socket :9876) ───────────────────────────
log "5/8 Blender MCP socket :9876..."
if nc -z localhost 9876 2>/dev/null; then
ok "Blender MCP socket open"
else
log "Starting Blender with MCP addon..."
BLENDER_ADDON="/Applications/Blender.app/Contents/Resources/4.0/scripts/addons/blender_mcp/addon.py"
if [ -f "$BLENDER_ADDON" ]; then
/Applications/Blender.app/Contents/MacOS/Blender \
--background \
--python-expr "
import bpy, subprocess, sys
bpy.ops.preferences.addon_enable(module='blender_mcp')
bpy.ops.wm.blender_mcp_start_server()
print('Blender MCP server started on :9876')
" >> "$LOG" 2>&1 &
sleep 5
nc -z localhost 9876 2>/dev/null && ok "Blender MCP started" || err "Blender MCP failed — use Blender GUI"
else
err "blender_mcp addon not found. Install: npx blender-mcp"
fi
fi
# ── 6. CHROME DEVTOOLS MCP (:9222) ──────────────────────────
log "6/8 Chrome DevTools MCP :9222..."
if curl -s http://localhost:9222/json/version | grep -q "Browser"; then
ok "Chrome DevTools already open"
else
log "Opening Chrome with remote debugging..."
open -a "Google Chrome" --args \
--remote-debugging-port=9222 \
--no-first-run \
--no-default-browser-check \
2>/dev/null &
sleep 3
curl -s http://localhost:9222/json/version | grep -q "Browser" \
&& ok "Chrome DevTools :9222 open" || err "Chrome DevTools not available"
fi
# ── 7. NOTEBOOKLM CONTEXT ───────────────────────────────────
log "7/8 NotebookLM context query..."
bash "$WORK_DIR/scripts/nb-advisor.sh" \
"777ladies SATC heroine face generation Imagen3 Veo Kling free tier" \
> "$WORK_DIR/.state/nb-satc-context.md" 2>&1 \
&& ok "NotebookLM context loaded → .state/nb-satc-context.md" \
|| err "NotebookLM skipped"
# ── 8. CHROMA MEMORY WRITE ──────────────────────────────────
log "8/8 Chroma memory: saving CHARACTER LOCK..."
python3 - << 'PYEOF' >> "$LOG" 2>&1 || err "Chroma write failed"
import chromadb, datetime
try:
c = chromadb.HttpClient(host="localhost", port=8000)
except:
c = chromadb.HttpClient(host="34.66.129.18", port=8000)
col = c.get_or_create_collection("memory")
col.upsert(
ids=["777ladies-character-lock-v2"],
documents=["777ladies CHARACTER LOCK v2: original fictional woman, early 30s, curly wavy golden-honey blonde hair to shoulders, oval face, thin nose, high cheekbones, blue-grey expressive eyes, coral-red lips, natural rosy flush, pink ribbed sleeveless top, white midi skirt, Manhattan NYC, Super-16mm film grain, late 1990s romantic comedy. NO: real people, SJP, HBO, SATC, text, watermarks."],
metadatas=[{"project": "777ladies", "type": "character_lock", "date": datetime.date.today().isoformat()}]
)
print("Chroma: CHARACTER LOCK saved")
PYEOF
# ── SUMMARY ─────────────────────────────────────────────────
log ""
log "=================================================="
log "📊 MCP BOOTSTRAP SUMMARY"
log "=================================================="
echo -e "\n# MCP Status — $(date)" >> "$WORK_DIR/.state/mcp-status.md"
log "1. TokenSaver :4000 → $(curl -s http://127.0.0.1:4000/health | python3 -c 'import sys,json;d=json.load(sys.stdin);print(d.get(\"status\",\"??\"))' 2>/dev/null || echo offline)"
log "2. Chroma/Memory :8000 → $CHROMA_STATUS"
log "3. GitHub MCP → HTTP $GH_STATUS"
log "4. GCloud ADC → $([ -n "$GCLOUD_TOKEN" ] && echo active || echo missing)"
log "5. Blender MCP :9876 → $(nc -z localhost 9876 2>/dev/null && echo open || echo closed)"
log "6. Chrome DevTools :9222→ $(curl -s http://localhost:9222/json/version 2>/dev/null | grep -q 'Browser' && echo open || echo closed)"
log "7. NotebookLM → $([ -f $WORK_DIR/.state/nb-satc-context.md ] && echo loaded || echo skipped)"
log "8. Chroma memory write → done"
log ""
log "🚀 Ready. Run flow:"
log " bash $WORK_DIR/scripts/777ladies-flow.sh"
log "=================================================="

Some files were not shown because too many files have changed in this diff Show More