@tutti-os/agent-gui 0.0.146 → 0.0.148

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -49,15 +49,20 @@ contract; it is not a pasted-text or external-file capability signal.
49
49
 
50
50
  ## External File Preparation
51
51
 
52
- OS clipboard and drop files use the required workspace
53
- `prepareExternalPromptFiles` host port. AgentGUI owns classification, pending
54
- mentions, and draft reconciliation. The host owns native-path lookup, size
55
- enforcement, persistence, and remote transport.
56
-
57
- The preparer returns one result per input `sourceIndex`. Prepared files require
58
- a provider-readable `path` or `url`; failures require a typed `errorCode`.
59
- Hosts must isolate per-file failures and reject oversized inputs before reading
60
- or persisting their bytes.
52
+ OS clipboard and drop entries first use the optional synchronous workspace
53
+ `resolveExternalPromptEntries` host port. The host classifies every input as a
54
+ live `WorkspaceFileReference` or a snapshot that needs preparation. AgentGUI
55
+ inserts references directly as ordinary file/folder mentions, preserves mixed
56
+ input order, and sends only `prepare` entries to `prepareExternalPromptFiles`.
57
+ Without the resolver, every input uses preparation.
58
+
59
+ Both ports return one result per input `sourceIndex`. The resolver is
60
+ synchronous so paste/drop insertion position remains stable. Prepared files
61
+ require a provider-readable `path` or `url`; failures require a typed
62
+ `errorCode`. Hosts must isolate per-file failures and reject oversized inputs
63
+ before reading or persisting their bytes. A host that resolves path-backed
64
+ entries as references must also reject any such entry that unexpectedly reaches
65
+ preparation, preventing a resolver failure from creating a duplicate snapshot.
61
66
 
62
67
  Slash commands come from the runtime session command snapshot. AgentGUI keeps
63
68
  legacy provider-default slash entries unless the host passes
@@ -492,6 +492,16 @@ interface AgentGUIAccountMenuState {
492
492
  onOpenExternal(url: string): void;
493
493
  }
494
494
 
495
+ type AgentExternalPromptEntryResolution = {
496
+ disposition: "reference";
497
+ reference: WorkspaceFileReference;
498
+ sourceIndex: number;
499
+ } | {
500
+ disposition: "prepare";
501
+ sourceIndex: number;
502
+ };
503
+ type AgentExternalPromptEntryResolver = (files: readonly File[]) => readonly AgentExternalPromptEntryResolution[];
504
+
495
505
  interface AgentPreparedExternalPromptFileMetadata {
496
506
  assetId?: string;
497
507
  mimeType?: string;
@@ -826,6 +836,7 @@ interface AgentComposerProps {
826
836
  }) => void;
827
837
  onLinkAction?: (action: WorkspaceLinkAction) => void;
828
838
  onRequestWorkspaceReferences?: ((entity?: AgentContextMentionItem | null) => Promise<WorkspaceReferencePickResult>) | null;
839
+ resolveExternalPromptEntries?: AgentExternalPromptEntryResolver | null;
829
840
  prepareExternalPromptFiles?: AgentExternalPromptFilePreparer | null;
830
841
  promptAssetLimit?: number | null;
831
842
  selectProjectDirectory?: () => Promise<{
@@ -994,6 +1005,7 @@ interface AgentGUINodeWorkspace {
994
1005
  selectProjectDirectory?: () => Promise<{
995
1006
  path: string;
996
1007
  } | null>;
1008
+ resolveExternalPromptEntries?: AgentComposerProps["resolveExternalPromptEntries"];
997
1009
  prepareExternalPromptFiles?: AgentComposerProps["prepareExternalPromptFiles"];
998
1010
  promptAssetLimit?: number | null;
999
1011
  referenceSourceAggregator?: ReferenceSourceAggregator | null;
package/dist/agent-gui.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  AgentGUI
3
- } from "./chunk-4WSWPMV7.js";
3
+ } from "./chunk-LWXHBRDO.js";
4
4
  import "./chunk-A4WCTHWS.js";
