@theoremjs/react 0.3.3 → 0.3.4-next.373.gab46e23
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 +21 -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 +1 -1
- package/hooks/use-page-tool-warnings.js +1 -1
- package/hooks/use-theorem-chat-actions.d.ts +2 -4
- package/hooks/use-theorem-chat-actions.js +1 -3
- package/hooks/use-theorem-chat-state.d.ts +1 -2
- package/hooks/use-theorem-chat.d.ts +4 -5
- package/hooks/use-theorem-chat.js +1 -6
- 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/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 -1
- package/client/audio-level.d.ts +0 -5
- package/client/audio-level.js +0 -24
- 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/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
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { LiveProfileInterface } from '@theoremjs/agents/interface';
|
|
2
|
+
import type { LiveCallOptions, LiveConnection } from '@theoremjs/web/client';
|
|
2
3
|
import { type LiveCaptionState, type LiveCaptionTurn } from '../../client/live/live-captions.ts';
|
|
3
|
-
import type { LiveCallOptions } from '../../client/live/live-page-tool.ts';
|
|
4
|
-
import type { LiveConnection } from '../../client/live-client.ts';
|
|
5
4
|
/**
|
|
6
5
|
* Owns LiveRunner state, session client, and stage callbacks.
|
|
7
6
|
* `connection` resolves what the call opens: a host with a fixed profile returns
|
|
@@ -10,11 +9,11 @@ import type { LiveConnection } from '../../client/live-client.ts';
|
|
|
10
9
|
*/
|
|
11
10
|
export declare function useLiveRunnerModel(iface: LiveProfileInterface, connection: () => LiveConnection | Promise<LiveConnection>, options?: LiveCallOptions): {
|
|
12
11
|
handle: string;
|
|
13
|
-
traces: import("
|
|
12
|
+
traces: import("@theoremjs/web/client").TraceFeed;
|
|
14
13
|
callStarted: boolean;
|
|
15
14
|
pastCalls: LiveCaptionTurn[][];
|
|
16
15
|
captions: LiveCaptionState;
|
|
17
|
-
failure: import("
|
|
16
|
+
failure: import("@theoremjs/web/client").ClientFailure | null;
|
|
18
17
|
sessionEnded: string | null;
|
|
19
18
|
levelsRef: import("react").RefObject<{
|
|
20
19
|
input: number;
|
|
@@ -23,9 +22,9 @@ export declare function useLiveRunnerModel(iface: LiveProfileInterface, connecti
|
|
|
23
22
|
isMuted: boolean;
|
|
24
23
|
isVideoOn: boolean;
|
|
25
24
|
sessionActive: boolean;
|
|
26
|
-
liveState: import("
|
|
25
|
+
liveState: import("@theoremjs/web/client").LiveState;
|
|
27
26
|
activeTool: string | null;
|
|
28
|
-
status: import("
|
|
27
|
+
status: import("@theoremjs/web/client").LiveSessionStatus;
|
|
29
28
|
textAvailable: boolean;
|
|
30
29
|
textDraft: string;
|
|
31
30
|
toolActive: boolean;
|
|
@@ -34,7 +33,7 @@ export declare function useLiveRunnerModel(iface: LiveProfileInterface, connecti
|
|
|
34
33
|
videoPreview: HTMLVideoElement | null;
|
|
35
34
|
voiceAvailable: boolean;
|
|
36
35
|
canRestart: boolean;
|
|
37
|
-
gatePrompt: import("
|
|
36
|
+
gatePrompt: import("@theoremjs/web/client").LiveToolGatePrompt | null;
|
|
38
37
|
setTextDraft: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
39
38
|
handleEnd: () => void;
|
|
40
39
|
startCall: (options: {
|
|
@@ -45,5 +44,5 @@ export declare function useLiveRunnerModel(iface: LiveProfileInterface, connecti
|
|
|
45
44
|
handleToggleMic: () => void;
|
|
46
45
|
handleFlipCamera: () => Promise<void>;
|
|
47
46
|
handleToggleVideo: () => Promise<void>;
|
|
48
|
-
resolveGateDecision: (resolution: import("
|
|
47
|
+
resolveGateDecision: (resolution: import("@theoremjs/web/client").ToolGateResolution) => void;
|
|
49
48
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { liveIngressEnabledFromSpec } from '@theoremjs/agents';
|
|
2
|
+
import { createTraceFeed, liveState } from '@theoremjs/web/client';
|
|
2
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
4
|
import { stashLiveCaptionCall, } from "../../client/live/live-captions.js";
|
|
4
|
-
import { liveState } from "../../client/live/live-state.js";
|
|
5
|
-
import { createTraceFeed } from "../../client/trace-feed.js";
|
|
6
5
|
import { usePageToolWarnings } from "../../hooks/use-page-tool-warnings.js";
|
|
7
6
|
import { useLiveRunnerControls } from "./use-live-runner-controls.js";
|
|
8
7
|
import { useLiveRunnerGate, useLiveRunnerUiState } from "./use-live-runner-ui.js";
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { type LabelOverrides, type SessionEventOf } from '@theoremjs/agents';
|
|
2
|
+
import type { LiveConnectPhase, LiveGateAnswer, LiveSessionStatus, LiveToolGatePrompt, ToolGateResolution } from '@theoremjs/web/client';
|
|
3
|
+
import { type ClientFailure } from '@theoremjs/web/client';
|
|
2
4
|
import { type Dispatch, type SetStateAction } from 'react';
|
|
3
|
-
import { type ClientFailure } from '../../client/failure.ts';
|
|
4
5
|
import { applyLiveTurnToolEvent } from '../../client/live/apply-live-turn-tool-event.ts';
|
|
5
6
|
import { type LiveCaptionState } from '../../client/live/live-captions.ts';
|
|
6
|
-
import type { LiveConnectPhase, LiveSessionStatus } from '../../client/live/live-state.ts';
|
|
7
|
-
import type { LiveGateAnswer, LiveToolGatePrompt } from '../../client/live/live-tool.ts';
|
|
8
7
|
import type { LiveFacingMode, LiveVideoCapture } from '../../client/live/live-video.ts';
|
|
9
|
-
import type { ToolGateResolution } from '../../client/tool-resume.ts';
|
|
10
8
|
/** UI + media state bag for the live runner. `labels` is the interface's: the profile's wording. */
|
|
11
9
|
export declare function useLiveRunnerUiState(labels: LabelOverrides): {
|
|
12
10
|
status: LiveSessionStatus;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TheoremError } from '@theoremjs/agents';
|
|
2
|
+
import { clientFailure } from '@theoremjs/web/client';
|
|
2
3
|
import { useCallback, useEffect, useRef, useState, } from 'react';
|
|
3
|
-
import { clientFailure } from "../../client/failure.js";
|
|
4
4
|
import { applyLiveTurnToolEvent } from "../../client/live/apply-live-turn-tool-event.js";
|
|
5
5
|
import { applyLiveTurnEvent, clearLiveCaptionInterim, emptyLiveCaptionState, } from "../../client/live/live-captions.js";
|
|
6
6
|
/** UI + media state bag for the live runner. `labels` is the interface's: the profile's wording. */
|
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { type SessionEventOf, type TurnEvent } from '@theoremjs/agents';
|
|
2
|
+
import type { LiveCallOptions, LiveConnectPhase, LiveGateAnswer, LiveSessionStatus, LiveToolGatePrompt, TraceFeed } from '@theoremjs/web/client';
|
|
3
|
+
import { type LiveConnection, LiveSessionClient } from '@theoremjs/web/client';
|
|
2
4
|
import { type Dispatch, type MutableRefObject, type SetStateAction } from 'react';
|
|
3
5
|
import { type LiveCaptionState } from '../../client/live/live-captions.ts';
|
|
4
|
-
import type { LiveCallOptions } from '../../client/live/live-page-tool.ts';
|
|
5
|
-
import type { LiveConnectPhase, LiveSessionStatus } from '../../client/live/live-state.ts';
|
|
6
|
-
import type { LiveGateAnswer, LiveToolGatePrompt } from '../../client/live/live-tool.ts';
|
|
7
6
|
import type { LiveFacingMode, LiveVideoCapture } from '../../client/live/live-video.ts';
|
|
8
|
-
import { type LiveConnection, LiveSessionClient } from '../../client/live-client.ts';
|
|
9
|
-
import type { TraceFeed } from '../../client/trace-feed.ts';
|
|
10
7
|
export type LiveClientBindings = LiveCallOptions & {
|
|
11
8
|
voiceAvailable: boolean;
|
|
12
9
|
/** Where the session's trace records go, when the relay delivers them. */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { TheoremError } from '@theoremjs/agents';
|
|
2
|
+
import { LiveSessionClient } from '@theoremjs/web/client';
|
|
2
3
|
import { useCallback, useRef, } from 'react';
|
|
3
4
|
import { applyLiveTranscript } from "../../client/live/live-captions.js";
|
|
4
5
|
import { runLiveToolCall } from "../../client/live/run-live-tool-call.js";
|
|
5
|
-
import { LiveSessionClient } from "../../client/live-client.js";
|
|
6
6
|
function onLiveStatusChange(next, bindings) {
|
|
7
7
|
bindings.setStatus(next);
|
|
8
8
|
if (next === 'listening' || next === 'ready') {
|
package/hooks/use-described.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ClientFailure } from '
|
|
1
|
+
import { type ClientFailure } from '@theoremjs/web/client';
|
|
2
2
|
/**
|
|
3
3
|
* What a transport describes, read once per transport; a failure when it can't be read. A new
|
|
4
4
|
* transport keeps the last description up until it describes itself, so swapping one in (a
|
package/hooks/use-described.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { clientFailure } from '@theoremjs/web/client';
|
|
1
2
|
import { useEffect, useState } from 'react';
|
|
2
|
-
import { clientFailure } from "../client/failure.js";
|
|
3
3
|
/**
|
|
4
4
|
* What a transport describes, read once per transport; a failure when it can't be read. A new
|
|
5
5
|
* transport keeps the last description up until it describes itself, so swapping one in (a
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { EmbeddingInput, EmbeddingUsage } from '@theoremjs/agents';
|
|
2
|
-
import type { EmbeddingInterface, EmbeddingTransport } from '
|
|
2
|
+
import type { EmbeddingInterface, EmbeddingTransport } from '@theoremjs/web/client';
|
|
3
3
|
import { type OneCallState } from './use-one-call.ts';
|
|
4
4
|
/** Documents embedded for search: each one's vector, in the order given. */
|
|
5
5
|
export type EmbeddingIndex = {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { addUsage, embeddingBatches } from '@theoremjs/web/client';
|
|
1
2
|
import { useState } from 'react';
|
|
2
|
-
import { addUsage, embeddingBatches } from "../client/embedding-input.js";
|
|
3
3
|
import { useOneCall } from "./use-one-call.js";
|
|
4
4
|
async function indexWith(transport, signal, inputs, rules, onProgress) {
|
|
5
5
|
const batches = embeddingBatches(inputs, rules);
|
package/hooks/use-one-call.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { TraceRecord } from '@theoremjs/agents';
|
|
2
|
-
import {
|
|
3
|
-
import type
|
|
2
|
+
import type { TraceFeed } from '@theoremjs/web/client';
|
|
3
|
+
import { type ClientFailure } from '@theoremjs/web/client';
|
|
4
4
|
/** A profile that answers in one call: a decision or an embedding. */
|
|
5
5
|
export type OneCallTransport = {
|
|
6
6
|
traces?: TraceFeed;
|
package/hooks/use-one-call.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
+
import { clientFailure, failedTraces } from '@theoremjs/web/client';
|
|
1
2
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
2
|
-
import { failedTraces } from "../client/decision-transport.js";
|
|
3
|
-
import { clientFailure } from "../client/failure.js";
|
|
4
3
|
const IDLE = {
|
|
5
4
|
status: 'idle',
|
|
6
5
|
result: null,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type PageTools } from '
|
|
1
|
+
import { type PageTools } from '@theoremjs/web/client';
|
|
2
2
|
/**
|
|
3
3
|
* Says in the console, once, where the page's tools and the profile's disagree. A wrong name is
|
|
4
4
|
* the builder's to fix, so it is never said to the visitor.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { pageToolMismatch } from '@theoremjs/web/client';
|
|
1
2
|
import { useEffect } from 'react';
|
|
2
|
-
import { pageToolMismatch } from "../client/live/live-page-tool.js";
|
|
3
3
|
/**
|
|
4
4
|
* Says in the console, once, where the page's tools and the profile's disagree. A wrong name is
|
|
5
5
|
* the builder's to fix, so it is never said to the visitor.
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { AttachmentValidationIssue, ComposerMenuAction, ComposerPendingMessage, ComposerProfileInterface, ComposerRunPhase, InterfaceTurnSession, TranscriptBlock } from '@theoremjs/agents/interface';
|
|
2
|
+
import type { RunOutcome, TheoremTransport } from '@theoremjs/web/client';
|
|
3
|
+
import { type AnsweringGate, type ClientFailure, type StreamView, type ToolDecisionAction, type ToolGateResolution } from '@theoremjs/web/client';
|
|
2
4
|
import { type MutableRefObject } from 'react';
|
|
3
|
-
import { type ClientFailure } from '../client/failure.ts';
|
|
4
|
-
import { type AnsweringGate, type StreamView, type ToolDecisionAction, type ToolGateResolution } from '../client/index.ts';
|
|
5
|
-
import type { RunOutcome } from '../client/run-session.ts';
|
|
6
|
-
import type { TheoremTransport } from '../client/transport.ts';
|
|
7
5
|
import type { MessageDelivery } from './use-theorem-chat-state.ts';
|
|
8
6
|
export type RunTurnStream = (run: (view: StreamView) => Promise<RunOutcome>, options?: {
|
|
9
7
|
/** The run sends a message: one that never posts goes back in the composer with its failure. */
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { TheoremError } from '@theoremjs/agents';
|
|
2
2
|
import { convertSteersToFrontQueued, createComposerPendingMessage, orderComposerPendingMessages, removeComposerPendingMessage, userDraftHasPayload, userDraftToSteerInject, } from '@theoremjs/agents/interface';
|
|
3
|
+
import { clientFailure, composerFieldsFromDraft, encodeComposerDraft, issuedOperationId, resumeInterfaceTool, streamInterfaceDraftTurn, streamInterfaceTurn, } from '@theoremjs/web/client';
|
|
3
4
|
import { useCallback } from 'react';
|
|
4
|
-
import { clientFailure } from "../client/failure.js";
|
|
5
|
-
import { composerFieldsFromDraft, encodeComposerDraft, resumeInterfaceTool, streamInterfaceDraftTurn, streamInterfaceTurn, } from "../client/index.js";
|
|
6
|
-
import { issuedOperationId } from "../client/turn-client.js";
|
|
7
5
|
function composerFieldsPayload(text, pendingFiles, pendingVoice) {
|
|
8
6
|
const meta = (files) => files.map((f) => ({
|
|
9
7
|
name: f.name,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type AttachmentValidationIssue, type ComposerPendingMessage, type InterfaceTurnSession, type TranscriptBlock } from '@theoremjs/agents/interface';
|
|
2
|
-
import type { ClientFailure } from '
|
|
3
|
-
import type { AnsweringGate } from '../client/tool-resume.ts';
|
|
2
|
+
import type { AnsweringGate, ClientFailure } from '@theoremjs/web/client';
|
|
4
3
|
type SetSession = (value: InterfaceTurnSession | ((prev: InterfaceTurnSession) => InterfaceTurnSession)) => void;
|
|
5
4
|
export type { SetSession };
|
|
6
5
|
/**
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { type ComposerPendingMessage, type ComposerProfileInterface, type ComposerRunPhase, type InterfaceTurnSession, type TranscriptBlock } from '@theoremjs/agents/interface';
|
|
2
|
-
import type { PageTools } from '
|
|
3
|
-
import type { ConversationView, TheoremTransport, TurnEventSink } from '../client/transport.ts';
|
|
2
|
+
import type { ConversationView, PageTools, TheoremTransport, TurnEventSink } from '@theoremjs/web/client';
|
|
4
3
|
import { type MessageDelivery } from './use-theorem-chat-state.ts';
|
|
5
4
|
export type UseTheoremChatOptions = {
|
|
6
5
|
transport: TheoremTransport;
|
|
@@ -57,9 +56,9 @@ export declare function useTheoremChat({ transport, iface, conversation: initial
|
|
|
57
56
|
blocks: TranscriptBlock[];
|
|
58
57
|
chatStarted: boolean;
|
|
59
58
|
draftText: string;
|
|
60
|
-
failure: import("
|
|
59
|
+
failure: import("@theoremjs/web/client").ClientFailure | null;
|
|
61
60
|
/** The answer on its way to a gate, shown on it until the answer settles or fails. */
|
|
62
|
-
answering: import("
|
|
61
|
+
answering: import("@theoremjs/web/client").AnsweringGate | null;
|
|
63
62
|
issues: import("@theoremjs/agents").AttachmentValidationIssue[];
|
|
64
63
|
pendingFiles: File[];
|
|
65
64
|
pendingMessages: ComposerPendingMessage[];
|
|
@@ -83,7 +82,7 @@ export declare function useTheoremChat({ transport, iface, conversation: initial
|
|
|
83
82
|
handlePendingQueue: (id: string) => void;
|
|
84
83
|
handlePendingRestore: (id: string) => Promise<void>;
|
|
85
84
|
handleSendNow: (draftSource?: ComposerPendingMessage) => Promise<void>;
|
|
86
|
-
handleToolDecision: (_index: number, action: import("
|
|
85
|
+
handleToolDecision: (_index: number, action: import("@theoremjs/web/client").ToolDecisionAction) => Promise<void>;
|
|
87
86
|
handleGenerationChange: (next: {
|
|
88
87
|
modelId: string;
|
|
89
88
|
effort?: string;
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
import { branchInterfaceTurnSession, consumeNextComposerQueue, convertSteersToFrontQueued, defaultInterfaceEffort, orderComposerPendingMessages, promoteComposerPendingKind, removeComposerPendingMessage, removeLandedSteers, } from '@theoremjs/agents/interface';
|
|
2
|
+
import { clientFailure, foldAssistantTurn, followGenerationDefaults, keepsConversation, sessionAfter, stampWorked, turnFailure, withPageToolDispatch, } from '@theoremjs/web/client';
|
|
2
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
-
import { clientFailure, turnFailure } from "../client/failure.js";
|
|
4
|
-
import { followGenerationDefaults } from "../client/generation-selection.js";
|
|
5
|
-
import { withPageToolDispatch } from "../client/page-dispatch.js";
|
|
6
|
-
import { sessionAfter, stampWorked } from "../client/run-commit.js";
|
|
7
|
-
import { keepsConversation } from "../client/run-session.js";
|
|
8
|
-
import { foldAssistantTurn } from "../client/turn-client.js";
|
|
9
4
|
import { usePageToolWarnings } from "./use-page-tool-warnings.js";
|
|
10
5
|
import { useTheoremChatActions } from "./use-theorem-chat-actions.js";
|
|
11
6
|
import { useTheoremChatState, } from "./use-theorem-chat-state.js";
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { DecisionAsset, DecisionJson, DecisionResult } from '@theoremjs/agents';
|
|
2
|
-
import type { DecisionInterface, DecisionTransport } from '
|
|
3
|
-
import type { ClientFailure } from '../client/failure.ts';
|
|
2
|
+
import type { ClientFailure, DecisionInterface, DecisionTransport } from '@theoremjs/web/client';
|
|
4
3
|
import { type OneCallState } from './use-one-call.ts';
|
|
5
4
|
export type TheoremDecisionState = {
|
|
6
5
|
/** The profile as the page sees it; null until the host describes it. */
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { EmbeddingInput, EmbeddingResult } from '@theoremjs/agents';
|
|
2
|
-
import type { EmbeddingInterface, EmbeddingTransport, EmbedOptions } from '
|
|
3
|
-
import type { ClientFailure } from '../client/failure.ts';
|
|
2
|
+
import type { ClientFailure, EmbeddingInterface, EmbeddingTransport, EmbedOptions } from '@theoremjs/web/client';
|
|
4
3
|
import { type OneCallState } from './use-one-call.ts';
|
|
5
4
|
export type TheoremEmbeddingState = {
|
|
6
5
|
/** The profile as the page sees it; null until the host describes it. */
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import type { TurnEvent } from '@theoremjs/agents';
|
|
2
|
-
import {
|
|
2
|
+
import type { HostInterface, HostTransport, PageTools } from '@theoremjs/web/client';
|
|
3
|
+
import { type ClientFailure, type PersonGateResolution } from '@theoremjs/web/client';
|
|
3
4
|
import type { ToolCall } from '../client/host-call.ts';
|
|
4
|
-
import type { HostInterface, HostTransport } from '../client/host-transport.ts';
|
|
5
|
-
import type { PageTools } from '../client/live/live-page-tool.ts';
|
|
6
|
-
import { type PersonGateResolution } from '../client/tool-resume.ts';
|
|
7
5
|
export type { ToolCall };
|
|
8
6
|
/** One call of one of the host's tools, as it streams. */
|
|
9
7
|
export type TheoremHostCall = {
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { toolCallsOf, toolSnapshotFromEvents } from '@theoremjs/agents/interface';
|
|
2
|
+
import { clientFailure, continueGatedToolInvocation, issuedOperationId, withPageToolDispatch, } from '@theoremjs/web/client';
|
|
2
3
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
3
|
-
import { clientFailure } from "../client/failure.js";
|
|
4
|
-
import { withPageToolDispatch } from "../client/page-dispatch.js";
|
|
5
|
-
import { continueGatedToolInvocation } from "../client/tool-resume.js";
|
|
6
|
-
import { issuedOperationId } from "../client/turn-client.js";
|
|
7
4
|
import { useDescribed } from "./use-described.js";
|
|
8
5
|
function callId() {
|
|
9
6
|
return typeof crypto !== 'undefined' && 'randomUUID' in crypto
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { ProfileInterface } from '@theoremjs/agents/interface';
|
|
2
|
-
import type { ClientFailure } from '
|
|
3
|
-
import type { TheoremTransport } from '../client/transport.ts';
|
|
2
|
+
import type { ClientFailure, TheoremTransport } from '@theoremjs/web/client';
|
|
4
3
|
/** `failure` is worded with the default labels: the profile's is not known until it loads. */
|
|
5
4
|
export type TheoremInterfaceState = {
|
|
6
5
|
status: 'loading';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { TraceRecord } from '@theoremjs/agents';
|
|
2
|
-
import type { TraceFeed } from '
|
|
2
|
+
import type { TraceFeed } from '@theoremjs/web/client';
|
|
3
3
|
/** The records a feed has delivered so far; none without a feed. */
|
|
4
4
|
export declare function useTraceRecords(feed: TraceFeed | undefined): readonly TraceRecord[];
|
package/index.d.ts
CHANGED
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - `@theoremjs/react` hooks + transport (this entry)
|
|
5
5
|
* - `@theoremjs/react/ui` Astryx chat UI built on these hooks
|
|
6
|
-
* - `@theoremjs/react/server` `createTheoremHandler` (and `createTheoremDecisionHandler`, `createTheoremEmbeddingHandler`, `createTheoremHostHandler`) for the host side
|
|
6
|
+
* - `@theoremjs/react/server` `@theoremjs/web/server`: `createTheoremHandler` (and `createTheoremDecisionHandler`, `createTheoremEmbeddingHandler`, `createTheoremHostHandler`) for the host side
|
|
7
7
|
*
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
|
-
export * from '
|
|
11
|
-
export { type PageDispatchResult, withPageToolDispatch } from './client/page-dispatch.ts';
|
|
10
|
+
export * from '@theoremjs/web/client';
|
|
12
11
|
export { type EmbeddingIndex, type IndexProgress, useEmbeddingIndex, } from './hooks/use-embedding-index.ts';
|
|
13
12
|
export { type SentTurn, type UseTheoremChatOptions, useTheoremChat, } from './hooks/use-theorem-chat.ts';
|
|
14
13
|
export { type TheoremDecisionState, useTheoremDecision } from './hooks/use-theorem-decision.ts';
|
package/index.js
CHANGED
|
@@ -3,12 +3,11 @@
|
|
|
3
3
|
*
|
|
4
4
|
* - `@theoremjs/react` hooks + transport (this entry)
|
|
5
5
|
* - `@theoremjs/react/ui` Astryx chat UI built on these hooks
|
|
6
|
-
* - `@theoremjs/react/server` `createTheoremHandler` (and `createTheoremDecisionHandler`, `createTheoremEmbeddingHandler`, `createTheoremHostHandler`) for the host side
|
|
6
|
+
* - `@theoremjs/react/server` `@theoremjs/web/server`: `createTheoremHandler` (and `createTheoremDecisionHandler`, `createTheoremEmbeddingHandler`, `createTheoremHostHandler`) for the host side
|
|
7
7
|
*
|
|
8
8
|
* @module
|
|
9
9
|
*/
|
|
10
|
-
export * from
|
|
11
|
-
export { withPageToolDispatch } from "./client/page-dispatch.js";
|
|
10
|
+
export * from '@theoremjs/web/client';
|
|
12
11
|
export { useEmbeddingIndex, } from "./hooks/use-embedding-index.js";
|
|
13
12
|
export { useTheoremChat, } from "./hooks/use-theorem-chat.js";
|
|
14
13
|
export { useTheoremDecision } from "./hooks/use-theorem-decision.js";
|
package/live.d.ts
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
*
|
|
4
4
|
* @module
|
|
5
5
|
*/
|
|
6
|
-
export type { LiveCallOptions, PageTool, PageToolAnswer, PageTools, } from '
|
|
7
|
-
export type { LiveConnection } from './client/live-client.ts';
|
|
6
|
+
export type { LiveCallOptions, LiveConnection, PageTool, PageToolAnswer, PageTools, } from '@theoremjs/web/client';
|
|
8
7
|
export type { LiveRunnerProps } from './ui/LiveRunner.tsx';
|
|
9
8
|
export { LiveRunner } from './ui/LiveRunner.tsx';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theoremjs/react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4-next.373.gab46e23",
|
|
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.
|
|
63
|
+
"@theoremjs/agents": "^0.3.4-next.373.gab46e23",
|
|
64
|
+
"@theoremjs/web": "^0.3.4-next.373.gab46e23"
|
|
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/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";
|