import type { ProjectRegistration } from '../../types'; import { getCliEntryPoint, getNodePath } from './node-paths'; import type { ServiceConfig, ServiceOptions, ServiceStatus, ServiceStrategy } from './types'; export { getCliEntryPoint, getNodePath }; /** Returns the LaunchAgent label for a given project */ export declare function getProjectLabel(tenantCode: string, projectCode: string): string; /** Returns the plist file path for a given project */ export declare function getProjectPlistPath(tenantCode: string, projectCode: string): string; /** Lists all per-project plist files under ~/Library/LaunchAgents */ export declare function getAllProjectPlists(): Array<{ label: string; plistPath: string; }>; export declare function generatePlist(options: ServiceConfig): string; /** Generate a per-project plist that runs a wrapper shell script */ export declare function generateProjectPlist(opts: { label: string; wrapperScriptPath: string; logDir: string; }): string; /** Generate a bash wrapper script that runs docker for one project */ export declare function generateWrapperScript(opts: { imageName: string; tenantCode: string; projectCode: string; projectConfigHostDir: string; projectDir?: string; token: string; apiUrl: string; anthropicApiKey?: string; claudeCodeOauthToken?: string; codexApiKey?: string; codexAccessToken?: string; verbose?: boolean; updateScriptPath: string; /** * Per-project log directory. When set, the wrapper redirects the docker * subprocess's stdout and stderr into separate `ai-support-agent * log-rotate --no-tee` subprocesses, producing `agent.out.log` / * `agent.err.log` (plus rotated generations `.1` … `.N`) under this * directory. The launchd plist's `StandardOutPath` / `StandardErrorPath` * point at separate `wrapper.out.log` / `wrapper.err.log` files (NOT * the rotator-owned paths) to avoid a double-write race where * launchd's open fd would otherwise keep appending to a rotated * generation. */ logDir?: string; }): string; /** Generate the update-and-restart.sh script */ export declare function generateUpdateScript(): string; /** * Write run.sh and plist for a single project. Does NOT launchctl load. * Returns the plist path. * * NOTE: This function does NOT generate update-and-restart.sh. Callers that * invoke this directly (not via installAndStartProject or install()) are * responsible for ensuring update-and-restart.sh exists at getUpdateScriptPath(). */ export declare function writeProjectServiceFiles(project: ProjectRegistration, options?: { verbose?: boolean; }): string; /** * Install service files and immediately start a single project via launchctl. * Idempotent: unloads any existing service before loading so that token/config * updates take effect immediately. */ export declare function installAndStartProject(project: ProjectRegistration, options?: { verbose?: boolean; }): void; export declare class DarwinServiceStrategy implements ServiceStrategy { install(options: ServiceOptions): Promise; uninstall(): void; start(): void; stop(): void; restart(): void; status(): ServiceStatus; } //# sourceMappingURL=darwin-service.d.ts.map