UNPKG

@promptbook/google

Version:

Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action

49 lines (48 loc) • 2.4 kB
/// <reference types="node" /> /// <reference types="node" /> import type { NormalizedQuestionsCliOptions } from './questionsCliOptions'; /** * Resolved project directory and its enclosing working tree. Project artifacts belong to `projectPath`; * Git paths and synchronization belong to `repositoryRoot`, which may be an enclosing monorepo. * * @private shared workspace context for Coder and workspace server commands */ export type WorkspaceRepositoryContext = { readonly projectPath: string; readonly repositoryRoot?: string; readonly gitDirectory?: string; readonly repositoryStatus: 'missing' | 'reused' | 'initialized'; }; /** * Command policy is separate from discovery: previews never initialize; explicit init needs no confirmation. * * @private shared workspace policy for Coder and workspace server commands */ export type WorkspaceRepositoryPolicy = 'initialize' | 'mutate' | 'read-only'; /** * Resolves the requested project once and discovers Git using Git itself, without requiring `HEAD`. * Broken metadata, bare repositories, ownership errors and unavailable Git are failures, not missing repositories. * * @private shared workspace discovery for CLI commands */ export declare function $resolveWorkspaceRepository(projectDirectory?: string): Promise<WorkspaceRepositoryContext>; /** * Checks the shared prerequisite before any project writes, Git synchronization, installation or startup. * Only an affirmative interactive answer or an explicit initializer authorizes `git init`. * * @private shared workspace preflight for Coder and workspace server commands */ export declare function $preflightWorkspaceRepository(options: { readonly projectDirectory?: string; readonly policy: WorkspaceRepositoryPolicy; } & Partial<NormalizedQuestionsCliOptions>): Promise<WorkspaceRepositoryContext>; /** * Executes Git without a shell, optional index locks, or credential prompts, retaining raw output boundaries. * Drains both output streams without execFile's fixed buffer limit so large repository listings remain complete. * @private shared Git discovery and commit-scope inspection */ export declare function $runWorkspaceGit(projectPath: string, argumentsList: ReadonlyArray<string>, options?: { readonly env?: Record<string, string>; readonly signal?: AbortSignal; readonly input?: string | Buffer; }): Promise<string>;