@tangle-network/agent-app 0.45.27 → 0.45.29

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 (76) hide show
  1. package/dist/{DesignCanvas-3RRPVPCP.js → DesignCanvas-RSWQCXM3.js} +2 -2
  2. package/dist/{DesignCanvasEditor-KAMMEX7E.js → DesignCanvasEditor-XZMGIST7.js} +4 -4
  3. package/dist/assistant/index.d.ts +63 -39
  4. package/dist/assistant/index.js +23 -5
  5. package/dist/assistant/index.js.map +1 -1
  6. package/dist/chat-react/index.d.ts +25 -2
  7. package/dist/chat-react/index.js.map +1 -1
  8. package/dist/chat-routes/index.js +1 -1
  9. package/dist/{chunk-ODYE4A7L.js → chunk-3I27SDU3.js} +142 -58
  10. package/dist/chunk-3I27SDU3.js.map +1 -0
  11. package/dist/chunk-C3CAYGGQ.js +18 -0
  12. package/dist/chunk-C3CAYGGQ.js.map +1 -0
  13. package/dist/chunk-EMLGWEHV.js +33 -0
  14. package/dist/chunk-EMLGWEHV.js.map +1 -0
  15. package/dist/{chunk-XEA5EG6P.js → chunk-EPZYYWCT.js} +8 -30
  16. package/dist/chunk-EPZYYWCT.js.map +1 -0
  17. package/dist/{chunk-NC2V63EL.js → chunk-FNM7JYME.js} +88 -21
  18. package/dist/chunk-FNM7JYME.js.map +1 -0
  19. package/dist/{chunk-WD2B6HGY.js → chunk-K4RA5T3A.js} +11 -32
  20. package/dist/chunk-K4RA5T3A.js.map +1 -0
  21. package/dist/{chunk-4QVG4WJQ.js → chunk-OYTMILRK.js} +10 -3
  22. package/dist/chunk-OYTMILRK.js.map +1 -0
  23. package/dist/{chunk-OYGM5WLD.js → chunk-PURHUAOR.js} +52 -15
  24. package/dist/chunk-PURHUAOR.js.map +1 -0
  25. package/dist/{chunk-AWPK7ZDS.js → chunk-QGOU3VXH.js} +3 -3
  26. package/dist/{chunk-RT5RKAFX.js → chunk-QGSVF6DZ.js} +8 -18
  27. package/dist/chunk-QGSVF6DZ.js.map +1 -0
  28. package/dist/{chunk-OTLEYHOG.js → chunk-RRH23CGS.js} +24 -4
  29. package/dist/chunk-RRH23CGS.js.map +1 -0
  30. package/dist/{chunk-N3G3FSM4.js → chunk-YXA3U4JZ.js} +9 -47
  31. package/dist/chunk-YXA3U4JZ.js.map +1 -0
  32. package/dist/design-canvas-react/engine.d.ts +15 -1
  33. package/dist/design-canvas-react/engine.js +6 -2
  34. package/dist/design-canvas-react/index.d.ts +13 -1
  35. package/dist/design-canvas-react/index.js +13 -8
  36. package/dist/design-canvas-react/index.js.map +1 -1
  37. package/dist/design-canvas-react/lazy.js +1 -1
  38. package/dist/legibility/cli.js +14 -8
  39. package/dist/legibility/cli.js.map +1 -1
  40. package/dist/legibility/index.js +2 -1
  41. package/dist/peer-floors/cli.js +14 -8
  42. package/dist/peer-floors/cli.js.map +1 -1
  43. package/dist/preflight/cli.js +4 -2
  44. package/dist/preflight/cli.js.map +1 -1
  45. package/dist/{run-tEsZUhAf.d.ts → run-D80hoLKh.d.ts} +1 -1
  46. package/dist/sandbox/index.d.ts +11 -1
  47. package/dist/sandbox/index.js +1 -1
  48. package/dist/signoff/cli.d.ts +2 -2
  49. package/dist/signoff/cli.js +6 -18
  50. package/dist/signoff/cli.js.map +1 -1
  51. package/dist/signoff/index.d.ts +4 -420
  52. package/dist/signoff/index.js +3 -55
  53. package/dist/signoff/proof-cli.js +11 -6
  54. package/dist/signoff/proof-cli.js.map +1 -1
  55. package/dist/signoff/proof.d.ts +70 -271
  56. package/dist/signoff/proof.js +3 -73
  57. package/dist/signoff/proof.js.map +1 -1
  58. package/dist/theme-contract/cli.js +6 -2
  59. package/dist/theme-contract/cli.js.map +1 -1
  60. package/dist/theme-contract/index.js +2 -1
  61. package/dist/{types-U7Nz-txa.d.ts → types-Bd6uW9vQ.d.ts} +1 -1
  62. package/dist/web-react/index.d.ts +51 -44
  63. package/dist/web-react/index.js +1 -1
  64. package/package.json +14 -3
  65. package/dist/chunk-4QVG4WJQ.js.map +0 -1
  66. package/dist/chunk-N3G3FSM4.js.map +0 -1
  67. package/dist/chunk-NC2V63EL.js.map +0 -1
  68. package/dist/chunk-ODYE4A7L.js.map +0 -1
  69. package/dist/chunk-OTLEYHOG.js.map +0 -1
  70. package/dist/chunk-OYGM5WLD.js.map +0 -1
  71. package/dist/chunk-RT5RKAFX.js.map +0 -1
  72. package/dist/chunk-WD2B6HGY.js.map +0 -1
  73. package/dist/chunk-XEA5EG6P.js.map +0 -1
  74. /package/dist/{DesignCanvas-3RRPVPCP.js.map → DesignCanvas-RSWQCXM3.js.map} +0 -0
  75. /package/dist/{DesignCanvasEditor-KAMMEX7E.js.map → DesignCanvasEditor-XZMGIST7.js.map} +0 -0
  76. /package/dist/{chunk-AWPK7ZDS.js.map → chunk-QGOU3VXH.js.map} +0 -0
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  DesignCanvas
3
- } from "./chunk-NC2V63EL.js";
3
+ } from "./chunk-FNM7JYME.js";
4
4
  import "./chunk-X5DQ5QOP.js";
