eve-lark 0.2.7 → 0.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.
package/README.md CHANGED
@@ -23,6 +23,8 @@ A [Lark](https://www.larksuite.com) / [Feishu](https://www.feishu.cn) channel fo
23
23
  - Timestamp skew window (5 min default)
24
24
  - Bot self-message suppression
25
25
 
26
+ **Interactive ask_question** — when the model calls eve's built-in `ask_question` tool, eve-lark renders the prompt as a Feishu interactive card with one button per option (`primary` / `default` / `danger` styles map to Feishu button types). Clicks come back via `card.action.trigger` and resume the parked session. `allowFreeform: true` lets the user reply with a normal chat message instead of clicking — the next inbound message in the same chat is intercepted as the answer. After an answer, the card is patched in place (buttons removed, selected option shown with a green ✓).
27
+
26
28
  **Both Feishu and Lark** are supported via a single `baseUrl` switch.
27
29
 
28
30
  ### Out of scope (v1)
@@ -32,6 +34,10 @@ These are intentionally **not** shipped — file an issue if you need them:
32
34
  - Multi-account configuration
33
35
  - Per-user OAuth (`user_access_token` device flow)
34
36
  - Feishu API tools (docs / bitable / calendar / tasks / drive)
37
+
38
+ > Card action buttons from ask_question ARE shipped (0.3.0+). The remaining
39
+ > "card action buttons" gap in the list below refers to fully custom card
40
+ > schemas authored by the agent itself.
35
41
  - Card action buttons (no interactive form handling)
36
42
 
37
43
  ## Quick start
package/dist/index.d.ts CHANGED
@@ -195,7 +195,32 @@ type LarkCardElement = {
195
195
  tag: "plain_text";
196
196
  content: string;
197
197
  }>;
198
+ } | {
199
+ tag: "action";
200
+ actions: LarkCardButton[];
201
+ layout?: "bisected" | "trisection" | "flow";
198
202
  };
203
+ interface LarkCardButton {
204
+ tag: "button";
205
+ text: {
206
+ tag: "plain_text";
207
+ content: string;
208
+ };
209
+ type?: "default" | "primary" | "danger";
210
+ /** Arbitrary JSON returned in the card.action.trigger callback's
211
+ * `action.value`. eve-lark sets `{ __eveLarkAsk, requestId, optionId }`. */
212
+ value?: Record<string, unknown>;
213
+ confirm?: {
214
+ title: {
215
+ tag: "plain_text";
216
+ content: string;
217
+ };
218
+ text: {
219
+ tag: "plain_text";
220
+ content: string;
221
+ };
222
+ };
223
+ }
199
224
 
200
225
  /**
201
226
  * Continuation token format: `${chatId}:${rootMessageId ?? "_"}`.