@tutti-os/agent-gui 0.0.133 → 0.0.134

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.
Files changed (77) hide show
  1. package/README.md +19 -5
  2. package/dist/{AgentRichTextReadonly-PEKCMRPE.js → AgentRichTextReadonly-HCKTNAYO.js} +7 -6
  3. package/dist/agent-conversation/index.d.ts +2 -2
  4. package/dist/agent-conversation/index.js +9 -9
  5. package/dist/agent-gui.d.ts +34 -6
  6. package/dist/agent-gui.js +17 -17
  7. package/dist/agent-message-center/index.js +7 -7
  8. package/dist/{agentFileMentionContracts-CWAeuL7S.d.ts → agentFileMentionContracts-B0yQizXB.d.ts} +5 -0
  9. package/dist/{agentGuiNodeTypes-B57MfwVo.d.ts → agentGuiNodeTypes-DV7KvZRe.d.ts} +6 -5
  10. package/dist/agents.d.ts +1 -1
  11. package/dist/agents.js +1 -1
  12. package/dist/app/renderer/agentactivity.css +6 -0
  13. package/dist/{chunk-GBBNYGL7.js → chunk-25VMCMAQ.js} +4 -4
  14. package/dist/{chunk-VS5BRBY6.js → chunk-5WOCGIXJ.js} +4 -1
  15. package/dist/chunk-5WOCGIXJ.js.map +1 -0
  16. package/dist/chunk-DLCZJKCA.js +1 -0
  17. package/dist/chunk-DLCZJKCA.js.map +1 -0
  18. package/dist/{chunk-QQRTUHCH.js → chunk-EU7DCT4F.js} +2 -2
  19. package/dist/{chunk-SZOTLVH6.js → chunk-GIYGO2PB.js} +2 -2
  20. package/dist/{chunk-HCRROERX.js → chunk-IN3HXYOO.js} +4 -4
  21. package/dist/{chunk-N62NVPHT.js → chunk-IYZ4GOSN.js} +4 -4
  22. package/dist/{chunk-A6NSHCRP.js → chunk-JI5KND3K.js} +54 -51
  23. package/dist/chunk-JI5KND3K.js.map +1 -0
  24. package/dist/{chunk-J4TTEMRW.js → chunk-KWGMK4IZ.js} +4 -4
  25. package/dist/{chunk-NE6H7S5Z.js → chunk-OFJNIQWR.js} +2 -2
  26. package/dist/{chunk-NE6H7S5Z.js.map → chunk-OFJNIQWR.js.map} +1 -1
  27. package/dist/{chunk-UARZZJJB.js → chunk-OI6BYC7P.js} +4 -4
  28. package/dist/{chunk-OBWM2RFE.js → chunk-QPEO4OQS.js} +308 -8
  29. package/dist/chunk-QPEO4OQS.js.map +1 -0
  30. package/dist/{chunk-XNE2ROCP.js → chunk-UA75CGAG.js} +3 -3
  31. package/dist/{chunk-PVTAFUDS.js → chunk-VGS7S7YT.js} +2 -2
  32. package/dist/{chunk-OQR3HXPF.js → chunk-VUNVGEQG.js} +7 -1
  33. package/dist/chunk-VUNVGEQG.js.map +1 -0
  34. package/dist/{chunk-IZ626FDO.js → chunk-Y5HD6XHP.js} +485 -361
  35. package/dist/chunk-Y5HD6XHP.js.map +1 -0
  36. package/dist/{chunk-KPMQGPYU.js → chunk-ZVYUTXQJ.js} +1 -1
  37. package/dist/chunk-ZVYUTXQJ.js.map +1 -0
  38. package/dist/context-mention-palette/index.d.ts +1 -1
  39. package/dist/context-mention-palette/index.js +8 -7
  40. package/dist/{contribution-BbW-kkpi.d.ts → contribution-CDdwTppn.d.ts} +2 -0
  41. package/dist/custom-mention.js +1 -0
  42. package/dist/i18n/index.d.ts +6 -0
  43. package/dist/i18n/index.js +2 -2
  44. package/dist/index.d.ts +53 -9
  45. package/dist/index.js +20 -20
  46. package/dist/index.js.map +1 -1
  47. package/dist/mention-search.d.ts +1 -1
  48. package/dist/mention-search.js +6 -5
  49. package/dist/{types-BeAVr4of.d.ts → types-ee3zJ6Cc.d.ts} +3 -0
  50. package/dist/workbench/browser-element-context/index.d.ts +37 -0
  51. package/dist/workbench/browser-element-context/index.js +750 -0
  52. package/dist/workbench/browser-element-context/index.js.map +1 -0
  53. package/dist/workbench/contribution.d.ts +1 -1
  54. package/dist/workbench/contribution.js +4 -4
  55. package/dist/workbench/index.d.ts +1 -1
  56. package/dist/workbench/index.js +4 -4
  57. package/dist/workbench/sessionTitle.js +2 -2
  58. package/dist/workbench/tool-sidebar/index.d.ts +189 -0
  59. package/dist/workbench/tool-sidebar/index.js +1492 -0
  60. package/dist/workbench/tool-sidebar/index.js.map +1 -0
  61. package/package.json +27 -12
  62. package/dist/chunk-A6NSHCRP.js.map +0 -1
  63. package/dist/chunk-IZ626FDO.js.map +0 -1
  64. package/dist/chunk-KPMQGPYU.js.map +0 -1
  65. package/dist/chunk-OBWM2RFE.js.map +0 -1
  66. package/dist/chunk-OQR3HXPF.js.map +0 -1
  67. package/dist/chunk-VS5BRBY6.js.map +0 -1
  68. /package/dist/{AgentRichTextReadonly-PEKCMRPE.js.map → AgentRichTextReadonly-HCKTNAYO.js.map} +0 -0
  69. /package/dist/{chunk-GBBNYGL7.js.map → chunk-25VMCMAQ.js.map} +0 -0
  70. /package/dist/{chunk-QQRTUHCH.js.map → chunk-EU7DCT4F.js.map} +0 -0
  71. /package/dist/{chunk-SZOTLVH6.js.map → chunk-GIYGO2PB.js.map} +0 -0
  72. /package/dist/{chunk-HCRROERX.js.map → chunk-IN3HXYOO.js.map} +0 -0
  73. /package/dist/{chunk-N62NVPHT.js.map → chunk-IYZ4GOSN.js.map} +0 -0
  74. /package/dist/{chunk-J4TTEMRW.js.map → chunk-KWGMK4IZ.js.map} +0 -0
  75. /package/dist/{chunk-UARZZJJB.js.map → chunk-OI6BYC7P.js.map} +0 -0
  76. /package/dist/{chunk-XNE2ROCP.js.map → chunk-UA75CGAG.js.map} +0 -0
  77. /package/dist/{chunk-PVTAFUDS.js.map → chunk-VGS7S7YT.js.map} +0 -0