5
5
  import "./chunk-DRB77FYL.js";
6
6
  import "./chunk-F7VH4G5C.js";
7
7
  export {
8
8
  DesignCanvas
9
9
  };
10
- //# sourceMappingURL=DesignCanvas-3RRPVPCP.js.map
10
+ //# sourceMappingURL=DesignCanvas-RSWQCXM3.js.map
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  DesignCanvasEditor
3
- } from "./chunk-OYGM5WLD.js";
4
- import "./chunk-NC2V63EL.js";
3
+ } from "./chunk-PURHUAOR.js";
4
+ import "./chunk-FNM7JYME.js";
5
5
  import "./chunk-LSQR6HM6.js";
6
- import "./chunk-4QVG4WJQ.js";
6
+ import "./chunk-OYTMILRK.js";
7
7
  import "./chunk-X5DQ5QOP.js";
8
8
  import "./chunk-DRB77FYL.js";
9
9
  import "./chunk-F7VH4G5C.js";
10
10
  export {
11
11
  DesignCanvasEditor
12
12
  };
13
- //# sourceMappingURL=DesignCanvasEditor-KAMMEX7E.js.map
13
+ //# sourceMappingURL=DesignCanvasEditor-XZMGIST7.js.map
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
- import { ToolDetailRenderers, ChatUiMessage } from '../web-react/index.js';
3
+ import { ToolDetailRenderers, ComposerFile, ChatUiMessage } from '../web-react/index.js';
4
4
  import '../contract-OxG_jVMx.js';
5
5
  import '@tangle-network/agent-interface';
6
6
  import '../plans/index.js';
@@ -15,6 +15,7 @@ import '../web-react/terminal.js';
15
15
  import '../billing-BibxgALe.js';
16
16
  import '../billing/index.js';
17
17
  import '../session-shell/index.js';
