@popcomputer/structured-chat 0.2.0-rc.0 → 0.2.0

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.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  export { AssistantDataPartSchema, AssistantMessagePartSchema, AssistantTextPartSchema, CollectQuestionView, InvalidChatPresentation, presentAnswerValidationRejection, presentChatNotice, presentChatReply, StructuredChatAssistantMessageSchema, StructuredChatSessionReferenceSchema, StructuredChatTurnRequestSchema, StructuredChatTurnResponseSchema, Text, type AssistantMessagePart, type PresentChatReplyOptions, type StructuredChatAssistantMessage, type StructuredChatSessionReference, type StructuredChatTurnRequest, type StructuredChatTurnResponse, } from "./core/protocol.js";
2
+ export { inspectChatState, InvalidChatDebugProjection, StructuredChatDebugSnapshotSchema, type InspectChatStateOptions, type StructuredChatDebugSnapshot, } from "./core/debug.js";
3
+ export { presentChatDebugReply, StructuredChatDebugTurnResponseSchema, type PresentChatDebugReplyOptions, type StructuredChatDebugTurnResponse, } from "./core/debug-protocol.js";
2
4
  export { makeStructuredChatModel, ModelProvider, structuredChatModelLayer, StructuredChatModelIdSchema, StructuredChatProviderIdSchema, StructuredChatRequestTimeoutSchema, type CloudflareWorkersAIProviderConfig, type OpenAIProviderConfig, type StructuredChatModelConfig, type StructuredChatModelId, type StructuredChatProvider, type StructuredChatProviderId, type StructuredChatProviderRequest, } from "./adapters/openai-compatible-model.js";
3
5
  export { ChatNameSchema, ChatVersionSchema, defineChat, InvalidChatTransition, InvalidChatTransitionReasonSchema, type ChatDefinition, type ChatError, type ChatRequirements, type ChatReply, type ChatReplyError, type ChatReplyInput, type ChatStageStates, type ChatStageTuple, type ChatState, type ChatTurn, type DefineChatInput, } from "./core/chat.js";
4
6
  export { Answer, AnswerModeSchema, type AnswerDefinition, type AnswerDefinitionContract, type AnswerMode, type DefineAnswerInput, type DefineUnvalidatedAnswerInput, type DefineValidatedAnswerInput, } from "./core/answer.js";
package/dist/index.js CHANGED
@@ -1,4 +1,6 @@
1
1
  export { AssistantDataPartSchema, AssistantMessagePartSchema, AssistantTextPartSchema, CollectQuestionView, InvalidChatPresentation, presentAnswerValidationRejection, presentChatNotice, presentChatReply, StructuredChatAssistantMessageSchema, StructuredChatSessionReferenceSchema, StructuredChatTurnRequestSchema, StructuredChatTurnResponseSchema, Text, } from "./core/protocol.js";
2
+ export { inspectChatState, InvalidChatDebugProjection, StructuredChatDebugSnapshotSchema, } from "./core/debug.js";
3
+ export { presentChatDebugReply, StructuredChatDebugTurnResponseSchema, } from "./core/debug-protocol.js";
2
4
  export { makeStructuredChatModel, ModelProvider, structuredChatModelLayer, StructuredChatModelIdSchema, StructuredChatProviderIdSchema, StructuredChatRequestTimeoutSchema, } from "./adapters/openai-compatible-model.js";
3
5
  export { ChatNameSchema, ChatVersionSchema, defineChat, InvalidChatTransition, InvalidChatTransitionReasonSchema, } from "./core/chat.js";
4
6
  export { Answer, AnswerModeSchema, } from "./core/answer.js";
@@ -0,0 +1,25 @@
1
+ import type { StructuredChatDebugSnapshot } from "../core/debug.js";
2
+ /** Viewport corner used by the structured-chat debug panel. */
3
+ export type StructuredChatDebugPanelPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
4
+ /** Color treatment used by the structured-chat debug panel. */
5
+ export type StructuredChatDebugPanelTheme = "system" | "light" | "dark";
6
+ /** Explicit in-memory source consumed by one structured-chat debug panel. */
7
+ export interface StructuredChatDebugStore {
8
+ /** Replace the current snapshot and notify active subscribers. */
9
+ readonly receive: (snapshot: StructuredChatDebugSnapshot) => void;
10
+ /** Subscribe to snapshot replacement. */
11
+ readonly subscribe: (listener: () => void) => () => void;
12
+ /** Read the current snapshot, or null before the first reply. */
13
+ readonly getSnapshot: () => StructuredChatDebugSnapshot | null;
14
+ }
15
+ /** Create one isolated structured-chat debug snapshot store. */
16
+ export declare const createStructuredChatDebugStore: () => StructuredChatDebugStore;
17
+ /** Props for the fixed, collapsible structured-chat debug panel. */
18
+ export interface StructuredChatDebugPanelProps {
19
+ readonly store: StructuredChatDebugStore;
20
+ readonly position?: StructuredChatDebugPanelPosition;
21
+ readonly theme?: StructuredChatDebugPanelTheme;
22
+ readonly defaultOpen?: boolean;
23
+ }
24
+ /** Render one fixed, accessible inspector for the latest debug snapshot. */
25
+ export declare const StructuredChatDebugPanel: ({ store, position, theme, defaultOpen, }: StructuredChatDebugPanelProps) => import("react").JSX.Element;