package/README.md CHANGED
@@ -44,8 +44,20 @@ local persistence and returns `{ path, name, sizeBytes }`.
44
44
  If the method is absent or staging fails, the attachment remains in an explicit
45
45
  failed state and retains its in-memory text. AgentGUI must not silently put the
46
46
  payload back into the input. The user can explicitly choose “Show in text
47
- field” to do that. Generic `uploadPromptContent` remains the contract for
48
- images and host-local files; it is not a pasted-text capability signal.
47
+ field” to do that. Generic `uploadPromptContent` remains the image-upload
48
+ contract; it is not a pasted-text or external-file capability signal.
49
+
50
+ ## External File Preparation
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.
49
61
 
50
62
  Slash commands come from the runtime session command snapshot. AgentGUI keeps
51
63
  legacy provider-default slash entries unless the host passes
@@ -187,10 +199,12 @@ Runnable provider targets are host-supplied. If the target catalog is absent,
187
199
  AgentGUI presents an explicit unavailable state; it does not synthesize local
188
200
  targets from presentation metadata.
189
201
 
190
- Agent names, primary icons, optional rail-specific icons, and optional
191
- home-carousel artwork come from `agents[].name`, `agents[].iconUrl`,
202
+ Agent names, primary icons, optional conversation-mask icons, optional
203
+ rail-specific icons, and optional home-carousel artwork come from
204
+ `agents[].name`, `agents[].iconUrl`, `agents[].maskIconUrl`,
192
205
  `agents[].sidebarIconUrl`, and `agents[].heroImageUrl`. Provider rail surfaces
193
- prefer `sidebarIconUrl`; other identity surfaces retain `iconUrl`.
206
+ prefer `sidebarIconUrl`; conversation rows use `maskIconUrl` where present;
207
+ other identity surfaces retain `iconUrl`.
194
208
  `owner.avatarUrl` is rendered separately as an ownership badge. Invalid entries
195
209
  and duplicate `agentTargetId` values are discarded by
196
210
  `normalizeAgentGUIAgents`, with the first occurrence preserving host order.
@@ -1,18 +1,19 @@
1
1
  import {
2
2
  AgentRichTextReadonly
3
- } from "./chunk-XNE2ROCP.js";
4
- import "./chunk-OBWM2RFE.js";
3
+ } from "./chunk-UA75CGAG.js";
4
+ import "./chunk-QPEO4OQS.js";
5
5
  import "./chunk-5QPOMKMQ.js";
6
- import "./chunk-KPMQGPYU.js";
6
+ import "./chunk-FGLQZ6I4.js";
7
+ import "./chunk-ZVYUTXQJ.js";
7
8
  import "./chunk-EDNJMG5T.js";
8
- import "./chunk-SZOTLVH6.js";
9
+ import "./chunk-GIYGO2PB.js";
9
10
  import "./chunk-PJP5BUU6.js";
10
11
  import "./chunk-7KVZPJ3O.js";
11
- import "./chunk-OQR3HXPF.js";
12
+ import "./chunk-VUNVGEQG.js";
12
13
  import "./chunk-D2JUDUYY.js";
13
14
  import "./chunk-6CUELYIF.js";
14
15
  import "./chunk-QMMWKQOT.js";
15
16
  export {
16
17
  AgentRichTextReadonly
17
18
  };
18
- //# sourceMappingURL=AgentRichTextReadonly-PEKCMRPE.js.map
19
+ //# sourceMappingURL=AgentRichTextReadonly-HCKTNAYO.js.map
@@ -2,10 +2,10 @@ import * as react from 'react';
2
2
  import { ReactNode, JSX } from 'react';
