@tangle-network/agent-app 0.43.44 → 0.43.45

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.
@@ -189,13 +189,19 @@ interface DurableChatCardsProps {
189
189
  planError?: (plan: ChatPlan) => string | null;
190
190
  onInteractionResolved?: (id: string, status: Exclude<ChatInteraction['status'], 'pending'>, answers?: InteractionAnswers) => void;
191
191
  onLateAnswer?: (message: string) => boolean | void | Promise<boolean | void>;
192
+ /** Fired when the user asks the agent to re-submit an expired/withdrawn
193
+ * plan card as a new chat turn; receives that card's interaction. Omit to
194
+ * hide the affordance entirely. */
195
+ onReRequest?: (interaction: ChatInteraction) => boolean | void | Promise<boolean | void>;
196
+ /** Overrides the default re-request button label. */
197
+ reRequestLabel?: string;
192
198
  renderMarkdown?: (markdown: string) => ReactNode;
193
199
  className?: string;
194
200
  }
195
201
  /** Ready-to-embed canonical question/plan card lane for persisted assistant
196
202
  * parts. Apps inject transport and styling callbacks instead of rebuilding the
197
203
  * lifecycle/render switch. */
198
- declare function DurableChatCards({ parts, canWrite, submitInteraction, decidePlan, decidingPlan, planError, onInteractionResolved, onLateAnswer, renderMarkdown, className, }: DurableChatCardsProps): react.JSX.Element | null;
204
+ declare function DurableChatCards({ parts, canWrite, submitInteraction, decidePlan, decidingPlan, planError, onInteractionResolved, onLateAnswer, onReRequest, reRequestLabel, renderMarkdown, className, }: DurableChatCardsProps): react.JSX.Element | null;
199
205
 
200
206
  /**
201
207
  * Client-side chat-stream consumption — the NDJSON parse loop every agent
@@ -410,11 +416,20 @@ interface InteractionPlanCardProps {
410
416
  /** Fired when this card resolves locally (approved/rejected, or discovered
411
417
  * expired via a 410) so the stream/route state stays in sync. */
412
418
  onResolved?: (id: string, status: Exclude<ChatInteractionStatus, 'pending'>) => void;
419
+ /** Fired when the user asks the agent to re-submit an expired/withdrawn plan
420
+ * as a new chat turn. Receives the interaction so a callback shared across
421
+ * cards (e.g. via DurableChatCards) knows which plan fired. Return/resolve
422
+ * `false` (or throw) to report the send failed and keep the affordance
423
+ * retryable. Omit to hide it entirely. */
424
+ onReRequest?: (interaction: ChatInteraction) => boolean | void | Promise<boolean | void>;
425
+ /** Overrides the default re-request button label
426
+ * ("Ask agent to re-submit the plan" — gtm's exact current copy). */
427
+ reRequestLabel?: string;
413
428
  /** Renders the plan body (markdown). Falls back to pre-wrapped plain text. */
414
429
  renderMarkdown?: (markdown: string) => ReactNode;
415
430
  className?: string;
416
431
  }
417
- declare function InteractionPlanCard({ interaction, canWrite, submitAnswer, onResolved, renderMarkdown, className, }: InteractionPlanCardProps): react.JSX.Element;
432
+ declare function InteractionPlanCard({ interaction, canWrite, submitAnswer, onResolved, onReRequest, reRequestLabel, renderMarkdown, className, }: InteractionPlanCardProps): react.JSX.Element;
418
433
 
419
434
  interface DurablePlanCardProps {
420
435
  plan: ChatPlan;
@@ -68,7 +68,7 @@ import {
68
68
  useSmoothText,
69
69
  useThinkingSeconds,
70
70
  waterfallLayout
71
- } from "../chunk-Q4EU6MGU.js";
71
+ } from "../chunk-7VMUOD3G.js";
72
72
  import {
73
73
  tabTerminalConnectionId,
74
74
  useSandboxTerminalConnection
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangle-network/agent-app",
3
- "version": "0.43.44",
3
+ "version": "0.43.45",
4
4
  "packageManager": "pnpm@10.33.4",
5
5
  "description": "Application-shell framework for Tangle agent products: a bounded tool loop, the structured agent→app tool side channel, integration-hub client, per-workspace billing, and crypto — composed over the Tangle agent substrate through typed seams.",
6
6
  "keywords": [