linkshell-cli 0.6.4 → 0.7.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 (60) hide show
  1. package/dist/cli/tsconfig.tsbuildinfo +1 -1
  2. package/dist/host/src/direct.d.ts +32 -0
  3. package/dist/host/src/direct.js +144 -0
  4. package/dist/host/src/direct.js.map +1 -0
  5. package/dist/host/src/drivers/acp/connection.js +3 -0
  6. package/dist/host/src/drivers/acp/connection.js.map +1 -1
  7. package/dist/host/src/drivers/acp/driver.d.ts +10 -1
  8. package/dist/host/src/drivers/acp/driver.js +48 -0
  9. package/dist/host/src/drivers/acp/driver.js.map +1 -1
  10. package/dist/host/src/drivers/claude/transcript.d.ts +88 -61
  11. package/dist/host/src/drivers/claude/transcript.js +8 -0
  12. package/dist/host/src/drivers/claude/transcript.js.map +1 -1
  13. package/dist/host/src/drivers/codex/app-server.d.ts +4 -0
  14. package/dist/host/src/drivers/codex/app-server.js +28 -2
  15. package/dist/host/src/drivers/codex/app-server.js.map +1 -1
  16. package/dist/host/src/drivers/codex/driver.d.ts +2 -1
  17. package/dist/host/src/drivers/codex/driver.js +17 -4
  18. package/dist/host/src/drivers/codex/driver.js.map +1 -1
  19. package/dist/host/src/drivers/codex/mapper.d.ts +11 -1
  20. package/dist/host/src/drivers/codex/mapper.js +80 -0
  21. package/dist/host/src/drivers/codex/mapper.js.map +1 -1
  22. package/dist/host/src/drivers/codex/settings.d.ts +7 -2
  23. package/dist/host/src/drivers/codex/settings.js +21 -2
  24. package/dist/host/src/drivers/codex/settings.js.map +1 -1
  25. package/dist/host/src/drivers/types.d.ts +3 -1
  26. package/dist/host/src/fs.d.ts +3 -3
  27. package/dist/host/src/host.d.ts +8 -1
  28. package/dist/host/src/host.js +14 -0
  29. package/dist/host/src/host.js.map +1 -1
  30. package/dist/host/src/hub.d.ts +3 -1
  31. package/dist/host/src/hub.js +25 -0
  32. package/dist/host/src/hub.js.map +1 -1
  33. package/dist/host/src/ports.d.ts +11 -2
  34. package/dist/host/src/ports.js +45 -7
  35. package/dist/host/src/ports.js.map +1 -1
  36. package/dist/host/src/questions.d.ts +21 -0
  37. package/dist/host/src/questions.js +102 -0
  38. package/dist/host/src/questions.js.map +1 -0
  39. package/dist/host/src/rpc/server.js +11 -2
  40. package/dist/host/src/rpc/server.js.map +1 -1
  41. package/dist/host/src/screen.d.ts +21 -0
  42. package/dist/host/src/screen.js +23 -12
  43. package/dist/host/src/screen.js.map +1 -1
  44. package/dist/wire/src/direct.d.ts +22 -0
  45. package/dist/wire/src/direct.js +37 -0
  46. package/dist/wire/src/direct.js.map +1 -0
  47. package/dist/wire/src/index.d.ts +1 -0
  48. package/dist/wire/src/index.js +1 -0
  49. package/dist/wire/src/index.js.map +1 -1
  50. package/dist/wire/src/model.d.ts +287 -6
  51. package/dist/wire/src/model.js +33 -0
  52. package/dist/wire/src/model.js.map +1 -1
  53. package/dist/wire/src/rpc.d.ts +1865 -170
  54. package/dist/wire/src/rpc.js +27 -3
  55. package/dist/wire/src/rpc.js.map +1 -1
  56. package/dist/wire/src/updates.d.ts +390 -34
  57. package/dist/wire/src/updates.js +11 -1
  58. package/dist/wire/src/updates.js.map +1 -1
  59. package/package.json +3 -3
  60. package/src/types/werift.d.ts +0 -23
@@ -255,6 +255,18 @@ export declare const toolDetailSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObj
255
255
  }, {
256
256
  type: "review";
257
257
  phase: "started" | "finished";
258
+ }>, z.ZodObject<{
259
+ type: z.ZodLiteral<"question">;
260
+ text: z.ZodString;
261
+ more: z.ZodOptional<z.ZodNumber>;
262
+ }, "strip", z.ZodTypeAny, {
263
+ type: "question";
264
+ text: string;
265
+ more?: number | undefined;
266
+ }, {
267
+ type: "question";
268
+ text: string;
269
+ more?: number | undefined;
258
270
  }>]>;
259
271
  export type ToolDetail = z.infer<typeof toolDetailSchema>;
260
272
  export declare const planEntrySchema: z.ZodObject<{
@@ -359,7 +371,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
359
371
  kind?: "agent" | "file" | "skill" | undefined;
360
372
  }>]>;