3
3
  import { c as AgentConversationVM, g as WorkspaceLinkAction, f as WorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-DWEy7jzx.js';
4
4
  export { B as BuildWorkspaceAgentSessionDetailInput, W as WorkspaceAgentActivityCard, e as WorkspaceAgentActivityTimelineItem, h as buildWorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-DWEy7jzx.js';
5
- import { d as AgentGUIProviderSkillOption, h as AgentMessageMarkdownWorkspaceAppIcon } from '../agentGuiNodeTypes-B57MfwVo.js';
5
+ import { d as AgentGUIProviderSkillOption, h as AgentMessageMarkdownWorkspaceAppIcon } from '../agentGuiNodeTypes-DV7KvZRe.js';
6
6
  import '@tutti-os/workspace-issue-manager/core';
7
7
  import '@tutti-os/agent-activity-core';
8
- import '../types-BeAVr4of.js';
8
+ import '../types-ee3zJ6Cc.js';
9
9
  import '@tutti-os/workspace-user-project/contracts';
10
10
 
11
11
  interface AgentConversationFlowProps {
@@ -6,25 +6,25 @@ import {
6
6
  projectAgentConversationVM,
7
7
  reconcileProjectedAgentConversationVM,
8
8
  useProjectedAgentConversation
9
- } from "../chunk-A6NSHCRP.js";
10
- import "../chunk-XNE2ROCP.js";
9
+ } from "../chunk-JI5KND3K.js";
10
+ import "../chunk-UA75CGAG.js";
11
11
  import "../chunk-FM42UN2J.js";
12
- import "../chunk-FGLQZ6I4.js";
13
12
  import "../chunk-XJ34OIEQ.js";
14
13
  import "../chunk-R7AXDQCA.js";
15
- import "../chunk-OBWM2RFE.js";
14
+ import "../chunk-QPEO4OQS.js";
16
15
  import "../chunk-5QPOMKMQ.js";
17
- import "../chunk-N62NVPHT.js";
18
- import "../chunk-KPMQGPYU.js";
19
- import "../chunk-NE6H7S5Z.js";
16
+ import "../chunk-FGLQZ6I4.js";
17
+ import "../chunk-IYZ4GOSN.js";
18
+ import "../chunk-ZVYUTXQJ.js";
19
+ import "../chunk-OFJNIQWR.js";
20
20
  import "../chunk-F5UR6EJG.js";
21
21
  import "../chunk-EDNJMG5T.js";
22
22
  import {
23
23
  translate
24
- } from "../chunk-SZOTLVH6.js";
24
+ } from "../chunk-GIYGO2PB.js";
25
25
  import "../chunk-PJP5BUU6.js";
26
26
  import "../chunk-7KVZPJ3O.js";
27
- import "../chunk-OQR3HXPF.js";
27
+ import "../chunk-VUNVGEQG.js";
28
28
  import "../chunk-MIJXEELH.js";
29
29
  import "../chunk-D2JUDUYY.js";
30
30
  import "../chunk-6CUELYIF.js";
@@ -2,11 +2,11 @@ import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
4
4
  import { AgentActivityGoalControlInput, AgentActivityGoalControlResult, AgentActivityCreateSessionInput, AgentActivitySession, AgentActivityDeleteSessionInput, AgentActivityDeleteSessionResult, AgentActivitySendInput, AgentActivitySessionSettings, AgentActivityActivateSessionResult, AgentActivitySnapshot, AgentSessionEngine, AgentActivityMessageOrder, AgentActivityMessagePage, AgentActivitySendInputResult, AgentActivityRenameSessionInput, AgentActivitySubmitInteractiveInput, AgentActivitySubmitInteractiveResult, AgentActivitySnapshotListener, AgentActivitySubmitSettingsPatch } from '@tutti-os/agent-activity-core';
5
- import { k as AgentHostAgentSessionComposerSettings, o as AgentHostUnactivateAgentSessionResult, b as AgentGUIAgentTarget, f as AgentGUIProvider, p as AgentPromptContentBlock, e as AgentGUINodeData, P as Point, g as AgentGUIProviderRailAllPresentation, h as AgentGUIProviderRailMode, i as AgentGUIProviderReadinessGate, d as AgentGUIHomeSuggestionId, N as NodeFrame, a as AgentGUIAgentDirectorySnapshot, c as AgentGUIAllAgentsPresentation } from './types-BeAVr4of.js';
6
- import { A as AgentComposerDraft, j as AgentSessionCommand, d as AgentGUIProviderSkillOption, b as AgentGUIComposerSettingsVM, e as AgentGUIQueueStatus, f as AgentGUIQueuedPromptVM, h as AgentMessageMarkdownWorkspaceAppIcon, k as AgentSlashCommandCapability, c as AgentGUINodeViewModel, i as AgentProbeSnapshot, a as AgentComposerDraftFile, g as AgentHostInputApi } from './agentGuiNodeTypes-B57MfwVo.js';
5
+ import { k as AgentHostAgentSessionComposerSettings, o as AgentHostUnactivateAgentSessionResult, b as AgentGUIAgentTarget, f as AgentGUIProvider, p as AgentPromptContentBlock, e as AgentGUINodeData, P as Point, g as AgentGUIProviderRailAllPresentation, h as AgentGUIProviderRailMode, i as AgentGUIProviderReadinessGate, d as AgentGUIHomeSuggestionId, N as NodeFrame, a as AgentGUIAgentDirectorySnapshot, c as AgentGUIAllAgentsPresentation } from './types-ee3zJ6Cc.js';
6
+ import { A as AgentComposerDraft, j as AgentSessionCommand, d as AgentGUIProviderSkillOption, b as AgentGUIComposerSettingsVM, e as AgentGUIQueueStatus, f as AgentGUIQueuedPromptVM, h as AgentMessageMarkdownWorkspaceAppIcon, k as AgentSlashCommandCapability, c as AgentGUINodeViewModel, i as AgentProbeSnapshot, a as AgentComposerDraftFile, g as AgentHostInputApi } from './agentGuiNodeTypes-DV7KvZRe.js';
7
7
  import { WorkspaceFileReference, ReferenceLocateTarget, WorkspaceFileReferenceAdapter, ReferenceProvenanceCatalog } from '@tutti-os/workspace-file-reference/contracts';
8
8
  export { ReferenceProvenanceCatalog as AgentGUIReferenceProvenanceFilterCatalog } from '@tutti-os/workspace-file-reference/contracts';
9
- import { A as AgentContextMentionItem } from './agentFileMentionContracts-CWAeuL7S.js';
9
+ import { A as AgentContextMentionItem } from './agentFileMentionContracts-B0yQizXB.js';
10
10
  import { WorkspaceFileEntry } from '@tutti-os/workspace-file-manager/services';
11
11
  import { ReferenceSourceAggregator } from '@tutti-os/workspace-file-reference/core';
12
12
  import { b as AgentConversationPromptVM, g as WorkspaceLinkAction } from './agentConversationVM-DWEy7jzx.js';
@@ -488,7 +488,33 @@ interface AgentGUIAccountMenuState {
488
488
  onOpenExternal(url: string): void;
489
489
  }
490
490
 
491
- type AgentDroppedFileReferenceResolver = (files: readonly File[]) => Promise<readonly WorkspaceFileReference[]> | readonly WorkspaceFileReference[];
491
+ interface AgentPreparedExternalPromptFileMetadata {
492
+ assetId?: string;
493
+ mimeType?: string;
494
+ name: string;
495
+ sizeBytes?: number;
496
+ uploadStatus?: string;
497
+ uri?: string;
498
+ }
499
+ type AgentPreparedExternalPromptFile = AgentPreparedExternalPromptFileMetadata & ({
500
+ path: string;
501
+ url?: string;
502
+ } | {
503
+ path?: string;
504
+ url: string;
505
+ });
506
+ type AgentExternalPromptFilePreparationErrorCode = "file_too_large" | "folder_unsupported" | "preparation_failed";
507
+ type AgentExternalPromptFilePreparationResult = {
508
+ sourceIndex: number;
509
+ status: "prepared";
510
+ file: AgentPreparedExternalPromptFile;
511
+ } | {
512
+ sourceIndex: number;
513
+ status: "error";
514
+ errorCode: AgentExternalPromptFilePreparationErrorCode;
515
+ retryable?: boolean;
516
+ };
517
+ type AgentExternalPromptFilePreparer = (files: readonly File[]) => Promise<readonly AgentExternalPromptFilePreparationResult[]>;
492
518
 
493
519
  interface AgentProjectPathChangeMetadata {
494
520
  action: WorkspaceUserProjectSelectChangeAction;
@@ -796,7 +822,8 @@ interface AgentComposerProps {
796
822
  }) => void;
797
823
  onLinkAction?: (action: WorkspaceLinkAction) => void;
798
824
  onRequestWorkspaceReferences?: ((entity?: AgentContextMentionItem | null) => Promise<WorkspaceReferencePickResult>) | null;
799
- resolveDroppedFileReferences?: AgentDroppedFileReferenceResolver | null;
825
+ prepareExternalPromptFiles?: AgentExternalPromptFilePreparer | null;
826
+ promptAssetLimit?: number | null;
800
827
  selectProjectDirectory?: () => Promise<{
801
828
  path: string;
802
829
  } | null>;
@@ -964,7 +991,8 @@ interface AgentGUINodeWorkspace {
964
991
  selectProjectDirectory?: () => Promise<{
965
992
  path: string;
966
993
  } | null>;
967
- resolveDroppedFileReferences?: AgentComposerProps["resolveDroppedFileReferences"];
994
+ prepareExternalPromptFiles?: AgentComposerProps["prepareExternalPromptFiles"];
995
+ promptAssetLimit?: number | null;
968
996
  referenceSourceAggregator?: ReferenceSourceAggregator | null;
969
997
  resolveReferenceEntryIconUrl?: (entry: WorkspaceFileEntry) => Promise<string | null | undefined>;
970
998
  resolveMentionReferenceTarget?: AgentMentionReferenceTargetResolver | null;
package/dist/agent-gui.js CHANGED
@@ -1,41 +1,41 @@
1
1
  import {
2
2
  AgentGUI
3
- } from "./chunk-IZ626FDO.js";
3
+ } from "./chunk-Y5HD6XHP.js";
4
4
  import "./chunk-A4WCTHWS.js";
5
- import "./chunk-HCRROERX.js";
5
+ import "./chunk-IN3HXYOO.js";
6
6
  import "./chunk-TUWQV2MC.js";
7
7
  import "./chunk-MHOYBRCY.js";
8
- import "./chunk-PVTAFUDS.js";
8
+ import "./chunk-VGS7S7YT.js";
9
9
  import "./chunk-5HIF53K5.js";
10
10
  import "./chunk-R2ZADXRB.js";
11
- import "./chunk-A6NSHCRP.js";
12
- import "./chunk-XNE2ROCP.js";
11
+ import "./chunk-JI5KND3K.js";
12
+ import "./chunk-UA75CGAG.js";
13
13
  import "./chunk-FM42UN2J.js";
14
14
  import "./chunk-UP3ZDYTN.js";
15
- import "./chunk-UARZZJJB.js";
16
- import "./chunk-VS5BRBY6.js";
17
- import "./chunk-FGLQZ6I4.js";
15
+ import "./chunk-OI6BYC7P.js";
16
+ import "./chunk-5WOCGIXJ.js";
18
17
  import "./chunk-DXT4W2SU.js";
19
- import "./chunk-J4TTEMRW.js";
18
+ import "./chunk-KWGMK4IZ.js";
20
19
  import "./chunk-USIFGHT3.js";
21
20
  import "./chunk-XJ34OIEQ.js";
22
21
  import "./chunk-R7AXDQCA.js";
23
- import "./chunk-OBWM2RFE.js";
22
+ import "./chunk-QPEO4OQS.js";
24
23
  import "./chunk-5QPOMKMQ.js";
25
24
  import "./chunk-RMQREVJY.js";
26
- import "./chunk-GBBNYGL7.js";
25
+ import "./chunk-FGLQZ6I4.js";
26
+ import "./chunk-25VMCMAQ.js";
27
27
  import "./chunk-2RQM7PJN.js";
28
- import "./chunk-N62NVPHT.js";
29
- import "./chunk-KPMQGPYU.js";
30
- import "./chunk-QQRTUHCH.js";
28
+ import "./chunk-IYZ4GOSN.js";
29
+ import "./chunk-ZVYUTXQJ.js";
30
+ import "./chunk-EU7DCT4F.js";
31
31
  import "./chunk-YMXYBG7U.js";
32
- import "./chunk-NE6H7S5Z.js";
32
+ import "./chunk-OFJNIQWR.js";
33
33
  import "./chunk-F5UR6EJG.js";
34
34
  import "./chunk-EDNJMG5T.js";
35
- import "./chunk-SZOTLVH6.js";
35
+ import "./chunk-GIYGO2PB.js";
36
36
  import "./chunk-PJP5BUU6.js";
37
37
  import "./chunk-7KVZPJ3O.js";
38
- import "./chunk-OQR3HXPF.js";
38
+ import "./chunk-VUNVGEQG.js";
39
39
  import "./chunk-MIJXEELH.js";
40
40
  import "./chunk-D2JUDUYY.js";
41
41
  import "./chunk-6CUELYIF.js";
@@ -6,7 +6,7 @@ import {
6
6
  dispatchAgentPlanPromptAction,
7
7
  getPromptToolDetails,
8
8
  isPromptRequestIdTitle
9
- } from "../chunk-GBBNYGL7.js";
9
+ } from "../chunk-25VMCMAQ.js";
10
10
  import {
11
11
  useEngineSelector
12
12
  } from "../chunk-2RQM7PJN.js";