18
+ import '../web-react/async/index.js';
18
19
  import '../catalog/index.js';
19
20
  import '../harness/index.js';
20
21
  import '../attachment-validation-BfJDBU1g.js';
@@ -608,43 +609,6 @@ interface AssistantThreads {
608
609
  /** Resolve and manage assistant threads state for a given user including pending deletions and refresh logic */
609
610
  declare function useAssistantThreads(userId: string | null): AssistantThreads;
610
611
 
611
- interface AssistantDockProps {
612
- /** The signed-in user this conversation belongs to (null when signed out). */
613
- userId: string | null;
614
- /** Host navigation for error CTAs and connect targets. */
615
- navigate?: (path: string) => void;
616
- balanceUsd?: number | null;
617
- formatMoney?: (usd: number | null) => string;
618
- /** Render workflow YAML as a node graph in a proposal card. */
619
- renderGraph?: (yaml: string) => ReactNode;
620
- /** Render the brand icon for a proposal requirement's integration provider.
621
- * The host owns the provider→icon mapping (its integrations catalog); when
622
- * absent, the card falls back to its built-in provider mark. */
623
- renderProviderIcon?: (provider: string) => ReactNode;
624
- /** Called after a workflow-mutating tool is confirmed (host re-fetches its list). */
625
- onWorkflowMutation?: () => void;
626
- /** In-place connect handler for a proposal's integration requirements. The host
627
- * runs its own connect flow (OAuth popup, api-key modal, app install) and
628
- * resolves whether the requirement is now satisfied; the proposal card then
629
- * flips it to connected. Host-agnostic — when omitted, the card falls back to
630
- * navigating the requirement's connect target via `navigate`. */
631
- onConnectRequirement?: (requirement: ConnectionRequirement) => Promise<ConnectRequirementResult>;
632
- /** Markdown renderer for assistant message content (plain text when absent). */
633
- renderMarkdown?: (content: string) => ReactNode;
634
- /** Per-tool custom detail renderers for expanded tool cards in the transcript. */
635
- toolRenderers?: ToolDetailRenderers;
636
- /** Render a prominent card for a CONFIRMED tool's result (e.g. a one-time
637
- * API-key reveal for `create_api_key`), shown inline after the action's status
638
- * line. The result's `output` may carry a one-time secret — see
639
- * {@link ConfirmedResult} for the never-persist/never-to-model contract. */
640
- renderConfirmedResult?: (result: ConfirmedResult) => ReactNode;
641
- /** Swap the conversation rendering for a host-supplied renderer (see
642
- * {@link AssistantPanelProps.renderTranscript}); the dock chrome, composer,
643
- * transport, and proposal flow stay owned by the panel. */
644
- renderTranscript?: (view: AssistantTranscriptView) => ReactNode;
645
- }
646
- declare function AssistantDock({ userId, navigate, balanceUsd, formatMoney, renderGraph, renderProviderIcon, onWorkflowMutation, onConnectRequirement, renderMarkdown, toolRenderers, renderConfirmedResult, renderTranscript, }: AssistantDockProps): react.JSX.Element;
647
-
648
612
  interface AssistantPanelProps {
649
613
  chat: AssistantChat;
650
614
  userId: string | null;
@@ -683,8 +647,68 @@ interface AssistantPanelProps {
683
647
  * clears its seed state (consume-once). */
684
648
  composerSeed?: string | null;
685
649
  onComposerSeedApplied?: () => void;
650
+ /** Opt-in attachment surface for the composer, mirroring `ChatComposer`'s
651
+ * attachment props: pass `onAttach` to show the attach button and accept
652
+ * drag-and-drop, and drive the staged-file chips with `pendingFiles` /
653
+ * `onRemoveFile` (web-react's `useComposerAttachments` owns that lifecycle).
654
+ * Omitted, the composer stays text-only. The assistant wire carries text
655
+ * only, so a host that stages files owns getting their content to the model
656
+ * (e.g. inlined on the next `chat.send`); `onComposerSend` is the signal to
657
+ * consume and clear the staged set. */
658
+ composerAttachments?: {
659
+ onAttach: (files: FileList) => void;
660
+ onAttachFolder?: (files: FileList) => void;
661
+ pendingFiles?: ComposerFile[];
662
+ onRemoveFile?: (id: string) => void;
663
+ accept?: string;
664
+ };
665
+ /** Fired when the composer sends (alongside `chat.send`) — the host's signal
666
+ * to consume and clear its staged attachments. */
667
+ onComposerSend?: (message: string) => void;
668
+ }
669
+ declare function AssistantPanel({ chat, userId, onClose, navigate, balanceUsd, formatMoney, renderGraph, renderProviderIcon, renderMarkdown, toolRenderers, renderConfirmedResult, renderTranscript, composerSeed, onComposerSeedApplied, composerAttachments, onComposerSend, }: AssistantPanelProps): react.JSX.Element;
670
+
671
+ interface AssistantDockProps {
672
+ /** The signed-in user this conversation belongs to (null when signed out). */
673
+ userId: string | null;
674
+ /** Host navigation for error CTAs and connect targets. */
675
+ navigate?: (path: string) => void;
676
+ balanceUsd?: number | null;
677
+ formatMoney?: (usd: number | null) => string;
678
+ /** Render workflow YAML as a node graph in a proposal card. */
679
+ renderGraph?: (yaml: string) => ReactNode;
680
+ /** Render the brand icon for a proposal requirement's integration provider.
681
+ * The host owns the provider→icon mapping (its integrations catalog); when
682
+ * absent, the card falls back to its built-in provider mark. */
683
+ renderProviderIcon?: (provider: string) => ReactNode;
684
+ /** Called after a workflow-mutating tool is confirmed (host re-fetches its list). */
685
+ onWorkflowMutation?: () => void;
686
+ /** In-place connect handler for a proposal's integration requirements. The host
687
+ * runs its own connect flow (OAuth popup, api-key modal, app install) and
688
+ * resolves whether the requirement is now satisfied; the proposal card then
689
+ * flips it to connected. Host-agnostic — when omitted, the card falls back to
690
+ * navigating the requirement's connect target via `navigate`. */
691
+ onConnectRequirement?: (requirement: ConnectionRequirement) => Promise<ConnectRequirementResult>;
692
+ /** Markdown renderer for assistant message content (plain text when absent). */
693
+ renderMarkdown?: (content: string) => ReactNode;
694
+ /** Per-tool custom detail renderers for expanded tool cards in the transcript. */
695
+ toolRenderers?: ToolDetailRenderers;
696
+ /** Render a prominent card for a CONFIRMED tool's result (e.g. a one-time
697
+ * API-key reveal for `create_api_key`), shown inline after the action's status
698
+ * line. The result's `output` may carry a one-time secret — see
699
+ * {@link ConfirmedResult} for the never-persist/never-to-model contract. */
700
+ renderConfirmedResult?: (result: ConfirmedResult) => ReactNode;
701
+ /** Swap the conversation rendering for a host-supplied renderer (see
702
+ * {@link AssistantPanelProps.renderTranscript}); the dock chrome, composer,
703
+ * transport, and proposal flow stay owned by the panel. */
704
+ renderTranscript?: (view: AssistantTranscriptView) => ReactNode;
705
+ /** Opt-in attachment surface for the dock's composer — forwarded to
706
+ * {@link AssistantPanelProps.composerAttachments}. */
707
+ composerAttachments?: AssistantPanelProps["composerAttachments"];
708
+ /** Forwarded to {@link AssistantPanelProps.onComposerSend}. */
709
+ onComposerSend?: AssistantPanelProps["onComposerSend"];
686
710
  }
687
- declare function AssistantPanel({ chat, userId, onClose, navigate, balanceUsd, formatMoney, renderGraph, renderProviderIcon, renderMarkdown, toolRenderers, renderConfirmedResult, renderTranscript, composerSeed, onComposerSeedApplied, }: AssistantPanelProps): react.JSX.Element;
711
+ declare function AssistantDock({ userId, navigate, balanceUsd, formatMoney, renderGraph, renderProviderIcon, onWorkflowMutation, onConnectRequirement, renderMarkdown, toolRenderers, renderConfirmedResult, renderTranscript, composerAttachments, onComposerSend, }: AssistantDockProps): react.JSX.Element;
688
712
 
689
713
  /**
690
714
  * True while a turn is streaming but the model hasn't emitted its first answer
@@ -6,7 +6,7 @@ import {
6
6
  ChatMessages,
7
7
  ModelPicker,
8
8
  ProviderLogo
9
- } from "../chunk-ODYE4A7L.js";
9
+ } from "../chunk-3I27SDU3.js";
10
10
  import "../chunk-FBVLEGEG.js";
11
11
  import "../chunk-HZ4WCA37.js";
12
12
  import "../chunk-GEYACSFW.js";
@@ -2391,7 +2391,9 @@ function AssistantPanel({
2391
2391
  renderConfirmedResult,
2392
2392
  renderTranscript,
2393
2393
  composerSeed = null,
2394
- onComposerSeedApplied
2394
+ onComposerSeedApplied,
2395
+ composerAttachments,
2396
+ onComposerSend
2395
2397
  }) {
2396
2398
  const models = useAssistantModels();
2397
2399
  const threads = useAssistantThreads(userId);
@@ -2712,6 +2714,7 @@ function AssistantPanel({
2712
2714
  onSend: (message) => {
2713
2715
  setView("chat");
2714
2716
  chat.send(message);
2717
+ onComposerSend?.(message);
2715
2718
  },
2716
2719
  onCancel: chat.stop,
2717
2720
  isStreaming: streaming,
@@ -2719,6 +2722,11 @@ function AssistantPanel({
2719
2722
  placeholder: "Message the assistant\u2026",
2720
2723
  seed: composerSeed,
2721
2724
  onSeedApplied: onComposerSeedApplied,
2725
+ onAttach: composerAttachments?.onAttach,
2726
+ onAttachFolder: composerAttachments?.onAttachFolder,
2727
+ pendingFiles: composerAttachments?.pendingFiles,
2728
+ onRemoveFile: composerAttachments?.onRemoveFile,
2729
+ accept: composerAttachments?.accept,
2722
2730
  controls: pickerModels.length > 0 ? /* @__PURE__ */ jsx5(
2723
2731
  ModelPicker,
2724
2732
  {
@@ -2868,7 +2876,9 @@ function AssistantDock({
2868
2876
  renderMarkdown,
2869
2877
  toolRenderers,
2870
2878
  renderConfirmedResult,
2871
- renderTranscript
2879
+ renderTranscript,
2880
+ composerAttachments,
2881
+ onComposerSend
2872
2882
  }) {
2873
2883
  const { open, openAssistant, closeAssistant, seed, clearSeed } = useAssistantLauncher();
2874
2884
  const chat = useAssistantChat(userId, {
@@ -2884,7 +2894,13 @@ function AssistantDock({
2884
2894
  useEffect7(() => {
2885
2895
  if (!open) return;
2886
2896
  const onKeyDown = (e) => {
2887
- if (e.key === "Escape") closeAssistant();
2897
+ if (e.key !== "Escape") return;
2898
+ if (dialogRef.current?.querySelector(
2899
+ '[aria-haspopup="true"][aria-expanded="true"]'
2900
+ )) {
2901
+ return;
2902
+ }
2903
+ closeAssistant();
2888
2904
  };
2889
2905
  document.addEventListener("keydown", onKeyDown);
2890
2906
  return () => document.removeEventListener("keydown", onKeyDown);
@@ -2982,7 +2998,9 @@ function AssistantDock({
2982
2998
  renderConfirmedResult,
2983
2999
  renderTranscript,
2984
3000
  composerSeed: seed,
2985
- onComposerSeedApplied: clearSeed
3001
+ onComposerSeedApplied: clearSeed,
3002
+ composerAttachments,
3003
+ onComposerSend
2986
3004
  },
2987
3005
  userId ?? "anon"
2988
3006
  ),