refactor: switch small standalone namespaces to self-reexport imports

This commit is contained in:
Kit Langton
2026-04-16 11:25:50 -04:00
parent a9248fbb4a
commit 70c40a12e5
8 changed files with 6 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ import { Provider } from "@/provider"
import { ProviderAuth } from "@/provider"
import { Agent } from "@/agent/agent"
import { Skill } from "@/skill"
import { Discovery } from "@/skill"
import { Discovery } from "@/skill/discovery"
import { Question } from "@/question"
import { Permission } from "@/permission"
import { Todo } from "@/session/todo"

View File

@@ -159,3 +159,4 @@ const ARITY: Record<string, number> = {
"yarn dlx": 3, // yarn dlx create-react-app
"yarn run": 3, // yarn run dev
}
export * as BashArity from "./arity"

View File

@@ -1,2 +1 @@
export * as Permission from "./permission"
export * as BashArity from "./arity"

View File

@@ -112,3 +112,4 @@ export const defaultLayer: Layer.Layer<Service> = layer.pipe(
Layer.provide(AppFileSystem.defaultLayer),
Layer.provide(NodePath.layer),
)
export * as Discovery from "./discovery"

View File

@@ -1,2 +1 @@
export * as Skill from "./skill"
export * as Discovery from "./discovery"

View File

@@ -14,7 +14,7 @@ import { fileURLToPath } from "url"
import { Flag } from "@/flag/flag"
import { Shell } from "@/shell/shell"
import { BashArity } from "@/permission"
import { BashArity } from "@/permission/arity"
import * as Truncate from "./truncate"
import { Plugin } from "@/plugin"
import { Effect, Stream } from "effect"

View File

@@ -1,5 +1,5 @@
import { test, expect } from "bun:test"
import { BashArity } from "../../src/permission"
import { BashArity } from "../../src/permission/arity"
test("arity 1 - unknown commands default to first token", () => {
expect(BashArity.prefix(["unknown", "command", "subcommand"])).toEqual(["unknown"])

View File

@@ -1,6 +1,6 @@
import { describe, test, expect, beforeAll, afterAll } from "bun:test"
import { Effect } from "effect"
import { Discovery } from "../../src/skill"
import { Discovery } from "../../src/skill/discovery"
import { Global } from "../../src/global"
import { Filesystem } from "../../src/util"
import { rm } from "fs/promises"