/** * State Module — Typed Collection Facades * * Each class provides a typed, ergonomic interface over a specific * `.squad/` collection, backed by StorageProvider + IO layer. * * @module state/collections */ import type { StorageProvider } from '../storage/storage-provider.js'; import type { AgentHandle } from './collection-map.js'; import type { Decision, RoutingConfig, TeamConfig } from './domain-types.js'; import type { SkillDefinition } from '../skills/skill-loader.js'; export declare class AgentsCollection { private readonly storage; private readonly rootDir; constructor(storage: StorageProvider, rootDir: string); /** Return a handle for interacting with a specific agent's state. */ get(name: string): AgentHandle; /** List agent names from `.squad/agents/`. */ list(): Promise; /** Create a new agent with charter and empty history. */ create(name: string, charter: string): Promise; /** Soft-delete an agent by removing its directory. */ delete(name: string): Promise; } export declare class DecisionsCollection { private readonly storage; private readonly rootDir; constructor(storage: StorageProvider, rootDir: string); /** Parse and return all decisions from `decisions.md`. */ list(): Promise; /** Append a new decision. Date is auto-generated if not provided. */ add(decision: Omit): Promise; } export declare class RoutingCollection { private readonly storage; private readonly rootDir; constructor(storage: StorageProvider, rootDir: string); /** Parse and return the routing configuration. */ get(): Promise; /** Write back a full routing configuration. */ update(config: RoutingConfig): Promise; } export declare class TeamCollection { private readonly storage; private readonly rootDir; constructor(storage: StorageProvider, rootDir: string); /** Parse and return the team configuration. */ get(): Promise; /** Write back a full team configuration. */ update(config: TeamConfig): Promise; } export declare class SkillsCollection { private readonly storage; private readonly rootDir; constructor(storage: StorageProvider, rootDir: string); /** List all skill IDs (directory names under .squad/skills/). */ list(): Promise; /** Get a skill definition by ID. Returns undefined if not found or unparseable. */ get(id: string): Promise; /** Check if a skill exists. */ exists(id: string): Promise; } export declare class TemplatesCollection { private readonly storage; private readonly rootDir; constructor(storage: StorageProvider, rootDir: string); /** List template filenames under .squad/templates/. */ list(): Promise; /** Get raw template content by ID. Returns undefined if not found. */ get(id: string): Promise; /** Check if a template exists. */ exists(id: string): Promise; } /** Serializable subset of config stored in `.squad/config.json`. */ export interface ConfigFileData { cacheEnabled?: boolean; cacheTtlMs?: number; } export declare class ConfigCollection { private readonly storage; private readonly rootDir; constructor(storage: StorageProvider, rootDir: string); /** Read and parse `.squad/config.json`. Returns defaults when file is missing or invalid. */ get(): Promise; /** Write config to `.squad/config.json`. */ update(config: ConfigFileData): Promise; /** Check if `.squad/config.json` exists. */ exists(): Promise; } export declare class LogCollection { private readonly storage; private readonly rootDir; constructor(storage: StorageProvider, rootDir: string); /** List log entry filenames under .squad/log/. */ list(): Promise; /** Read a specific log entry. Returns undefined if not found. */ get(id: string): Promise; /** Write a new log entry. */ write(id: string, content: string): Promise; } //# sourceMappingURL=collections.d.ts.map