@dudko.dev/agent-web-react 0.0.32 → 0.0.33
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 +1 -1
- package/dist/{elicitation-BW7R4iIw.d.cts → elicitation-B6h_-yLg.d.cts} +6 -0
- package/dist/{elicitation-BW7R4iIw.d.ts → elicitation-B6h_-yLg.d.ts} +6 -0
- package/dist/index.cjs +18 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -3
- package/dist/index.d.ts +13 -3
- package/dist/index.js +18 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp.d.cts +2 -2
- package/dist/mcp.d.ts +2 -2
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -2,8 +2,8 @@ import * as react from 'react';
|
|
|
2
2
|
import { DependencyList, ReactNode, RefObject, ComponentType, CSSProperties } from 'react';
|
|
3
3
|
import { RunFile, RunResult, Agent, ToolApprovalMode, AppToolCallRequest, AppSamplingRequest, AppSamplingView, AppSamplingResult, CompactResult, IUsage, AgentEventHandler, BrowserAgentConfig, VirtualFileInfo, VirtualFileSystem, CredentialStore, createWebLLMModel, WebLLMModelOptions, ModelTier, TierReason, EscalationReason, DecisionFallbackReason, AgentEvent, Skill, IPlan, ToolApprovalRequest, ToolApprovalContext, ToolApprovalDecision } from '@dudko.dev/agent-web';
|
|
4
4
|
export { Agent, AgentEvent, AgentEventHandler, AgentLoggerSink, AgentTool, AgentToolSet, AppToolCallRequest, AttachmentsNotSupportedError, BrowserAgentConfig, CompactResult, CompactionConfig, CredentialStore, FileToolsOptions, IPlan, IPlanStep, IStepResult, IToolCall, IUsage, ImagesNotSupportedError, IndexedDBStore, LearningConfig, LogLevel, McpAppCsp, McpAppResource, McpAppToolResult, MemoryCredentialStore, MemorySkillStore, MemoryStore, ModelInput, ProviderModelSpec, ProviderType, RunControl, RunFile, RunOptions, RunResult, SessionBusyError, SessionHolder, SessionLockMode, SessionRunState, SessionWatch, Skill, SkillStore, StorageChange, StorageChangeKind, StorageChangeOp, SubagentInfo, SubagentToolOptions, SubagentWorkerConfig, ThinkingLevel, ThinkingSetting, TokenLimits, ToolApprovalConfig, ToolApprovalContext, ToolApprovalMode, ToolApprovalRequest, VaultCredentialStore, VfsSkillStore, VirtualFile, VirtualFileInfo, VirtualFileSystem, WatchSessionOptions, createAgent, createFileTools, createRunControl, createSubagentTool, createWebLLMModel, defineSkill, defineTool, isWebGPUAvailable, loadSkillFromUrl, markReadOnly, onStorageChange, parseSkillMarkdown, postStorageChange, preloadWebLLMModel, serveSubagentWorker, supportsImages, supportsPdf, unloadWebLLMModel, watchSession } from '@dudko.dev/agent-web';
|
|
5
|
-
import { A as AgentUiState, C as ChatAttachment, a as ApprovalView, b as ChatMessage, c as AgentStatus, E as ElicitationIssueKind, d as ElicitationOutcomeReason, M as McpAppSandboxReason, R as RemoteRunView, L as LessonView, S as SubagentView, e as SubagentNode, P as PendingElicitation, f as McpElicitationResult, g as ElicitationView, W as WrittenFileView, T as ToolCallView, h as StepView, U as UserNoteView, D as DecisionView, i as MediaView, j as AppView, k as McpAppsConnectionLike, l as McpAppSandboxOptions, m as AppRequestView, n as TranscriptView, B as BudgetView, o as CompactionView, p as ModelLoadState, q as McpAppHost, r as AppRequestAnswerOptions } from './elicitation-
|
|
6
|
-
export { s as APP_DEFAULT_HEIGHT, t as APP_MAX_HEIGHT, u as APP_MIN_HEIGHT, v as AppDownload, w as AppDownloadView, x as AppFileSaverEnv, y as AppLink, z as AppReadyDownload, F as AppResourceReader, G as ElicitationControl, H as ElicitationDraft, I as ElicitationDraftValue, J as ElicitationField, K as ElicitationFormOutcome, N as ElicitationIssue, O as ElicitationLink, Q as ElicitationOption, V as FetchView, X as MCP_APP_DISPLAY_MODES, Y as MCP_APP_MAX_ARGS_CHARS, Z as MCP_APP_MAX_DOWNLOAD_BYTES, _ as MCP_APP_MAX_FILE_NAME_CHARS, $ as MCP_APP_MAX_IN_FLIGHT, a0 as MCP_APP_MAX_MESSAGE_CHARS, a1 as MCP_APP_MAX_URL_CHARS, a2 as MCP_APP_NOTIFICATIONS, a3 as MCP_APP_OPTIONAL_REQUESTS, a4 as MCP_APP_PROTOCOL_VERSION, a5 as MCP_APP_REFUSED, a6 as MCP_APP_REFUSED_DOWNLOAD_EXTENSIONS, a7 as MCP_APP_REFUSED_DOWNLOAD_TYPES, a8 as MCP_APP_RELAY, a9 as MCP_APP_REQUESTS, aa as MCP_APP_SANDBOX_FRAME_TOKENS, ab as MCP_APP_SANDBOX_GRACE_MS, ac as MCP_APP_SANDBOX_SERVER, ad as MCP_APP_SANDBOX_TIMEOUT_MS, ae as McpAppBridge, af as McpAppBridgeHandlers, ag as McpAppBridgeOptions, ah as McpAppDisplayMode, ai as McpAppRpcError, aj as McpAppRpcMessage, ak as McpAppSandboxInput, al as McpAppSandboxLink, am as McpAppSandboxLinkOptions, an as McpAppSandboxTarget, ao as McpElicitationFieldSchema, ap as McpElicitationRequest, aq as McpElicitationSchema, ar as QueuedMessageView, as as ReplanState, at as SkillConsentView, au as StepEscalationView, av as UseMcpAppHostOptions, aw as appDisplayModeAllowed, ax as appDownloadOf, ay as appDownloadRefusal, az as appFileExtensionOf, aA as appFileNameOf, aB as appGestureOf, aC as appLinkOf, aD as appMessageTextOf, aE as appMimeTypeOf, aF as appSamplingErrorOf, aG as buildMcpAppDocument, aH as buildMcpAppSandboxShell, aI as clampAppHeight, aJ as elicitationFields, aK as elicitationFormAnswer, aL as elicitationInitialDraft, aM as elicitationLink, aN as formatCountdown, aO as grantedAppCsp, aP as mcpAppCsp, aQ as mcpAppHostCapabilities, aR as mcpAppSandboxProxyUrl, aS as mcpAppSandboxShellCsp, aT as mcpAppSandboxTarget, aU as resolveAppDownload, aV as saveAppFile, aW as useMcpAppHost } from './elicitation-
|
|
5
|
+
import { A as AgentUiState, C as ChatAttachment, a as ApprovalView, b as ChatMessage, c as AgentStatus, E as ElicitationIssueKind, d as ElicitationOutcomeReason, M as McpAppSandboxReason, R as RemoteRunView, L as LessonView, S as SubagentView, e as SubagentNode, P as PendingElicitation, f as McpElicitationResult, g as ElicitationView, W as WrittenFileView, T as ToolCallView, h as StepView, U as UserNoteView, D as DecisionView, i as MediaView, j as AppView, k as McpAppsConnectionLike, l as McpAppSandboxOptions, m as AppRequestView, n as TranscriptView, B as BudgetView, o as CompactionView, p as ModelLoadState, q as McpAppHost, r as AppRequestAnswerOptions } from './elicitation-B6h_-yLg.cjs';
|
|
6
|
+
export { s as APP_DEFAULT_HEIGHT, t as APP_MAX_HEIGHT, u as APP_MIN_HEIGHT, v as AppDownload, w as AppDownloadView, x as AppFileSaverEnv, y as AppLink, z as AppReadyDownload, F as AppResourceReader, G as ElicitationControl, H as ElicitationDraft, I as ElicitationDraftValue, J as ElicitationField, K as ElicitationFormOutcome, N as ElicitationIssue, O as ElicitationLink, Q as ElicitationOption, V as FetchView, X as MCP_APP_DISPLAY_MODES, Y as MCP_APP_MAX_ARGS_CHARS, Z as MCP_APP_MAX_DOWNLOAD_BYTES, _ as MCP_APP_MAX_FILE_NAME_CHARS, $ as MCP_APP_MAX_IN_FLIGHT, a0 as MCP_APP_MAX_MESSAGE_CHARS, a1 as MCP_APP_MAX_URL_CHARS, a2 as MCP_APP_NOTIFICATIONS, a3 as MCP_APP_OPTIONAL_REQUESTS, a4 as MCP_APP_PROTOCOL_VERSION, a5 as MCP_APP_REFUSED, a6 as MCP_APP_REFUSED_DOWNLOAD_EXTENSIONS, a7 as MCP_APP_REFUSED_DOWNLOAD_TYPES, a8 as MCP_APP_RELAY, a9 as MCP_APP_REQUESTS, aa as MCP_APP_SANDBOX_FRAME_TOKENS, ab as MCP_APP_SANDBOX_GRACE_MS, ac as MCP_APP_SANDBOX_SERVER, ad as MCP_APP_SANDBOX_TIMEOUT_MS, ae as McpAppBridge, af as McpAppBridgeHandlers, ag as McpAppBridgeOptions, ah as McpAppDisplayMode, ai as McpAppRpcError, aj as McpAppRpcMessage, ak as McpAppSandboxInput, al as McpAppSandboxLink, am as McpAppSandboxLinkOptions, an as McpAppSandboxTarget, ao as McpElicitationFieldSchema, ap as McpElicitationRequest, aq as McpElicitationSchema, ar as QueuedMessageView, as as ReplanState, at as SkillConsentView, au as StepEscalationView, av as UseMcpAppHostOptions, aw as appDisplayModeAllowed, ax as appDownloadOf, ay as appDownloadRefusal, az as appFileExtensionOf, aA as appFileNameOf, aB as appGestureOf, aC as appLinkOf, aD as appMessageTextOf, aE as appMimeTypeOf, aF as appSamplingErrorOf, aG as buildMcpAppDocument, aH as buildMcpAppSandboxShell, aI as clampAppHeight, aJ as elicitationFields, aK as elicitationFormAnswer, aL as elicitationInitialDraft, aM as elicitationLink, aN as formatCountdown, aO as grantedAppCsp, aP as mcpAppCsp, aQ as mcpAppHostCapabilities, aR as mcpAppSandboxProxyUrl, aS as mcpAppSandboxShellCsp, aT as mcpAppSandboxTarget, aU as resolveAppDownload, aV as saveAppFile, aW as useMcpAppHost } from './elicitation-B6h_-yLg.cjs';
|
|
7
7
|
export { M as MCP_APP_POLICY_TOKEN_MAX_CHARS, a as MCP_APP_SANDBOX_PROXY_READY, b as MCP_APP_SANDBOX_RESOURCE_READY, i as isMcpAppSandboxMessage, m as mcpAppPolicyToken } from './mcp-app-policy-DIUmGPJP.cjs';
|
|
8
8
|
|
|
9
9
|
interface UseAgentOptions {
|
|
@@ -922,7 +922,17 @@ interface AgentLabels {
|
|
|
922
922
|
htmlShorter: string;
|
|
923
923
|
/** The accessible name of the frame itself. */
|
|
924
924
|
htmlFrameName: (path: string) => string;
|
|
925
|
-
|
|
925
|
+
/**
|
|
926
|
+
* `n` is the CALLS to the media models, failed ones included (`usage.mediaCalls`: what the
|
|
927
|
+
* run's cap counts). `made` is what came of them (`imagesGenerated`, `speechCharacters`,
|
|
928
|
+
* `transcriptionSeconds`): a label that says "pictures made" counts `made.imagesGenerated`,
|
|
929
|
+
* never `n` - a call that failed made nothing. An empty string shows nothing.
|
|
930
|
+
*/
|
|
931
|
+
usageMedia: (n: number, made: {
|
|
932
|
+
imagesGenerated: number;
|
|
933
|
+
speechCharacters: number;
|
|
934
|
+
transcriptionSeconds: number;
|
|
935
|
+
}) => string;
|
|
926
936
|
usageDecisions: (n: number) => string;
|
|
927
937
|
/** "decision model: continue (0.93)" - its answer was used; the probability is formatted. */
|
|
928
938
|
decisionAccepted: (choice: string, confidence: string) => string;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,8 +2,8 @@ import * as react from 'react';
|
|
|
2
2
|
import { DependencyList, ReactNode, RefObject, ComponentType, CSSProperties } from 'react';
|
|
3
3
|
import { RunFile, RunResult, Agent, ToolApprovalMode, AppToolCallRequest, AppSamplingRequest, AppSamplingView, AppSamplingResult, CompactResult, IUsage, AgentEventHandler, BrowserAgentConfig, VirtualFileInfo, VirtualFileSystem, CredentialStore, createWebLLMModel, WebLLMModelOptions, ModelTier, TierReason, EscalationReason, DecisionFallbackReason, AgentEvent, Skill, IPlan, ToolApprovalRequest, ToolApprovalContext, ToolApprovalDecision } from '@dudko.dev/agent-web';
|
|
4
4
|
export { Agent, AgentEvent, AgentEventHandler, AgentLoggerSink, AgentTool, AgentToolSet, AppToolCallRequest, AttachmentsNotSupportedError, BrowserAgentConfig, CompactResult, CompactionConfig, CredentialStore, FileToolsOptions, IPlan, IPlanStep, IStepResult, IToolCall, IUsage, ImagesNotSupportedError, IndexedDBStore, LearningConfig, LogLevel, McpAppCsp, McpAppResource, McpAppToolResult, MemoryCredentialStore, MemorySkillStore, MemoryStore, ModelInput, ProviderModelSpec, ProviderType, RunControl, RunFile, RunOptions, RunResult, SessionBusyError, SessionHolder, SessionLockMode, SessionRunState, SessionWatch, Skill, SkillStore, StorageChange, StorageChangeKind, StorageChangeOp, SubagentInfo, SubagentToolOptions, SubagentWorkerConfig, ThinkingLevel, ThinkingSetting, TokenLimits, ToolApprovalConfig, ToolApprovalContext, ToolApprovalMode, ToolApprovalRequest, VaultCredentialStore, VfsSkillStore, VirtualFile, VirtualFileInfo, VirtualFileSystem, WatchSessionOptions, createAgent, createFileTools, createRunControl, createSubagentTool, createWebLLMModel, defineSkill, defineTool, isWebGPUAvailable, loadSkillFromUrl, markReadOnly, onStorageChange, parseSkillMarkdown, postStorageChange, preloadWebLLMModel, serveSubagentWorker, supportsImages, supportsPdf, unloadWebLLMModel, watchSession } from '@dudko.dev/agent-web';
|
|
5
|
-
import { A as AgentUiState, C as ChatAttachment, a as ApprovalView, b as ChatMessage, c as AgentStatus, E as ElicitationIssueKind, d as ElicitationOutcomeReason, M as McpAppSandboxReason, R as RemoteRunView, L as LessonView, S as SubagentView, e as SubagentNode, P as PendingElicitation, f as McpElicitationResult, g as ElicitationView, W as WrittenFileView, T as ToolCallView, h as StepView, U as UserNoteView, D as DecisionView, i as MediaView, j as AppView, k as McpAppsConnectionLike, l as McpAppSandboxOptions, m as AppRequestView, n as TranscriptView, B as BudgetView, o as CompactionView, p as ModelLoadState, q as McpAppHost, r as AppRequestAnswerOptions } from './elicitation-
|
|
6
|
-
export { s as APP_DEFAULT_HEIGHT, t as APP_MAX_HEIGHT, u as APP_MIN_HEIGHT, v as AppDownload, w as AppDownloadView, x as AppFileSaverEnv, y as AppLink, z as AppReadyDownload, F as AppResourceReader, G as ElicitationControl, H as ElicitationDraft, I as ElicitationDraftValue, J as ElicitationField, K as ElicitationFormOutcome, N as ElicitationIssue, O as ElicitationLink, Q as ElicitationOption, V as FetchView, X as MCP_APP_DISPLAY_MODES, Y as MCP_APP_MAX_ARGS_CHARS, Z as MCP_APP_MAX_DOWNLOAD_BYTES, _ as MCP_APP_MAX_FILE_NAME_CHARS, $ as MCP_APP_MAX_IN_FLIGHT, a0 as MCP_APP_MAX_MESSAGE_CHARS, a1 as MCP_APP_MAX_URL_CHARS, a2 as MCP_APP_NOTIFICATIONS, a3 as MCP_APP_OPTIONAL_REQUESTS, a4 as MCP_APP_PROTOCOL_VERSION, a5 as MCP_APP_REFUSED, a6 as MCP_APP_REFUSED_DOWNLOAD_EXTENSIONS, a7 as MCP_APP_REFUSED_DOWNLOAD_TYPES, a8 as MCP_APP_RELAY, a9 as MCP_APP_REQUESTS, aa as MCP_APP_SANDBOX_FRAME_TOKENS, ab as MCP_APP_SANDBOX_GRACE_MS, ac as MCP_APP_SANDBOX_SERVER, ad as MCP_APP_SANDBOX_TIMEOUT_MS, ae as McpAppBridge, af as McpAppBridgeHandlers, ag as McpAppBridgeOptions, ah as McpAppDisplayMode, ai as McpAppRpcError, aj as McpAppRpcMessage, ak as McpAppSandboxInput, al as McpAppSandboxLink, am as McpAppSandboxLinkOptions, an as McpAppSandboxTarget, ao as McpElicitationFieldSchema, ap as McpElicitationRequest, aq as McpElicitationSchema, ar as QueuedMessageView, as as ReplanState, at as SkillConsentView, au as StepEscalationView, av as UseMcpAppHostOptions, aw as appDisplayModeAllowed, ax as appDownloadOf, ay as appDownloadRefusal, az as appFileExtensionOf, aA as appFileNameOf, aB as appGestureOf, aC as appLinkOf, aD as appMessageTextOf, aE as appMimeTypeOf, aF as appSamplingErrorOf, aG as buildMcpAppDocument, aH as buildMcpAppSandboxShell, aI as clampAppHeight, aJ as elicitationFields, aK as elicitationFormAnswer, aL as elicitationInitialDraft, aM as elicitationLink, aN as formatCountdown, aO as grantedAppCsp, aP as mcpAppCsp, aQ as mcpAppHostCapabilities, aR as mcpAppSandboxProxyUrl, aS as mcpAppSandboxShellCsp, aT as mcpAppSandboxTarget, aU as resolveAppDownload, aV as saveAppFile, aW as useMcpAppHost } from './elicitation-
|
|
5
|
+
import { A as AgentUiState, C as ChatAttachment, a as ApprovalView, b as ChatMessage, c as AgentStatus, E as ElicitationIssueKind, d as ElicitationOutcomeReason, M as McpAppSandboxReason, R as RemoteRunView, L as LessonView, S as SubagentView, e as SubagentNode, P as PendingElicitation, f as McpElicitationResult, g as ElicitationView, W as WrittenFileView, T as ToolCallView, h as StepView, U as UserNoteView, D as DecisionView, i as MediaView, j as AppView, k as McpAppsConnectionLike, l as McpAppSandboxOptions, m as AppRequestView, n as TranscriptView, B as BudgetView, o as CompactionView, p as ModelLoadState, q as McpAppHost, r as AppRequestAnswerOptions } from './elicitation-B6h_-yLg.js';
|
|
6
|
+
export { s as APP_DEFAULT_HEIGHT, t as APP_MAX_HEIGHT, u as APP_MIN_HEIGHT, v as AppDownload, w as AppDownloadView, x as AppFileSaverEnv, y as AppLink, z as AppReadyDownload, F as AppResourceReader, G as ElicitationControl, H as ElicitationDraft, I as ElicitationDraftValue, J as ElicitationField, K as ElicitationFormOutcome, N as ElicitationIssue, O as ElicitationLink, Q as ElicitationOption, V as FetchView, X as MCP_APP_DISPLAY_MODES, Y as MCP_APP_MAX_ARGS_CHARS, Z as MCP_APP_MAX_DOWNLOAD_BYTES, _ as MCP_APP_MAX_FILE_NAME_CHARS, $ as MCP_APP_MAX_IN_FLIGHT, a0 as MCP_APP_MAX_MESSAGE_CHARS, a1 as MCP_APP_MAX_URL_CHARS, a2 as MCP_APP_NOTIFICATIONS, a3 as MCP_APP_OPTIONAL_REQUESTS, a4 as MCP_APP_PROTOCOL_VERSION, a5 as MCP_APP_REFUSED, a6 as MCP_APP_REFUSED_DOWNLOAD_EXTENSIONS, a7 as MCP_APP_REFUSED_DOWNLOAD_TYPES, a8 as MCP_APP_RELAY, a9 as MCP_APP_REQUESTS, aa as MCP_APP_SANDBOX_FRAME_TOKENS, ab as MCP_APP_SANDBOX_GRACE_MS, ac as MCP_APP_SANDBOX_SERVER, ad as MCP_APP_SANDBOX_TIMEOUT_MS, ae as McpAppBridge, af as McpAppBridgeHandlers, ag as McpAppBridgeOptions, ah as McpAppDisplayMode, ai as McpAppRpcError, aj as McpAppRpcMessage, ak as McpAppSandboxInput, al as McpAppSandboxLink, am as McpAppSandboxLinkOptions, an as McpAppSandboxTarget, ao as McpElicitationFieldSchema, ap as McpElicitationRequest, aq as McpElicitationSchema, ar as QueuedMessageView, as as ReplanState, at as SkillConsentView, au as StepEscalationView, av as UseMcpAppHostOptions, aw as appDisplayModeAllowed, ax as appDownloadOf, ay as appDownloadRefusal, az as appFileExtensionOf, aA as appFileNameOf, aB as appGestureOf, aC as appLinkOf, aD as appMessageTextOf, aE as appMimeTypeOf, aF as appSamplingErrorOf, aG as buildMcpAppDocument, aH as buildMcpAppSandboxShell, aI as clampAppHeight, aJ as elicitationFields, aK as elicitationFormAnswer, aL as elicitationInitialDraft, aM as elicitationLink, aN as formatCountdown, aO as grantedAppCsp, aP as mcpAppCsp, aQ as mcpAppHostCapabilities, aR as mcpAppSandboxProxyUrl, aS as mcpAppSandboxShellCsp, aT as mcpAppSandboxTarget, aU as resolveAppDownload, aV as saveAppFile, aW as useMcpAppHost } from './elicitation-B6h_-yLg.js';
|
|
7
7
|
export { M as MCP_APP_POLICY_TOKEN_MAX_CHARS, a as MCP_APP_SANDBOX_PROXY_READY, b as MCP_APP_SANDBOX_RESOURCE_READY, i as isMcpAppSandboxMessage, m as mcpAppPolicyToken } from './mcp-app-policy-DIUmGPJP.js';
|
|
8
8
|
|
|
9
9
|
interface UseAgentOptions {
|
|
@@ -922,7 +922,17 @@ interface AgentLabels {
|
|
|
922
922
|
htmlShorter: string;
|
|
923
923
|
/** The accessible name of the frame itself. */
|
|
924
924
|
htmlFrameName: (path: string) => string;
|
|
925
|
-
|
|
925
|
+
/**
|
|
926
|
+
* `n` is the CALLS to the media models, failed ones included (`usage.mediaCalls`: what the
|
|
927
|
+
* run's cap counts). `made` is what came of them (`imagesGenerated`, `speechCharacters`,
|
|
928
|
+
* `transcriptionSeconds`): a label that says "pictures made" counts `made.imagesGenerated`,
|
|
929
|
+
* never `n` - a call that failed made nothing. An empty string shows nothing.
|
|
930
|
+
*/
|
|
931
|
+
usageMedia: (n: number, made: {
|
|
932
|
+
imagesGenerated: number;
|
|
933
|
+
speechCharacters: number;
|
|
934
|
+
transcriptionSeconds: number;
|
|
935
|
+
}) => string;
|
|
926
936
|
usageDecisions: (n: number) => string;
|
|
927
937
|
/** "decision model: continue (0.93)" - its answer was used; the probability is formatted. */
|
|
928
938
|
decisionAccepted: (choice: string, confidence: string) => string;
|
package/dist/index.js
CHANGED
|
@@ -192,6 +192,7 @@ var createInitialAgentState = () => ({
|
|
|
192
192
|
events: [],
|
|
193
193
|
seq: 0
|
|
194
194
|
});
|
|
195
|
+
var BLOCKER_MARK = "[BLOCKER]";
|
|
195
196
|
var resetRun = (state) => ({
|
|
196
197
|
...createInitialAgentState(),
|
|
197
198
|
status: state.status,
|
|
@@ -733,7 +734,13 @@ var applyEvent = (state, event, ctx) => {
|
|
|
733
734
|
case "step.text-delta":
|
|
734
735
|
return {
|
|
735
736
|
...state,
|
|
736
|
-
|
|
737
|
+
// "[BLOCKER]" is the executor's signal to the core that a step cannot be completed (the
|
|
738
|
+
// core strips it from the step's summary): never a word for the user. Stripped from the
|
|
739
|
+
// text as it accumulates, so a marker split across two deltas goes too.
|
|
740
|
+
steps: patchStep(state.steps, event.step.id, (s) => ({
|
|
741
|
+
...s,
|
|
742
|
+
text: (s.text + event.delta).split(BLOCKER_MARK).join("")
|
|
743
|
+
}))
|
|
737
744
|
};
|
|
738
745
|
case "step.tool-call": {
|
|
739
746
|
const tagged = new Set(
|
|
@@ -1088,6 +1095,7 @@ var applyEvent = (state, event, ctx) => {
|
|
|
1088
1095
|
return event.phase === "run" ? {
|
|
1089
1096
|
...withoutBusy(keepSubmitted(state)),
|
|
1090
1097
|
error: event.error,
|
|
1098
|
+
errorCode: event.code,
|
|
1091
1099
|
messages: finalizeAssistant(
|
|
1092
1100
|
state.messages,
|
|
1093
1101
|
state.finalText || `Error: ${event.error}`,
|
|
@@ -1169,7 +1177,8 @@ var agentStateReducer = (state, action) => {
|
|
|
1169
1177
|
return {
|
|
1170
1178
|
...state,
|
|
1171
1179
|
status: action.status,
|
|
1172
|
-
error: action.status === "error" ? action.error : void 0
|
|
1180
|
+
error: action.status === "error" ? action.error : void 0,
|
|
1181
|
+
errorCode: void 0
|
|
1173
1182
|
};
|
|
1174
1183
|
case "remote": {
|
|
1175
1184
|
const remote = action.remote;
|
|
@@ -7246,13 +7255,18 @@ var UsageBadge = ({
|
|
|
7246
7255
|
const media = showCalls ? usage.mediaCalls ?? 0 : 0;
|
|
7247
7256
|
const decisions = showCalls ? usage.decisionCalls ?? 0 : 0;
|
|
7248
7257
|
if (usage.totalTokens === 0 && media === 0 && decisions === 0) return null;
|
|
7258
|
+
const mediaText = media ? L.usageMedia(media, {
|
|
7259
|
+
imagesGenerated: usage.imagesGenerated ?? 0,
|
|
7260
|
+
speechCharacters: usage.speechCharacters ?? 0,
|
|
7261
|
+
transcriptionSeconds: usage.transcriptionSeconds ?? 0
|
|
7262
|
+
}) : "";
|
|
7249
7263
|
const reasoning = usage.reasoningTokens ?? 0;
|
|
7250
7264
|
const cached = usage.cachedInputTokens ?? 0;
|
|
7251
7265
|
const title = [
|
|
7252
7266
|
`${usage.inputTokens} in + ${usage.outputTokens} out = ${usage.totalTokens} tokens`,
|
|
7253
7267
|
reasoning ? `${reasoning} thinking` : "",
|
|
7254
7268
|
cached ? `${cached} input tokens from the prompt cache` : "",
|
|
7255
|
-
|
|
7269
|
+
mediaText,
|
|
7256
7270
|
decisions ? L.usageDecisions(decisions) : ""
|
|
7257
7271
|
].filter(Boolean).join(" \xB7 ");
|
|
7258
7272
|
return /* @__PURE__ */ jsxs16("span", { className: ["awr-usage", className].filter(Boolean).join(" "), title, children: [
|
|
@@ -7262,7 +7276,7 @@ var UsageBadge = ({
|
|
|
7262
7276
|
"\u2193",
|
|
7263
7277
|
!compact && reasoning > 0 && ` \xB7 ${formatTokens(reasoning)} think`,
|
|
7264
7278
|
!compact && cached > 0 && ` \xB7 ${formatTokens(cached)} cached`,
|
|
7265
|
-
!compact &&
|
|
7279
|
+
!compact && mediaText && ` \xB7 ${mediaText}`,
|
|
7266
7280
|
!compact && decisions > 0 && ` \xB7 ${L.usageDecisions(decisions)}`
|
|
7267
7281
|
] });
|
|
7268
7282
|
};
|