@tangle-network/agent-app 0.27.2 → 0.28.0

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 (98) hide show
  1. package/dist/DesignCanvas-AOIVN3SJ.js +12 -0
  2. package/dist/DesignCanvasEditor-TN7CWUJW.js +13 -0
  3. package/dist/{TimelineEditor-JDG54OBP.js → TimelineEditor-Z7C6BFP5.js} +2 -2
  4. package/dist/{apply-Cp8c3K9D.d.ts → apply-Gk4raT2j.d.ts} +3 -1
  5. package/dist/{chunk-AFDROJ64.js → chunk-2QI7XV2T.js} +1 -1
  6. package/dist/chunk-2QI7XV2T.js.map +1 -0
  7. package/dist/{chunk-LUE4HO5C.js → chunk-4IQMTTNE.js} +10 -10
  8. package/dist/chunk-4IQMTTNE.js.map +1 -0
  9. package/dist/{chunk-HABVCJJT.js → chunk-7I37CO5D.js} +271 -404
  10. package/dist/chunk-7I37CO5D.js.map +1 -0
  11. package/dist/{chunk-5RT6KY4G.js → chunk-GQRL6VNU.js} +1 -1
  12. package/dist/chunk-GQRL6VNU.js.map +1 -0
  13. package/dist/{chunk-SCG5JJ4C.js → chunk-HFC4BTWJ.js} +32 -4
  14. package/dist/chunk-HFC4BTWJ.js.map +1 -0
  15. package/dist/{chunk-7QCIYDGC.js → chunk-IOREXWLM.js} +2 -2
  16. package/dist/chunk-J7JNV5BH.js +14 -0
  17. package/dist/chunk-J7JNV5BH.js.map +1 -0
  18. package/dist/{chunk-6UOE5CTA.js → chunk-JT6HHO5P.js} +5 -10
  19. package/dist/chunk-JT6HHO5P.js.map +1 -0
  20. package/dist/{chunk-JZAJE3JL.js → chunk-M2EBUDZ7.js} +19 -5
  21. package/dist/chunk-M2EBUDZ7.js.map +1 -0
  22. package/dist/{chunk-RJ2ZHK5D.js → chunk-S6WS2B32.js} +132 -7
  23. package/dist/chunk-S6WS2B32.js.map +1 -0
  24. package/dist/chunk-SQV7NUEM.js +136 -0
  25. package/dist/chunk-SQV7NUEM.js.map +1 -0
  26. package/dist/chunk-UAKFCMWK.js +1 -0
  27. package/dist/chunk-UAKFCMWK.js.map +1 -0
  28. package/dist/chunk-V5XZKHCL.js +296 -0
  29. package/dist/chunk-V5XZKHCL.js.map +1 -0
  30. package/dist/chunk-XWJXZ6WE.js +604 -0
  31. package/dist/chunk-XWJXZ6WE.js.map +1 -0
  32. package/dist/chunk-Y2SZVW35.js +125 -0
  33. package/dist/chunk-Y2SZVW35.js.map +1 -0
  34. package/dist/{chunk-27LQXQSS.js → chunk-YEWTVDDT.js} +224 -767
  35. package/dist/chunk-YEWTVDDT.js.map +1 -0
  36. package/dist/{chunk-UDXMR3AD.js → chunk-YNALYIQ3.js} +56 -18
  37. package/dist/chunk-YNALYIQ3.js.map +1 -0
  38. package/dist/command-stack-CkjelfK_.d.ts +267 -0
  39. package/dist/design-canvas/drizzle.d.ts +2 -2
  40. package/dist/design-canvas/index.d.ts +7 -6
  41. package/dist/design-canvas/index.js +3 -2
  42. package/dist/design-canvas-react/engine.d.ts +349 -0
  43. package/dist/design-canvas-react/engine.js +86 -0
  44. package/dist/design-canvas-react/engine.js.map +1 -0
  45. package/dist/design-canvas-react/index.d.ts +69 -649
  46. package/dist/design-canvas-react/index.js +84 -173
  47. package/dist/design-canvas-react/index.js.map +1 -1
  48. package/dist/design-canvas-react/lazy.d.ts +6 -0
  49. package/dist/design-canvas-react/lazy.js +9 -0
  50. package/dist/design-canvas-react/lazy.js.map +1 -0
  51. package/dist/{export-presets-Dl5Aa5xj.d.ts → export-presets-DAsU5Wal.d.ts} +2 -143
  52. package/dist/flow-types-Cb_AblZs.d.ts +25 -0
  53. package/dist/index.d.ts +11 -8
  54. package/dist/index.js +21 -8
  55. package/dist/lazy-BHHqS8-j.d.ts +72 -0
  56. package/dist/missions/index.d.ts +12 -0
  57. package/dist/missions/index.js +1 -1
  58. package/dist/{model-BHLN208Z.d.ts → model-BBwyOuWG.d.ts} +3 -1
  59. package/dist/operations-DLIvvD00.d.ts +144 -0
  60. package/dist/platform/index.js +1 -1
  61. package/dist/runtime/index.d.ts +33 -33
  62. package/dist/runtime/index.js +1 -1
  63. package/dist/sequences/index.d.ts +1 -1
  64. package/dist/sequences/index.js +2 -1
  65. package/dist/sequences-react/index.d.ts +15 -1
  66. package/dist/sequences-react/index.js +2 -2
  67. package/dist/{store-CUStmtdH.d.ts → store-CFyxgTlD.d.ts} +1 -1
  68. package/dist/theme/index.d.ts +80 -0
  69. package/dist/theme/index.js +14 -0
  70. package/dist/theme/index.js.map +1 -0
  71. package/dist/theme/tailwind-preset.d.ts +65 -0
  72. package/dist/theme/tailwind-preset.js +33 -0
  73. package/dist/theme/tailwind-preset.js.map +1 -0
  74. package/dist/theme/tokens.css +95 -0
  75. package/dist/trace/index.d.ts +2 -18
  76. package/dist/trace/index.js +2 -2
  77. package/dist/web/index.d.ts +25 -2
  78. package/dist/web/index.js +3 -1
  79. package/dist/web-react/index.d.ts +71 -31
  80. package/dist/web-react/index.js +625 -486
  81. package/dist/web-react/index.js.map +1 -1
  82. package/package.json +28 -3
  83. package/dist/DesignCanvas-73IUJJUP.js +0 -10
  84. package/dist/DesignCanvasEditor-6F2UTOSW.js +0 -9
  85. package/dist/chunk-27LQXQSS.js.map +0 -1
  86. package/dist/chunk-5RT6KY4G.js.map +0 -1
  87. package/dist/chunk-6UOE5CTA.js.map +0 -1
  88. package/dist/chunk-AFDROJ64.js.map +0 -1
  89. package/dist/chunk-HABVCJJT.js.map +0 -1
  90. package/dist/chunk-JZAJE3JL.js.map +0 -1
  91. package/dist/chunk-LUE4HO5C.js.map +0 -1
  92. package/dist/chunk-RJ2ZHK5D.js.map +0 -1
  93. package/dist/chunk-SCG5JJ4C.js.map +0 -1
  94. package/dist/chunk-UDXMR3AD.js.map +0 -1
  95. /package/dist/{DesignCanvas-73IUJJUP.js.map → DesignCanvas-AOIVN3SJ.js.map} +0 -0
  96. /package/dist/{DesignCanvasEditor-6F2UTOSW.js.map → DesignCanvasEditor-TN7CWUJW.js.map} +0 -0
  97. /package/dist/{TimelineEditor-JDG54OBP.js.map → TimelineEditor-Z7C6BFP5.js.map} +0 -0
  98. /package/dist/{chunk-7QCIYDGC.js.map → chunk-IOREXWLM.js.map} +0 -0