5
5
  import "./chunk-ZF65NZ4B.js";
6
6
  import "./chunk-TUWQV2MC.js";
@@ -176,6 +176,8 @@ interface WorkspaceAgentMessageCenterCardProps {
176
176
  interactive?: boolean;
177
177
  isSubmitting: boolean;
178
178
  lazySummary?: boolean;
179
+ promptVariant?: "compact" | "full";
180
+ showSummaryWithPrompt?: boolean;
179
181
  summaryAccessory?: ReactNode;
180
182
  onLinkAction?: (action: WorkspaceLinkAction) => void;
181
183
  onOpenChat: (input: {
@@ -471,14 +473,42 @@ declare function useEngineSelector<TState, TSelected>(engine: EngineStateStore<T
471
473
  declare function buildWorkspaceAgentMessageCenterModelFromEngine(presentation: WorkspaceAgentMessageCenterPresentation, snapshot: Pick<AgentActivitySnapshot, "sessionMessagesById" | "workspaceId">, options?: BuildWorkspaceAgentMessageCenterOptions): WorkspaceAgentMessageCenterModel;
472
474
  interface WorkspaceAgentMessageCenterPresentation {
473
475
  consumers: readonly WorkspaceAgentConsumerSession[];
476
+ dismissedPlanTurnKeys: Readonly<Record<string, true>>;
474
477
  promptStatusByKey: Readonly<Record<string, WorkspaceAgentMessageCenterPromptStatus>>;
475
478
  }
476
479
  declare function selectWorkspaceAgentMessageCenterPresentation(state: AgentSessionEngineState): WorkspaceAgentMessageCenterPresentation;
477
480
  declare function workspaceAgentMessageCenterPresentationEqual(left: WorkspaceAgentMessageCenterPresentation, right: WorkspaceAgentMessageCenterPresentation): boolean;
481
+ type WorkspaceAgentAttentionTarget = {
482
+ kind: "interaction";
483
+ workspaceId: string;
484
+ agentSessionId: string;
485
+ turnId: string;
486
+ requestId: string;
487
+ } | {
488
+ kind: "plan-implementation";
489
+ workspaceId: string;
490
+ agentSessionId: string;
491
+ turnId: string;
492
+ requestId: string;
493
+ };
494
+ interface WorkspaceAgentAttentionItem {
495
+ item: WorkspaceAgentMessageCenterItem;
496
+ status: WorkspaceAgentMessageCenterPromptStatus;
497
+ target: WorkspaceAgentAttentionTarget;
498
+ }
499
+ /**
500
+ * Projects every canonical actionable target instead of collapsing a root
501
+ * conversation to its latest interaction. The display item keeps the root
502
+ * conversation identity for navigation while target keeps the exact child
503
+ * session/turn/request identity used by the command.
504
+ */
505
+ declare function selectWorkspaceAgentAttentionItems(presentation: WorkspaceAgentMessageCenterPresentation, snapshot: Pick<AgentActivitySnapshot, "sessionMessagesById" | "workspaceId">, options?: BuildWorkspaceAgentMessageCenterOptions): WorkspaceAgentAttentionItem[];
506
+ declare function workspaceAgentAttentionItemsEqual(left: readonly WorkspaceAgentAttentionItem[], right: readonly WorkspaceAgentAttentionItem[]): boolean;
478
507
  type WorkspaceAgentMessageCenterPromptStatus = "idle" | "responding" | "unknown" | "failed";
479
508
  declare function workspaceAgentMessageCenterPromptStatus(presentation: WorkspaceAgentMessageCenterPresentation, item: Pick<WorkspaceAgentMessageCenterItem, "agentSessionId" | "pendingInteractionTarget" | "pendingPrompt">): WorkspaceAgentMessageCenterPromptStatus;
480
509
 
481
510
  declare function stabilizeWorkspaceAgentMessageCenterModel(previous: WorkspaceAgentMessageCenterModel | null, next: WorkspaceAgentMessageCenterModel): WorkspaceAgentMessageCenterModel;
511
+ declare function workspaceAgentMessageCenterItemEqual(left: WorkspaceAgentMessageCenterItem, right: WorkspaceAgentMessageCenterItem): boolean;
482
512
 
483
513
  declare const messageCenterFiltersStorageKey = "tutti.agent-message-center.filters";
484
514
  interface MessageCenterFilterPreferences {
@@ -489,4 +519,4 @@ interface MessageCenterFilterPreferences {
489
519
  declare function readMessageCenterFilterPreferences(): MessageCenterFilterPreferences;
490
520
  declare function writeMessageCenterFilterPreferences(preferences: MessageCenterFilterPreferences): void;
491
521
 
492
- export { AgentInteractivePromptSurface, AgentVerticalScrollArea, type BuildWorkspaceAgentMessageCenterOptions, type MessageCenterAgentUserStack, type MessageCenterFilterPreferences, type MessageCenterGroup, type MessageCenterGroupBy, MessageCenterGroupHeading, MessageCenterIdentityAvatarMark, MessageCenterIdentityAvatarStack, MessageCenterIdentityLabel, MessageCenterOpenChatButton, type MessageCenterProviderOption, type MessageCenterStatusFilter, type MessageCenterStatusOption, type MessageCenterStatusTone, MessageCenterSummary, type MessageCenterTranslate, PLAN_IMPLEMENTATION_ACTION_IMPLEMENT, PLAN_IMPLEMENTATION_PROMPT, type PromptToolDetail, type WorkspaceAgentMessageCenterAgentPresentation, WorkspaceAgentMessageCenterAttentionDeck, type WorkspaceAgentMessageCenterAttentionDeckProps, type WorkspaceAgentMessageCenterAttentionDeckRenderCardInput, WorkspaceAgentMessageCenterCard, type WorkspaceAgentMessageCenterCardProps, type WorkspaceAgentMessageCenterCounts, type WorkspaceAgentMessageCenterDigest, type WorkspaceAgentMessageCenterDigestPrimary, type WorkspaceAgentMessageCenterDigestPrimaryKind, type WorkspaceAgentMessageCenterIdentity, type WorkspaceAgentMessageCenterInteractionTarget, type WorkspaceAgentMessageCenterItem, type WorkspaceAgentMessageCenterModel, WorkspaceAgentMessageCenterPanel, type WorkspaceAgentMessageCenterPanelPresentation, type WorkspaceAgentMessageCenterPanelProps, type WorkspaceAgentMessageCenterPresentation, type WorkspaceAgentMessageCenterPromptStatus, WorkspaceAgentMessageCenterStack, MessageCenterViewMenu as WorkspaceAgentMessageCenterViewMenu, approvalOptionDisplayLabel, buildMessageCenterProviderOptions, buildMessageCenterStatusOptions, buildWorkspaceAgentInteractivePromptLabels, buildWorkspaceAgentMessageCenterModelFromEngine, dispatchAgentPlanPromptAction, getPromptToolDetails, groupMessageCenterItems, isInteractiveMessageCenterItem, isPromptRequestIdTitle, isRecentlyCompletedMessageCenterItem, isWaitingMessageCenterItem, itemMatchesViewFilters, managedAgentRoundedIconUrl, messageCenterAgentUserStackId, messageCenterFiltersStorageKey, messageCenterGroupLabel, messageCenterStackPreviewNodes, messageCenterStackPreviewText, messageCenterStackRenderId, messageCenterStackScrollSyncSegment, messageCenterStatusFilterValue, messageCenterStatusTone, messageCenterStatusToneClass, partitionMessageCenterItemsByAgentUser, readMessageCenterFilterPreferences, resolveMessageCenterNotificationAction, selectMessageCenterAttentionDeckItems, selectWorkspaceAgentMessageCenterPresentation, stabilizeWorkspaceAgentMessageCenterModel, statusFilterSummary, useEngineSelector, userAvatarPlaceholderUrl, workspaceAgentActivityStatusLabel, workspaceAgentMessageCenterPresentationEqual, workspaceAgentMessageCenterPromptStatus, writeMessageCenterFilterPreferences };
522
+ export { AgentInteractivePromptSurface, AgentVerticalScrollArea, type BuildWorkspaceAgentMessageCenterOptions, type MessageCenterAgentUserStack, type MessageCenterFilterPreferences, type MessageCenterGroup, type MessageCenterGroupBy, MessageCenterGroupHeading, MessageCenterIdentityAvatarMark, MessageCenterIdentityAvatarStack, MessageCenterIdentityLabel, MessageCenterOpenChatButton, type MessageCenterProviderOption, type MessageCenterStatusFilter, type MessageCenterStatusOption, type MessageCenterStatusTone, MessageCenterSummary, type MessageCenterTranslate, PLAN_IMPLEMENTATION_ACTION_IMPLEMENT, PLAN_IMPLEMENTATION_PROMPT, type PromptToolDetail, type WorkspaceAgentAttentionItem, type WorkspaceAgentAttentionTarget, type WorkspaceAgentMessageCenterAgentPresentation, WorkspaceAgentMessageCenterAttentionDeck, type WorkspaceAgentMessageCenterAttentionDeckProps, type WorkspaceAgentMessageCenterAttentionDeckRenderCardInput, WorkspaceAgentMessageCenterCard, type WorkspaceAgentMessageCenterCardProps, type WorkspaceAgentMessageCenterCounts, type WorkspaceAgentMessageCenterDigest, type WorkspaceAgentMessageCenterDigestPrimary, type WorkspaceAgentMessageCenterDigestPrimaryKind, type WorkspaceAgentMessageCenterIdentity, type WorkspaceAgentMessageCenterInteractionTarget, type WorkspaceAgentMessageCenterItem, type WorkspaceAgentMessageCenterModel, WorkspaceAgentMessageCenterPanel, type WorkspaceAgentMessageCenterPanelPresentation, type WorkspaceAgentMessageCenterPanelProps, type WorkspaceAgentMessageCenterPresentation, type WorkspaceAgentMessageCenterPromptStatus, WorkspaceAgentMessageCenterStack, MessageCenterViewMenu as WorkspaceAgentMessageCenterViewMenu, approvalOptionDisplayLabel, buildMessageCenterProviderOptions, buildMessageCenterStatusOptions, buildWorkspaceAgentInteractivePromptLabels, buildWorkspaceAgentMessageCenterModelFromEngine, dispatchAgentPlanPromptAction, getPromptToolDetails, groupMessageCenterItems, isInteractiveMessageCenterItem, isPromptRequestIdTitle, isRecentlyCompletedMessageCenterItem, isWaitingMessageCenterItem, itemMatchesViewFilters, managedAgentRoundedIconUrl, messageCenterAgentUserStackId, messageCenterFiltersStorageKey, messageCenterGroupLabel, messageCenterStackPreviewNodes, messageCenterStackPreviewText, messageCenterStackRenderId, messageCenterStackScrollSyncSegment, messageCenterStatusFilterValue, messageCenterStatusTone, messageCenterStatusToneClass, partitionMessageCenterItemsByAgentUser, readMessageCenterFilterPreferences, resolveMessageCenterNotificationAction, selectMessageCenterAttentionDeckItems, selectWorkspaceAgentAttentionItems, selectWorkspaceAgentMessageCenterPresentation, stabilizeWorkspaceAgentMessageCenterModel, statusFilterSummary, useEngineSelector, userAvatarPlaceholderUrl, workspaceAgentActivityStatusLabel, workspaceAgentAttentionItemsEqual, workspaceAgentMessageCenterItemEqual, workspaceAgentMessageCenterPresentationEqual, workspaceAgentMessageCenterPromptStatus, writeMessageCenterFilterPreferences };