Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/website-api/src/api-markdown.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/** Frontmatter descriptions render as plain text, so a code mark would show as a character. */
export function plainDescription(description: string): string {
function plainDescription(description: string): string {
return description.replaceAll("`", "");
}

Expand Down Expand Up @@ -27,7 +27,7 @@ export function rewriteApiLinks(markdown: string): string {
});
}

export interface IndexEntry {
interface IndexEntry {
readonly specifier: string;
readonly slug: string;
readonly blurb: string;
Expand Down
6 changes: 3 additions & 3 deletions apps/website/src/features/demo/snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export interface Token {
readonly swap?: boolean;
}

export interface DemoAgent {
interface DemoAgent {
readonly id: string;
readonly mine: boolean;
readonly enabled: boolean;
Expand Down Expand Up @@ -112,15 +112,15 @@ export function taskLabel(task: TaskKey): CopyKey {
return taskSpec(task).label;
}

export function agentSupports(row: SupportRow, task: TaskKey): boolean {
function agentSupports(row: SupportRow, task: TaskKey): boolean {
const capability = taskSpec(task).capability;
if (capability === null) {
return true;
}
return row[capability];
}

export function isSelectable(agentId: string, task: TaskKey, rows: readonly SupportRow[]): boolean {
function isSelectable(agentId: string, task: TaskKey, rows: readonly SupportRow[]): boolean {
if (agentId === MY_AGENT) {
return true;
}
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/features/docs/guide-paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const ENTRY_GUIDE_SLUG = {
"/lanes": "coordination/lanes"
} as const;

export type GuideEntry = keyof typeof ENTRY_GUIDE_SLUG;
type GuideEntry = keyof typeof ENTRY_GUIDE_SLUG;

export function docsIndex(): "/docs" {
return "/docs";
Expand Down
2 changes: 1 addition & 1 deletion apps/website/src/features/layer/layer-paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function isLayerFn(name: string): name is LayerFn {
return (CONNECTION_FNS as readonly string[]).includes(name) || (COORDINATION_FNS as readonly string[]).includes(name);
}

export function isCoordinationFn(name: LayerFn): boolean {
function isCoordinationFn(name: LayerFn): boolean {
return (COORDINATION_FNS as readonly string[]).includes(name);
}

Expand Down
2 changes: 1 addition & 1 deletion infra/architecture/boundaries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export interface PackageRule {
readonly publicImports?: Readonly<Record<string, string>>;
}

export interface LayerRule {
interface LayerRule {
/** Layers of the same package this layer may import. */
readonly layers: readonly Layer[];
/**
Expand Down
5 changes: 2 additions & 3 deletions knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ function sourceEntries(
.map(sourcePath => `${sourcePath}!`);
}

// The inline *.test.ts files are discovered by vitest. Unused exports/types are staged for a
// dedicated cleanup pass; configuration and tag hints still fail the run.
// The inline *.test.ts files are discovered by vitest. Configuration and tag hints fail the run.
const config: KnipConfig = {
...knip,
exclude: ['exports', 'types', 'duplicates'],

// eslint-plugin-boundaries and oxlint-plugin-eslint are declared in infra/architecture and load
// through withBoundaryLint in every package's vite.config.ts; eslint-import-resolver-typescript
// is referenced by name inside the boundaries resolver options; @effect/language-service is a
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"changeset": "changeset",
"check": "pnpm run format:check && pnpm run build && pnpm run lint && pnpm run typecheck && pnpm run test && pnpm run check:package",
"check:package": "pnpm -r run check:package",
"duplicates:audit": "jscpd --config node_modules/@perfectpan/lint-config/jscpd-audit.json packages apps infra scripts tests --absolute --output tmp/duplicates-audit --ignore '**/node_modules/**,**/dist/**,**/coverage/**,**/.vite/**,**/*.json' --format 'typescript'",
"duplicates": "jscpd --config node_modules/@perfectpan/lint-config/jscpd.json packages apps infra scripts tests --ignore '**/node_modules/**,**/dist/**,**/coverage/**,**/.vite/**,**/.source/**,**/.tanstack/**,**/routeTree.gen.ts,**/*.json,**/*.test.ts,**/*.test.tsx,**/test/support/**,**/test/fixtures/**' --format 'typescript,tsx'",
"duplicates:audit": "jscpd --config node_modules/@perfectpan/lint-config/jscpd-audit.json packages apps infra scripts tests --absolute --output tmp/duplicates-audit --ignore '**/node_modules/**,**/dist/**,**/coverage/**,**/.vite/**,**/.source/**,**/.tanstack/**,**/routeTree.gen.ts,**/*.json' --format 'typescript,tsx'",
"format": "pnpm -r run format",
"format:check": "pnpm -r run format:check",
"knip": "knip",
Expand Down
4 changes: 2 additions & 2 deletions packages/acp/src/application/services/wire.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,14 @@ export interface AgentInfo {
readonly title?: string;
}

export interface Handshake {
interface Handshake {
readonly protocolVersion: number;
readonly features: AgentFeatures;
readonly authMethods: readonly AuthMethodInfo[];
readonly agentInfo?: AgentInfo;
}

export interface SessionParams {
interface SessionParams {
readonly cwd: string;
readonly mcpServers: readonly McpServerConfig[];
readonly meta?: Record<string, unknown>;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
export interface SessionOpened {
interface SessionOpened {
readonly _tag: "SessionOpened";
readonly sessionId: string;
}

export interface TurnStarted {
interface TurnStarted {
readonly _tag: "TurnStarted";
readonly sessionId: string;
readonly turn: number;
}

export interface CancelRequested {
interface CancelRequested {
readonly _tag: "CancelRequested";
readonly sessionId: string;
readonly turn: number;
}

export interface TurnFinished {
interface TurnFinished {
readonly _tag: "TurnFinished";
readonly sessionId: string;
readonly turn: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/acp/test/support.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
type PromptBlock
} from "../src/public.js";

export const FAKE_AGENT: string = fileURLToPath(new URL("fixtures/fake-agent.ts", import.meta.url));
const FAKE_AGENT: string = fileURLToPath(new URL("fixtures/fake-agent.ts", import.meta.url));

/** The fake agent as a profile: Node runs the fixture, and the system prompt goes to `_meta.systemPrompt`. */
export function fakeProfile(overrides: Partial<AcpProfile> = {}): AcpProfile {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export interface LanesConfig<E, R> {
}

/** Why the lanes interrupted an activation. */
export type ActivationInterruptReason = "cancel" | "close" | "timeout";
type ActivationInterruptReason = "cancel" | "close" | "timeout";

/**
* How an activation ended. An activation that succeeded or failed by itself is reported so even when a cancel, close
Expand All @@ -48,12 +48,12 @@ export type ActivationExit<E> =
| { readonly _tag: "ActivationInterrupted"; readonly key: string; readonly reason: ActivationInterruptReason };

/** `close` ran, or the Scope that created the lanes closed. */
export interface LanesClosed {
interface LanesClosed {
readonly _tag: "LanesClosed";
readonly key: string;
}

export interface LanesStatus {
interface LanesStatus {
readonly running: number;
readonly queued: number;
readonly closed: boolean;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
/** The wake joined an activation that has not started yet: the queued one, or the one after the running one. */
export interface WakeCoalesced {
interface WakeCoalesced {
readonly _tag: "WakeCoalesced";
readonly key: string;
}

/** The lane joined the end of the queue to wait for a free slot. */
export interface LaneQueued {
interface LaneQueued {
readonly _tag: "LaneQueued";
readonly key: string;
}

/** The lane left the queue, because it got a slot or was cancelled. */
export interface LaneDequeued {
interface LaneDequeued {
readonly _tag: "LaneDequeued";
readonly key: string;
}

export interface ActivationStarted {
interface ActivationStarted {
readonly _tag: "ActivationStarted";
readonly key: string;
}

export interface ActivationEnded {
interface ActivationEnded {
readonly _tag: "ActivationEnded";
readonly key: string;
}

/** A cancel dropped the wake a running lane owed, so no activation follows the running one. */
export interface PendingDropped {
interface PendingDropped {
readonly _tag: "PendingDropped";
readonly key: string;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* `idle`: nothing runs and nothing is owed. `queued`: woken while every slot was taken, waiting for one. `running`: one
* activation runs.
*/
export type LaneState = "idle" | "queued" | "running";
type LaneState = "idle" | "queued" | "running";

export interface LaneSnapshot {
readonly key: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export interface LeaseConfig {
readonly retryMs?: number;
}

export interface AcquireOptions {
interface AcquireOptions {
/**
* Keep trying every `retryMs` while the lease is held or the repository is busy (a guard that stays locked),
* instead of failing with `LeaseHeld` or a `busy` `LeaseRepositoryFailure`. The wait ends when the lease is taken,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export interface LeaseAcquired {
interface LeaseAcquired {
readonly _tag: "LeaseAcquired";
readonly key: string;
readonly generation: number;
Expand All @@ -7,14 +7,14 @@ export interface LeaseAcquired {
readonly previousHolderId: string | null;
}

export interface LeaseRenewed {
interface LeaseRenewed {
readonly _tag: "LeaseRenewed";
readonly key: string;
readonly generation: number;
readonly revision: number;
}

export interface LeaseReleased {
interface LeaseReleased {
readonly _tag: "LeaseReleased";
readonly key: string;
readonly generation: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-kit-collab/test/support/workers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const WORKER_TEST_TIMEOUT_MS = 30_000;
const workerLine = z.looseObject({ event: z.string() });

/** One JSON line a worker printed. */
export type WorkerLine = Readonly<z.infer<typeof workerLine>>;
type WorkerLine = Readonly<z.infer<typeof workerLine>>;

export interface Worker {
readonly pid: number;
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-kit/src/providers/acp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { dimAcpProfile } from "@rivus/agent-kit-provider-dim/acp";
import { mergeService } from "./merge.js";
import type { Provider } from "./types.js";

export const builtinAcpProfiles: AcpProfiles = {
const builtinAcpProfiles: AcpProfiles = {
"claude-code": claudeCodeAcpProfile,
codex: codexAcpProfile,
dsh: dshAcpProfile,
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-kit/src/providers/discovery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { kimiProbe } from "@rivus/agent-kit-provider-kimi/discovery";
import { mergeService } from "./merge.js";
import type { Provider } from "./types.js";

export const builtinProbeRecipes: {
const builtinProbeRecipes: {
readonly codex: typeof codexProbe;
readonly "claude-code": typeof claudeCodeProbe;
readonly grok: typeof grokProbe;
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-kit/src/providers/identity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { dim } from "@rivus/agent-kit-provider-dim/identity";
import { mergeService } from "./merge.js";
import type { Provider } from "./types.js";

export const builtinCodingAgents: {
const builtinCodingAgents: {
readonly codex: typeof codex;
readonly dsh: typeof dsh;
readonly "claude-code": typeof claudeCode;
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-kit/src/providers/install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import { zcodeInstallAdapter } from "@rivus/agent-kit-provider-zcode/install";
import { mergeService } from "./merge.js";
import type { Provider } from "./types.js";

export const builtinInstallAdapters: {
const builtinInstallAdapters: {
readonly codex: typeof codexInstallAdapter;
readonly "claude-code": typeof claudeCodeInstallAdapter;
readonly grok: typeof grokInstallAdapter;
Expand Down
2 changes: 1 addition & 1 deletion packages/agent-kit/src/providers/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { geminiCliSessionAdapter } from "@rivus/agent-kit-provider-gemini-cli/se
import { mergeService } from "./merge.js";
import type { Provider } from "./types.js";

export const builtinSessionAdapters: {
const builtinSessionAdapters: {
readonly codex: typeof codexSessionAdapter;
readonly dsh: typeof dshSessionAdapter;
readonly opencode: typeof opencodeSessionAdapter;
Expand Down
2 changes: 1 addition & 1 deletion packages/discovery/src/application/services/host-paths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ function recipeHomeRule(
}

/** Every path a recipe checks, including its credential files. */
export function recipePaths(recipe: ProbeRecipe): ProbePath[] {
function recipePaths(recipe: ProbeRecipe): ProbePath[] {
return [
...recipe.appPaths,
...recipe.configPaths,
Expand Down
2 changes: 1 addition & 1 deletion packages/discovery/src/application/services/run-probe.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const OutputLimit = z.looseObject({ code: z.literal(OUTPUT_LIMIT_CODE) });
* Windows runs `.cmd` and `.bat` files only through `cmd.exe`, and Node refuses to spawn them without a shell. npm
* installs agents as such shims, so on Windows they are found but never run.
*/
export function isShellShim(platform: Pick<DiscoveryPlatform, "os">, path: string): boolean {
function isShellShim(platform: Pick<DiscoveryPlatform, "os">, path: string): boolean {
return platform.os === "win32" && /\.(?:cmd|bat)$/i.test(path);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export function saveLedger(
* Resolves the operations an interrupted modification left pending from probes of their targets, never by
* replaying them, and saves the result. Must run under the LedgerLock.
*/
export function recoverPending(
function recoverPending(
scope: LedgerScope,
loaded: LoadedLedger,
registrations?: RegistrationLookup
Expand Down
2 changes: 1 addition & 1 deletion packages/harness/src/application/use-cases/plan-install.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ export interface PlanInput {
* The content a step leaves at its target, or `undefined` when it leaves nothing or does not write there.
* The executor resolves a restored pre-image from its blob reference.
*/
export function contentAfter(
function contentAfter(
scope: LedgerScope,
step: PlanStep,
ledger: Ledger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function foreignSource(file: ForeignHookFile, runner: CodingAgentId): LegacyHook
* files the selected runners execute (see `foreignHookFiles`). A grouped file is one source under `/hooks`; a flat
* file is one source per runner event, its pointer naming the JSON-escaped event.
*/
export function legacyHookSources(
function legacyHookSources(
owner: OwnerSnapshot,
agents: readonly CodingAgentId[],
adapters: InstallAdapters,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function bundleFiresEvent(
* runner; the owner tracks it in its ledger; and the plan leaves it where it is (no step, or a removal other than a
* delete). Replacing the file would silently drop that consumer's hook, so this is an unresolvable conflict.
*/
export function retainsForeignHook(
function retainsForeignHook(
item: ForeignHookObservation,
context: {
readonly bundle: BundleSnapshot;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { CodingAgentId } from "@rivus/agent-kit-catalog/public";
import type { LedgerEntry } from "../../ledger/entities/ledger-entry.js";
import type { PlanStepSnapshot } from "../value-objects/plan-step.js";

export type RegistrationPurpose = "register" | "unregister";
type RegistrationPurpose = "register" | "unregister";

export interface RegistrationCommands {
/** The agent whose command line acts: the step's first, falling back to the ledger entry's first. */
Expand Down
Loading
Loading