import type { CommandFn, ExecContext, RegisteredCommand } from '../../commands/config.ts'; import type { OpKwargs } from '../../ops/registry.ts'; import type { CommandSpec, FlagValue } from '../../commands/spec/types.ts'; import type { ByteSource } from '../../io/types.ts'; import { IOResult } from '../../io/types.ts'; import type { CacheManager } from '../../cache/manager.ts'; import type { RegisteredOp } from '../../ops/registry.ts'; import type { Resource } from '../../resource/base.ts'; import { type Limit, ConsistencyPolicy, MountMode, PathSpec } from '../../types.ts'; export interface MountInit { prefix: string; resource: Resource; mode?: MountMode; consistency?: ConsistencyPolicy; } export declare class MountEntry { readonly prefix: string; readonly resource: Resource; readonly mode: MountMode; readonly consistency: ConsistencyPolicy; /** * Per-path revision pins installed at Workspace.load time. Read * functions consult these via the {@link revisionFor} contextvar * lookup; on a hit, the backend GET pins to the recorded revision so * replay serves the exact bytes the agent saw. Empty during normal * runs; populated only by the snapshot loader. */ readonly revisions: Map; cacheManager: CacheManager | null; private readonly cmds; private readonly generalCmds; private readonly cmdSpecs; readonly commandLimits: Map; private readonly ops; private readonly generalOps; private readonly crossCmds; private prefixIndex; constructor(init: MountInit); /** * This mount's mode narrowed by the current session's cap. The * configured mode is the ceiling; a session's mode can only weaken it. */ effectiveMode(): MountMode; register(cmd: RegisteredCommand): void; registerGeneral(cmd: RegisteredCommand): void; resolveCommand(cmdName: string, extension?: string | null): RegisteredCommand | null; /** * How many leading words form a registered command name here. Command * names may span several words ("gws docs documents get"), git-style. * Returns the length of the longest registered name that is a prefix of * `words`, or 1 (the bare first token) if no multi-word name matches; 0 * for no words. */ longestCommandMatch(words: string[]): number; isGeneralCommand(cmdName: string): boolean; allCommands(): readonly RegisteredCommand[]; specFor(cmdName: string): CommandSpec | null; filetypeHandlers(cmdName: string): Record; unregister(names: string[]): void; commands(): Record; registeredOps(): Record; registerCross(cmd: RegisteredCommand, targetResourceType: string): void; resolveCross(cmdName: string, targetResourceType: string): RegisteredCommand | null; registerOp(op: RegisteredOp): void; registerGeneralOp(op: RegisteredOp): void; /** * Batch-register commands and ops. Mirrors Python's * `Mount.register_fns(...)`. Each entry is a `RegisteredCommand` or * `RegisteredOp`; commands with `resource: null` go to the general * table, ops with `resource: null` likewise. Multi-resource entries * (sharing the same name across resources) are filtered to this * mount's resource kind; if a name has entries but none match this * mount, throw. */ registerFns(items: readonly (RegisteredCommand | RegisteredOp)[]): void; private resolveCascade; executeCmd(cmdName: string, paths: PathSpec[], texts: string[], flags: Record, context?: ExecContext): Promise<[ByteSource | null, IOResult]>; executeOp(opName: string, path: string, args?: readonly unknown[], kwargs?: OpKwargs): Promise; } //# sourceMappingURL=mount.d.ts.map