@@ -19,20 +19,20 @@ import {
19
19
  isExitPlanSwitchModeInput,
20
20
  normalizeAgentApprovalPurpose,
21
21
  normalizeAskUserQuestions
22
- } from "../chunk-N62NVPHT.js";
22
+ } from "../chunk-IYZ4GOSN.js";
23
23
  import {
24
24
  cn
25
- } from "../chunk-KPMQGPYU.js";
25
+ } from "../chunk-ZVYUTXQJ.js";
26
26
  import {
27
27
  userAvatarPlaceholderUrl,
28
28
  workspaceAgentActivityStatusLabel
29
- } from "../chunk-QQRTUHCH.js";
29
+ } from "../chunk-EU7DCT4F.js";
30
30
  import {
31
31
  resolveWorkspaceAgentSessionSortTimeUnixMs
32
32
  } from "../chunk-YMXYBG7U.js";
33
33
  import {
34
34
  workspaceAgentProviderLabel
35
- } from "../chunk-NE6H7S5Z.js";
35
+ } from "../chunk-OFJNIQWR.js";
36
36
  import "../chunk-F5UR6EJG.js";
37
37
  import {
38
38
  managedAgentRoundedIconUrl
@@ -41,10 +41,10 @@ import {
41
41
  AgentGuiI18nProvider,
42
42
  getActiveUiLanguage,
43
43
  useTranslation
44
- } from "../chunk-SZOTLVH6.js";
44
+ } from "../chunk-GIYGO2PB.js";
45
45
  import "../chunk-PJP5BUU6.js";
