/** * WorkspaceMutations initialization logic. * * Handles initial setup of project and user-scope workspaces: agent detection, * interactive agent selection, and settings/lockfile creation. * * @internal */ import * as FileSystem from "effect/FileSystem"; import * as Path from "effect/Path"; import * as Effect from "effect/Effect"; import { type ConfigurableAgentId } from "../agents/types.js"; import { CliRenderer } from "../cli-renderer/index.js"; import { type Settings } from "../settings/index.js"; import type { WorkspaceMutationsOptions } from "./service-interface.js"; import { type WorkspaceLocation } from "./paths.js"; export interface SetupAgentCandidate { readonly id: ConfigurableAgentId; readonly name: string; readonly projectDetected: boolean; readonly userDetected: boolean; readonly state: "selected" | "suggested" | "available" | "retired"; readonly selectionReason?: "explicit" | "project-detected" | "user-detected" | "catalog-suggestion"; } export declare const initializeProjectWorkspace: (localDir: string, options: WorkspaceMutationsOptions) => Effect.Effect<{ settings: { readonly [x: string]: unknown; readonly skills?: { readonly [x: string]: { readonly enabled: boolean; readonly source: string; readonly origin?: "bundled"; }; }; readonly subagents?: { readonly [x: string]: { readonly source: string; readonly enabled: boolean; }; }; readonly rules?: { readonly [x: string]: { readonly source: string; readonly enabled: boolean; }; }; readonly hooks?: { readonly [x: string]: { readonly source: string; readonly enabled: boolean; }; }; readonly knowledge?: { readonly [x: string]: { readonly enabled: boolean; readonly source: string; readonly instructionEntry?: boolean; }; }; readonly packs?: { readonly [x: string]: { readonly source: string; readonly enabled: boolean; }; }; readonly sources?: readonly ({ readonly name: string; readonly type: "github"; readonly url: URL; } | { readonly name: string; readonly type: "gitlab"; readonly url: URL; } | { readonly name: string; readonly type: "bitbucket"; readonly url: URL; } | { readonly name: string; readonly type: "azurerepos"; readonly url: URL; } | { readonly name: string; readonly type: "registry"; readonly location: URL; })[]; readonly mcpServers?: { readonly [x: string]: { readonly enabled: boolean; readonly env: { readonly [x: string]: string; }; readonly source: string; readonly kind?: "sourced" | undefined; readonly url?: string | undefined; readonly command?: string | undefined; readonly headers?: { readonly [x: string]: string; } | undefined; readonly agents?: readonly ("adal" | "aider-desk" | "amp" | "antigravity" | "antigravity-cli" | "augment" | "claude-code" | "cline" | "codearts-agent" | "codebuddy" | "codemaker" | "codestudio" | "codex" | "command-code" | "continue" | "cortex" | "crush" | "cursor" | "deepagents" | "devin" | "dexto" | "droid" | "firebender" | "forgecode" | "gemini-cli" | "github-copilot-cli" | "goose" | "grok-cli" | "hermes" | "ibm-bob" | "iflow-cli" | "junie" | "lingma" | "qoder-cn" | "kilo" | "kimi-cli" | "kiro-cli" | "kode" | "mcpjam" | "minimax-code" | "mistral-vibe" | "mux" | "neovate" | "openclaw" | "opencode" | "openhands" | "ona" | "pi" | "pochi" | "qoder" | "qwen-code" | "replit" | "roo" | "rovodev" | "tabnine-cli" | "trae-cn" | "trae" | "warp" | "windsurf" | "zencoder" | "zed" | "zenflow")[] | undefined; readonly args?: readonly string[] | undefined; } | { readonly kind: "inline"; readonly enabled: boolean; readonly env: { readonly [x: string]: string; }; readonly url?: string | undefined; readonly command?: string | undefined; readonly headers?: { readonly [x: string]: string; } | undefined; readonly source?: undefined; readonly agents?: readonly ("adal" | "aider-desk" | "amp" | "antigravity" | "antigravity-cli" | "augment" | "claude-code" | "cline" | "codearts-agent" | "codebuddy" | "codemaker" | "codestudio" | "codex" | "command-code" | "continue" | "cortex" | "crush" | "cursor" | "deepagents" | "devin" | "dexto" | "droid" | "firebender" | "forgecode" | "gemini-cli" | "github-copilot-cli" | "goose" | "grok-cli" | "hermes" | "ibm-bob" | "iflow-cli" | "junie" | "lingma" | "qoder-cn" | "kilo" | "kimi-cli" | "kiro-cli" | "kode" | "mcpjam" | "minimax-code" | "mistral-vibe" | "mux" | "neovate" | "openclaw" | "opencode" | "openhands" | "ona" | "pi" | "pochi" | "qoder" | "qwen-code" | "replit" | "roo" | "rovodev" | "tabnine-cli" | "trae-cn" | "trae" | "warp" | "windsurf" | "zencoder" | "zed" | "zenflow")[] | undefined; readonly args?: readonly string[] | undefined; }; }; readonly owner?: string & import("effect/Brand").Brand<"Handle">; readonly lint?: { readonly rules?: { readonly [x: string]: "error" | "off" | "info" | "warn"; }; }; readonly $schema?: string; readonly publish?: { readonly defaultVisibility?: "public" | "private" | undefined; }; readonly agents?: readonly ("adal" | "aider-desk" | "amp" | "antigravity" | "antigravity-cli" | "augment" | "claude-code" | "cline" | "codearts-agent" | "codebuddy" | "codemaker" | "codestudio" | "codex" | "command-code" | "continue" | "cortex" | "crush" | "cursor" | "deepagents" | "devin" | "dexto" | "droid" | "firebender" | "forgecode" | "gemini-cli" | "github-copilot-cli" | "goose" | "grok-cli" | "hermes" | "ibm-bob" | "iflow-cli" | "junie" | "lingma" | "qoder-cn" | "kilo" | "kimi-cli" | "kiro-cli" | "kode" | "mcpjam" | "minimax-code" | "mistral-vibe" | "mux" | "neovate" | "openclaw" | "opencode" | "openhands" | "ona" | "pi" | "pochi" | "qoder" | "qwen-code" | "replit" | "roo" | "rovodev" | "tabnine-cli" | "trae-cn" | "trae" | "warp" | "windsurf" | "zencoder" | "zed" | "zenflow")[]; readonly minimumReleaseAge?: string; readonly minimumReleaseAgeExclude?: readonly { readonly owner: string & import("effect/Brand").Brand<"Handle">; readonly type: "skill" | "mcp-server" | "subagent" | "rule" | "hook" | "knowledge" | "pack" | "*"; readonly name: "*" | (string & import("effect/Brand").Brand<"ExtensionName">); }[]; readonly instructionFiles?: false | { readonly fileName?: string; readonly gitignoreAliases?: boolean; }; readonly skillsConfig?: { readonly dir?: string; }; readonly rulesConfig?: { readonly dir?: string; }; readonly hooksConfig?: { readonly dir?: string; }; readonly knowledgeConfig?: { readonly dir?: string; readonly instructions?: boolean; }; readonly subagentsConfig?: { readonly dir?: string; }; readonly packsConfig?: { readonly dir?: string; }; readonly mcpServersConfig?: { readonly dir?: string; }; }; agentCandidates: readonly SetupAgentCandidate[]; confirmed: boolean; }, import("../app-error/app-error.ts").AppError | import("../cli-prompt/prompt-cancelled.ts").PromptCancelled, Path.Path | FileSystem.FileSystem | CliRenderer | "effect/unstable/cli/GlobalFlag/axm-non-interactive">; interface WorkspaceInitializationState { readonly settings: Settings; readonly initialized: boolean; readonly wouldInitialize: boolean; readonly cancelled: boolean; readonly agentCandidates: ReadonlyArray; } /** * Ensure the user workspace has axm.json and axm-lock.yaml. * * Creates missing files with empty defaults. * * @param workspaceRoot - Path to the user workspace root */ export declare const ensureUserWorkspaceInitialized: (workspaceRoot: string, options: WorkspaceMutationsOptions) => Effect.Effect; /** * Ensure project workspace is initialized, returning local settings. * * Reads existing local settings or runs the initialization flow when missing. * * @param localDir - Path to local .axm directory * @param options - WorkspaceMutations options * @returns Effect yielding local Settings */ export declare const ensureProjectWorkspaceInitialized: (localDir: string, options: WorkspaceMutationsOptions) => Effect.Effect; export declare const bootstrapWorkspace: (options: WorkspaceMutationsOptions) => Effect.Effect<{ location: WorkspaceLocation; settings: Settings; initialized: boolean; wouldInitialize: boolean; cancelled: boolean; agentCandidates: ReadonlyArray; }, import("../app-error/app-error.ts").AppError | import("../cli-prompt/prompt-cancelled.ts").PromptCancelled, Path.Path | FileSystem.FileSystem | CliRenderer | "effect/unstable/cli/GlobalFlag/axm-non-interactive">; export {}; //# sourceMappingURL=initialization.d.ts.map