361
373
  }, "strip", z.ZodTypeAny, {
362
- sessionUpdate: "user_message_chunk";
363
374
  content: {
364
375
  type: "text";
365
376
  text: string;
@@ -374,9 +385,9 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
374
385
  uri: string;
375
386
  kind?: "agent" | "file" | "skill" | undefined;
376
387
  };
388
+ sessionUpdate: "user_message_chunk";
377
389
  messageId?: string | undefined;
378
390
  }, {
379
- sessionUpdate: "user_message_chunk";
380
391
  content: {
381
392
  type: "text";
382
393
  text: string;
@@ -391,6 +402,7 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
391
402
  uri: string;
392
403
  kind?: "agent" | "file" | "skill" | undefined;
393
404
  };
405
+ sessionUpdate: "user_message_chunk";
394
406
  messageId?: string | undefined;
395
407
  }>, z.ZodObject<{
396
408
  sessionUpdate: z.ZodLiteral<"agent_message_chunk">;
@@ -438,8 +450,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
438
450
  kind?: "agent" | "file" | "skill" | undefined;
439
451
  }>]>;
440
452
  }, "strip", z.ZodTypeAny, {
441
- sessionUpdate: "agent_message_chunk";
442
- messageId: string;
443
453
  content: {
444
454
  type: "text";
445
455
  text: string;
@@ -454,10 +464,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
454
464
  uri: string;
455
465
  kind?: "agent" | "file" | "skill" | undefined;
456
466
  };
457
- parentToolCallId?: string | undefined;
458
- }, {
459
467
  sessionUpdate: "agent_message_chunk";
460
468
  messageId: string;
469
+ parentToolCallId?: string | undefined;
470
+ }, {
461
471
  content: {
462
472
  type: "text";
463
473
  text: string;
@@ -472,6 +482,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
472
482
  uri: string;
473
483
  kind?: "agent" | "file" | "skill" | undefined;
474
484
  };
485
+ sessionUpdate: "agent_message_chunk";
486
+ messageId: string;
475
487
  parentToolCallId?: string | undefined;
476
488
  }>, z.ZodObject<{
477
489
  sessionUpdate: z.ZodLiteral<"agent_thought_chunk">;
@@ -519,8 +531,6 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
519
531
  kind?: "agent" | "file" | "skill" | undefined;
520
532
  }>]>;
521
533
  }, "strip", z.ZodTypeAny, {
522
- sessionUpdate: "agent_thought_chunk";
523
- messageId: string;
524
534
  content: {
525
535
  type: "text";
526
536
  text: string;
@@ -535,10 +545,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
535
545
  uri: string;
536
546
  kind?: "agent" | "file" | "skill" | undefined;
537
547
  };
538
- parentToolCallId?: string | undefined;
539
- }, {
540
548
  sessionUpdate: "agent_thought_chunk";
541
549
  messageId: string;
550
+ parentToolCallId?: string | undefined;
551
+ }, {
542
552
  content: {
543
553
  type: "text";
544
554
  text: string;
@@ -553,6 +563,8 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
553
563
  uri: string;
554
564
  kind?: "agent" | "file" | "skill" | undefined;
555
565
  };
566
+ sessionUpdate: "agent_thought_chunk";
567
+ messageId: string;
556
568
  parentToolCallId?: string | undefined;
557
569
  }>, z.ZodObject<{
558
570
  sessionUpdate: z.ZodLiteral<"tool_call">;
@@ -768,6 +780,18 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
768
780
  }, {
769
781
  type: "review";
770
782
  phase: "started" | "finished";
783
+ }>, z.ZodObject<{
784
+ type: z.ZodLiteral<"question">;
785
+ text: z.ZodString;
786
+ more: z.ZodOptional<z.ZodNumber>;
787
+ }, "strip", z.ZodTypeAny, {
788
+ type: "question";
789
+ text: string;
790
+ more?: number | undefined;
791
+ }, {
792
+ type: "question";
793
+ text: string;
794
+ more?: number | undefined;
771
795
  }>]>>;
772
796
  }, "strip", z.ZodTypeAny, {
773
797
  status: "failed" | "pending" | "in_progress" | "completed";
@@ -800,6 +824,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
800
824
  } | {
801
825
  type: "review";
802
826
  phase: "started" | "finished";
827
+ } | {
828
+ type: "question";
829
+ text: string;
830
+ more?: number | undefined;
803
831
  } | undefined;
