/** * Default no-op stubs for workspace getter methods on WorkspaceMutationsService. * Spread into test mocks to satisfy the interface without implementing every method. * * @internal Test-only. Not exported from the barrel. */ import * as Effect from "effect/Effect"; import type { WorkspaceMutationsService, ReadModelRecordRow, PackagingKind } from "./index.js"; import type { AppError } from "../app-error/index.js"; import type { ExtensionInventory } from "./read-model/extensions/inventory.js"; import { type McpServerLockEntry, type RegistryPackLockEntry, type SkillLockEntry } from "../lockfile/index.js"; import { type InstallableExtensionType } from "../extensions/index.js"; import { type Handle } from "../extensions/handle.js"; import { type Version } from "../version-constraints/version-constraints.js"; type WorkspaceMockOverrides = Partial & Partial; /** * Build a `configured` read-model row. Tests that previously stubbed * `getConfiguredSkills` with a `{ name: { source, enabled } }` map supply the * same facts here and feed the result to {@link rowsFor}. */ export declare const configuredRow: (args: { readonly type: InstallableExtensionType; readonly name: string; readonly source: string; readonly enabled?: boolean; readonly packagingKind?: PackagingKind; }) => ReadModelRecordRow; /** Build an `implicit` read-model row (pack member or lockfile-only entry). */ export declare const implicitRow: (args: { readonly type: InstallableExtensionType; readonly name: string; readonly source?: string; readonly packagingKind?: PackagingKind; }) => ReadModelRecordRow; /** Build an `unmanaged` read-model row (observed on disk, unclaimed). */ export declare const unmanagedRow: (args: { readonly type: InstallableExtensionType; readonly name: string; readonly locations?: ReadonlyArray; readonly packagingKind?: PackagingKind; }) => ReadModelRecordRow; /** * Build a `records.rows` stub from per-type row lists. Types absent from the * map yield an empty array, matching the real reader's totality. */ export declare const rowsFor: (byType: Partial>>) => (type: InstallableExtensionType) => Effect.Effect, AppError>; /** * No-op stubs for all read-model record getters. Spread into mock objects: * ```ts * const ws: WorkspaceMutationsService = { * records: readModelRecordStubs, * // your overrides * }; * ``` */ export declare const readModelRecordStubs: { readonly getInventory: () => Effect.Effect<{ items: never[]; count: number; configuredCount: number; implicitCount: number; installedCount: number; unmanagedCount: number; }, never, never>; readonly getExtensionInventory: () => Effect.Effect; readonly rows: () => Effect.Effect, AppError>; }; /** * Base workspace mock with no-op defaults for all methods. * Tests should only override the methods they exercise. * * @example * ```ts * const ws = makeBaseWorkspaceMock("/tmp/axm", { * setSkill: vi.fn(() => Effect.void), * }); * ``` */ export declare const makeBaseWorkspaceMock: (axmDir?: string, overrides?: WorkspaceMockOverrides) => WorkspaceMutationsService; export declare const TEST_CONTENT_IDENTITY: string & import("effect/Brand").Brand<"SourceHash">; export declare const TEST_TREE_INTEGRITY: string & import("effect/Brand").Brand<"TreeIntegrity">; export interface WriteWorkspaceFilesOptions { readonly agents?: ReadonlyArray | undefined; readonly owner?: string | undefined; readonly skills?: Record | undefined; readonly mcps?: Record | undefined; readonly subagents?: Record | undefined; readonly rules?: Record | undefined; readonly packs?: Record | undefined; readonly sources?: ReadonlyArray | undefined; readonly lockfileSkills?: Record | undefined; readonly lockfileMcpServers?: Record | undefined; readonly lockfileSubagents?: Record | undefined; readonly lockfileRules?: Record | undefined; readonly lockfilePacks?: Record | undefined; } export declare const writeWorkspaceFiles: (runtimeDir: string, opts?: WriteWorkspaceFilesOptions) => void; export declare const makeLocalSkillLockEntry: (opts?: { readonly path?: string; readonly agents?: ReadonlyArray; readonly installedAt?: unknown; readonly updatedAt?: unknown; }) => SkillLockEntry; export declare const makeRegistrySkillLockEntry: (opts: { readonly owner: Handle; readonly name: string; readonly resolvedVersion?: Version; readonly integrity?: string; readonly sourceName?: string; readonly endpoint?: URL; readonly publisherBindingId?: string; readonly agents?: ReadonlyArray; readonly installedAt?: unknown; readonly updatedAt?: unknown; }) => SkillLockEntry; export declare const makeRegistryMcpServerLockEntry: (opts: { readonly owner: Handle; readonly name: string; readonly resolvedVersion?: Version; readonly integrity?: string; readonly sourceName?: string; readonly endpoint?: URL; readonly publisherBindingId?: string; readonly installedAt?: unknown; readonly updatedAt?: unknown; }) => McpServerLockEntry; export declare const makeRegistryPackLockEntry: (opts: { readonly owner: Handle; readonly name: string; readonly resolvedVersion?: Version; readonly integrity?: string; readonly sourceName?: string; readonly endpoint?: URL; readonly publisherBindingId?: string; readonly sourceHash?: string; readonly resolvedSkills?: Readonly>; readonly resolvedMcpServers?: Readonly>; readonly resolvedSubagents?: Readonly>; readonly installedAt?: unknown; readonly updatedAt?: unknown; }) => RegistryPackLockEntry; export {}; //# sourceMappingURL=test-stubs.d.ts.map