Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

963 B
Raw Blame
import { describe, expect, it } from "vitest";

import {
  emptySuspendedRouteAttempts,
  holdSuspendedRouteAttempt,
  releaseSuspendedRouteAttempt,
} from "./suspendedRouteAttempts";

describe("suspended route attempts", () => {
  it("settles only the matching backend", () => {
    const claude = {
      backend: "claude" as const,
      modelId: "claude-model",
      stage: "initial" as const,
      manual_override: { hops: [] },
      submitted: [],
    };
    const codex = {
      backend: "codex" as const,
      modelId: "codex-model",
      stage: "confirmed" as const,
      manual_override: { hops: [] },
      submitted: [],
    };
    const held = holdSuspendedRouteAttempt(
      holdSuspendedRouteAttempt(emptySuspendedRouteAttempts(), claude),
      codex,
    );

    const remaining = releaseSuspendedRouteAttempt(held, "codex");

    expect(remaining.get("claude")).toEqual(claude);
    expect(remaining.has("codex")).toBe(false);
  });
});