804
832
  content?: ({
805
833
  type: "content";
@@ -869,6 +897,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
869
897
  } | {
870
898
  type: "review";
871
899
  phase: "started" | "finished";
900
+ } | {
901
+ type: "question";
902
+ text: string;
903
+ more?: number | undefined;
872
904
  } | undefined;
873
905
  content?: ({
874
906
  type: "content";
@@ -990,6 +1022,18 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
990
1022
  }, {
991
1023
  type: "review";
992
1024
  phase: "started" | "finished";
1025
+ }>, z.ZodObject<{
1026
+ type: z.ZodLiteral<"question">;
1027
+ text: z.ZodString;
1028
+ more: z.ZodOptional<z.ZodNumber>;
1029
+ }, "strip", z.ZodTypeAny, {
1030
+ type: "question";
1031
+ text: string;
1032
+ more?: number | undefined;
1033
+ }, {
1034
+ type: "question";
1035
+ text: string;
1036
+ more?: number | undefined;
993
1037
  }>]>>;
994
1038
  /** Replaces the tool call's content when present. */
995
1039
  content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -1143,6 +1187,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1143
1187
  } | {
1144
1188
  type: "review";
1145
1189
  phase: "started" | "finished";
1190
+ } | {
1191
+ type: "question";
1192
+ text: string;
1193
+ more?: number | undefined;
1146
1194
  } | undefined;
