/** * @module cosmology/web-cosmology-workspace-service * * Web-specialized CosmologyWorkspaceService wrapper for @ibgib/web-gib. * Binds automatically to the active ContextModeService (metaspace + rootSpace) or persistent metaspace, * and seamlessly handles IndexedDB device delegate resolution for in-browser commitItems and two-phase sync. */ import { MetaspaceService } from "@ibgib/core-gib/dist/witness/space/metaspace/metaspace-types.mjs"; import { IbGibSpaceAny } from "@ibgib/core-gib/dist/witness/space/space-base-v1.mjs"; import { CosmologyWorkspaceService, InitCosmosOpts, EnsureCosmosOpts, InitGalaxyOpts, InitGalaxyResult, EnsureGalaxyOpts, EnsureGalaxyResult, InitBranchOpts, InitBranchResult, EnsureBranchOpts, EnsureBranchResult, CommitItemsOpts, WorkspacePushOpts } from "@ibgib/core-gib/dist/cosmology/workspace/index.mjs"; import { CosmosIbGib_V1, CosmosGalaxyEntry } from "@ibgib/core-gib/dist/cosmology/cosmos/cosmos-types.mjs"; import { B2tFSGalaxyIbGib_V1, B2tFSGalaxyData_V1 } from "@ibgib/core-gib/dist/cosmology/branching/b2tfs-galaxy/b2tfs-galaxy-types.mjs"; import { VcsAddResult, VcsCommitResult, VcsBranchResult, VcsCheckoutResult, VcsResetResult, VcsRestoreResult, VcsMergeResult, VcsLogResult, VcsStatusResult, VcsGenerateCommentResult, VcsPushResult, VcsStatusOpts, VcsAddOpts, VcsCommitOpts, VcsBranchOpts, VcsCheckoutOpts, VcsResetOpts, VcsRestoreOpts, VcsMergeOpts, VcsLogOpts } from "@ibgib/core-gib/dist/cosmology/branching/commands/index.mjs"; import { WorkspaceCmdOpts, WorkspaceCmdOptsSansIndex, WorkspaceCmdOptsSansIndexAndBranch } from "@ibgib/core-gib/dist/cosmology/workspace/index.mjs"; import { WebContextModeService } from "../context/context-mode-service.mjs"; export interface WebCosmologyWorkspaceServiceOptions { /** Explicit or injected ContextModeService. */ contextModeSvc?: WebContextModeService; /** Explicit metaspace override. */ metaspace?: MetaspaceService; /** Explicit local/root space override. */ localSpace?: IbGibSpaceAny; /** Optional default Cosmos name */ cosmosName?: string; /** Optional default Galaxy name */ galaxyName?: string; /** Optional default Branch name */ branchName?: string; /** Whether to acquire space lock during mutations (defaults to true) */ enableBranchLocking?: boolean; } export declare class WebCosmologyWorkspaceService { protected lc: string; protected contextModeSvc?: WebContextModeService; protected explicitMetaspace?: MetaspaceService; protected explicitLocalSpace?: IbGibSpaceAny; protected defaultCosmosName?: string; protected defaultGalaxyName?: string; protected defaultBranchName?: string; protected enableBranchLocking?: boolean; constructor(opts?: WebCosmologyWorkspaceServiceOptions); /** * Resolves the underlying CosmologyWorkspaceService bound to the active context mode * or explicit spaces. */ getUnderlyingService(): Promise; initCosmos(opts: InitCosmosOpts): Promise; ensureCosmos(opts?: EnsureCosmosOpts): Promise; listCosmoses(): Promise; initGalaxy(opts: InitGalaxyOpts): Promise; ensureGalaxy(opts?: EnsureGalaxyOpts): Promise; listGalaxies(opts?: { cosmosName?: string; }): Promise; initBranch(opts: InitBranchOpts): Promise; ensureBranch(opts?: EnsureBranchOpts): Promise; getGalaxyIbGib(): Promise; getActiveBranchName(opts?: { galaxyIbGib?: B2tFSGalaxyIbGib_V1; targetDir?: string; }): Promise; getActiveBranchSpace(opts?: B2tFSGalaxyIbGib_V1 | { galaxyIbGib?: B2tFSGalaxyIbGib_V1; targetDir?: string; branchName?: string; }): Promise; /** * Programmatically commits file items directly into the Galaxy branch, * automatically resolving author delegate and primary identity from device context if omitted. */ commitItems(opts: CommitItemsOpts): Promise; /** * Pushes branch data to a remote Space-Gib server via Two-Phase Sync, * automatically resolving sync delegate credentials from IndexedDB if omitted. */ push(opts: WorkspacePushOpts): 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; } //# sourceMappingURL=web-cosmology-workspace-service.d.mts.map