orchid-ai 1.3.0 → 1.3.1

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/README.md CHANGED
@@ -119,6 +119,14 @@ npx orchid-generate-schemas init --verbose
119
119
 
120
120
  See [Schema Generation Guide](docs/SCHEMA_GENERATION.md) for detailed usage.
121
121
 
122
+ ## Publishing & `orchid-ai/headless`
123
+
124
+ `npm publish` and `npm pack` run **`prepack`**, which executes **`npm run build`** and **`npm run verify-dist`**. That guarantees the registry tarball includes **`dist/headless.*`**, **`dist/server/*`**, and the main bundle — required for **`import … from 'orchid-ai/headless'`** and **`orchid-ai/server`**.
125
+
126
+ If you link this repo with **`file:../…`**, run **`npm run build`** in the package after changes so `dist/` is present.
127
+
128
+ See [Headless usage](docs/HEADLESS.md) for MUI / hooks-only integration.
129
+
122
130
  ## Documentation
123
131
 
124
132
  - [**Schema Generation**](docs/SCHEMA_GENERATION.md)
@@ -11,6 +11,6 @@ export declare class ErrorBoundary extends Component<Props, State> {
11
11
  constructor(props: Props);
12
12
  static getDerivedStateFromError(error: Error): State;
13
13
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
14
- render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | null | undefined;
14
+ render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
15
15
  }
16
16
  export {};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Headless API — streaming hooks, model switching, and shared types/constants
3
+ * without Tailwind-based components. Build your UI with MUI, plain CSS, etc.
4
+ *
5
+ * @example
6
+ * import { useStreamingAI, useModelSwitcher } from 'orchid-ai/headless';
7
+ */
8
+ export { useStreamingAI } from './hooks/useStreamingAI';
9
+ export type { StreamingModelSelection } from './hooks/useStreamingAI';
10
+ export { useSuggestions, useDebouncedSuggestions, } from './hooks/useSuggestions';
11
+ export { useResolvedDefaultModel } from './hooks/useResolvedDefaultModel';
12
+ export { useModelSwitcher } from './hooks/useModelSwitcher';
13
+ export { mergeWithAi } from './utils';
14
+ export { useAiMerge } from './hooks/useAiMerge';
15
+ export { ErrorBoundary } from './components/ErrorBoundary';
16
+ export { DEFAULT_CONFIG, DEFAULT_MODELS } from './constants';
17
+ export { defaultTheme as defaultCommandTheme } from './constants';
18
+ export { defaultDarkTheme, defaultLightTheme } from './constants';
19
+ export type { CommandConfig, TrainingData, AIProvider, CommandTheme, CommandSuggestion, CommandPopupProps, ChatMessage, ChatTheme, AIStatus, Action, ModelInfo, ServerConfig, ClientConfig, SchemaDefinition, SchemaProperty, ContextualServiceConfig, ContextualRequest, ModelCapabilities, MessageContent, TextContent, SuggestionsContent, LoadingSuggestionsContent, } from './types/types';
@@ -1,5 +1,5 @@
1
1
  import { ChatMessage, ModelCapabilities, ServerConfig } from '../types/types';
2
- interface ModelSelection {
2
+ export interface StreamingModelSelection {
3
3
  provider: string;
4
4
  model?: string;
5
5
  tier?: 'fast' | 'balanced' | 'powerful';
@@ -13,7 +13,7 @@ export declare function useStreamingAI({ userId, serverConfig, formData, chats:
13
13
  setChats?: React.Dispatch<React.SetStateAction<Record<string, ChatMessage[]>>>;
14
14
  currentChatId?: string;
15
15
  setCurrentChatId?: React.Dispatch<React.SetStateAction<string>>;
16
- modelSelection?: ModelSelection;
16
+ modelSelection?: StreamingModelSelection;
17
17
  onUsageTracked?: (tokens: number, computeUnits: number) => void;
18
18
  chatLevel?: 'full' | 'basic' | 'none';
19
19
  additionalContext?: string | Record<string, unknown>;
@@ -27,4 +27,3 @@ export declare function useStreamingAI({ userId, serverConfig, formData, chats:
27
27
  newChat: () => void;
28
28
  switchChat: (chatId: string) => void;
29
29
  };
30
- export {};
@@ -1,4 +1,5 @@
1
1
  export { useStreamingAI } from './hooks/useStreamingAI';
2
+ export type { StreamingModelSelection } from './hooks/useStreamingAI';
2
3
  export { useSuggestions, useDebouncedSuggestions, } from './hooks/useSuggestions';
3
4
  export { useResolvedDefaultModel } from './hooks/useResolvedDefaultModel';
4
5
  export { ChatPanel } from './components/ChatPanel';
@@ -11,6 +11,6 @@ export declare class ErrorBoundary extends Component<Props, State> {
11
11
  constructor(props: Props);
12
12
  static getDerivedStateFromError(error: Error): State;
13
13
  componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
14
- render(): string | number | boolean | import("react/jsx-runtime").JSX.Element | Iterable<React.ReactNode> | null | undefined;
14
+ render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
15
15
  }
16
16
  export {};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Headless API — streaming hooks, model switching, and shared types/constants
3
+ * without Tailwind-based components. Build your UI with MUI, plain CSS, etc.
4
+ *
5
+ * @example
6
+ * import { useStreamingAI, useModelSwitcher } from 'orchid-ai/headless';
7
+ */
8
+ export { useStreamingAI } from './hooks/useStreamingAI';
9
+ export type { StreamingModelSelection } from './hooks/useStreamingAI';
10
+ export { useSuggestions, useDebouncedSuggestions, } from './hooks/useSuggestions';
11
+ export { useResolvedDefaultModel } from './hooks/useResolvedDefaultModel';
12
+ export { useModelSwitcher } from './hooks/useModelSwitcher';
13
+ export { mergeWithAi } from './utils';
14
+ export { useAiMerge } from './hooks/useAiMerge';
15
+ export { ErrorBoundary } from './components/ErrorBoundary';
16
+ export { DEFAULT_CONFIG, DEFAULT_MODELS } from './constants';
17
+ export { defaultTheme as defaultCommandTheme } from './constants';
18
+ export { defaultDarkTheme, defaultLightTheme } from './constants';
19
+ export type { CommandConfig, TrainingData, AIProvider, CommandTheme, CommandSuggestion, CommandPopupProps, ChatMessage, ChatTheme, AIStatus, Action, ModelInfo, ServerConfig, ClientConfig, SchemaDefinition, SchemaProperty, ContextualServiceConfig, ContextualRequest, ModelCapabilities, MessageContent, TextContent, SuggestionsContent, LoadingSuggestionsContent, } from './types/types';