1147
1195
  content?: ({
1148
1196
  type: "content";
@@ -1208,6 +1256,10 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1208
1256
  } | {
1209
1257
  type: "review";
1210
1258
  phase: "started" | "finished";
1259
+ } | {
1260
+ type: "question";
1261
+ text: string;
1262
+ more?: number | undefined;
1211
1263
  } | undefined;
1212
1264
  content?: ({
1213
1265
  type: "content";
@@ -1470,6 +1522,59 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1470
1522
  name: string;
1471
1523
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
1472
1524
  }>, "many">;
1525
+ /**
1526
+ * The agent is asking the user something: answer with `sessions.answer`.
1527
+ * `options` then hold what else can be done (skip the questions, stop),
1528
+ * which is also all an app that predates questions can offer.
1529
+ */
1530
+ questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
1531
+ id: z.ZodString;
1532
+ header: z.ZodOptional<z.ZodString>;
1533
+ text: z.ZodString;
1534
+ kind: z.ZodEnum<["choice", "choices", "text"]>;
1535
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
1536
+ value: z.ZodString;
1537
+ label: z.ZodString;
1538
+ description: z.ZodOptional<z.ZodString>;
1539
+ }, "strip", z.ZodTypeAny, {
1540
+ value: string;
1541
+ label: string;
1542
+ description?: string | undefined;
1543
+ }, {
1544
+ value: string;
1545
+ label: string;
1546
+ description?: string | undefined;
1547
+ }>, "many">>;
1548
+ other: z.ZodOptional<z.ZodBoolean>;
1549
+ secret: z.ZodOptional<z.ZodBoolean>;
1550
+ required: z.ZodOptional<z.ZodBoolean>;
1551
+ }, "strip", z.ZodTypeAny, {
1552
+ id: string;
1553
+ kind: "text" | "choice" | "choices";
1554
+ text: string;
1555
+ options?: {
1556
+ value: string;
1557
+ label: string;
1558
+ description?: string | undefined;
1559
+ }[] | undefined;
1560
+ other?: boolean | undefined;
1561
+ header?: string | undefined;
1562
+ secret?: boolean | undefined;
1563
+ required?: boolean | undefined;
1564
+ }, {
1565
+ id: string;
1566
+ kind: "text" | "choice" | "choices";
1567
+ text: string;
1568
+ options?: {
1569
+ value: string;
1570
+ label: string;
1571
+ description?: string | undefined;
1572
+ }[] | undefined;
1573
+ other?: boolean | undefined;
1574
+ header?: string | undefined;
1575
+ secret?: boolean | undefined;
1576
+ required?: boolean | undefined;
1577
+ }>, "many">>;
1473
1578
  }, "strip", z.ZodTypeAny, {
1474
1579
  options: {
1475
1580
  optionId: string;
@@ -1481,6 +1586,20 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1481
1586
  sessionUpdate: "ls_permission";
1482
1587
  toolCallId?: string | undefined;
1483
1588
  detail?: string | undefined;
1589
+ questions?: {
1590
+ id: string;
1591
+ kind: "text" | "choice" | "choices";
1592
+ text: string;
1593
+ options?: {
1594
+ value: string;
1595
+ label: string;
1596
+ description?: string | undefined;
1597
+ }[] | undefined;
1598
+ other?: boolean | undefined;
1599
+ header?: string | undefined;
1600
+ secret?: boolean | undefined;
1601
+ required?: boolean | undefined;
1602
+ }[] | undefined;
1484
1603
  }, {
1485
1604
  options: {
1486
1605
  optionId: string;
@@ -1492,18 +1611,56 @@ export declare const sessionUpdateSchema: z.ZodDiscriminatedUnion<"sessionUpdate
1492
1611
  sessionUpdate: "ls_permission";
1493
1612
  toolCallId?: string | undefined;
1494
1613
  detail?: string | undefined;
1614
+ questions?: {
1615
+ id: string;
1616
+ kind: "text" | "choice" | "choices";
1617
+ text: string;
1618
+ options?: {
1619
+ value: string;
1620
+ label: string;
1621
+ description?: string | undefined;
1622
+ }[] | undefined;
1623
+ other?: boolean | undefined;
1624
+ header?: string | undefined;
1625
+ secret?: boolean | undefined;
1626
+ required?: boolean | undefined;
1627
+ }[] | undefined;
1495
1628
  }>, z.ZodObject<{
1496
1629
  sessionUpdate: z.ZodLiteral<"ls_permission_resolved">;
1497
1630
  requestId: z.ZodString;
1498
1631
  optionId: z.ZodOptional<z.ZodString>;
1632
+ /** How questions were answered, for the record. */
1633
+ answers: z.ZodOptional<z.ZodArray<z.ZodObject<{
1634
+ id: z.ZodString;
1635
+ values: z.ZodArray<z.ZodString, "many">;
1636
+ other: z.ZodOptional<z.ZodString>;
1637
+ }, "strip", z.ZodTypeAny, {
1638
+ values: string[];
1639
+ id: string;
1640
+ other?: string | undefined;
1641
+ }, {
1642
+ values: string[];
1643
+ id: string;
1644
+ other?: string | undefined;
1645
+ }>, "many">>;
1499
1646
  }, "strip", z.ZodTypeAny, {
1500
1647
  requestId: string;
1501
1648
  sessionUpdate: "ls_permission_resolved";
1502
1649
  optionId?: string | undefined;
1650
+ answers?: {
1651
+ values: string[];
1652
+ id: string;
1653
+ other?: string | undefined;
1654
+ }[] | undefined;
1503
1655
  }, {
1504
1656
  requestId: string;
1505
1657
  sessionUpdate: "ls_permission_resolved";
1506
1658
  optionId?: string | undefined;
1659
+ answers?: {
1660
+ values: string[];
1661
+ id: string;
1662
+ other?: string | undefined;
1663
+ }[] | undefined;
1507
1664
  }>, z.ZodObject<{
1508
1665
  sessionUpdate: z.ZodLiteral<"ls_driver">;
1509
1666
  driver: z.ZodEnum<["desktop", "remote", "none"]>;
@@ -1593,7 +1750,6 @@ export declare const sessionEventSchema: z.ZodObject<{
1593
1750
  kind?: "agent" | "file" | "skill" | undefined;
1594
1751
  }>]>;
1595
1752
  }, "strip", z.ZodTypeAny, {
1596
- sessionUpdate: "user_message_chunk";
1597
1753
  content: {
1598
1754
  type: "text";
1599
1755
  text: string;
@@ -1608,9 +1764,9 @@ export declare const sessionEventSchema: z.ZodObject<{
1608
1764
  uri: string;
1609
1765
  kind?: "agent" | "file" | "skill" | undefined;
1610
1766
  };
1767
+ sessionUpdate: "user_message_chunk";
1611
1768
  messageId?: string | undefined;
1612
1769
  }, {
1613
- sessionUpdate: "user_message_chunk";
1614
1770
  content: {
1615
1771
  type: "text";
1616
1772
  text: string;
@@ -1625,6 +1781,7 @@ export declare const sessionEventSchema: z.ZodObject<{
1625
1781
  uri: string;
1626
1782
  kind?: "agent" | "file" | "skill" | undefined;
1627
1783
  };
1784
+ sessionUpdate: "user_message_chunk";
1628
1785
  messageId?: string | undefined;
1629
1786
  }>, z.ZodObject<{
1630
1787
  sessionUpdate: z.ZodLiteral<"agent_message_chunk">;
@@ -1672,8 +1829,6 @@ export declare const sessionEventSchema: z.ZodObject<{
1672
1829
  kind?: "agent" | "file" | "skill" | undefined;
1673
1830
  }>]>;
1674
1831
  }, "strip", z.ZodTypeAny, {
1675
- sessionUpdate: "agent_message_chunk";
1676
- messageId: string;
1677
1832
  content: {
1678
1833
  type: "text";
1679
1834
  text: string;
@@ -1688,10 +1843,10 @@ export declare const sessionEventSchema: z.ZodObject<{
1688
1843
  uri: string;
1689
1844
  kind?: "agent" | "file" | "skill" | undefined;
1690
1845
  };
1691
- parentToolCallId?: string | undefined;
1692
- }, {
1693
1846
  sessionUpdate: "agent_message_chunk";
1694
1847
  messageId: string;
1848
+ parentToolCallId?: string | undefined;
1849
+ }, {
1695
1850
  content: {
1696
1851
  type: "text";
1697
1852
  text: string;
@@ -1706,6 +1861,8 @@ export declare const sessionEventSchema: z.ZodObject<{
1706
1861
  uri: string;
1707
1862
  kind?: "agent" | "file" | "skill" | undefined;
1708
1863
  };
1864
+ sessionUpdate: "agent_message_chunk";
1865
+ messageId: string;
1709
1866
  parentToolCallId?: string | undefined;
1710
1867
  }>, z.ZodObject<{
1711
1868
  sessionUpdate: z.ZodLiteral<"agent_thought_chunk">;
@@ -1753,8 +1910,6 @@ export declare const sessionEventSchema: z.ZodObject<{
1753
1910
  kind?: "agent" | "file" | "skill" | undefined;
1754
1911
  }>]>;
1755
1912
  }, "strip", z.ZodTypeAny, {
1756
- sessionUpdate: "agent_thought_chunk";
1757
- messageId: string;
1758
1913
  content: {
1759
1914
  type: "text";
1760
1915
  text: string;
@@ -1769,10 +1924,10 @@ export declare const sessionEventSchema: z.ZodObject<{
1769
1924
  uri: string;
1770
1925
  kind?: "agent" | "file" | "skill" | undefined;
1771
1926
  };
1772
- parentToolCallId?: string | undefined;
1773
- }, {
1774
1927
  sessionUpdate: "agent_thought_chunk";
1775
1928
  messageId: string;
1929
+ parentToolCallId?: string | undefined;
1930
+ }, {
1776
1931
  content: {
1777
1932
  type: "text";
1778
1933
  text: string;
@@ -1787,6 +1942,8 @@ export declare const sessionEventSchema: z.ZodObject<{
1787
1942
  uri: string;
1788
1943
  kind?: "agent" | "file" | "skill" | undefined;
1789
1944
  };
1945
+ sessionUpdate: "agent_thought_chunk";
1946
+ messageId: string;
1790
1947
  parentToolCallId?: string | undefined;
1791
1948
  }>, z.ZodObject<{
1792
1949
  sessionUpdate: z.ZodLiteral<"tool_call">;
@@ -2002,6 +2159,18 @@ export declare const sessionEventSchema: z.ZodObject<{
2002
2159
  }, {
2003
2160
  type: "review";
2004
2161
  phase: "started" | "finished";
2162
+ }>, z.ZodObject<{
2163
+ type: z.ZodLiteral<"question">;
2164
+ text: z.ZodString;
2165
+ more: z.ZodOptional<z.ZodNumber>;
2166
+ }, "strip", z.ZodTypeAny, {
2167
+ type: "question";
2168
+ text: string;
2169
+ more?: number | undefined;
2170
+ }, {
2171
+ type: "question";
2172
+ text: string;
2173
+ more?: number | undefined;
2005
2174
  }>]>>;
2006
2175
  }, "strip", z.ZodTypeAny, {
2007
2176
  status: "failed" | "pending" | "in_progress" | "completed";
@@ -2034,6 +2203,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2034
2203
  } | {
2035
2204
  type: "review";
2036
2205
  phase: "started" | "finished";
2206
+ } | {
2207
+ type: "question";
2208
+ text: string;
2209
+ more?: number | undefined;
2037
2210
  } | undefined;
2038
2211
  content?: ({
2039
2212
  type: "content";
@@ -2103,6 +2276,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2103
2276
  } | {
2104
2277
  type: "review";
2105
2278
  phase: "started" | "finished";
2279
+ } | {
2280
+ type: "question";
2281
+ text: string;
2282
+ more?: number | undefined;
2106
2283
  } | undefined;
2107
2284
  content?: ({
2108
2285
  type: "content";
@@ -2224,6 +2401,18 @@ export declare const sessionEventSchema: z.ZodObject<{
2224
2401
  }, {
2225
2402
  type: "review";
2226
2403
  phase: "started" | "finished";
2404
+ }>, z.ZodObject<{
2405
+ type: z.ZodLiteral<"question">;
2406
+ text: z.ZodString;
2407
+ more: z.ZodOptional<z.ZodNumber>;
2408
+ }, "strip", z.ZodTypeAny, {
2409
+ type: "question";
2410
+ text: string;
2411
+ more?: number | undefined;
2412
+ }, {
2413
+ type: "question";
2414
+ text: string;
2415
+ more?: number | undefined;
2227
2416
  }>]>>;
2228
2417
  /** Replaces the tool call's content when present. */
2229
2418
  content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
@@ -2377,6 +2566,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2377
2566
  } | {
2378
2567
  type: "review";
2379
2568
  phase: "started" | "finished";
2569
+ } | {
2570
+ type: "question";
2571
+ text: string;
2572
+ more?: number | undefined;
2380
2573
  } | undefined;
2381
2574
  content?: ({
2382
2575
  type: "content";
@@ -2442,6 +2635,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2442
2635
  } | {
2443
2636
  type: "review";
2444
2637
  phase: "started" | "finished";
2638
+ } | {
2639
+ type: "question";
2640
+ text: string;
2641
+ more?: number | undefined;
2445
2642
  } | undefined;
2446
2643
  content?: ({
2447
2644
  type: "content";
@@ -2704,6 +2901,59 @@ export declare const sessionEventSchema: z.ZodObject<{
2704
2901
  name: string;
2705
2902
  kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
2706
2903
  }>, "many">;
2904
+ /**
2905
+ * The agent is asking the user something: answer with `sessions.answer`.
2906
+ * `options` then hold what else can be done (skip the questions, stop),
2907
+ * which is also all an app that predates questions can offer.
2908
+ */
2909
+ questions: z.ZodOptional<z.ZodArray<z.ZodObject<{
2910
+ id: z.ZodString;
2911
+ header: z.ZodOptional<z.ZodString>;
2912
+ text: z.ZodString;
2913
+ kind: z.ZodEnum<["choice", "choices", "text"]>;
2914
+ options: z.ZodOptional<z.ZodArray<z.ZodObject<{
2915
+ value: z.ZodString;
2916
+ label: z.ZodString;
2917
+ description: z.ZodOptional<z.ZodString>;
2918
+ }, "strip", z.ZodTypeAny, {
2919
+ value: string;
2920
+ label: string;
2921
+ description?: string | undefined;
2922
+ }, {
2923
+ value: string;
2924
+ label: string;
2925
+ description?: string | undefined;
2926
+ }>, "many">>;
2927
+ other: z.ZodOptional<z.ZodBoolean>;
2928
+ secret: z.ZodOptional<z.ZodBoolean>;
2929
+ required: z.ZodOptional<z.ZodBoolean>;
2930
+ }, "strip", z.ZodTypeAny, {
2931
+ id: string;
2932
+ kind: "text" | "choice" | "choices";
2933
+ text: string;
2934
+ options?: {
2935
+ value: string;
2936
+ label: string;
2937
+ description?: string | undefined;
2938
+ }[] | undefined;
2939
+ other?: boolean | undefined;
2940
+ header?: string | undefined;
2941
+ secret?: boolean | undefined;
2942
+ required?: boolean | undefined;
2943
+ }, {
2944
+ id: string;
2945
+ kind: "text" | "choice" | "choices";
2946
+ text: string;
2947
+ options?: {
2948
+ value: string;
2949
+ label: string;
2950
+ description?: string | undefined;
2951
+ }[] | undefined;
2952
+ other?: boolean | undefined;
2953
+ header?: string | undefined;
2954
+ secret?: boolean | undefined;
2955
+ required?: boolean | undefined;
2956
+ }>, "many">>;
2707
2957
  }, "strip", z.ZodTypeAny, {
2708
2958
  options: {
2709
2959
  optionId: string;
@@ -2715,6 +2965,20 @@ export declare const sessionEventSchema: z.ZodObject<{
2715
2965
  sessionUpdate: "ls_permission";
2716
2966
  toolCallId?: string | undefined;
2717
2967
  detail?: string | undefined;
2968
+ questions?: {
2969
+ id: string;
2970
+ kind: "text" | "choice" | "choices";
2971
+ text: string;
2972
+ options?: {
2973
+ value: string;
2974
+ label: string;
2975
+ description?: string | undefined;
2976
+ }[] | undefined;
2977
+ other?: boolean | undefined;
2978
+ header?: string | undefined;
2979
+ secret?: boolean | undefined;
2980
+ required?: boolean | undefined;
2981
+ }[] | undefined;
2718
2982
  }, {
2719
2983
  options: {
2720
2984
  optionId: string;
@@ -2726,18 +2990,56 @@ export declare const sessionEventSchema: z.ZodObject<{
2726
2990
  sessionUpdate: "ls_permission";
2727
2991
  toolCallId?: string | undefined;
2728
2992
  detail?: string | undefined;
2993
+ questions?: {
2994
+ id: string;
2995
+ kind: "text" | "choice" | "choices";
2996
+ text: string;
2997
+ options?: {
2998
+ value: string;
2999
+ label: string;
3000
+ description?: string | undefined;
3001
+ }[] | undefined;
3002
+ other?: boolean | undefined;
3003
+ header?: string | undefined;
3004
+ secret?: boolean | undefined;
3005
+ required?: boolean | undefined;
3006
+ }[] | undefined;
2729
3007
  }>, z.ZodObject<{
2730
3008
  sessionUpdate: z.ZodLiteral<"ls_permission_resolved">;
2731
3009
  requestId: z.ZodString;
2732
3010
  optionId: z.ZodOptional<z.ZodString>;
3011
+ /** How questions were answered, for the record. */
3012
+ answers: z.ZodOptional<z.ZodArray<z.ZodObject<{
3013
+ id: z.ZodString;
3014
+ values: z.ZodArray<z.ZodString, "many">;
3015
+ other: z.ZodOptional<z.ZodString>;
3016
+ }, "strip", z.ZodTypeAny, {
3017
+ values: string[];
3018
+ id: string;
3019
+ other?: string | undefined;
3020
+ }, {
3021
+ values: string[];
3022
+ id: string;
3023
+ other?: string | undefined;
3024
+ }>, "many">>;
2733
3025
  }, "strip", z.ZodTypeAny, {
2734
3026
  requestId: string;
2735
3027
  sessionUpdate: "ls_permission_resolved";
2736
3028
  optionId?: string | undefined;
3029
+ answers?: {
3030
+ values: string[];
3031
+ id: string;
3032
+ other?: string | undefined;
3033
+ }[] | undefined;
2737
3034
  }, {
2738
3035
  requestId: string;
2739
3036
  sessionUpdate: "ls_permission_resolved";
2740
3037
  optionId?: string | undefined;
3038
+ answers?: {
3039
+ values: string[];
3040
+ id: string;
3041
+ other?: string | undefined;
3042
+ }[] | undefined;
2741
3043
  }>, z.ZodObject<{
2742
3044
  sessionUpdate: z.ZodLiteral<"ls_driver">;
2743
3045
  driver: z.ZodEnum<["desktop", "remote", "none"]>;
@@ -2776,11 +3078,7 @@ export declare const sessionEventSchema: z.ZodObject<{
2776
3078
  hint?: string | undefined;
2777
3079
  }>]>;
2778
3080
  }, "strip", z.ZodTypeAny, {
2779
- sessionId: string;
2780
- seq: number;
2781
- ts: number;
2782
3081
  update: {
2783
- sessionUpdate: "user_message_chunk";
2784
3082
  content: {
2785
3083
  type: "text";
2786
3084
  text: string;
@@ -2795,10 +3093,9 @@ export declare const sessionEventSchema: z.ZodObject<{
2795
3093
  uri: string;
2796
3094
  kind?: "agent" | "file" | "skill" | undefined;
2797
3095
  };
3096
+ sessionUpdate: "user_message_chunk";
2798
3097
  messageId?: string | undefined;
2799
3098
  } | {
2800
- sessionUpdate: "agent_message_chunk";
2801
- messageId: string;
2802
3099
  content: {
2803
3100
  type: "text";
2804
3101
  text: string;
@@ -2813,10 +3110,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2813
3110
  uri: string;
2814
3111
  kind?: "agent" | "file" | "skill" | undefined;
2815
3112
  };
3113
+ sessionUpdate: "agent_message_chunk";
3114
+ messageId: string;
2816
3115
  parentToolCallId?: string | undefined;
2817
3116
  } | {
2818
- sessionUpdate: "agent_thought_chunk";
2819
- messageId: string;
2820
3117
  content: {
2821
3118
  type: "text";
2822
3119
  text: string;
@@ -2831,6 +3128,8 @@ export declare const sessionEventSchema: z.ZodObject<{
2831
3128
  uri: string;
2832
3129
  kind?: "agent" | "file" | "skill" | undefined;
2833
3130
  };
3131
+ sessionUpdate: "agent_thought_chunk";
3132
+ messageId: string;
2834
3133
  parentToolCallId?: string | undefined;
2835
3134
  } | {
2836
3135
  status: "failed" | "pending" | "in_progress" | "completed";
@@ -2863,6 +3162,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2863
3162
  } | {
2864
3163
  type: "review";
2865
3164
  phase: "started" | "finished";
3165
+ } | {
3166
+ type: "question";
3167
+ text: string;
3168
+ more?: number | undefined;
2866
3169
  } | undefined;
2867
3170
  content?: ({
2868
3171
  type: "content";
@@ -2931,6 +3234,10 @@ export declare const sessionEventSchema: z.ZodObject<{
2931
3234
  } | {
2932
3235
  type: "review";
2933
3236
  phase: "started" | "finished";
3237
+ } | {
3238
+ type: "question";
3239
+ text: string;
3240
+ more?: number | undefined;
2934
3241
  } | undefined;
2935
3242
  content?: ({
2936
3243
  type: "content";
@@ -3031,10 +3338,29 @@ export declare const sessionEventSchema: z.ZodObject<{
3031
3338
  sessionUpdate: "ls_permission";
3032
3339
  toolCallId?: string | undefined;
3033
3340
  detail?: string | undefined;
3341
+ questions?: {
3342
+ id: string;
3343
+ kind: "text" | "choice" | "choices";
3344
+ text: string;
3345
+ options?: {
3346
+ value: string;
3347
+ label: string;
3348
+ description?: string | undefined;
3349
+ }[] | undefined;
3350
+ other?: boolean | undefined;
3351
+ header?: string | undefined;
3352
+ secret?: boolean | undefined;
3353
+ required?: boolean | undefined;
3354
+ }[] | undefined;
3034
3355
  } | {
3035
3356
  requestId: string;
3036
3357
  sessionUpdate: "ls_permission_resolved";
3037
3358
  optionId?: string | undefined;
3359
+ answers?: {
3360
+ values: string[];
3361
+ id: string;
3362
+ other?: string | undefined;
3363
+ }[] | undefined;
3038
3364
  } | {
3039
3365
  driver: "remote" | "desktop" | "none";
3040
3366
  sessionUpdate: "ls_driver";
@@ -3048,12 +3374,11 @@ export declare const sessionEventSchema: z.ZodObject<{
3048
3374
  sessionUpdate: "ls_error";
3049
3375
  hint?: string | undefined;
3050
3376
  };
3051
- }, {
3052
3377
  sessionId: string;
3053
3378
  seq: number;
3054
3379
  ts: number;
3380
+ }, {
3055
3381
  update: {
3056
- sessionUpdate: "user_message_chunk";
3057
3382
  content: {
3058
3383
  type: "text";
3059
3384
  text: string;
@@ -3068,10 +3393,9 @@ export declare const sessionEventSchema: z.ZodObject<{
3068
3393
  uri: string;
3069
3394
  kind?: "agent" | "file" | "skill" | undefined;
3070
3395
  };
3396
+ sessionUpdate: "user_message_chunk";
3071
3397
  messageId?: string | undefined;
3072
3398
  } | {
3073
- sessionUpdate: "agent_message_chunk";
3074
- messageId: string;
3075
3399
  content: {
3076
3400
  type: "text";
3077
3401
  text: string;
@@ -3086,10 +3410,10 @@ export declare const sessionEventSchema: z.ZodObject<{
3086
3410
  uri: string;
3087
3411
  kind?: "agent" | "file" | "skill" | undefined;
3088
3412
  };
3413
+ sessionUpdate: "agent_message_chunk";
3414
+ messageId: string;
3089
3415
  parentToolCallId?: string | undefined;
3090
3416
  } | {
3091
- sessionUpdate: "agent_thought_chunk";
3092
- messageId: string;
3093
3417
  content: {
3094
3418
  type: "text";
3095
3419
  text: string;
@@ -3104,6 +3428,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3104
3428
  uri: string;
3105
3429
  kind?: "agent" | "file" | "skill" | undefined;
3106
3430
  };
3431
+ sessionUpdate: "agent_thought_chunk";
3432
+ messageId: string;
3107
3433
  parentToolCallId?: string | undefined;
3108
3434
  } | {
3109
3435
  status: "failed" | "pending" | "in_progress" | "completed";
@@ -3136,6 +3462,10 @@ export declare const sessionEventSchema: z.ZodObject<{
3136
3462
  } | {
3137
3463
  type: "review";
3138
3464
  phase: "started" | "finished";
3465
+ } | {
3466
+ type: "question";
3467
+ text: string;
3468
+ more?: number | undefined;
3139
3469
  } | undefined;
3140
3470
  content?: ({
3141
3471
  type: "content";
@@ -3204,6 +3534,10 @@ export declare const sessionEventSchema: z.ZodObject<{
3204
3534
  } | {
3205
3535
  type: "review";
3206
3536
  phase: "started" | "finished";
3537
+ } | {
3538
+ type: "question";
3539
+ text: string;
3540
+ more?: number | undefined;
3207
3541
  } | undefined;
3208
3542
  content?: ({
3209
3543
  type: "content";
@@ -3304,10 +3638,29 @@ export declare const sessionEventSchema: z.ZodObject<{
3304
3638
  sessionUpdate: "ls_permission";
3305
3639
  toolCallId?: string | undefined;
3306
3640
  detail?: string | undefined;
3641
+ questions?: {
3642
+ id: string;
3643
+ kind: "text" | "choice" | "choices";
3644
+ text: string;
3645
+ options?: {
3646
+ value: string;
3647
+ label: string;
3648
+ description?: string | undefined;
3649
+ }[] | undefined;
3650
+ other?: boolean | undefined;
3651
+ header?: string | undefined;
3652
+ secret?: boolean | undefined;
3653
+ required?: boolean | undefined;
3654
+ }[] | undefined;
3307
3655
  } | {
3308
3656
  requestId: string;
3309
3657
  sessionUpdate: "ls_permission_resolved";
3310
3658
  optionId?: string | undefined;
3659
+ answers?: {
3660
+ values: string[];
3661
+ id: string;
3662
+ other?: string | undefined;
3663
+ }[] | undefined;
3311
3664
  } | {
3312
3665
  driver: "remote" | "desktop" | "none";
3313
3666
  sessionUpdate: "ls_driver";
@@ -3321,5 +3674,8 @@ export declare const sessionEventSchema: z.ZodObject<{
3321
3674
  sessionUpdate: "ls_error";
3322
3675
  hint?: string | undefined;
3323
3676
  };
3677
+ sessionId: string;
3678
+ seq: number;
3679
+ ts: number;
3324
3680
  }>;
3325
3681
  export type SessionEvent = z.infer<typeof sessionEventSchema>;