46
46
  import "../chunk-7KVZPJ3O.js";
47
- import "../chunk-OQR3HXPF.js";
47
+ import "../chunk-VUNVGEQG.js";
48
48
  import {
49
49
  normalizeAgentTitleText
50
50
  } from "../chunk-MIJXEELH.js";
@@ -9,11 +9,16 @@ interface AgentMentionFileItem {
9
9
  name: string;
10
10
  entryKind: AgentFileMentionKind;
11
11
  directoryPath: string;
12
+ /** Present only for a regular file attached from the local composer. */
13
+ attachmentId?: string;
14
+ attachmentStatus?: AgentComposerFileMentionStatus;
15
+ attachmentErrorCode?: string;
12
16
  score?: number;
13
17
  thumbnailUrl?: string | null;
14
18
  mentionNavigation?: AgentMentionFileNavigationAction;
15
19
  childCount?: number;
16
20
  }
21
+ type AgentComposerFileMentionStatus = "uploading" | "ready" | "error";
17
22
  interface AgentMentionSessionItem {
18
23
  kind: "session";
19
24
  href: string;
@@ -1,5 +1,5 @@
1
1
  import { AgentActivitySession, AgentActivitySlashCommandPolicy, AgentActivityUsage, CanonicalAgentSession } from '@tutti-os/agent-activity-core';
2
- import { j as AgentHostAgentSessionCommand, k as AgentHostAgentSessionComposerSettings, m as AgentHostAgentSessionReasoningEffort, n as AgentHostAgentSessionSpeed, l as AgentHostAgentSessionPermissionConfig, f as AgentGUIProvider, p as AgentPromptContentBlock, e as AgentGUINodeData, b as AgentGUIAgentTarget, h as AgentGUIProviderRailMode, i as AgentGUIProviderReadinessGate } from './types-BeAVr4of.js';
2
+ import { j as AgentHostAgentSessionCommand, k as AgentHostAgentSessionComposerSettings, m as AgentHostAgentSessionReasoningEffort, n as AgentHostAgentSessionSpeed, l as AgentHostAgentSessionPermissionConfig, f as AgentGUIProvider, p as AgentPromptContentBlock, e as AgentGUINodeData, b as AgentGUIAgentTarget, h as AgentGUIProviderRailMode, i as AgentGUIProviderReadinessGate } from './types-ee3zJ6Cc.js';
3
3
  import { A as AgentApprovalItemVM, a as AgentAskUserQuestionVM, b as AgentConversationPromptVM, c as AgentConversationVM, f as WorkspaceAgentSessionDetailViewModel } from './agentConversationVM-DWEy7jzx.js';
4
4
  import { WorkspaceUserProjectService } from '@tutti-os/workspace-user-project/contracts';
5
5
 
@@ -213,10 +213,6 @@ type AgentHostWorkspaceApi = AgentHostRecord & {
213
213
  ensureDirectory: (input: {
214
214
  path: string;
215
215
  }) => AgentHostAsyncResult<void>;
216
- getReferenceForFile?: (file: File) => {
217
- kind: "file" | "folder";
218
- path: string;
219
- };
220
216
  readFile: (input: {
221
217
  path: string;
222
218
  }) => AgentHostAsyncResult<ReadWorkspaceFileResult>;
@@ -558,10 +554,15 @@ interface AgentComposerFileBlockBase {
558
554
  mimeType?: string;
559
555
  path?: string;
560
556
  hostPath?: string;
557
+ url?: string;
558
+ uri?: string;
561
559
  assetId?: string;
560
+ uploadStatus?: string;
562
561
  sizeBytes?: number;
563
562
  uploading?: boolean;
564
563
  uploadError?: string;
564
+ uploadErrorCode?: string;
565
+ uploadRetryable?: boolean;
565
566
  }
566
567
  interface AgentComposerRegularFileBlock extends AgentComposerFileBlockBase {
567
568
  kind: "file";
package/dist/agents.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { A as AgentGUIAgent, b as AgentGUIAgentTarget } from './types-BeAVr4of.js';
1
+ import { A as AgentGUIAgent, b as AgentGUIAgentTarget } from './types-ee3zJ6Cc.js';
2
2
 
3
3
  declare function normalizeAgentGUIAgents(agents: readonly AgentGUIAgent[] | null | undefined): AgentGUIAgent[];
4
4
  declare function agentGUIAgentIsReady(agent: AgentGUIAgent): boolean;
package/dist/agents.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  normalizeAgentGUIAgents,
4
4
  projectAgentGUIAgentsToInternalTargets,
5
5
  resolveAgentGUISelectedDirectoryAgent
6
- } from "./chunk-VS5BRBY6.js";
6
+ } from "./chunk-5WOCGIXJ.js";
7
7
  export {
8
8
  agentGUIAgentIsReady,
9
9
  normalizeAgentGUIAgents,
@@ -4403,6 +4403,12 @@ aside.workspace-agents-status-panel
4403
4403
  color: var(--folder);
4404
4404
  }
4405
4405
 
4406
+ [data-agent-file-mention="true"][data-agent-mention-kind="file"][data-upload-error="true"].tsh-agent-object-token--file {
4407
+ border-color: color-mix(in srgb, var(--state-danger) 42%, transparent);
4408
+ background: color-mix(in srgb, var(--state-danger) 8%, transparent);
4409
+ color: var(--state-danger);
4410
+ }
4411
+
4406
4412
  [data-agent-file-mention="true"][data-agent-mention-kind="file"][data-agent-file-entry-kind="directory"]
4407
4413
  .tsh-agent-object-token__icon {
4408
4414
  mask-image: url("./assets/icons/folder-filled.svg");
@@ -2,17 +2,17 @@ import {
2
2
  AgentGUIConversation_styles_default,
3
3
  MessageSquareMoreIcon,
4
4
  extractAgentMcpToolTarget
5
- } from "./chunk-N62NVPHT.js";
5
+ } from "./chunk-IYZ4GOSN.js";
6
6
  import {
7
7
  getOptionalAgentHostApi,
8
8
  useOptionalAgentHostApi
9
- } from "./chunk-NE6H7S5Z.js";
9
+ } from "./chunk-OFJNIQWR.js";
10
10
  import {
11
11
  fileChangePathsFromChanges
12
12
  } from "./chunk-F5UR6EJG.js";
