/** * @module cosmology/workspace/cosmology-workspace-service * * Unified Cosmology Workspace Service. * Serves as the single, cosmology-native API for initializing, verifying, * mutating, committing, and two-phase syncing data across Cosmoses, Galaxies, and Branch Spaces. */ import { MetaspaceService } from '../../witness/space/metaspace/metaspace-types.mjs'; import { IbGibSpaceAny } from '../../witness/space/space-base-v1.mjs'; import { CosmosIbGib_V1, CosmosGalaxyEntry } from '../cosmos/cosmos-types.mjs'; import { B2tFSGalaxyIbGib_V1, B2tFSGalaxyData_V1 } from '../branching/b2tfs-galaxy/b2tfs-galaxy-types.mjs'; import { WorkspaceProjectionSpaceFactory, WorkspaceCmdOpts, WorkspaceCmdOptsSansIndex, WorkspaceCmdOptsSansIndexAndBranch } from './cosmology-workspace-types.mjs'; import { VcsAddOpts, VcsAddResult, VcsCommitOpts, VcsCommitResult, VcsBranchOpts, VcsBranchResult, VcsCheckoutOpts, VcsCheckoutResult, VcsResetOpts, VcsResetResult, VcsRestoreOpts, VcsRestoreResult, VcsMergeOpts, VcsMergeResult, VcsLogOpts, VcsLogResult, VcsStatusOpts, VcsStatusResult, VcsGenerateCommentResult, VcsPushResult, VcsCloneResult, VcsForkResult } from '../branching/commands/index.mjs'; import { CosmologyWorkspaceServiceOptions, InitCosmosOpts, EnsureCosmosOpts, InitGalaxyOpts, InitGalaxyResult, EnsureGalaxyOpts, EnsureGalaxyResult, InitBranchOpts, InitBranchResult, EnsureBranchOpts, EnsureBranchResult, CommitItemsOpts, WorkspacePushOpts, WorkspaceCloneOpts, WorkspaceForkOpts } from './cosmology-workspace-types.mjs'; export declare class CosmologyWorkspaceService { protected lc: string; metaspace: MetaspaceService; localSpace: IbGibSpaceAny; defaultCosmosName?: string; defaultGalaxyName?: string; defaultGalaxyAddr?: string; defaultBranchName?: string; b2tfsGalaxyRoot: string; cosmosRoot: string; vcsFolderName: string; workspaceSpace?: IbGibSpaceAny; fnGetWorkspaceProjectionSpace?: WorkspaceProjectionSpaceFactory; enableBranchLocking: boolean; constructor(options: CosmologyWorkspaceServiceOptions); /** * Initializes a brand-new Cosmos in localSpace. * Fails fast (throws) if a Cosmos with this name already exists. */ initCosmos(opts: InitCosmosOpts): Promise; /** * Ensures an existing Cosmos in localSpace. * Fails fast (throws) if the Cosmos does not exist. Never initializes. */ ensureCosmos(opts?: EnsureCosmosOpts): Promise; /** * Lists all registered Cosmoses in localSpace. */ listCosmoses(): Promise; /** * Initializes a new member Galaxy in a containing Cosmos. * Fails fast (throws) if the Galaxy already exists in the Cosmos. */ initGalaxy(opts: InitGalaxyOpts): Promise; /** * Ensures an existing member Galaxy in a containing Cosmos. * Fails fast (throws) if the Galaxy or Cosmos does not exist. Never initializes. */ ensureGalaxy(opts?: EnsureGalaxyOpts): Promise; /** * Lists all member Galaxy manifest entries in a Cosmos. */ listGalaxies(opts?: { cosmosName?: string; }): Promise; /** * Initializes a new branch in a Galaxy. * Fails fast (throws) if the branch already exists. */ initBranch(opts: InitBranchOpts): Promise; /** * Ensures an existing branch in a Galaxy and resolves its dedicated branch space. * Fails fast (throws) if the branch or its dedicated branch space does not exist. Never initializes. */ ensureBranch(opts?: EnsureBranchOpts): Promise; /** * Executes a mutating branch operation wrapped with in-space lockSpace coordination. */ protected withBranchLock(space: IbGibSpaceAny | undefined, fn: () => Promise): Promise; /** * Programmatically commits file items and optional companion comments directly into * a Galaxy branch without requiring a physical workspace projection on disk. */ commitItems(opts: CommitItemsOpts): Promise; getGalaxyIbGib(): Promise; getActiveBranchName(opts?: { galaxyIbGib?: B2tFSGalaxyIbGib_V1; targetDir?: string; }): Promise; getActiveBranchSpace(opts?: B2tFSGalaxyIbGib_V1 | { galaxyIbGib?: B2tFSGalaxyIbGib_V1; targetDir?: string; branchName?: string; }): Promise; getActiveWorkspaceProjectionSpace({ galaxyIbGib, targetDir, activeBranchSpace, }: { galaxyIbGib: B2tFSGalaxyIbGib_V1; targetDir?: string; activeBranchSpace?: IbGibSpaceAny; }): Promise; status(opts?: Partial): Promise; add(paths?: string[], opts?: Partial): Promise; commit(opts: WorkspaceCmdOptsSansIndexAndBranch): Promise; branch(opts: WorkspaceCmdOptsSansIndexAndBranch): Promise; checkout(opts: WorkspaceCmdOptsSansIndex): Promise; reset(opts: WorkspaceCmdOpts): Promise; restore(opts: Partial): Promise; merge(opts: WorkspaceCmdOptsSansIndexAndBranch): Promise; log(opts: WorkspaceCmdOpts): Promise; generateComment(opts?: { paths?: string[]; folderTopic?: string; targetDir?: string; galaxyIbGib?: B2tFSGalaxyIbGib_V1; }): Promise; updateIndex(opts: { dataToUpdate?: Partial; targetSpace?: IbGibSpaceAny; }): Promise; push(opts: WorkspacePushOpts): Promise; clone(opts: WorkspaceCloneOpts): Promise; fork(opts: WorkspaceForkOpts): Promise; } //# sourceMappingURL=cosmology-workspace-service.d.mts.map