@maintainer-pro/ai-cli 0.1.12 → 0.1.14

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.cjs CHANGED
@@ -38,6 +38,8 @@ __export(index_exports, {
38
38
  DEFAULT_AI_IGNORE_PATHS: () => DEFAULT_AI_IGNORE_PATHS,
39
39
  HOST_APPS_FILE: () => HOST_APPS_FILE,
40
40
  MAINTAINER_PRO_HOME_DIR: () => MAINTAINER_PRO_HOME_DIR,
41
+ PACKAGE_NAME: () => PACKAGE_NAME,
42
+ PACKAGE_VERSION: () => PACKAGE_VERSION,
41
43
  PROMPT_SECTION: () => PROMPT_SECTION,
42
44
  WORKING_PROVIDER: () => WORKING_PROVIDER,
43
45
  buildClaudeUserPrompt: () => buildClaudeUserPrompt,
@@ -1819,6 +1821,20 @@ function createLocalDirectoryStore(baseDir) {
1819
1821
  );
1820
1822
  const next = waiting[0] ?? null;
1821
1823
  if (!next) {
1824
+ const orphan = existing.messages.some((m) => m.provider === "working");
1825
+ if (orphan) {
1826
+ existing.messages = existing.messages.filter(
1827
+ (m) => m.provider !== "working"
1828
+ );
1829
+ existing.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
1830
+ await writeConversation(filePath, existing);
1831
+ return {
1832
+ action: "cleared_orphan_wip",
1833
+ workingId: null,
1834
+ promotedId: null,
1835
+ nextQueued: null
1836
+ };
1837
+ }
1822
1838
  return {
1823
1839
  action: "noop",
1824
1840
  workingId: null,
@@ -3713,6 +3729,19 @@ Return the real local ports and npm script names.`
3713
3729
  fingerprint
3714
3730
  };
3715
3731
  }
3732
+
3733
+ // src/version.ts
3734
+ var import_node_module = require("module");
3735
+ var import_meta = {};
3736
+ var require2 = (0, import_node_module.createRequire)(import_meta.url);
3737
+ var PACKAGE_NAME = "@maintainer-pro/ai-cli";
3738
+ var PACKAGE_VERSION = (() => {
3739
+ try {
3740
+ return String(require2("../package.json").version || "0.0.0");
3741
+ } catch {
3742
+ return "0.0.0";
3743
+ }
3744
+ })();
3716
3745
  // Annotate the CommonJS export names for ESM import in node:
3717
3746
  0 && (module.exports = {
3718
3747
  ACCESS_IGNORE_BEGIN,
@@ -3723,6 +3752,8 @@ Return the real local ports and npm script names.`
3723
3752
  DEFAULT_AI_IGNORE_PATHS,
3724
3753
  HOST_APPS_FILE,
3725
3754
  MAINTAINER_PRO_HOME_DIR,
3755
+ PACKAGE_NAME,
3756
+ PACKAGE_VERSION,
3726
3757
  PROMPT_SECTION,
3727
3758
  WORKING_PROVIDER,
3728
3759
  buildClaudeUserPrompt,
package/dist/index.d.cts CHANGED
@@ -669,4 +669,7 @@ declare function proposeHostAppsFromConfig(input: ProposeHostAppsInput): Promise
669
669
  */
670
670
  declare function resolveHostApps(input: HostAppsResolveInput): Promise<HostAppsResolveResult>;
671
671
 
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 };
672
+ declare const PACKAGE_NAME = "@maintainer-pro/ai-cli";
673
+ declare const PACKAGE_VERSION: string;
674
+
675
+ 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, PACKAGE_NAME, PACKAGE_VERSION, 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
@@ -669,4 +669,7 @@ declare function proposeHostAppsFromConfig(input: ProposeHostAppsInput): Promise
669
669
  */
670
670
  declare function resolveHostApps(input: HostAppsResolveInput): Promise<HostAppsResolveResult>;
671
671
 
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 };
672
+ declare const PACKAGE_NAME = "@maintainer-pro/ai-cli";
673
+ declare const PACKAGE_VERSION: string;
674
+
675
+ 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, PACKAGE_NAME, PACKAGE_VERSION, 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.js CHANGED
@@ -1701,6 +1701,20 @@ function createLocalDirectoryStore(baseDir) {
1701
1701
  );
1702
1702
  const next = waiting[0] ?? null;
1703
1703
  if (!next) {
1704
+ const orphan = existing.messages.some((m) => m.provider === "working");
1705
+ if (orphan) {
1706
+ existing.messages = existing.messages.filter(
1707
+ (m) => m.provider !== "working"
1708
+ );
1709
+ existing.updatedAt = (/* @__PURE__ */ new Date()).toISOString();
1710
+ await writeConversation(filePath, existing);
1711
+ return {
1712
+ action: "cleared_orphan_wip",
1713
+ workingId: null,
1714
+ promotedId: null,
1715
+ nextQueued: null
1716
+ };
1717
+ }
1704
1718
  return {
1705
1719
  action: "noop",
1706
1720
  workingId: null,
@@ -3595,6 +3609,18 @@ Return the real local ports and npm script names.`
3595
3609
  fingerprint
3596
3610
  };
3597
3611
  }
3612
+
3613
+ // src/version.ts
3614
+ import { createRequire } from "module";
3615
+ var require2 = createRequire(import.meta.url);
3616
+ var PACKAGE_NAME = "@maintainer-pro/ai-cli";
3617
+ var PACKAGE_VERSION = (() => {
3618
+ try {
3619
+ return String(require2("../package.json").version || "0.0.0");
3620
+ } catch {
3621
+ return "0.0.0";
3622
+ }
3623
+ })();
3598
3624
  export {
3599
3625
  ACCESS_IGNORE_BEGIN,
3600
3626
  ACCESS_IGNORE_END,
@@ -3604,6 +3630,8 @@ export {
3604
3630
  DEFAULT_AI_IGNORE_PATHS,
3605
3631
  HOST_APPS_FILE,
3606
3632
  MAINTAINER_PRO_HOME_DIR,
3633
+ PACKAGE_NAME,
3634
+ PACKAGE_VERSION,
3607
3635
  PROMPT_SECTION,
3608
3636
  WORKING_PROVIDER,
3609
3637
  buildClaudeUserPrompt,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maintainer-pro/ai-cli",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "Maintainer Pro server SDK: Claude/Cursor CLI, chat HTTP handlers, and optional SQL persistence",
5
5
  "keywords": [
6
6
  "maintainer-pro",