chore: reorg files

This commit is contained in:
2026-10-10 15:00:15 +02:00
parent c853cca9cf
commit ced43fbb11
28 changed files with 35 additions and 32 deletions
+1 -1
View File
@@ -2,7 +2,7 @@ import { afterEach, beforeEach, expect, test } from "bun:test";
import { mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { ClaudeQuotaTracker, normalizeClaudeQuota } from "../src/claude-quota.js";
import { ClaudeQuotaTracker, normalizeClaudeQuota } from "../src/quota/claude-quota.js";
const payload = {
five_hour: { utilization: 12.5, resets_at: "2026-10-07T12:00:00+00:00" },
+1 -1
View File
@@ -1,7 +1,7 @@
import { Plugin, Model, Provider } from "@opencode/plugin/effect";
import { fromPromise } from "@opencode/plugin/promise/adapter";
import { Effect } from "effect";
import agents from "../../src/agents.js";
import agents from "../../src/agents/agents.js";
export default Plugin.define({
id: agents.id,
+1 -1
View File
@@ -6,7 +6,7 @@ import { Tool } from "@opencode/schema/tool";
import { Cause, Effect } from "effect";
import { z } from "zod";
import { appendFile } from "node:fs/promises";
import multiWork from "../../src/multi-work.js";
import multiWork from "../../src/multi-work/multi-work.js";
const probe = Rpc.define({
id: "multi-work-test",
+1 -1
View File
@@ -2,7 +2,7 @@ import { afterEach, expect, test } from "bun:test";
import { mkdir, mkdtemp, rm } from "node:fs/promises";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { command, Herdr } from "../src/herdr.js";
import { command, Herdr } from "../src/multi-work/herdr.js";
const directories: string[] = [];
afterEach(async () => {
+2 -2
View File
@@ -9,8 +9,8 @@ import type { ToolEditor, ToolHooks } from "@opencode/plugin/effect/tool";
import type { AgentEditor } from "@opencode/plugin/effect/agent";
import type { SessionContext } from "@opencode/plugin/effect/session";
import { z } from "zod";
import { Herdr, type HerdrRoot } from "../src/herdr.js";
import { bindingKey, bindingSchema, installMultiWork } from "../src/multi-work.js";
import { Herdr, type HerdrRoot } from "../src/multi-work/herdr.js";
import { bindingKey, bindingSchema, installMultiWork } from "../src/multi-work/multi-work.js";
class FixtureHerdr extends Herdr {
eligible = true;
+3 -3
View File
@@ -7,10 +7,10 @@ import type { SkillEditor } from "@opencode/plugin/promise/skill";
import type { DeepMutable } from "@opencode/plugin/promise/types";
import type { Skill } from "@opencode/schema/skill";
import type { ModelInfo } from "@opencode/client";
import plugin from "../src/agents.js";
import { model } from "../src/model.js";
import plugin from "../src/agents/agents.js";
import { model } from "../src/agents/model.js";
import { z } from "zod";
import { AgentsRpc } from "../src/agents-rpc.js";
import { AgentsRpc } from "../src/agents/agents-rpc.js";
const cleanups: Plugin.Cleanup[] = [];
afterEach(async () => {
+2 -2
View File
@@ -1,7 +1,7 @@
import { expect, test } from "bun:test";
import type { Plugin } from "@opencode/plugin";
import quota from "../src/quota-plugin.js";
import { QuotaRpc } from "../src/quota-rpc.js";
import quota from "../src/quota/quota-plugin.js";
import { QuotaRpc } from "../src/quota/quota-rpc.js";
test("Quota loads independently and retains its RPC ID and nullable status", async () => {
let controller: ReadableStreamDefaultController<unknown>;
+1 -1
View File
@@ -1,6 +1,6 @@
import { expect, test } from "bun:test";
import type { Schema } from "effect";
import { normalizeQuota, QuotaTracker } from "../src/quota.js";
import { normalizeQuota, QuotaTracker } from "../src/quota/quota.js";
const plus = {
plan_type: "plus",
+2 -2
View File
@@ -4,7 +4,7 @@ import type { Route, SlotMap } from "@opencode/plugin/tui/context";
import { testRender, type JSX } from "@opentui/solid";
import { createSignal } from "solid-js";
import { build } from "../scripts/build.js";
import type { QuotaStatus } from "../src/quota.js";
import type { QuotaStatus } from "../src/quota/quota.js";
type SidebarSlotRender = (input: { readonly sessionID: string }) => JSX.Element;
type HomeSlotRender = (input: SlotMap["prompt.footer"]) => JSX.Element;
@@ -27,7 +27,7 @@ const status = (plan: string, remaining: number): QuotaStatus => ({
test("built quota slot stays reactive across pending, empty, failure, update, and session states", async () => {
await build();
// Resolve the built bundle at runtime; tsc runs before build creates dist/tui.js.
const tui: typeof import("../src/tui.js") = await import(
const tui: typeof import("../src/quota/tui.js") = await import(
new URL("../dist/tui.js", import.meta.url).href
);
const { default: plugin } = tui;