@maintainer-pro/ai-cli 0.1.9 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -538,9 +538,13 @@ type HostApp = {
538
538
  locked?: boolean;
539
539
  /** Share URL — the page the browser opens. */
540
540
  host?: boolean;
541
+ /** Project folder this process should start in (multi-folder sandboxes). */
542
+ folderPath?: string | null;
541
543
  };
542
544
  type HostAppsResolveInput = {
543
545
  workspaceDir: string;
546
+ /** Extra attached folders for the same sandbox (UI + JVM backend, etc.). */
547
+ workspaceDirs?: string[];
544
548
  appName?: string;
545
549
  preferredAiPort?: number;
546
550
  /** Desired list from Maintainer Pro — used as source of truth when present. */
@@ -582,6 +586,8 @@ type SetupProposal = {
582
586
  };
583
587
  type ProposeHostAppsInput = {
584
588
  workspaceDir: string;
589
+ /** Extra attached folders for the same sandbox. */
590
+ workspaceDirs?: string[];
585
591
  appName?: string;
586
592
  preferredAiPort?: number;
587
593
  /**
@@ -595,11 +601,18 @@ declare function hostAppsCachePath(folder: string, extra?: {
595
601
  sandboxId?: string | null;
596
602
  dataDir?: string | null;
597
603
  }): string;
604
+ declare function isAiServerApp(app: Pick<HostApp, "id" | "role"> | null | undefined): boolean;
605
+ /** @deprecated Chat is in-process in the bridge, not a listed host app. */
598
606
  declare function defaultAiServerApp(port?: number): HostApp;
599
607
  declare function normalizeHostApp(raw: unknown): HostApp | null;
600
608
  declare function ensureSingleHost(apps: HostApp[]): HostApp[];
601
609
  declare function normalizeHostApps(raw: unknown): HostApp[];
602
- declare function ensureAiServerApp(apps: HostApp[], preferredPort?: number): HostApp[];
610
+ /** Chat is in-process in the bridge. Strips leftover ai-server rows. */
611
+ declare function withoutAiServerApp(apps: HostApp[]): HostApp[];
612
+ /**
613
+ * @deprecated Chat is not a listed host app. Strips leftover ai-server rows.
614
+ */
615
+ declare function ensureAiServerApp(apps: HostApp[], _preferredPort?: number): HostApp[];
603
616
  declare function readProjectEnvLayers(folder: string): {
604
617
  merged: Record<string, string>;
605
618
  layers: Array<{
@@ -608,6 +621,7 @@ declare function readProjectEnvLayers(folder: string): {
608
621
  }>;
609
622
  };
610
623
  declare function hostAppsFingerprint(folder: string): string;
624
+ declare function hostAppsFingerprintForFolders(folders: string[]): string;
611
625
  declare function detectHostAppsFromFiles(folder: string, opts?: {
612
626
  preferredAiPort?: number;
613
627
  appName?: string;
@@ -616,6 +630,14 @@ declare function detectHostAppsFromFiles(folder: string, opts?: {
616
630
  reasons: string[];
617
631
  confused: boolean;
618
632
  };
633
+ declare function detectHostAppsFromFolders(folders: string[], opts?: {
634
+ preferredAiPort?: number;
635
+ appName?: string;
636
+ }): {
637
+ apps: HostApp[];
638
+ reasons: string[];
639
+ confused: boolean;
640
+ };
619
641
  declare function readHostAppsCache(folder: string, extra?: {
620
642
  sandboxId?: string | null;
621
643
  dataDir?: string | null;
@@ -633,6 +655,8 @@ declare function writeHostAppsCache(folder: string, apps: HostApp[], extra?: Rec
633
655
  /** @deprecated Use writeHostAppsCache. */
634
656
  declare const writeCollaboraterApps: typeof writeHostAppsCache;
635
657
  declare function mergeDesiredHostApps(desired: HostApp[], detected: HostApp[]): HostApp[];
658
+ /** Keep saved apps, and append newly detected ones that are not already listed. */
659
+ declare function unionHostApps(desired: HostApp[], detected: HostApp[]): HostApp[];
636
660
  /**
637
661
  * Fast, interactive onboarding propose: file detect first, optional read-only AI.
638
662
  * Never edits the repository.
@@ -645,4 +669,4 @@ declare function proposeHostAppsFromConfig(input: ProposeHostAppsInput): Promise
645
669
  */
646
670
  declare function resolveHostApps(input: HostAppsResolveInput): Promise<HostAppsResolveResult>;
647
671
 
648
- export { ACCESS_IGNORE_BEGIN, ACCESS_IGNORE_END, AI_SERVER_APP_ID, AI_SERVER_DEFAULT_PORT, type AiCliProviderId, type AiProvider, type AiResponse, COLLABORATER_DIR, type CachedChatMessage, type CachedConversation, type CallAiOptions, type ChatAttachment, type ChatHandlerOptions, type ChatHandlers, type ChatMessage, type ChatSenderType, type ChatStoreLike, type ChatUser, type ClientContext, DEFAULT_AI_IGNORE_PATHS, HOST_APPS_FILE, type HostApp, type HostAppAlternative, type HostAppRole, type HostAppSource, type HostAppsResolveInput, type HostAppsResolveResult, type LocalStoredMessage, MAINTAINER_PRO_HOME_DIR, type MaintainerProStoreOptions, PROMPT_SECTION, type ParentChainEntry, type ParentChainSource, type PriorConversationOptions, type ProjectDataInput, type ProposeHostAppsInput, type ProviderPreference, type SetupProposal, type SetupProposalConfidence, type SyncedChatStore, type SyncedChatStoreOptions, type SyncedStoreStats, type ToolCall, type ToolSchemaMap, WORKING_PROVIDER, type WorkingTurnEvent, type WorkspaceInspectInput, type WorkspaceInspectResult, type WorkspaceKind, buildClaudeUserPrompt, buildConversationPrompt, buildCursorPrompt, buildPriorConversationsContext, callAi, collectParentChain, commandExists, createAntigravityProvider, createBuiltinProviders, createChatHandler, createClaudeProvider, createCursorProvider, createDefaultSystemPrompt, createInfoLogger, createLocalDirectoryStore, createLogger, createMaintainerProStore, createMaintainerProStoreFromEnv, createSyncedChatStore, createToolValidator, defaultAiServerApp, detectHostAppsFromFiles, ensureAiServerApp, ensureProjectDataDir, ensureSingleHost, formatAccessPolicyPromptSection, formatClientContext, formatParentChainContext, getProviderPreference, hostAppsCachePath, hostAppsFingerprint, inspectAndRepairWorkspace, inspectConfigOnly, isDevMode, isIgnoredRelative, isInsideWorkspace, isPathAllowed, maintainerProHome, mergeDesiredHostApps, normalizeHostApp, normalizeHostApps, normalizeIgnorePaths, parentChainForTurn, parseAiResponse, parseIgnorePathsEnv, parsePort, previewText, hostAppsCachePath$1 as projectHostAppsPath, projectIdForFolder, projectUploadsDir, proposeHostAppsFromConfig, providerLabel, readCollaboraterApps, readHostAppsCache, readProjectEnvLayers, renderManagedIgnoreBlock, resolveCliBinary, resolveHostApps, resolveIgnorePaths, resolveLogLevel, resolveProjectDataDir, resolveProvider, sanitizeProjectId, saveChatAttachments, toNextRoute, upsertManagedIgnoreFile, writeCollaboraterApps, writeHostAppsCache };
672
+ export { ACCESS_IGNORE_BEGIN, ACCESS_IGNORE_END, AI_SERVER_APP_ID, AI_SERVER_DEFAULT_PORT, type AiCliProviderId, type AiProvider, type AiResponse, COLLABORATER_DIR, type CachedChatMessage, type CachedConversation, type CallAiOptions, type ChatAttachment, type ChatHandlerOptions, type ChatHandlers, type ChatMessage, type ChatSenderType, type ChatStoreLike, type ChatUser, type ClientContext, DEFAULT_AI_IGNORE_PATHS, HOST_APPS_FILE, type HostApp, type HostAppAlternative, type HostAppRole, type HostAppSource, type HostAppsResolveInput, type HostAppsResolveResult, type LocalStoredMessage, MAINTAINER_PRO_HOME_DIR, type MaintainerProStoreOptions, PROMPT_SECTION, type ParentChainEntry, type ParentChainSource, type PriorConversationOptions, type ProjectDataInput, type ProposeHostAppsInput, type ProviderPreference, type SetupProposal, type SetupProposalConfidence, type SyncedChatStore, type SyncedChatStoreOptions, type SyncedStoreStats, type ToolCall, type ToolSchemaMap, WORKING_PROVIDER, type WorkingTurnEvent, type WorkspaceInspectInput, type WorkspaceInspectResult, type WorkspaceKind, buildClaudeUserPrompt, buildConversationPrompt, buildCursorPrompt, buildPriorConversationsContext, callAi, collectParentChain, commandExists, createAntigravityProvider, createBuiltinProviders, createChatHandler, createClaudeProvider, createCursorProvider, createDefaultSystemPrompt, createInfoLogger, createLocalDirectoryStore, createLogger, createMaintainerProStore, createMaintainerProStoreFromEnv, createSyncedChatStore, createToolValidator, defaultAiServerApp, detectHostAppsFromFiles, detectHostAppsFromFolders, ensureAiServerApp, ensureProjectDataDir, ensureSingleHost, formatAccessPolicyPromptSection, formatClientContext, formatParentChainContext, getProviderPreference, hostAppsCachePath, hostAppsFingerprint, hostAppsFingerprintForFolders, inspectAndRepairWorkspace, inspectConfigOnly, isAiServerApp, isDevMode, isIgnoredRelative, isInsideWorkspace, isPathAllowed, maintainerProHome, mergeDesiredHostApps, normalizeHostApp, normalizeHostApps, normalizeIgnorePaths, parentChainForTurn, parseAiResponse, parseIgnorePathsEnv, parsePort, previewText, hostAppsCachePath$1 as projectHostAppsPath, projectIdForFolder, projectUploadsDir, proposeHostAppsFromConfig, providerLabel, readCollaboraterApps, readHostAppsCache, readProjectEnvLayers, renderManagedIgnoreBlock, resolveCliBinary, resolveHostApps, resolveIgnorePaths, resolveLogLevel, resolveProjectDataDir, resolveProvider, sanitizeProjectId, saveChatAttachments, toNextRoute, unionHostApps, upsertManagedIgnoreFile, withoutAiServerApp, writeCollaboraterApps, writeHostAppsCache };
package/dist/index.d.ts CHANGED
@@ -538,9 +538,13 @@ type HostApp = {
538
538
  locked?: boolean;
539
539
  /** Share URL — the page the browser opens. */
540
540
  host?: boolean;
541
+ /** Project folder this process should start in (multi-folder sandboxes). */
542
+ folderPath?: string | null;
541
543
  };
542
544
  type HostAppsResolveInput = {
543
545
  workspaceDir: string;
546
+ /** Extra attached folders for the same sandbox (UI + JVM backend, etc.). */
547
+ workspaceDirs?: string[];
544
548
  appName?: string;
545
549
  preferredAiPort?: number;
546
550
  /** Desired list from Maintainer Pro — used as source of truth when present. */
@@ -582,6 +586,8 @@ type SetupProposal = {
582
586
  };
583
587
  type ProposeHostAppsInput = {
584
588
  workspaceDir: string;
589
+ /** Extra attached folders for the same sandbox. */
590
+ workspaceDirs?: string[];
585
591
  appName?: string;
586
592
  preferredAiPort?: number;
587
593
  /**
@@ -595,11 +601,18 @@ declare function hostAppsCachePath(folder: string, extra?: {
595
601
  sandboxId?: string | null;
596
602
  dataDir?: string | null;
597
603
  }): string;
604
+ declare function isAiServerApp(app: Pick<HostApp, "id" | "role"> | null | undefined): boolean;
605
+ /** @deprecated Chat is in-process in the bridge, not a listed host app. */
598
606
  declare function defaultAiServerApp(port?: number): HostApp;
599
607
  declare function normalizeHostApp(raw: unknown): HostApp | null;
600
608
  declare function ensureSingleHost(apps: HostApp[]): HostApp[];
601
609
  declare function normalizeHostApps(raw: unknown): HostApp[];
602
- declare function ensureAiServerApp(apps: HostApp[], preferredPort?: number): HostApp[];
610
+ /** Chat is in-process in the bridge. Strips leftover ai-server rows. */
611
+ declare function withoutAiServerApp(apps: HostApp[]): HostApp[];
612
+ /**
613
+ * @deprecated Chat is not a listed host app. Strips leftover ai-server rows.
614
+ */
615
+ declare function ensureAiServerApp(apps: HostApp[], _preferredPort?: number): HostApp[];
603
616
  declare function readProjectEnvLayers(folder: string): {
604
617
  merged: Record<string, string>;
605
618
  layers: Array<{
@@ -608,6 +621,7 @@ declare function readProjectEnvLayers(folder: string): {
608
621
  }>;
609
622
  };
610
623
  declare function hostAppsFingerprint(folder: string): string;
624
+ declare function hostAppsFingerprintForFolders(folders: string[]): string;
611
625
  declare function detectHostAppsFromFiles(folder: string, opts?: {
612
626
  preferredAiPort?: number;
613
627
  appName?: string;
@@ -616,6 +630,14 @@ declare function detectHostAppsFromFiles(folder: string, opts?: {
616
630
  reasons: string[];
617
631
  confused: boolean;
618
632
  };
633
+ declare function detectHostAppsFromFolders(folders: string[], opts?: {
634
+ preferredAiPort?: number;
635
+ appName?: string;
636
+ }): {
637
+ apps: HostApp[];
638
+ reasons: string[];
639
+ confused: boolean;
640
+ };
619
641
  declare function readHostAppsCache(folder: string, extra?: {
620
642
  sandboxId?: string | null;
621
643
  dataDir?: string | null;
@@ -633,6 +655,8 @@ declare function writeHostAppsCache(folder: string, apps: HostApp[], extra?: Rec
633
655
  /** @deprecated Use writeHostAppsCache. */
634
656
  declare const writeCollaboraterApps: typeof writeHostAppsCache;
635
657
  declare function mergeDesiredHostApps(desired: HostApp[], detected: HostApp[]): HostApp[];
658
+ /** Keep saved apps, and append newly detected ones that are not already listed. */
659
+ declare function unionHostApps(desired: HostApp[], detected: HostApp[]): HostApp[];
636
660
  /**
637
661
  * Fast, interactive onboarding propose: file detect first, optional read-only AI.
638
662
  * Never edits the repository.
@@ -645,4 +669,4 @@ declare function proposeHostAppsFromConfig(input: ProposeHostAppsInput): Promise
645
669
  */
646
670
  declare function resolveHostApps(input: HostAppsResolveInput): Promise<HostAppsResolveResult>;
647
671
 
648
- export { ACCESS_IGNORE_BEGIN, ACCESS_IGNORE_END, AI_SERVER_APP_ID, AI_SERVER_DEFAULT_PORT, type AiCliProviderId, type AiProvider, type AiResponse, COLLABORATER_DIR, type CachedChatMessage, type CachedConversation, type CallAiOptions, type ChatAttachment, type ChatHandlerOptions, type ChatHandlers, type ChatMessage, type ChatSenderType, type ChatStoreLike, type ChatUser, type ClientContext, DEFAULT_AI_IGNORE_PATHS, HOST_APPS_FILE, type HostApp, type HostAppAlternative, type HostAppRole, type HostAppSource, type HostAppsResolveInput, type HostAppsResolveResult, type LocalStoredMessage, MAINTAINER_PRO_HOME_DIR, type MaintainerProStoreOptions, PROMPT_SECTION, type ParentChainEntry, type ParentChainSource, type PriorConversationOptions, type ProjectDataInput, type ProposeHostAppsInput, type ProviderPreference, type SetupProposal, type SetupProposalConfidence, type SyncedChatStore, type SyncedChatStoreOptions, type SyncedStoreStats, type ToolCall, type ToolSchemaMap, WORKING_PROVIDER, type WorkingTurnEvent, type WorkspaceInspectInput, type WorkspaceInspectResult, type WorkspaceKind, buildClaudeUserPrompt, buildConversationPrompt, buildCursorPrompt, buildPriorConversationsContext, callAi, collectParentChain, commandExists, createAntigravityProvider, createBuiltinProviders, createChatHandler, createClaudeProvider, createCursorProvider, createDefaultSystemPrompt, createInfoLogger, createLocalDirectoryStore, createLogger, createMaintainerProStore, createMaintainerProStoreFromEnv, createSyncedChatStore, createToolValidator, defaultAiServerApp, detectHostAppsFromFiles, ensureAiServerApp, ensureProjectDataDir, ensureSingleHost, formatAccessPolicyPromptSection, formatClientContext, formatParentChainContext, getProviderPreference, hostAppsCachePath, hostAppsFingerprint, inspectAndRepairWorkspace, inspectConfigOnly, isDevMode, isIgnoredRelative, isInsideWorkspace, isPathAllowed, maintainerProHome, mergeDesiredHostApps, normalizeHostApp, normalizeHostApps, normalizeIgnorePaths, parentChainForTurn, parseAiResponse, parseIgnorePathsEnv, parsePort, previewText, hostAppsCachePath$1 as projectHostAppsPath, projectIdForFolder, projectUploadsDir, proposeHostAppsFromConfig, providerLabel, readCollaboraterApps, readHostAppsCache, readProjectEnvLayers, renderManagedIgnoreBlock, resolveCliBinary, resolveHostApps, resolveIgnorePaths, resolveLogLevel, resolveProjectDataDir, resolveProvider, sanitizeProjectId, saveChatAttachments, toNextRoute, upsertManagedIgnoreFile, writeCollaboraterApps, writeHostAppsCache };
672
+ export { ACCESS_IGNORE_BEGIN, ACCESS_IGNORE_END, AI_SERVER_APP_ID, AI_SERVER_DEFAULT_PORT, type AiCliProviderId, type AiProvider, type AiResponse, COLLABORATER_DIR, type CachedChatMessage, type CachedConversation, type CallAiOptions, type ChatAttachment, type ChatHandlerOptions, type ChatHandlers, type ChatMessage, type ChatSenderType, type ChatStoreLike, type ChatUser, type ClientContext, DEFAULT_AI_IGNORE_PATHS, HOST_APPS_FILE, type HostApp, type HostAppAlternative, type HostAppRole, type HostAppSource, type HostAppsResolveInput, type HostAppsResolveResult, type LocalStoredMessage, MAINTAINER_PRO_HOME_DIR, type MaintainerProStoreOptions, PROMPT_SECTION, type ParentChainEntry, type ParentChainSource, type PriorConversationOptions, type ProjectDataInput, type ProposeHostAppsInput, type ProviderPreference, type SetupProposal, type SetupProposalConfidence, type SyncedChatStore, type SyncedChatStoreOptions, type SyncedStoreStats, type ToolCall, type ToolSchemaMap, WORKING_PROVIDER, type WorkingTurnEvent, type WorkspaceInspectInput, type WorkspaceInspectResult, type WorkspaceKind, buildClaudeUserPrompt, buildConversationPrompt, buildCursorPrompt, buildPriorConversationsContext, callAi, collectParentChain, commandExists, createAntigravityProvider, createBuiltinProviders, createChatHandler, createClaudeProvider, createCursorProvider, createDefaultSystemPrompt, createInfoLogger, createLocalDirectoryStore, createLogger, createMaintainerProStore, createMaintainerProStoreFromEnv, createSyncedChatStore, createToolValidator, defaultAiServerApp, detectHostAppsFromFiles, detectHostAppsFromFolders, ensureAiServerApp, ensureProjectDataDir, ensureSingleHost, formatAccessPolicyPromptSection, formatClientContext, formatParentChainContext, getProviderPreference, hostAppsCachePath, hostAppsFingerprint, hostAppsFingerprintForFolders, inspectAndRepairWorkspace, inspectConfigOnly, isAiServerApp, isDevMode, isIgnoredRelative, isInsideWorkspace, isPathAllowed, maintainerProHome, mergeDesiredHostApps, normalizeHostApp, normalizeHostApps, normalizeIgnorePaths, parentChainForTurn, parseAiResponse, parseIgnorePathsEnv, parsePort, previewText, hostAppsCachePath$1 as projectHostAppsPath, projectIdForFolder, projectUploadsDir, proposeHostAppsFromConfig, providerLabel, readCollaboraterApps, readHostAppsCache, readProjectEnvLayers, renderManagedIgnoreBlock, resolveCliBinary, resolveHostApps, resolveIgnorePaths, resolveLogLevel, resolveProjectDataDir, resolveProvider, sanitizeProjectId, saveChatAttachments, toNextRoute, unionHostApps, upsertManagedIgnoreFile, withoutAiServerApp, writeCollaboraterApps, writeHostAppsCache };