13
13
  import {
14
14
  translate
15
- } from "./chunk-SZOTLVH6.js";
15
+ } from "./chunk-GIYGO2PB.js";
16
16
 
17
17
  // shared/agentConversation/planImplementationPresentation.ts
18
18
  var PLAN_IMPLEMENTATION_PROMPT = "Implement the plan.";
@@ -1471,4 +1471,4 @@ export {
1471
1471
  isPromptRequestIdTitle,
1472
1472
  AgentInteractivePromptSurface
1473
1473
  };
1474
- //# sourceMappingURL=chunk-GBBNYGL7.js.map
1474
+ //# sourceMappingURL=chunk-25VMCMAQ.js.map
@@ -6,6 +6,7 @@ function normalizeAgentGUIAgents(agents) {
6
6
  const agentTargetId = agent.agentTargetId.trim();
7
7
  const name = agent.name.trim();
8
8
  const iconUrl = agent.iconUrl.trim();
9
+ const maskIconUrl = agent.maskIconUrl?.trim() ?? "";
9
10
  const sidebarIconUrl = agent.sidebarIconUrl?.trim() ?? "";
10
11
  const heroImageUrl = agent.heroImageUrl?.trim() ?? "";
11
12
  if (!agentTargetId || !name || !iconUrl || seenAgentTargetIds.has(agentTargetId)) {
@@ -19,6 +20,7 @@ function normalizeAgentGUIAgents(agents) {
19
20
  agentTargetId,
20
21
  name,
21
22
  iconUrl,
23
+ ...maskIconUrl ? { maskIconUrl } : {},
22
24
  ...sidebarIconUrl ? { sidebarIconUrl } : {},
23
25
  ...heroImageUrl ? { heroImageUrl } : {},
24
26
  ...agent.description?.trim() ? { description: agent.description.trim() } : {},
@@ -69,6 +71,7 @@ function projectAgentGUIAgentsToInternalTargets(agents) {
69
71
  availability: agent.availability,
70
72
  ...agent.description ? { description: agent.description } : {},
71
73
  iconUrl: agent.iconUrl,
74
+ ...agent.maskIconUrl ? { maskIconUrl: agent.maskIconUrl } : {},
72
75
  ...agent.sidebarIconUrl ? { sidebarIconUrl: agent.sidebarIconUrl } : {},
73
76
  ...agent.heroImageUrl ? { heroImageUrl: agent.heroImageUrl } : {},
74
77
  ...agent.owner?.avatarUrl ? {
@@ -101,4 +104,4 @@ export {
101
104
  resolveAgentGUISelectedDirectoryAgent,
102
105
  projectAgentGUIAgentsToInternalTargets
103
106
  };
104
- //# sourceMappingURL=chunk-VS5BRBY6.js.map
107
+ //# sourceMappingURL=chunk-5WOCGIXJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../agents.ts"],"sourcesContent":["import type {\n AgentGUIAgent,\n AgentGUIAgentAvailabilityStatus,\n AgentGUIAgentTarget\n} from \"./types.ts\";\n\nexport function normalizeAgentGUIAgents(\n agents: readonly AgentGUIAgent[] | null | undefined\n): AgentGUIAgent[] {\n const normalized: AgentGUIAgent[] = [];\n const seenAgentTargetIds = new Set<string>();\n for (const agent of agents ?? []) {\n const agentTargetId = agent.agentTargetId.trim();\n const name = agent.name.trim();\n const iconUrl = agent.iconUrl.trim();\n const maskIconUrl = agent.maskIconUrl?.trim() ?? \"\";\n const sidebarIconUrl = agent.sidebarIconUrl?.trim() ?? \"\";\n const heroImageUrl = agent.heroImageUrl?.trim() ?? \"\";\n if (\n !agentTargetId ||\n !name ||\n !iconUrl ||\n seenAgentTargetIds.has(agentTargetId)\n ) {\n continue;\n }\n seenAgentTargetIds.add(agentTargetId);\n const ownerName = agent.owner?.name?.trim() ?? \"\";\n const ownerAvatarUrl = agent.owner?.avatarUrl?.trim() ?? \"\";\n const reason = agent.availability.reason?.trim() ?? \"\";\n normalized.push({\n agentTargetId,\n name,\n iconUrl,\n ...(maskIconUrl ? { maskIconUrl } : {}),\n ...(sidebarIconUrl ? { sidebarIconUrl } : {}),\n ...(heroImageUrl ? { heroImageUrl } : {}),\n ...(agent.description?.trim()\n ? { description: agent.description.trim() }\n : {}),\n ...(ownerName || ownerAvatarUrl\n ? {\n owner: {\n ...(ownerName ? { name: ownerName } : {}),\n ...(ownerAvatarUrl ? { avatarUrl: ownerAvatarUrl } : {})\n }\n }\n : {}),\n ...(agent.ownership === \"self\" || agent.ownership === \"shared\"\n ? { ownership: agent.ownership }\n : {}),\n availability: {\n status: normalizeAgentGUIAgentAvailabilityStatus(\n agent.availability.status\n ),\n ...(reason ? { reason } : {}),\n ...(agent.availability.pendingAction\n ? { pendingAction: agent.availability.pendingAction }\n : {})\n },\n provider: agent.provider,\n ...(agent.setupKind === \"target_runtime\"\n ? { setupKind: \"target_runtime\" as const }\n : {})\n });\n }\n return normalized;\n}\n\nexport function agentGUIAgentIsReady(agent: AgentGUIAgent): boolean {\n return agent.availability.status === \"ready\";\n}\n\nexport function resolveAgentGUISelectedDirectoryAgent(input: {\n agents: readonly AgentGUIAgent[];\n agentTargetId?: string | null;\n defaultAgentTargetId?: string | null;\n}): AgentGUIAgent | null {\n const explicitAgentTargetId =\n input.agentTargetId?.trim() || input.defaultAgentTargetId?.trim() || \"\";\n if (explicitAgentTargetId) {\n return (\n input.agents.find(\n (agent) => agent.agentTargetId === explicitAgentTargetId\n ) ?? null\n );\n }\n return (\n input.agents.find((agent) => agentGUIAgentIsReady(agent)) ??\n input.agents[0] ??\n null\n );\n}\n\n/** Package-internal bridge while the carried node is migrated to agent names. */\nexport function projectAgentGUIAgentsToInternalTargets(\n agents: readonly AgentGUIAgent[]\n): AgentGUIAgentTarget[] {\n return agents.map((agent) => ({\n targetId: agent.agentTargetId,\n agentTargetId: agent.agentTargetId,\n provider: agent.provider,\n ref: {\n kind: \"agent-directory\",\n provider: agent.provider,\n agentTargetId: agent.agentTargetId,\n ...(agent.setupKind ? { setupKind: agent.setupKind } : {})\n },\n label: agent.name,\n availability: agent.availability,\n ...(agent.description ? { description: agent.description } : {}),\n iconUrl: agent.iconUrl,\n ...(agent.maskIconUrl ? { maskIconUrl: agent.maskIconUrl } : {}),\n ...(agent.sidebarIconUrl ? { sidebarIconUrl: agent.sidebarIconUrl } : {}),\n ...(agent.heroImageUrl ? { heroImageUrl: agent.heroImageUrl } : {}),\n ...(agent.owner?.avatarUrl\n ? {\n badge: {\n iconUrl: agent.owner.avatarUrl,\n ...(agent.owner.name ? { label: agent.owner.name } : {})\n }\n }\n : {}),\n ...(agent.owner?.name ? { ownerLabel: agent.owner.name } : {}),\n ...(agent.ownership ? { ownership: agent.ownership } : {}),\n ...(agent.availability.status !== \"ready\" && !agent.setupKind\n ? { disabled: true }\n : {}),\n ...(agent.availability.reason\n ? { unavailableReason: agent.availability.reason }\n : {})\n }));\n}\n\nfunction normalizeAgentGUIAgentAvailabilityStatus(\n status: AgentGUIAgentAvailabilityStatus\n): AgentGUIAgentAvailabilityStatus {\n switch (status) {\n case \"ready\":\n case \"checking\":\n case \"coming_soon\":\n case \"not_installed\":\n case \"auth_required\":\n case \"unavailable\":\n return status;\n }\n}\n"],"mappings":";AAMO,SAAS,wBACd,QACiB;AACjB,QAAM,aAA8B,CAAC;AACrC,QAAM,qBAAqB,oBAAI,IAAY;AAC3C,aAAW,SAAS,UAAU,CAAC,GAAG;AAChC,UAAM,gBAAgB,MAAM,cAAc,KAAK;AAC/C,UAAM,OAAO,MAAM,KAAK,KAAK;AAC7B,UAAM,UAAU,MAAM,QAAQ,KAAK;AACnC,UAAM,cAAc,MAAM,aAAa,KAAK,KAAK;AACjD,UAAM,iBAAiB,MAAM,gBAAgB,KAAK,KAAK;AACvD,UAAM,eAAe,MAAM,cAAc,KAAK,KAAK;AACnD,QACE,CAAC,iBACD,CAAC,QACD,CAAC,WACD,mBAAmB,IAAI,aAAa,GACpC;AACA;AAAA,IACF;AACA,uBAAmB,IAAI,aAAa;AACpC,UAAM,YAAY,MAAM,OAAO,MAAM,KAAK,KAAK;AAC/C,UAAM,iBAAiB,MAAM,OAAO,WAAW,KAAK,KAAK;AACzD,UAAM,SAAS,MAAM,aAAa,QAAQ,KAAK,KAAK;AACpD,eAAW,KAAK;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAI,cAAc,EAAE,YAAY,IAAI,CAAC;AAAA,MACrC,GAAI,iBAAiB,EAAE,eAAe,IAAI,CAAC;AAAA,MAC3C,GAAI,eAAe,E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