@tangle-network/agent-app 0.40.0 → 0.41.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 (43) hide show
  1. package/dist/auth-DuptSkWh.d.ts +39 -0
  2. package/dist/{chunk-TQ5M7BFV.js → chunk-2A7STBX7.js} +2 -2
  3. package/dist/{chunk-FDJ6JQCI.js → chunk-3II3AWHY.js} +6 -4
  4. package/dist/{chunk-FDJ6JQCI.js.map → chunk-3II3AWHY.js.map} +1 -1
  5. package/dist/{chunk-RH74YJIK.js → chunk-7EVZUIHW.js} +7 -2
  6. package/dist/chunk-7EVZUIHW.js.map +1 -0
  7. package/dist/{chunk-DBIG2PHS.js → chunk-IZAH45W2.js} +3 -3
  8. package/dist/{chunk-PPSZNVKT.js → chunk-MFRCM32T.js} +29 -3
  9. package/dist/chunk-MFRCM32T.js.map +1 -0
  10. package/dist/{chunk-BUUJ7TEQ.js → chunk-NEOV2NQ3.js} +2 -2
  11. package/dist/{chunk-CPI3RILI.js → chunk-ULZEF45E.js} +49 -7
  12. package/dist/chunk-ULZEF45E.js.map +1 -0
  13. package/dist/{chunk-2FDTJIU4.js → chunk-WFMUDX5J.js} +2 -2
  14. package/dist/design-canvas/index.d.ts +3 -3
  15. package/dist/design-canvas/index.js +2 -2
  16. package/dist/eval/index.d.ts +1 -1
  17. package/dist/index.d.ts +4 -4
  18. package/dist/index.js +18 -8
  19. package/dist/{mcp-4I_RHhNa.d.ts → mcp-BHfIoGLW.d.ts} +10 -6
  20. package/dist/preset-cloudflare/index.d.ts +1 -1
  21. package/dist/runtime/index.d.ts +3 -3
  22. package/dist/runtime/index.js +2 -2
  23. package/dist/sandbox/index.d.ts +2 -2
  24. package/dist/sandbox/index.js +4 -4
  25. package/dist/sequences/index.d.ts +3 -3
  26. package/dist/sequences/index.js +2 -2
  27. package/dist/stream/index.d.ts +37 -3
  28. package/dist/stream/index.js +5 -1
  29. package/dist/tools/index.d.ts +13 -8
  30. package/dist/tools/index.js +9 -3
  31. package/dist/{types-wHs0rmtu.d.ts → types-BEOvc_ue.d.ts} +68 -1
  32. package/dist/web-react/index.d.ts +58 -1
  33. package/dist/web-react/index.js +241 -137
  34. package/dist/web-react/index.js.map +1 -1
  35. package/package.json +1 -1
  36. package/dist/auth-DcK5ERaL.d.ts +0 -65
  37. package/dist/chunk-CPI3RILI.js.map +0 -1
  38. package/dist/chunk-PPSZNVKT.js.map +0 -1
  39. package/dist/chunk-RH74YJIK.js.map +0 -1
  40. /package/dist/{chunk-TQ5M7BFV.js.map → chunk-2A7STBX7.js.map} +0 -0
  41. /package/dist/{chunk-DBIG2PHS.js.map → chunk-IZAH45W2.js.map} +0 -0
  42. /package/dist/{chunk-BUUJ7TEQ.js.map → chunk-NEOV2NQ3.js.map} +0 -0
  43. /package/dist/{chunk-2FDTJIU4.js.map → chunk-WFMUDX5J.js.map} +0 -0
@@ -229,6 +229,63 @@ interface UseSandboxTerminalConnectionResult extends SandboxTerminalConnection {
229
229
  connect: () => Promise<void>;
230
230
  }
231
231
  declare function useSandboxTerminalConnection(opts: UseSandboxTerminalConnectionOptions): UseSandboxTerminalConnectionResult;