@@ -1,9 +1,9 @@
1
1
  import * as react from 'react';
2
2
  import { ReactNode } from 'react';
3
3
  import { S as StepAgentActivity } from '../agent-activity-C8ZG0F0M.js';
4
- import { FlowTrace } from '../trace/index.js';
5
- import { Harness } from '../harness/index.js';
4
+ import { a as FlowTrace } from '../flow-types-Cb_AblZs.js';
6
5
  import { C as CatalogModel } from '../model-catalog-BEAEVDaa.js';
6
+ import { Harness } from '../harness/index.js';
7
7
 
8
8
  /**
9
9
  * Client-side chat-stream consumption — the NDJSON parse loop every agent
@@ -248,8 +248,10 @@ declare function useSandboxTerminalConnection(opts: UseSandboxTerminalConnection
248
248
  interface SeatPaywallProps {
249
249
  /** Human product name shown in the headline, e.g. "Creative". */
250
250
  product: string;
251
- /** Fired when the user clicks the unlock CTA — route them to checkout. */
252
- onCheckout: () => void;
251
+ /** Fired when the user clicks the unlock CTA — route them to checkout. When
252
+ * it returns a promise the button shows a pending state and ignores repeat
253
+ * clicks until it settles (no double-charge on a slow checkout open). */
254
+ onCheckout: () => void | Promise<void>;
253
255
  /** Monthly seat price in whole dollars. Default 100. */
254
256
  priceUsd?: number;
255
257
  /** Included monthly AI usage in whole dollars. Default 50. */
