@theoremjs/react 0.3.4-next.363.g11be542 → 0.3.4-next.375.ga2d1878
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 +23 -336
- package/client/host-call.d.ts +2 -2
- package/client/host-call.js +1 -2
- package/client/index.d.ts +1 -28
- package/client/index.js +1 -22
- package/client/live/apply-live-turn-tool-event.js +1 -1
- package/client/live/run-live-tool-call.d.ts +1 -3
- package/client/live/run-live-tool-call.js +1 -1
- package/client/transcript-groups.js +1 -1
- package/client/voice-recorder.js +1 -1
- package/components/live/use-live-runner-controls.d.ts +1 -2
- package/components/live/use-live-runner-model.d.ts +7 -8
- package/components/live/use-live-runner-model.js +1 -2
- package/components/live/use-live-runner-ui.d.ts +2 -4
- package/components/live/use-live-runner-ui.js +1 -1
- package/components/live/use-live-session-client.d.ts +2 -5
- package/components/live/use-live-session-client.js +1 -1
- package/hooks/use-described.d.ts +1 -1
- package/hooks/use-described.js +1 -1
- package/hooks/use-embedding-index.d.ts +1 -1
- package/hooks/use-embedding-index.js +1 -1
- package/hooks/use-one-call.d.ts +2 -2
- package/hooks/use-one-call.js +1 -2
- package/hooks/use-page-tool-warnings.d.ts +2 -5
- package/hooks/use-page-tool-warnings.js +3 -14
- package/hooks/use-theorem-chat.d.ts +35 -81
- package/hooks/use-theorem-chat.js +30 -522
- package/hooks/use-theorem-decision.d.ts +1 -2
- package/hooks/use-theorem-embedding.d.ts +1 -2
- package/hooks/use-theorem-host.d.ts +2 -4
- package/hooks/use-theorem-host.js +1 -4
- package/hooks/use-theorem-interface.d.ts +1 -2
- package/hooks/use-trace-records.d.ts +1 -1
- package/index.d.ts +2 -3
- package/index.js +2 -3
- package/live.d.ts +1 -2
- package/package.json +3 -2
- package/server/mod.d.ts +1 -26
- package/server/mod.js +1 -24
- package/ui/ChatComposerBar.d.ts +1 -1
- package/ui/ChatComposerBar.js +1 -3
- package/ui/ChatTranscript.d.ts +1 -1
- package/ui/ChatTranscript.js +1 -1
- package/ui/ConsoleFrame.d.ts +1 -1
- package/ui/DecisionAnswers.d.ts +1 -1
- package/ui/EmbeddingDocuments.d.ts +2 -2
- package/ui/EmbeddingDocuments.js +1 -2
- package/ui/EmbeddingQuery.d.ts +1 -1
- package/ui/EmbeddingQuery.js +1 -2
- package/ui/EmbeddingResults.d.ts +1 -1
- package/ui/EmbeddingResults.js +1 -1
- package/ui/EmbeddingSpace.d.ts +1 -2
- package/ui/LiveRunner.d.ts +1 -2
- package/ui/SchemaFields.d.ts +1 -1
- package/ui/SchemaFields.js +1 -2
- package/ui/ShapedData.js +1 -1
- package/ui/StateFields.js +1 -1
- package/ui/TheoremChat.d.ts +2 -2
- package/ui/TheoremChat.js +1 -1
- package/ui/TheoremDecision.d.ts +1 -1
- package/ui/TheoremDecision.js +1 -1
- package/ui/TheoremEmbedding.d.ts +1 -1
- package/ui/TheoremEmbedding.js +1 -2
- package/ui/TheoremHost.d.ts +2 -3
- package/ui/TheoremHost.js +1 -3
- package/ui/ToolGateCard.d.ts +1 -1
- package/ui/ToolGateCard.js +1 -2
- package/ui/ToolResult.d.ts +1 -1
- package/ui/ToolResult.js +1 -2
- package/ui/ToolResultCharts.d.ts +1 -1
- package/ui/ToolResultCharts.js +1 -2
- package/ui/TraceInspector.d.ts +1 -1
- package/ui/TraceInspectorPanel.d.ts +1 -1
- package/ui/approval-heading.js +1 -1
- package/ui/embedding-space-gl.d.ts +2 -2
- package/ui/embedding-space-gl.js +1 -1
- package/ui/index.d.ts +1 -1
- package/ui/labels.d.ts +1 -2
- package/client/audio-level.d.ts +0 -5
- package/client/audio-level.js +0 -24
- package/client/composer-drawer.d.ts +0 -19
- package/client/composer-drawer.js +0 -15
- package/client/composer-hints.d.ts +0 -25
- package/client/composer-hints.js +0 -20
- package/client/composer-primary.d.ts +0 -16
- package/client/composer-primary.js +0 -25
- package/client/decision-transport.d.ts +0 -70
- package/client/decision-transport.js +0 -175
- package/client/decode-composer-draft.d.ts +0 -11
- package/client/decode-composer-draft.js +0 -12
- package/client/embedding-input.d.ts +0 -84
- package/client/embedding-input.js +0 -194
- package/client/embedding-space.d.ts +0 -82
- package/client/embedding-space.js +0 -389
- package/client/embedding-transport.d.ts +0 -40
- package/client/embedding-transport.js +0 -71
- package/client/encode-composer-draft.d.ts +0 -9
- package/client/encode-composer-draft.js +0 -34
- package/client/encode-files.d.ts +0 -18
- package/client/encode-files.js +0 -54
- package/client/failure.d.ts +0 -29
- package/client/failure.js +0 -34
- package/client/generation-selection.d.ts +0 -15
- package/client/generation-selection.js +0 -24
- package/client/host-transport.d.ts +0 -70
- package/client/host-transport.js +0 -75
- package/client/live/live-mic-forward.d.ts +0 -30
- package/client/live/live-mic-forward.js +0 -46
- package/client/live/live-page-tool.d.ts +0 -34
- package/client/live/live-page-tool.js +0 -11
- package/client/live/live-state.d.ts +0 -13
- package/client/live/live-state.js +0 -22
- package/client/live/live-tool.d.ts +0 -11
- package/client/live/live-tool.js +0 -1
- package/client/live-client.d.ts +0 -189
- package/client/live-client.js +0 -829
- package/client/live-errors.d.ts +0 -2
- package/client/live-errors.js +0 -9
- package/client/live-messages.d.ts +0 -148
- package/client/live-messages.js +0 -100
- package/client/mic-capture.d.ts +0 -4
- package/client/mic-capture.js +0 -6
- package/client/oauth-popup.d.ts +0 -26
- package/client/oauth-popup.js +0 -30
- package/client/page-dispatch.d.ts +0 -15
- package/client/page-dispatch.js +0 -63
- package/client/pcm-downsample.d.ts +0 -4
- package/client/pcm-downsample.js +0 -45
- package/client/run-commit.d.ts +0 -34
- package/client/run-commit.js +0 -49
- package/client/run-session.d.ts +0 -79
- package/client/run-session.js +0 -207
- package/client/schema-fields.d.ts +0 -63
- package/client/schema-fields.js +0 -199
- package/client/shaped-data.d.ts +0 -118
- package/client/shaped-data.js +0 -343
- package/client/source-citations.d.ts +0 -13
- package/client/source-citations.js +0 -56
- package/client/space-geometry.d.ts +0 -39
- package/client/space-geometry.js +0 -183
- package/client/tool-result.d.ts +0 -78
- package/client/tool-result.js +0 -293
- package/client/tool-resume.d.ts +0 -50
- package/client/tool-resume.js +0 -14
- package/client/trace-feed.d.ts +0 -13
- package/client/trace-feed.js +0 -18
- package/client/transcript-schema.d.ts +0 -10
- package/client/transcript-schema.js +0 -120
- package/client/transport.d.ts +0 -264
- package/client/transport.js +0 -330
- package/client/turn-client.d.ts +0 -44
- package/client/turn-client.js +0 -88
- package/client/wire-line.d.ts +0 -56
- package/client/wire-line.js +0 -90
- package/client/worklets/mic-capture.js +0 -16
- package/hooks/use-theorem-chat-actions.d.ts +0 -79
- package/hooks/use-theorem-chat-actions.js +0 -287
- package/hooks/use-theorem-chat-state.d.ts +0 -66
- package/hooks/use-theorem-chat-state.js +0 -122
- package/server/checkpoint-ownership.d.ts +0 -6
- package/server/checkpoint-ownership.js +0 -42
- package/server/conversation-store.d.ts +0 -92
- package/server/conversation-store.js +0 -131
- package/server/conversation.d.ts +0 -193
- package/server/conversation.js +0 -552
- package/server/credential-store.d.ts +0 -24
- package/server/credential-store.js +0 -14
- package/server/decision-handler.d.ts +0 -42
- package/server/decision-handler.js +0 -46
- package/server/embedding-handler.d.ts +0 -33
- package/server/embedding-handler.js +0 -45
- package/server/handler.d.ts +0 -158
- package/server/handler.js +0 -775
- package/server/json-response.d.ts +0 -2
- package/server/json-response.js +0 -7
- package/server/mcp-handler.d.ts +0 -46
- package/server/mcp-handler.js +0 -312
- package/server/page-dispatch.d.ts +0 -22
- package/server/page-dispatch.js +0 -127
- package/server/request-body.d.ts +0 -2
- package/server/request-body.js +0 -42
- package/server/request-check.d.ts +0 -21
- package/server/request-check.js +0 -49
- package/server/session-authority.d.ts +0 -8
- package/server/session-authority.js +0 -78
- package/server/session-boundary.d.ts +0 -26
- package/server/session-boundary.js +0 -64
- package/server/session-identity.d.ts +0 -16
- package/server/session-identity.js +0 -41
- package/server/session-limits.d.ts +0 -12
- package/server/session-limits.js +0 -59
- package/server/session-store.d.ts +0 -123
- package/server/session-store.js +0 -264
- package/server/single-action.d.ts +0 -21
- package/server/single-action.js +0 -30
- package/server/steer-inbox.d.ts +0 -35
- package/server/steer-inbox.js +0 -52
- package/server/tool-operations.d.ts +0 -6
- package/server/tool-operations.js +0 -132
- package/server/turn-input.d.ts +0 -10
- package/server/turn-input.js +0 -29
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theoremjs/react",
|
|
3
|
-
"version": "0.3.4-next.
|
|
3
|
+
"version": "0.3.4-next.375.ga2d1878",
|
|
4
4
|
"description": "React bindings for Theorem: headless hooks + transport, an Astryx chat UI, and a Web-standard server handler.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -60,7 +60,8 @@
|
|
|
60
60
|
"@stylexjs/stylex": "0.19.0",
|
|
61
61
|
"react": "^19.0.0",
|
|
62
62
|
"react-dom": "^19.0.0",
|
|
63
|
-
"@theoremjs/agents": "^0.3.4-next.
|
|
63
|
+
"@theoremjs/agents": "^0.3.4-next.375.ga2d1878",
|
|
64
|
+
"@theoremjs/web": "^0.3.4-next.375.ga2d1878"
|
|
64
65
|
},
|
|
65
66
|
"peerDependenciesMeta": {
|
|
66
67
|
"@astryxdesign/core": {
|
package/server/mod.d.ts
CHANGED
|
@@ -1,26 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Server half of `@theoremjs/react`: serve one profile to the chat UI, a
|
|
3
|
-
* decision profile to the decision UI, or a host profile's tools to the host UI or to MCP clients.
|
|
4
|
-
*
|
|
5
|
-
* @module
|
|
6
|
-
*/
|
|
7
|
-
export { theoremHostCallRequestSchema } from '../client/host-transport.ts';
|
|
8
|
-
export type { LiveClientMessage, LiveOpenMessage } from '../client/live-messages.ts';
|
|
9
|
-
export { theoremConversationRequestSchema, theoremInvokeRequestSchema, theoremReplaySchema, theoremRewindRequestSchema, theoremSteerRequestSchema, theoremTurnRequestSchema, } from '../client/transport.ts';
|
|
10
|
-
export { answerReply, type ConversationHost, type ConversationUse, conversationView, type IssuedWalkAway, messageReply, type OpenedConversation, openConversation, type PostedMessage, postedMessage, type ReplyLine, type ReplyRunner, type ReplyTurn, readerConversationHost, rewindConversation, startConversation, statelessRefusal, type WalkedAwayCall, waitingCalls, } from './conversation.ts';
|
|
11
|
-
export { type ConversationSnapshot, type ConversationWriteResult, createMemoryConversationStore, createSealedConversationStore, emptyConversation, type PausedReply, type SealedConversationStoreOptions, type StoredConversation, storedConversationSchema, type TheoremConversationStore, unknownConversation, } from './conversation-store.ts';
|
|
12
|
-
export { createMemoryCredentialStore, type TheoremCredentialStore, type TheoremCredentials, } from './credential-store.ts';
|
|
13
|
-
export { createTheoremDecisionHandler, type TheoremDecisionHandlerOptions, } from './decision-handler.ts';
|
|
14
|
-
export { createTheoremEmbeddingHandler, embedBodySchema, embedRequest, type TheoremEmbeddingHandlerOptions, } from './embedding-handler.ts';
|
|
15
|
-
export { createTheoremHandler, createTheoremHostHandler, readBody, type TheoremHandlerOptions, type TheoremHostHandlerOptions, type TheoremRequestContext, theoremSession, theoremSessionId, } from './handler.ts';
|
|
16
|
-
export { createTheoremMcpHandler, type TheoremMcpHandlerOptions } from './mcp-handler.ts';
|
|
17
|
-
export { createMemoryPageToolBroker, type PageToolBroker, type PageToolResult, pageToolResultSchema, sessionPageDispatch, } from './page-dispatch.ts';
|
|
18
|
-
export { checkRequest, parseLiveClientMessage, parseLiveOpenMessage } from './request-check.ts';
|
|
19
|
-
export { sessionStateStore } from './session-authority.ts';
|
|
20
|
-
export { createTheoremSessionBoundary, type PreparedLiveOpen, type SessionBoundaryOptions, type TheoremSessionBoundary, } from './session-boundary.ts';
|
|
21
|
-
export type { TheoremSessionLimits } from './session-limits.ts';
|
|
22
|
-
export { resolveSessionLimits } from './session-limits.ts';
|
|
23
|
-
export { createMemorySessionStore, DEFAULT_OPERATION_RETENTION_MS, type MemorySessionStoreOptions, type PendingToolGate, type SessionSnapshot, type SessionToolOperation, type SessionWriteResult, type TheoremSessionState, type TheoremSessionStore, theoremSessionStateSchema, } from './session-store.ts';
|
|
24
|
-
export { createMemorySteerInbox, type SteerInbox, type SteerUnit, steerStage, steerUnitOf, } from './steer-inbox.ts';
|
|
25
|
-
export { sessionToolCoordinator } from './tool-operations.ts';
|
|
26
|
-
export { kernelTurnInput, liveSessionOpen } from './turn-input.ts';
|
|
1
|
+
export * from '@theoremjs/web/server';
|
package/server/mod.js
CHANGED
|
@@ -1,24 +1 @@
|
|
|
1
|
-
|
|
2
|
-
* Server half of `@theoremjs/react`: serve one profile to the chat UI, a
|
|
3
|
-
* decision profile to the decision UI, or a host profile's tools to the host UI or to MCP clients.
|
|
4
|
-
*
|
|
5
|
-
* @module
|
|
6
|
-
*/
|
|
7
|
-
export { theoremHostCallRequestSchema } from "../client/host-transport.js";
|
|
8
|
-
export { theoremConversationRequestSchema, theoremInvokeRequestSchema, theoremReplaySchema, theoremRewindRequestSchema, theoremSteerRequestSchema, theoremTurnRequestSchema, } from "../client/transport.js";
|
|
9
|
-
export { answerReply, conversationView, messageReply, openConversation, postedMessage, readerConversationHost, rewindConversation, startConversation, statelessRefusal, waitingCalls, } from "./conversation.js";
|
|
10
|
-
export { createMemoryConversationStore, createSealedConversationStore, emptyConversation, storedConversationSchema, unknownConversation, } from "./conversation-store.js";
|
|
11
|
-
export { createMemoryCredentialStore, } from "./credential-store.js";
|
|
12
|
-
export { createTheoremDecisionHandler, } from "./decision-handler.js";
|
|
13
|
-
export { createTheoremEmbeddingHandler, embedBodySchema, embedRequest, } from "./embedding-handler.js";
|
|
14
|
-
export { createTheoremHandler, createTheoremHostHandler, readBody, theoremSession, theoremSessionId, } from "./handler.js";
|
|
15
|
-
export { createTheoremMcpHandler } from "./mcp-handler.js";
|
|
16
|
-
export { createMemoryPageToolBroker, pageToolResultSchema, sessionPageDispatch, } from "./page-dispatch.js";
|
|
17
|
-
export { checkRequest, parseLiveClientMessage, parseLiveOpenMessage } from "./request-check.js";
|
|
18
|
-
export { sessionStateStore } from "./session-authority.js";
|
|
19
|
-
export { createTheoremSessionBoundary, } from "./session-boundary.js";
|
|
20
|
-
export { resolveSessionLimits } from "./session-limits.js";
|
|
21
|
-
export { createMemorySessionStore, DEFAULT_OPERATION_RETENTION_MS, theoremSessionStateSchema, } from "./session-store.js";
|
|
22
|
-
export { createMemorySteerInbox, steerStage, steerUnitOf, } from "./steer-inbox.js";
|
|
23
|
-
export { sessionToolCoordinator } from "./tool-operations.js";
|
|
24
|
-
export { kernelTurnInput, liveSessionOpen } from "./turn-input.js";
|
|
1
|
+
export * from '@theoremjs/web/server';
|
package/ui/ChatComposerBar.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ChatComposerInputHandle } from '@astryxdesign/core/Chat';
|
|
2
2
|
import { type AttachmentValidationIssue, type ComposerMenuAction, type ComposerPendingMessage, type ComposerProfileInterface, type ComposerRunPhase, type LiveProfileInterface } from '@theoremjs/agents/interface';
|
|
3
|
-
import type { ClientFailure } from '
|
|
3
|
+
import type { ClientFailure } from '@theoremjs/web/client';
|
|
4
4
|
/** A slot the profile declares: its allowed values, the one chosen, and how to choose another. */
|
|
5
5
|
/** The effort selector's icon. The studio's Agents list shows the same one. */
|
|
6
6
|
export declare const EFFORT_ICON: import("react").ForwardRefExoticComponent<import("@tabler/icons-react").IconProps & import("react").RefAttributes<SVGSVGElement>>;
|
package/ui/ChatComposerBar.js
CHANGED
|
@@ -15,11 +15,9 @@ import { VStack } from '@astryxdesign/core/VStack';
|
|
|
15
15
|
import { IconAdjustmentsHorizontal, IconArrowDown, IconArrowUp, IconBrain, IconCornerDownLeft, IconInputAi, IconMicrophone, IconPaperclip, IconPencil, IconPlayerRecordFilled, IconSend, IconStack2, IconX, } from '@tabler/icons-react';
|
|
16
16
|
import { attachmentIssueText, labelText } from '@theoremjs/agents';
|
|
17
17
|
import { composerPendingPreview, effortSelectEnabled, interfaceEffortOptions, interfaceModelOptions, modelSelectEnabled, } from '@theoremjs/agents/interface';
|
|
18
|
+
import { composerActionState, composerDrawerSummary, isStashShortcut, resolveComposerHint, STASH_SHORTCUT, } from '@theoremjs/web/client';
|
|
18
19
|
import { useCallback, useEffect, useMemo, useRef, useState, } from 'react';
|
|
19
20
|
import { stageComposerFiles } from "../client/composer-attachments.js";
|
|
20
|
-
import { composerDrawerSummary } from "../client/composer-drawer.js";
|
|
21
|
-
import { isStashShortcut, resolveComposerHint, STASH_SHORTCUT, } from "../client/composer-hints.js";
|
|
22
|
-
import { composerActionState } from "../client/composer-primary.js";
|
|
23
21
|
import { useComposerVoice } from "../components/use-composer-voice.js";
|
|
24
22
|
import { useEditorSelection } from "../components/use-editor-selection.js";
|
|
25
23
|
import { composerDrawerLabel } from "./labels.js";
|
package/ui/ChatTranscript.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { type ChatMessageStatus } from '@astryxdesign/core/Chat';
|
|
2
2
|
import type { LabelOverrides } from '@theoremjs/agents';
|
|
3
3
|
import { type TranscriptBlock } from '@theoremjs/agents/interface';
|
|
4
|
+
import type { AnsweringGate } from '@theoremjs/web/client';
|
|
4
5
|
import { type ReactNode } from 'react';
|
|
5
|
-
import type { AnsweringGate } from '../client/tool-resume.ts';
|
|
6
6
|
import { type ToolDecision } from './ToolGateCard.tsx';
|
|
7
7
|
export type ChatTranscriptProps = {
|
|
8
8
|
blocks: readonly TranscriptBlock[];
|
package/ui/ChatTranscript.js
CHANGED
|
@@ -20,8 +20,8 @@ import { Tooltip as HoverTip } from '@astryxdesign/core/Tooltip';
|
|
|
20
20
|
import { VStack } from '@astryxdesign/core/VStack';
|
|
21
21
|
import { IconCheck, IconCopy } from '@tabler/icons-react';
|
|
22
22
|
import { stopText } from '@theoremjs/agents/interface';
|
|
23
|
+
import { citationsFromBlock } from '@theoremjs/web/client';
|
|
23
24
|
import { createContext, useContext, useEffect, useMemo, useRef, useState, } from 'react';
|
|
24
|
-
import { citationsFromBlock } from "../client/source-citations.js";
|
|
25
25
|
import { assistantTurnCopyText, assistantTurnTiming, composeAssistantTurn, groupTranscriptBlocks, pendingPromptOf, promptReplyKey, promptTime, replyKey, toolCallLabel, workStatus, } from "../client/transcript-groups.js";
|
|
26
26
|
import { useSecondTicker } from "../hooks/use-second-ticker.js";
|
|
27
27
|
import { useDisclosureMotion } from "./disclosure-motion.js";
|
package/ui/ConsoleFrame.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DefinedTheme } from '@astryxdesign/core/theme';
|
|
2
|
+
import type { HttpOptions } from '@theoremjs/web/client';
|
|
2
3
|
import { type CSSProperties, type ReactNode } from 'react';
|
|
3
|
-
import type { HttpOptions } from '../client/transport.ts';
|
|
4
4
|
import type { TheoremLabels } from './labels.ts';
|
|
5
5
|
import { type TraceInspector } from './TraceInspectorPanel.tsx';
|
|
6
6
|
/** The props a one-call console page shares: its look, its wording, its trace, and its layout. */
|
package/ui/DecisionAnswers.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DecisionJson, DecisionResult } from '@theoremjs/agents';
|
|
2
|
+
import type { DecisionInterface } from '@theoremjs/web/client';
|
|
2
3
|
import { type ReactNode } from 'react';
|
|
3
4
|
import { type DecisionImages } from '../client/decision-images.ts';
|
|
4
|
-
import type { DecisionInterface } from '../client/decision-transport.ts';
|
|
5
5
|
export type TheoremDecisionAnswersProps = {
|
|
6
6
|
iface: DecisionInterface;
|
|
7
7
|
result: DecisionResult;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type EmbeddingInput } from '@theoremjs/agents';
|
|
2
|
+
import type { EmbeddingInterface } from '@theoremjs/web/client';
|
|
3
|
+
import { type EmbeddingInputCheck, type EmbeddingMediaPart } from '@theoremjs/web/client';
|
|
2
4
|
import { type ReactNode } from 'react';
|
|
3
|
-
import { type EmbeddingInputCheck, type EmbeddingMediaPart } from '../client/embedding-input.ts';
|
|
4
|
-
import type { EmbeddingInterface } from '../client/embedding-transport.ts';
|
|
5
5
|
import { type ConsoleView } from './ConsoleFrame.tsx';
|
|
6
6
|
import type { LabelText } from './labels.ts';
|
|
7
7
|
/** The profile's `inputs`, which every request is held to. */
|
package/ui/EmbeddingDocuments.js
CHANGED
|
@@ -13,9 +13,8 @@ import { Tooltip } from '@astryxdesign/core/Tooltip';
|
|
|
13
13
|
import { VStack } from '@astryxdesign/core/VStack';
|
|
14
14
|
import { IconBaselineDensityMedium, IconCsv, IconFileText, IconPilcrow, IconScissors, IconX, } from '@tabler/icons-react';
|
|
15
15
|
import { attachmentIssueText, base64Bytes } from '@theoremjs/agents';
|
|
16
|
+
import { checkInputs, embeddingBatches, encodeFiles, readEmbeddingInputs, readsAsText, splitText, } from '@theoremjs/web/client';
|
|
16
17
|
import { useMemo, useState } from 'react';
|
|
17
|
-
import { checkInputs, embeddingBatches, readEmbeddingInputs, readsAsText, splitText, } from "../client/embedding-input.js";
|
|
18
|
-
import { encodeFiles } from "../client/encode-files.js";
|
|
19
18
|
import { JsonRequest, RequestCard, RunBar, useBytes } from "./ConsoleFrame.js";
|
|
20
19
|
import { useLabels } from "./labels-provider.js";
|
|
21
20
|
import { textRows } from "./StateFields.js";
|
package/ui/EmbeddingQuery.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type EmbeddingInput } from '@theoremjs/agents';
|
|
2
|
-
import { type EmbeddingFields } from '
|
|
2
|
+
import { type EmbeddingFields } from '@theoremjs/web/client';
|
|
3
3
|
import { type ConsoleView } from './ConsoleFrame.tsx';
|
|
4
4
|
import { type Rules } from './EmbeddingDocuments.tsx';
|
|
5
5
|
/** Where the embedded documents stand for a search: as embedded, or changed since. */
|
package/ui/EmbeddingQuery.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { TextArea } from '@astryxdesign/core/TextArea';
|
|
3
3
|
import { base64Bytes } from '@theoremjs/agents';
|
|
4
|
+
import { checkInputs, encodeFiles, fieldsInput, inputFields, readEmbeddingInput, } from '@theoremjs/web/client';
|
|
4
5
|
import { useState } from 'react';
|
|
5
|
-
import { checkInputs, fieldsInput, inputFields, readEmbeddingInput, } from "../client/embedding-input.js";
|
|
6
|
-
import { encodeFiles } from "../client/encode-files.js";
|
|
7
6
|
import { JsonRequest, RequestCard, RunBar, useBytes } from "./ConsoleFrame.js";
|
|
8
7
|
import { EmbeddingFileDrop, FileTile, inputIssue, TextBesideFile, } from "./EmbeddingDocuments.js";
|
|
9
8
|
import { useLabels } from "./labels-provider.js";
|
package/ui/EmbeddingResults.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EmbeddingResult } from '@theoremjs/agents';
|
|
2
|
-
import type { EmbeddingMatch } from '
|
|
2
|
+
import type { EmbeddingMatch } from '@theoremjs/web/client';
|
|
3
3
|
import type { EmbeddingIndex, IndexProgress } from '../hooks/use-embedding-index.ts';
|
|
4
4
|
import type { OneCallState } from '../hooks/use-one-call.ts';
|
|
5
5
|
import { type EmbeddingDocument } from './EmbeddingDocuments.tsx';
|
package/ui/EmbeddingResults.js
CHANGED
|
@@ -10,8 +10,8 @@ import { StackItem } from '@astryxdesign/core/Stack';
|
|
|
10
10
|
import { Text } from '@astryxdesign/core/Text';
|
|
11
11
|
import { VStack } from '@astryxdesign/core/VStack';
|
|
12
12
|
import { IconCheck, IconCopy } from '@tabler/icons-react';
|
|
13
|
+
import { layoutSpaceSoon, outlierThreshold, placeQuery, } from '@theoremjs/web/client';
|
|
13
14
|
import { lazy, Suspense, useEffect, useMemo, useState } from 'react';
|
|
14
|
-
import { layoutSpaceSoon, outlierThreshold, placeQuery, } from "../client/embedding-space.js";
|
|
15
15
|
import { Arrive } from "./arrive.js";
|
|
16
16
|
import { useBytes } from "./ConsoleFrame.js";
|
|
17
17
|
import { ResultStack, Share, useNumbers } from "./DecisionAnswers.js";
|
package/ui/EmbeddingSpace.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import type { EmbeddingSpace, SpacePoint } from '
|
|
2
|
-
import type { QueryMatch } from '../client/space-geometry.ts';
|
|
1
|
+
import type { EmbeddingSpace, QueryMatch, SpacePoint } from '@theoremjs/web/client';
|
|
3
2
|
export type EmbeddingSpaceViewProps = {
|
|
4
3
|
space: EmbeddingSpace;
|
|
5
4
|
/** Where the last query landed, or `null` before any. */
|
package/ui/LiveRunner.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { DefinedTheme } from '@astryxdesign/core/theme';
|
|
2
2
|
import type { LiveProfileInterface } from '@theoremjs/agents/interface';
|
|
3
|
-
import type { LiveCallOptions } from '
|
|
4
|
-
import type { LiveConnection } from '../client/live-client.ts';
|
|
3
|
+
import type { LiveCallOptions, LiveConnection } from '@theoremjs/web/client';
|
|
5
4
|
import { type TheoremLabels } from './labels.ts';
|
|
6
5
|
export type LiveRunnerProps = {
|
|
7
6
|
iface: LiveProfileInterface;
|
package/ui/SchemaFields.d.ts
CHANGED
package/ui/SchemaFields.js
CHANGED
|
@@ -14,9 +14,8 @@ import { TextArea } from '@astryxdesign/core/TextArea';
|
|
|
14
14
|
import { TextInput } from '@astryxdesign/core/TextInput';
|
|
15
15
|
import { Tokenizer } from '@astryxdesign/core/Tokenizer';
|
|
16
16
|
import { VStack } from '@astryxdesign/core/VStack';
|
|
17
|
+
import { blankRow, isRow, json, schemaFields, withField, } from '@theoremjs/web/client';
|
|
17
18
|
import { useState } from 'react';
|
|
18
|
-
import { blankRow, schemaFields, withField, } from "../client/schema-fields.js";
|
|
19
|
-
import { isRow, json } from "../client/shaped-data.js";
|
|
20
19
|
import { useLabels } from "./labels-provider.js";
|
|
21
20
|
import { useKeyedRows } from "./row-keys.js";
|
|
22
21
|
import { AddRow, Group, Labelled, RemoveRow } from "./StateFields.js";
|
package/ui/ShapedData.js
CHANGED
|
@@ -12,8 +12,8 @@ import { Table } from '@astryxdesign/core/Table';
|
|
|
12
12
|
import { Text } from '@astryxdesign/core/Text';
|
|
13
13
|
import { Token } from '@astryxdesign/core/Token';
|
|
14
14
|
import { VStack } from '@astryxdesign/core/VStack';
|
|
15
|
+
import { fieldLabel, fieldReading, isPlain, isProse, isRow, json, MAX_ROWS, plainReading, rowHeading, shapeOf, splitFields, unpacked, withUnit, } from '@theoremjs/web/client';
|
|
15
16
|
import { Component, useMemo, useState } from 'react';
|
|
16
|
-
import { fieldLabel, fieldReading, isPlain, isProse, isRow, json, MAX_ROWS, plainReading, rowHeading, shapeOf, splitFields, unpacked, withUnit, } from "../client/shaped-data.js";
|
|
17
17
|
import { Arrive, useArrive } from "./arrive.js";
|
|
18
18
|
import { useLabels } from "./labels-provider.js";
|
|
19
19
|
import { useMarkdownPlugins } from "./markdown-plugins.js";
|
package/ui/StateFields.js
CHANGED
|
@@ -15,9 +15,9 @@ import { Thumbnail } from '@astryxdesign/core/Thumbnail';
|
|
|
15
15
|
import { Tokenizer } from '@astryxdesign/core/Tokenizer';
|
|
16
16
|
import { VStack } from '@astryxdesign/core/VStack';
|
|
17
17
|
import { IconPlus, IconX } from '@tabler/icons-react';
|
|
18
|
+
import { humanize, isPlain } from '@theoremjs/web/client';
|
|
18
19
|
import { createContext, useContext, useId, useState } from 'react';
|
|
19
20
|
import { IMAGE_ACCEPT, imageSrc } from "../client/decision-images.js";
|
|
20
|
-
import { humanize, isPlain } from "../client/shaped-data.js";
|
|
21
21
|
import { blankLike, isWordList, tableColumns } from "../client/state-fields.js";
|
|
22
22
|
import { useImageReader } from "./DecisionImages.js";
|
|
23
23
|
import { useLabels } from "./labels-provider.js";
|
package/ui/TheoremChat.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { DefinedTheme } from '@astryxdesign/core/theme';
|
|
2
|
+
import type { PageTools } from '@theoremjs/web/client';
|
|
3
|
+
import { type ConversationView, type HttpTransportOptions, type TheoremTransport } from '@theoremjs/web/client';
|
|
2
4
|
import { type ReactNode, type Ref } from 'react';
|
|
3
|
-
import type { PageTools } from '../client/live/live-page-tool.ts';
|
|
4
|
-
import { type ConversationView, type HttpTransportOptions, type TheoremTransport } from '../client/transport.ts';
|
|
5
5
|
import { type SentTurn, type UseTheoremChatOptions } from '../hooks/use-theorem-chat.ts';
|
|
6
6
|
import type { TheoremLabels } from './labels.ts';
|
|
7
7
|
export type TheoremChatProps = {
|
package/ui/TheoremChat.js
CHANGED
|
@@ -6,9 +6,9 @@ import { Layout, LayoutContent } from '@astryxdesign/core/Layout';
|
|
|
6
6
|
import { Text } from '@astryxdesign/core/Text';
|
|
7
7
|
import { VStack } from '@astryxdesign/core/VStack';
|
|
8
8
|
import { moveComposerPendingWithinKind, removeComposerPendingMessage, } from '@theoremjs/agents/interface';
|
|
9
|
+
import { createHttpTransport, } from '@theoremjs/web/client';
|
|
9
10
|
import { useImperativeHandle, useMemo, useRef, } from 'react';
|
|
10
11
|
import { parseAspectRatio } from "../client/image-output.js";
|
|
11
|
-
import { createHttpTransport, } from "../client/transport.js";
|
|
12
12
|
import { useTheoremChat, } from "../hooks/use-theorem-chat.js";
|
|
13
13
|
import { useTheoremInterface } from "../hooks/use-theorem-interface.js";
|
|
14
14
|
import { ChatComposerBar } from "./ChatComposerBar.js";
|
package/ui/TheoremDecision.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { type DecisionTransport } from '@theoremjs/web/client';
|
|
1
2
|
import { type DecisionImages } from '../client/decision-images.ts';
|
|
2
|
-
import { type DecisionTransport } from '../client/decision-transport.ts';
|
|
3
3
|
import { type ConsolePageProps } from './ConsoleFrame.tsx';
|
|
4
4
|
import { type TheoremDecisionAnswersProps } from './DecisionAnswers.tsx';
|
|
5
5
|
export type TheoremDecisionProps = ConsolePageProps & {
|
package/ui/TheoremDecision.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { Banner } from '@astryxdesign/core/Banner';
|
|
3
|
+
import { createDecisionTransport, } from '@theoremjs/web/client';
|
|
3
4
|
import { useMemo, useRef, useState } from 'react';
|
|
4
5
|
import { droppedImages, namedImages, stateFields, } from "../client/decision-images.js";
|
|
5
|
-
import { createDecisionTransport, } from "../client/decision-transport.js";
|
|
6
6
|
import { useTheoremDecision } from "../hooks/use-theorem-decision.js";
|
|
7
7
|
import { ConsoleFrame, JsonRequest, RequestCard, ResponseColumn, RunBar, useBytes, } from "./ConsoleFrame.js";
|
|
8
8
|
import { TheoremDecisionAnswers } from "./DecisionAnswers.js";
|
package/ui/TheoremEmbedding.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type EmbeddingTransport } from '
|
|
1
|
+
import { type EmbeddingTransport } from '@theoremjs/web/client';
|
|
2
2
|
import { type ConsolePageProps } from './ConsoleFrame.tsx';
|
|
3
3
|
import { type EmbeddingDocument } from './EmbeddingDocuments.tsx';
|
|
4
4
|
export type TheoremEmbeddingProps = ConsolePageProps & {
|
package/ui/TheoremEmbedding.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { VStack } from '@astryxdesign/core/VStack';
|
|
3
|
+
import { createEmbeddingTransport, rankMatches, } from '@theoremjs/web/client';
|
|
3
4
|
import { useMemo, useRef, useState } from 'react';
|
|
4
|
-
import { rankMatches } from "../client/embedding-input.js";
|
|
5
|
-
import { createEmbeddingTransport, } from "../client/embedding-transport.js";
|
|
6
5
|
import { useEmbeddingIndex } from "../hooks/use-embedding-index.js";
|
|
7
6
|
import { useTheoremEmbedding } from "../hooks/use-theorem-embedding.js";
|
|
8
7
|
import { ConsoleFrame, ConsoleSection, ResponseColumn, } from "./ConsoleFrame.js";
|
package/ui/TheoremHost.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import type { DefinedTheme } from '@astryxdesign/core/theme';
|
|
2
|
+
import type { HttpOptions, PageTools } from '@theoremjs/web/client';
|
|
3
|
+
import { type HostTransport } from '@theoremjs/web/client';
|
|
2
4
|
import { type CSSProperties } from 'react';
|
|
3
|
-
import { type HostTransport } from '../client/host-transport.ts';
|
|
4
|
-
import type { PageTools } from '../client/live/live-page-tool.ts';
|
|
5
|
-
import type { HttpOptions } from '../client/transport.ts';
|
|
6
5
|
import { type TheoremLabels } from './labels.ts';
|
|
7
6
|
export type TheoremHostProps = {
|
|
8
7
|
/** Where `createTheoremHostHandler` is mounted. Default `/api/host`. Ignored when `transport` is set. */
|
package/ui/TheoremHost.js
CHANGED
|
@@ -10,11 +10,9 @@ import { Text } from '@astryxdesign/core/Text';
|
|
|
10
10
|
import { Token } from '@astryxdesign/core/Token';
|
|
11
11
|
import { VStack } from '@astryxdesign/core/VStack';
|
|
12
12
|
import { IconMathFunction, IconWorld } from '@tabler/icons-react';
|
|
13
|
+
import { createHostTransport, isRow, json, missingFields, } from '@theoremjs/web/client';
|
|
13
14
|
import { useMemo, useRef, useState } from 'react';
|
|
14
15
|
import { hostCallFailure, hostCallStatus, hostConsoleView, } from "../client/host-call.js";
|
|
15
|
-
import { createHostTransport, } from "../client/host-transport.js";
|
|
16
|
-
import { missingFields } from "../client/schema-fields.js";
|
|
17
|
-
import { isRow, json } from "../client/shaped-data.js";
|
|
18
16
|
import { toolCallLabel } from "../client/transcript-groups.js";
|
|
19
17
|
import { useSecondTicker } from "../hooks/use-second-ticker.js";
|
|
20
18
|
import { useTheoremHost } from "../hooks/use-theorem-host.js";
|
package/ui/ToolGateCard.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ToolGate } from '@theoremjs/agents/kernel';
|
|
2
|
-
import type { ToolDecisionAction } from '
|
|
2
|
+
import type { ToolDecisionAction } from '@theoremjs/web/client';
|
|
3
3
|
export type ToolDecision = ToolDecisionAction;
|
|
4
4
|
/** The widest a gate card gets, in pixels. */
|
|
5
5
|
export declare const GATE_CARD_WIDTH = 400;
|
package/ui/ToolGateCard.js
CHANGED
|
@@ -11,9 +11,8 @@ import { TextInput } from '@astryxdesign/core/TextInput';
|
|
|
11
11
|
import { Token } from '@astryxdesign/core/Token';
|
|
12
12
|
import { VStack } from '@astryxdesign/core/VStack';
|
|
13
13
|
import { IconEye, IconFlame, IconPencil } from '@tabler/icons-react';
|
|
14
|
+
import { humanize, isOAuthComplete } from '@theoremjs/web/client';
|
|
14
15
|
import { useCallback, useEffect, useState } from 'react';
|
|
15
|
-
import { isOAuthComplete } from "../client/oauth-popup.js";
|
|
16
|
-
import { humanize } from "../client/shaped-data.js";
|
|
17
16
|
import { approvalHeading } from "./approval-heading.js";
|
|
18
17
|
import { TheoremLabelsProvider, useLabels } from "./labels-provider.js";
|
|
19
18
|
/** The widest a gate card gets, in pixels. */
|
package/ui/ToolResult.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ResultMedia } from '
|
|
1
|
+
import { type ResultMedia } from '@theoremjs/web/client';
|
|
2
2
|
/**
|
|
3
3
|
* A tool's output under one Response heading, led by what answers it (figures,
|
|
4
4
|
* charts, the images and audio it returned), then the data itself drawn by its shape, with its JSON one
|
package/ui/ToolResult.js
CHANGED
|
@@ -6,9 +6,8 @@ import { useLocale } from '@astryxdesign/core/i18n';
|
|
|
6
6
|
import { Lightbox } from '@astryxdesign/core/Lightbox';
|
|
7
7
|
import { Skeleton } from '@astryxdesign/core/Skeleton';
|
|
8
8
|
import { VStack } from '@astryxdesign/core/VStack';
|
|
9
|
+
import { hasLead, layoutResult, returnedMedia, withUnit, } from '@theoremjs/web/client';
|
|
9
10
|
import { lazy, Suspense, useMemo, useState } from 'react';
|
|
10
|
-
import { withUnit } from "../client/shaped-data.js";
|
|
11
|
-
import { hasLead, layoutResult, returnedMedia, } from "../client/tool-result.js";
|
|
12
11
|
import { Arrive } from "./arrive.js";
|
|
13
12
|
import { useLabels } from "./labels-provider.js";
|
|
14
13
|
import { keyedByContent } from "./row-keys.js";
|
package/ui/ToolResultCharts.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ResultChart } from '
|
|
1
|
+
import { type ResultChart } from '@theoremjs/web/client';
|
|
2
2
|
/** Each chart in its card, side by side where the column is wide enough. */
|
|
3
3
|
export declare function ToolResultCharts({ charts }: {
|
|
4
4
|
charts: readonly ResultChart[];
|
package/ui/ToolResultCharts.js
CHANGED
|
@@ -3,10 +3,9 @@ import { HStack } from '@astryxdesign/core/HStack';
|
|
|
3
3
|
import { useLocale } from '@astryxdesign/core/i18n';
|
|
4
4
|
import { Text } from '@astryxdesign/core/Text';
|
|
5
5
|
import { VStack } from '@astryxdesign/core/VStack';
|
|
6
|
+
import { timeFormats, withUnit } from '@theoremjs/web/client';
|
|
6
7
|
import { useMemo } from 'react';
|
|
7
8
|
import { Bar, BarChart, Cell, Line, LineChart, ResponsiveContainer, Tooltip, XAxis, YAxis, } from 'recharts';
|
|
8
|
-
import { withUnit } from "../client/shaped-data.js";
|
|
9
|
-
import { timeFormats } from "../client/tool-result.js";
|
|
10
9
|
import { Arrive } from "./arrive.js";
|
|
11
10
|
import { CardWall } from "./CardWall.js";
|
|
12
11
|
import { ChartFrame, ChartTip, FIRST_WIDTH_PX } from "./TraceOverview.js";
|
package/ui/TraceInspector.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TraceRecord } from '@theoremjs/agents';
|
|
2
|
+
import type { TraceFeed } from '@theoremjs/web/client';
|
|
2
3
|
import { type ReactNode } from 'react';
|
|
3
|
-
import type { TraceFeed } from '../client/trace-feed.ts';
|
|
4
4
|
/** The inspector over the records a feed has delivered; the panel loads this module when it first opens. */
|
|
5
5
|
export declare function TraceFeedBody({ traces, isWide, }: {
|
|
6
6
|
traces: TraceFeed | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TraceRecord } from '@theoremjs/agents';
|
|
2
2
|
import type { ProfileObservabilityView } from '@theoremjs/agents/interface';
|
|
3
|
+
import type { TraceFeed } from '@theoremjs/web/client';
|
|
3
4
|
import { type ReactNode } from 'react';
|
|
4
|
-
import type { TraceFeed } from '../client/trace-feed.ts';
|
|
5
5
|
import { type SidePanelLabels } from './SidePanel.tsx';
|
|
6
6
|
export type TraceInspector = {
|
|
7
7
|
/** The header toggle; null when the host drives the trace or the profile records none. */
|
package/ui/approval-heading.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { humanize } from
|
|
1
|
+
import { humanize } from '@theoremjs/web/client';
|
|
2
2
|
/** "@concierge wants to check the weather": the tool's `labels.request`, else its name in words. */
|
|
3
3
|
export function approvalHeading(t, gate, toolName, agent) {
|
|
4
4
|
const request = gate.request ??
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @module
|
|
10
10
|
*/
|
|
11
|
-
import type { EmbeddingSpace, SpacePoint } from '
|
|
12
|
-
import { type QueryMatch } from '
|
|
11
|
+
import type { EmbeddingSpace, SpacePoint } from '@theoremjs/web/client';
|
|
12
|
+
import { type QueryMatch } from '@theoremjs/web/client';
|
|
13
13
|
/** What the space highlights: a query's matches, and the document under the pointer. */
|
|
14
14
|
export type SpaceFocus = {
|
|
15
15
|
query: SpacePoint | null;
|
package/ui/embedding-space-gl.js
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @module
|
|
10
10
|
*/
|
|
11
|
-
import { DOT_FLOATS, FRAME_SLOT, queryGeometry, SEGMENT_FLOATS, spaceGeometry, } from
|
|
11
|
+
import { DOT_FLOATS, FRAME_SLOT, queryGeometry, SEGMENT_FLOATS, spaceGeometry, } from '@theoremjs/web/client';
|
|
12
12
|
/** Slot states per texture row. */
|
|
13
13
|
const STATE_ROW = 1024;
|
|
14
14
|
/** Field of view, in radians. */
|
package/ui/index.d.ts
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @module
|
|
10
10
|
*/
|
|
11
|
+
export type { LiveCallOptions, PageTool, PageToolAnswer, PageTools, } from '@theoremjs/web/client';
|
|
11
12
|
export type { InkWaveStatus } from '../client/ink-waveform.ts';
|
|
12
|
-
export type { LiveCallOptions, PageTool, PageToolAnswer, PageTools, } from '../client/live/live-page-tool.ts';
|
|
13
13
|
export { useLiveCaptionLog } from '../client/live/use-live-caption-log.ts';
|
|
14
14
|
export { InkWaveform, type InkWaveformProps, type InkWaveLevels, } from '../components/InkWaveform.tsx';
|
|
15
15
|
export { useLiveRunnerModel } from '../components/live/use-live-runner-model.ts';
|
package/ui/labels.d.ts
CHANGED
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
|
-
import type { ComposerDrawerSummary } from '
|
|
11
|
-
import type { LiveState } from '../client/live/live-state.ts';
|
|
10
|
+
import type { ComposerDrawerSummary, LiveState } from '@theoremjs/web/client';
|
|
12
11
|
import type { TurnUsage, WorkStatus } from '../client/transcript-groups.ts';
|
|
13
12
|
export declare const THEOREM_UI_CATALOG: {
|
|
14
13
|
readonly '@theorem.agent.handle': {
|
package/client/audio-level.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/** Shared mic RMS → waveform level scaling for live and turn-composer paths. */
|
|
2
|
-
export declare const INPUT_LEVEL_GAIN = 4;
|
|
3
|
-
export declare function float32Rms(samples: Float32Array): number;
|
|
4
|
-
export declare function float32RmsToLevel(samples: Float32Array): number;
|
|
5
|
-
export declare function timeDomainBytesToLevel(samples: Uint8Array<ArrayBufferLike>): number;
|
package/client/audio-level.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/** Shared mic RMS → waveform level scaling for live and turn-composer paths. */
|
|
2
|
-
export const INPUT_LEVEL_GAIN = 4;
|
|
3
|
-
export function float32Rms(samples) {
|
|
4
|
-
let sum = 0;
|
|
5
|
-
for (const sample of samples) {
|
|
6
|
-
sum += sample * sample;
|
|
7
|
-
}
|
|
8
|
-
if (samples.length === 0)
|
|
9
|
-
return 0;
|
|
10
|
-
return Math.sqrt(sum / samples.length);
|
|
11
|
-
}
|
|
12
|
-
export function float32RmsToLevel(samples) {
|
|
13
|
-
return Math.min(1, float32Rms(samples) * INPUT_LEVEL_GAIN);
|
|
14
|
-
}
|
|
15
|
-
export function timeDomainBytesToLevel(samples) {
|
|
16
|
-
let sum = 0;
|
|
17
|
-
for (const sample of samples) {
|
|
18
|
-
const normalized = (sample - 128) / 128;
|
|
19
|
-
sum += normalized * normalized;
|
|
20
|
-
}
|
|
21
|
-
if (samples.length === 0)
|
|
22
|
-
return 0;
|
|
23
|
-
return Math.min(1, Math.sqrt(sum / samples.length) * INPUT_LEVEL_GAIN);
|
|
24
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ComposerPendingMessage } from '@theoremjs/agents/interface';
|
|
2
|
-
/** What waits in the composer, by kind; the UI words each kind. */
|
|
3
|
-
export type ComposerDrawerKind = 'steer' | 'queue' | 'stash' | 'attached';
|
|
4
|
-
/** Collapsed-drawer header: the total, then each waiting kind's count, in display order. */
|
|
5
|
-
export type ComposerDrawerSummary = {
|
|
6
|
-
count: number;
|
|
7
|
-
parts: {
|
|
8
|
-
kind: ComposerDrawerKind;
|
|
9
|
-
n: number;
|
|
10
|
-
}[];
|
|
11
|
-
};
|
|
12
|
-
/**
|
|
13
|
-
* What's waiting in the composer, by kind: steering, queued, stashed, attached
|
|
14
|
-
* (files and voice notes). Null when nothing waits.
|
|
15
|
-
*/
|
|
16
|
-
export declare function composerDrawerSummary(args: {
|
|
17
|
-
pendingMessages: readonly Pick<ComposerPendingMessage, 'kind'>[];
|
|
18
|
-
attachmentCount: number;
|
|
19
|
-
}): ComposerDrawerSummary | null;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* What's waiting in the composer, by kind: steering, queued, stashed, attached
|
|
3
|
-
* (files and voice notes). Null when nothing waits.
|
|
4
|
-
*/
|
|
5
|
-
export function composerDrawerSummary(args) {
|
|
6
|
-
const countOf = (kind) => args.pendingMessages.filter((message) => message.kind === kind).length;
|
|
7
|
-
const parts = [
|
|
8
|
-
{ kind: 'steer', n: countOf('steer') },
|
|
9
|
-
{ kind: 'queue', n: countOf('queue') },
|
|
10
|
-
{ kind: 'stash', n: countOf('stash') },
|
|
11
|
-
{ kind: 'attached', n: args.attachmentCount },
|
|
12
|
-
].filter((part) => part.n > 0);
|
|
13
|
-
const count = parts.reduce((sum, part) => sum + part.n, 0);
|
|
14
|
-
return count === 0 ? null : { count, parts };
|
|
15
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Composer hints — ephemeral guidance about the current composer interaction
|
|
3
|
-
* (not pending-message state). Mirrors seance's `stash-selected-draft` hint.
|
|
4
|
-
*/
|
|
5
|
-
/** Stash shortcut in Astryx `Kbd` notation (`mod` is ⌘ on macOS, Ctrl elsewhere). */
|
|
6
|
-
export declare const STASH_SHORTCUT = "mod+shift+s";
|
|
7
|
-
/** Which hint applies, and its shortcut; the UI words it. */
|
|
8
|
-
export type ComposerHint = {
|
|
9
|
-
id: 'stash-selected-draft';
|
|
10
|
-
shortcut: string;
|
|
11
|
-
};
|
|
12
|
-
/** Whether a keydown is the stash shortcut (⌘⇧S / Ctrl+Shift+S). */
|
|
13
|
-
export declare function isStashShortcut(event: {
|
|
14
|
-
code: string;
|
|
15
|
-
metaKey: boolean;
|
|
16
|
-
ctrlKey: boolean;
|
|
17
|
-
shiftKey: boolean;
|
|
18
|
-
altKey: boolean;
|
|
19
|
-
}): boolean;
|
|
20
|
-
/** The stash hint — shown while the whole draft is selected in the focused input and it can be stashed. */
|
|
21
|
-
export declare function resolveComposerHint(args: {
|
|
22
|
-
draftText: string;
|
|
23
|
-
selectedText: string;
|
|
24
|
-
canStash: boolean;
|
|
25
|
-
}): ComposerHint | null;
|
package/client/composer-hints.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Composer hints — ephemeral guidance about the current composer interaction
|
|
3
|
-
* (not pending-message state). Mirrors seance's `stash-selected-draft` hint.
|
|
4
|
-
*/
|
|
5
|
-
/** Stash shortcut in Astryx `Kbd` notation (`mod` is ⌘ on macOS, Ctrl elsewhere). */
|
|
6
|
-
export const STASH_SHORTCUT = 'mod+shift+s';
|
|
7
|
-
/** Whether a keydown is the stash shortcut (⌘⇧S / Ctrl+Shift+S). */
|
|
8
|
-
export function isStashShortcut(event) {
|
|
9
|
-
return (event.code === 'KeyS' && event.shiftKey && !event.altKey && (event.metaKey || event.ctrlKey));
|
|
10
|
-
}
|
|
11
|
-
/** The stash hint — shown while the whole draft is selected in the focused input and it can be stashed. */
|
|
12
|
-
export function resolveComposerHint(args) {
|
|
13
|
-
const draft = args.draftText.trim();
|
|
14
|
-
if (!args.canStash || !draft || args.selectedText.trim() !== draft)
|
|
15
|
-
return null;
|
|
16
|
-
return {
|
|
17
|
-
id: 'stash-selected-draft',
|
|
18
|
-
shortcut: STASH_SHORTCUT,
|
|
19
|
-
};
|
|
20
|
-
}
|