232
+ /**
233
+ * Stable-per-tab, unique-per-client terminal connection id.
234
+ *
235
+ * Persists in `sessionStorage` so a reload in the same tab reuses the id (the
236
+ * sidecar restores the same PTY session via `TerminalView.connectionId`), while
237
+ * separate tabs/windows each get a distinct id. Pass the result as
238
+ * `TerminalView`'s `connectionId`. Without it (e.g. gtm-agent today) every tab
239
+ * shares one connection id and their reconnects evict each other.
240
+ *
241
+ * Falls back to an ephemeral id when `sessionStorage` is unavailable (SSR,
242
+ * privacy mode) — still unique per call, just not reload-stable.
243
+ */
244
+ declare function tabTerminalConnectionId(storageKey?: string): string;
245
+
246
+ /**
247
+ * `WorkspaceTerminalPanel` — the shared sandbox-terminal surface: a header with
248
+ * a status badge, connect/provisioning/error states with a retry, and the lazy
249
+ * `TerminalView` (from `@tangle-network/sandbox-ui`) mounted only once the
250
+ * connection is live. creative-agent and gtm-agent each hand-roll a structurally
251
+ * identical panel; only the copy and the status-tone map are app-specific, so
252
+ * those are props and everything else lives here.
253
+ *
254
+ * Pair it with {@link useSandboxTerminalConnection} (the `connection` prop) and
255
+ * {@link tabTerminalConnectionId} (the `connectionId` prop) so reloads restore
256
+ * the same PTY and separate tabs don't evict each other.
257
+ *
258
+ * Styling matches the rest of `web-react`: Tailwind over the shared design
259
+ * tokens; glyphs inline; no icon/UI library.
260
+ */
261
+
262
+ type TerminalStatusTone = 'idle' | 'connecting' | 'connected' | 'error';
263
+ interface TerminalStatusDisplay {
264
+ tone: TerminalStatusTone;
265
+ label: string;
266
+ }
267
+ interface WorkspaceTerminalPanelProps {
268
+ /** Live connection state (from {@link useSandboxTerminalConnection}). */
269
+ connection: SandboxTerminalConnection;
270
+ /** Stable per-tab id (from {@link tabTerminalConnectionId}) so the sidecar
271
+ * restores the same PTY across remounts and tabs don't collide. */
272
+ connectionId?: string;
273
+ /** Header title. Default "Terminal". */
274
+ title?: string;
275
+ /** Header subtitle / sandbox label. */
276
+ subtitle?: string;
277
+ /** Whether the terminal tab is visible (forwarded to `TerminalView` for fit). */
278
+ isActive?: boolean;
279
+ /** Reconnect handler — wire to the hook's `connect`. Shown on idle/error. */
280
+ onRetry?: () => void;
281
+ /** Map a `connection.status` to a badge tone + label. The default covers
282
+ * idle/provisioning/running/error; override for app-specific vocabulary. */
283
+ statusDisplay?: (connection: SandboxTerminalConnection) => TerminalStatusDisplay;
284
+ /** Extra header content, right-aligned (actions, sandbox id, …). */
285
+ headerExtra?: ReactNode;
286
+ className?: string;
287
+ }
288
+ declare function WorkspaceTerminalPanel({ connection, connectionId, title, subtitle, isActive, onRetry, statusDisplay, headerExtra, className, }: WorkspaceTerminalPanelProps): ReactNode;
232
289
 
233
290
  /**
234
291
  * `SeatPaywall` — the shared "unlock this product" screen every agent app
@@ -459,4 +516,4 @@ type ToolDetailRenderers = Record<string, (call: ChatToolCallInfo, message: Chat
459
516
  */
460
517
  declare function ChatMessages({ messages, models, renderMarkdown, renderExtras, userLabel, agentLabel, loading, approval, onToolCallClick, toolRenderers, error, onRetry, renderEmpty, }: ChatMessagesProps): react.JSX.Element;
461
518
 
462
- 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 };
519
+ 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 TerminalStatusDisplay, type TerminalStatusTone, type ToolDetailRenderers, type ToolRunRecord, type ToolRunStep, type UseSandboxTerminalConnectionOptions, type UseSandboxTerminalConnectionResult, type WaterfallRow, WorkspaceTerminalPanel, type WorkspaceTerminalPanelProps, activityTone, consumeChatStream, dispatchChatStreamLine, formatActivityCost, formatActivityDuration, formatModelCost, formatTokensPerSecond, mergeActivityPages, nextRevealCount, pendingApprovalOf, streamChatTurn, tabTerminalConnectionId, usePending, usePopover, useSandboxTerminalConnection, useSmoothText, waterfallLayout };