@alquimia-ai/ui 2.2.4 → 2.3.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.
@@ -0,0 +1,26 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ToolApproval } from '@alquimia-ai/tools/hooks';
3
+
4
+ /** The subset of a `useAlquimia` `ToolApproval` this card reads. */
5
+ type ToolApprovalView = Pick<ToolApproval, "controlId" | "toolName" | "arguments" | "channelOwned" | "status" | "reason" | "decidedHere" | "canAnswer" | "lastResult">;
6
+ interface ToolApprovalCardProps {
7
+ approval: ToolApprovalView;
8
+ /** Usually `useAlquimia().approveTool`. */
9
+ onDecide: (controlId: string, approved: boolean, reason?: string) => unknown;
10
+ /**
11
+ * Name of the channel that owns a channel-bound gate ("WhatsApp", "Slack"…),
12
+ * for the explanation shown in place of the buttons. The runtime's refusal
13
+ * does not name it, so only the app can.
14
+ */
15
+ channelName?: string;
16
+ className?: string;
17
+ }
18
+ /**
19
+ * A human-approval gate: what the agent wants to run, with what arguments, and
20
+ * Approve / Reject. The card never decides the gate is settled on its own — it
21
+ * reflects `approval.status`, which the hook drives from the stream, so a
22
+ * decision made by another operator or on the originating channel shows here too.
23
+ */
24
+ declare function ToolApprovalCard({ approval, onDecide, channelName, className }: ToolApprovalCardProps): react_jsx_runtime.JSX.Element;
25
+
26
+ export { ToolApprovalCard as T, type ToolApprovalCardProps as a, type ToolApprovalView as b };
@@ -0,0 +1,26 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ToolApproval } from '@alquimia-ai/tools/hooks';
3
+
4
+ /** The subset of a `useAlquimia` `ToolApproval` this card reads. */
5
+ type ToolApprovalView = Pick<ToolApproval, "controlId" | "toolName" | "arguments" | "channelOwned" | "status" | "reason" | "decidedHere" | "canAnswer" | "lastResult">;
6
+ interface ToolApprovalCardProps {
7
+ approval: ToolApprovalView;
8
+ /** Usually `useAlquimia().approveTool`. */
9
+ onDecide: (controlId: string, approved: boolean, reason?: string) => unknown;
10
+ /**
11
+ * Name of the channel that owns a channel-bound gate ("WhatsApp", "Slack"…),
12
+ * for the explanation shown in place of the buttons. The runtime's refusal
13
+ * does not name it, so only the app can.
14
+ */
15
+ channelName?: string;
16
+ className?: string;
17
+ }
18
+ /**
19
+ * A human-approval gate: what the agent wants to run, with what arguments, and
20
+ * Approve / Reject. The card never decides the gate is settled on its own — it
21
+ * reflects `approval.status`, which the hook drives from the stream, so a
22
+ * decision made by another operator or on the originating channel shows here too.
23
+ */
24
+ declare function ToolApprovalCard({ approval, onDecide, channelName, className }: ToolApprovalCardProps): react_jsx_runtime.JSX.Element;
25
+
26
+ export { ToolApprovalCard as T, type ToolApprovalCardProps as a, type ToolApprovalView as b };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alquimia-ai/ui",
3
- "version": "2.2.4",
3
+ "version": "2.3.0",
4
4
  "author": "Alquimia AI",
5
5
  "description": "UI components for Alquimia SDK",
6
6
  "private": false,