@@ -266,6 +268,59 @@ interface SeatPaywallProps {
266
268
  */
267
269
  declare function SeatPaywall({ product, onCheckout, priceUsd, includedUsageUsd, tagline, ctaLabel, }: SeatPaywallProps): ReactNode;
268
270
 
271
+ /**
272
+ * Keyboard + pointer model for a trigger-and-popover pair, dependency-free.
273
+ * Outside-mousedown and Escape both close; Escape also returns focus to the
274
+ * trigger so keyboard users aren't dropped at the top of the document. The
275
+ * returned `triggerProps` carry the ARIA contract (`aria-haspopup`/
276
+ * `aria-expanded`); spread them onto the trigger button.
277
+ */
278
+ declare function usePopover(open: boolean, setOpen: (open: boolean) => void): {
279
+ containerRef: react.RefObject<HTMLDivElement | null>;
280
+ triggerRef: react.RefObject<HTMLButtonElement | null>;
281
+ triggerProps: {
282
+ ref: react.RefObject<HTMLButtonElement | null>;
283
+ 'aria-haspopup': true;
284
+ 'aria-expanded': boolean;
285
+ };
286
+ };
287
+ /**
288
+ * Guard an async action against double-submit. `run` ignores re-entrant calls
289
+ * while a promise is in flight and flips `pending` so the caller can disable
290
+ * the control — the fix for double-charge / double-approve on a slow network.
291
+ * Settles (success or throw) before clearing, and no-ops state updates after
292
+ * unmount.
293
+ */
294
+ declare function usePending(): {
295
+ pending: boolean;
296
+ run: (action: () => void | Promise<void>) => void;
297
+ };
298
+ interface ModelPickerProps {
299
+ value: string;
300
+ onChange: (id: string) => void;
301
+ /** Catalogue models — from `GET`ing the app's catalogue route (see
302
+ * `runtime/model-catalog`), plus any product-specific entries appended. */
303
+ models: CatalogModel[];
304
+ loading?: boolean;
305
+ /** Render a provider logo/badge; default is a generic sparkle. */
306
+ renderProviderBadge?: (provider: string) => ReactNode;
307
+ /** Section label for `featured` models. */
308
+ recommendedLabel?: string;
309
+ }
310
+ /**
311
+ * Searchable model picker pill + popover: a featured/recommended section
312
+ * first, then per-provider groups in catalogue order (the server already
313
+ * sorts providers by tier).
314
+ */
315
+ declare function ModelPicker({ value, onChange, models, loading, renderProviderBadge, recommendedLabel }: ModelPickerProps): react.JSX.Element;
316
+ interface EffortPickerProps {
317
+ value: string;
318
+ onChange: (id: string) => void;
319
+ }
320
+ /** Reasoning-effort selector pill, styled to match {@link ModelPicker}. Show
321
+ * it only when the selected model `supportsReasoning`. */
322
+ declare function EffortPicker({ value, onChange }: EffortPickerProps): react.JSX.Element;
323
+
269
324
  interface AgentSessionControlsProps {
270
325
  /** Catalog models — canonical provider-prefixed ids. */
271
326
  models: CatalogModel[];
@@ -304,31 +359,6 @@ interface ChatMessageMetrics {
304
359
  declare function formatModelCost(msg: ChatMessageMetrics, models: CatalogModel[]): string | null;
305
360
  /** "38 tok/s" from completion tokens over first-token→end duration; null when unknown. */
306
361
  declare function formatTokensPerSecond(msg: ChatMessageMetrics): string | null;
307
- interface ModelPickerProps {
308
- value: string;
309
- onChange: (id: string) => void;
310
- /** Catalogue models — from `GET`ing the app's catalogue route (see
311
- * `runtime/model-catalog`), plus any product-specific entries appended. */
312
- models: CatalogModel[];
313
- loading?: boolean;
314
- /** Render a provider logo/badge; default is a generic sparkle. */
315
- renderProviderBadge?: (provider: string) => ReactNode;
316
- /** Section label for `featured` models. */
317
- recommendedLabel?: string;
318
- }
319
- /**
320
- * Searchable model picker pill + popover: a featured/recommended section
321
- * first, then per-provider groups in catalogue order (the server already
322
- * sorts providers by tier).
323
- */
324
- declare function ModelPicker({ value, onChange, models, loading, renderProviderBadge, recommendedLabel }: ModelPickerProps): react.JSX.Element;
325
- interface EffortPickerProps {
326
- value: string;
327
- onChange: (id: string) => void;
328
- }
329
- /** Reasoning-effort selector pill, styled to match {@link ModelPicker}. Show
330
- * it only when the selected model `supportsReasoning`. */
331
- declare function EffortPicker({ value, onChange }: EffortPickerProps): react.JSX.Element;
332
362
  /** One step of a retained tool run (e.g. a sandbox command + its output). */
333
363
  interface ToolRunStep {
334
364
  at: string;
@@ -398,6 +428,16 @@ interface ChatMessagesProps {
398
428
  onToolCallClick?: (call: ChatToolCallInfo, message: ChatUiMessage) => void;
399
429
  /** Per-tool custom detail renderers for expanded tool cards. */
400
430
  toolRenderers?: ToolDetailRenderers;
431
+ /** Stream-error affordance: when the turn failed (a thrown transport error or
432
+ * a loop-level `onErrorEvent`), pass the message here to render an error row.
433
+ * A failed turn otherwise just stops with no UI signal. */
434
+ error?: string | null;
435
+ /** Retry control shown on the error row; omit to render the error without a
436
+ * retry button (e.g. when the product retries automatically). */
437
+ onRetry?: () => void;
438
+ /** Zero-state renderer, shown when there are no messages and the turn is
439
+ * neither loading nor errored. Omit to render nothing (current behavior). */
440
+ renderEmpty?: () => ReactNode;
401
441
  }
402
442
  interface ProposalApprovalHandlers {
403
443
  onApprove: (proposalId: string, toolCallId: string) => void | Promise<void>;
@@ -412,6 +452,6 @@ type ToolDetailRenderers = Record<string, (call: ChatToolCallInfo, message: Chat
412
452
  * model id, tokens/sec, and cost, plus a collapsible thinking section and
413
453
  * tool-call chips.
414
454
  */
415
- declare function ChatMessages({ messages, models, renderMarkdown, renderExtras, userLabel, agentLabel, loading, approval, onToolCallClick, toolRenderers, }: ChatMessagesProps): react.JSX.Element;
455
+ declare function ChatMessages({ messages, models, renderMarkdown, renderExtras, userLabel, agentLabel, loading, approval, onToolCallClick, toolRenderers, error, onRetry, renderEmpty, }: ChatMessagesProps): react.JSX.Element;
416
456
 
417
- export { type ActivityTone, type AgentActivityPage, AgentActivityPanel, type AgentActivityPanelProps, type AgentActivityRecord, AgentSessionControls, type AgentSessionControlsProps, type ChatMessageMetrics, ChatMessages, type ChatMessagesProps, type ChatStreamCallbacks, type ChatStreamToolCall, type ChatStreamToolResult, type ChatToolCallInfo, type ChatUiMessage, type ConsumeChatStreamResult, EffortPicker, type EffortPickerProps, FlowWaterfall, type FlowWaterfallProps, MissionActivityLane, type MissionActivityLaneProps, ModelPicker, type ModelPickerProps, type ProposalApprovalHandlers, ProviderLogo, type ProviderLogoProps, RunDrillIn, type RunDrillInProps, type SandboxTerminalConnection, type SandboxTerminalConnectionResponse, SeatPaywall, type SeatPaywallProps, type SmoothRevealOptions, type StreamChatOptions, type ToolDetailRenderers, type ToolRunRecord, type ToolRunStep, type UseSandboxTerminalConnectionOptions, type UseSandboxTerminalConnectionResult, type WaterfallRow, activityTone, consumeChatStream, dispatchChatStreamLine, formatActivityCost, formatActivityDuration, formatModelCost, formatTokensPerSecond, mergeActivityPages, nextRevealCount, pendingApprovalOf, streamChatTurn, useSandboxTerminalConnection, useSmoothText, waterfallLayout };
457
+ export { type ActivityTone, type AgentActivityPage, AgentActivityPanel, type AgentActivityPanelProps, type AgentActivityRecord, AgentSessionControls, type AgentSessionControlsProps, type ChatMessageMetrics, ChatMessages, type ChatMessagesProps, type ChatStreamCallbacks, type ChatStreamToolCall, type ChatStreamToolResult, type ChatToolCallInfo, type ChatUiMessage, type ConsumeChatStreamResult, EffortPicker, type EffortPickerProps, FlowWaterfall, type FlowWaterfallProps, MissionActivityLane, type MissionActivityLaneProps, ModelPicker, type ModelPickerProps, type ProposalApprovalHandlers, ProviderLogo, type ProviderLogoProps, RunDrillIn, type RunDrillInProps, type SandboxTerminalConnection, type SandboxTerminalConnectionResponse, SeatPaywall, type SeatPaywallProps, type SmoothRevealOptions, type StreamChatOptions, type ToolDetailRenderers, type ToolRunRecord, type ToolRunStep, type UseSandboxTerminalConnectionOptions, type UseSandboxTerminalConnectionResult, type WaterfallRow, activityTone, consumeChatStream, dispatchChatStreamLine, formatActivityCost, formatActivityDuration, formatModelCost, formatTokensPerSecond, mergeActivityPages, nextRevealCount, pendingApprovalOf, streamChatTurn, usePending, usePopover, useSandboxTerminalConnection, useSmoothText, waterfallLayout };