@ignite-ember/extension-bridge 0.2.0 → 0.2.1

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.
@@ -1,7 +1,7 @@
1
1
  // GENERATED from the igni host schema 1.13.0 by igni-sdk's tools/host_codegen.py — do not edit. Run `make host-sdks` after refreshing contracts/host-schema.json.
2
2
  //
3
3
  // `bridge.host` as an extension's page sees it. Read
4
- // `docs/HOST_OBJECT_MODEL.md` in igni for what each object is.
4
+ // igni-core's `docs/HOST_OBJECT_MODEL.md` (https://github.com/ignite-ember/igni-core/blob/main/docs/HOST_OBJECT_MODEL.md) for what each object is.
5
5
 
6
6
  import { HostObject, Property, Signal, type HostLink, type JsonValue } from "./hostModel.js";
7
7
 
@@ -1176,6 +1176,12 @@ export class HostAppState extends HostObject {
1176
1176
  *
1177
1177
  * A page never builds one of these: `bridge.host` is already the
1178
1178
  * right one, and a second would be a second conversation.
1179
+ *
1180
+ * @param link — The link this object talks to the host through.
1181
+ * @param window — The window it was reached through, or null for
1182
+ * the one the page is in.
1183
+ * @param session — The session it was reached through, or null for
1184
+ * the one on screen.
1179
1185
  */
1180
1186
  constructor(
1181
1187
  link: HostLink,
@@ -1187,17 +1193,30 @@ export class HostAppState extends HostObject {
1187
1193
  this.changed = new Signal("app.state.changed");
1188
1194
  }
1189
1195
 
1190
- /** One value, or `None`. */
1196
+ /**
1197
+ * One value, or `None`.
1198
+ *
1199
+ * @param key — The key to read the value of.
1200
+ */
1191
1201
  get(key: string): Promise<string | null> {
1192
1202
  return this.call<string | null>("get", { key });
1193
1203
  }
1194
1204
 
1195
- /** Store one value. */
1205
+ /**
1206
+ * Store one value.
1207
+ *
1208
+ * @param key — The key to store the value under.
1209
+ * @param value — The value to store.
1210
+ */
1196
1211
  set(key: string, value: string): Promise<void> {
1197
1212
  return this.call<void>("set", { key, value });
1198
1213
  }
1199
1214
 
1200
- /** Remove one key. */
1215
+ /**
1216
+ * Remove one key.
1217
+ *
1218
+ * @param key — The key to remove.
1219
+ */
1201
1220
  delete(key: string): Promise<void> {
1202
1221
  return this.call<void>("delete", { key });
1203
1222
  }
@@ -1223,6 +1242,12 @@ export class HostChatApprovals extends HostObject {
1223
1242
  *
1224
1243
  * A page never builds one of these: `bridge.host` is already the
1225
1244
  * right one, and a second would be a second conversation.
1245
+ *
1246
+ * @param link — The link this object talks to the host through.
1247
+ * @param window — The window it was reached through, or null for
1248
+ * the one the page is in.
1249
+ * @param session — The session it was reached through, or null for
1250
+ * the one on screen.
1226
1251
  */
1227
1252
  constructor(
1228
1253
  link: HostLink,
@@ -1237,12 +1262,22 @@ export class HostChatApprovals extends HostObject {
1237
1262
  this.changed = new Signal("chat.approvals.changed");
1238
1263
  }
1239
1264
 
1240
- /** Answer one request, as the person's dialog does. */
1265
+ /**
1266
+ * Answer one request, as the person's dialog does.
1267
+ *
1268
+ * @param requirement_id — The waiting request to answer, by its id.
1269
+ * @param action — `confirm` or `reject`.
1270
+ * @param choice — `once`, `always` or `similar`.
1271
+ */
1241
1272
  answer(requirement_id: string, action: string, choice?: string): Promise<void> {
1242
1273
  return this.call<void>("answer", { requirement_id, action, choice });
1243
1274
  }
1244
1275
 
1245
- /** Answer every request of a pause at once. */
1276
+ /**
1277
+ * Answer every request of a pause at once.
1278
+ *
1279
+ * @param answers — The answers to give, one per waiting request.
1280
+ */
1246
1281
  answer_all(answers: ApprovalAnswer[]): Promise<void> {
1247
1282
  return this.call<void>("answer_all", { answers });
1248
1283
  }
@@ -1264,6 +1299,12 @@ export class HostChatViews extends HostObject {
1264
1299
  *
1265
1300
  * A page never builds one of these: `bridge.host` is already the
1266
1301
  * right one, and a second would be a second conversation.
1302
+ *
1303
+ * @param link — The link this object talks to the host through.
1304
+ * @param window — The window it was reached through, or null for
1305
+ * the one the page is in.
1306
+ * @param session — The session it was reached through, or null for
1307
+ * the one on screen.
1267
1308
  */
1268
1309
  constructor(
1269
1310
  link: HostLink,
@@ -1276,7 +1317,13 @@ export class HostChatViews extends HostObject {
1276
1317
  this.action = new Signal("chat.views.action");
1277
1318
  }
1278
1319
 
1279
- /** Act on a view as if the person had. */
1320
+ /**
1321
+ * Act on a view as if the person had.
1322
+ *
1323
+ * @param view_id — The view the action was used on, by its id.
1324
+ * @param action — The control's action name.
1325
+ * @param params — The values the view attached to the action.
1326
+ */
1280
1327
  dispatch(view_id: string, action: string, params?: Record<string, JsonValue>): Promise<JsonValue> {
1281
1328
  return this.call<JsonValue>("dispatch", { view_id, action, params });
1282
1329
  }
@@ -1312,6 +1359,12 @@ export class HostApp extends HostObject {
1312
1359
  *
1313
1360
  * A page never builds one of these: `bridge.host` is already the
1314
1361
  * right one, and a second would be a second conversation.
1362
+ *
1363
+ * @param link — The link this object talks to the host through.
1364
+ * @param window — The window it was reached through, or null for
1365
+ * the one the page is in.
1366
+ * @param session — The session it was reached through, or null for
1367
+ * the one on screen.
1315
1368
  */
1316
1369
  constructor(
1317
1370
  link: HostLink,
@@ -1331,12 +1384,20 @@ export class HostApp extends HostObject {
1331
1384
  this.activity_changed = new Signal("app.activity_changed");
1332
1385
  }
1333
1386
 
1334
- /** Show or hide routing detail. */
1387
+ /**
1388
+ * Show or hide routing detail.
1389
+ *
1390
+ * @param on — Whether routing detail is shown.
1391
+ */
1335
1392
  set_verbose(on: boolean): Promise<Display> {
1336
1393
  return this.call<Display>("set_verbose", { on });
1337
1394
  }
1338
1395
 
1339
- /** Switch the output style, as `/output-style <name>` does. */
1396
+ /**
1397
+ * Switch the output style, as `/output-style <name>` does.
1398
+ *
1399
+ * @param name — The output style to switch to, by its name.
1400
+ */
1340
1401
  set_output_style(name: string): Promise<Display> {
1341
1402
  return this.call<Display>("set_output_style", { name });
1342
1403
  }
@@ -1346,7 +1407,11 @@ export class HostApp extends HostObject {
1346
1407
  return this.call<UpdateInfo | null>("check_for_update", {});
1347
1408
  }
1348
1409
 
1349
- /** Open an https link in the person's browser, the way igni opens every link outside it. The window asked about opens it: a page's own, else the active one. Anything but an absolute `https://` URL with a host and no credentials in it is refused (`invalid`). */
1410
+ /**
1411
+ * Open an https link in the person's browser, the way igni opens every link outside it. The window asked about opens it: a page's own, else the active one. Anything but an absolute `https://` URL with a host and no credentials in it is refused (`invalid`).
1412
+ *
1413
+ * @param url — The link: `https://` only.
1414
+ */
1350
1415
  open_external(url: string): Promise<void> {
1351
1416
  return this.call<void>("open_external", { url });
1352
1417
  }
@@ -1372,6 +1437,12 @@ export class HostWindows extends HostObject {
1372
1437
  *
1373
1438
  * A page never builds one of these: `bridge.host` is already the
1374
1439
  * right one, and a second would be a second conversation.
1440
+ *
1441
+ * @param link — The link this object talks to the host through.
1442
+ * @param window — The window it was reached through, or null for
1443
+ * the one the page is in.
1444
+ * @param session — The session it was reached through, or null for
1445
+ * the one on screen.
1375
1446
  */
1376
1447
  constructor(
1377
1448
  link: HostLink,
@@ -1386,7 +1457,11 @@ export class HostWindows extends HostObject {
1386
1457
  this.focus_changed = new Signal("windows.focus_changed");
1387
1458
  }
1388
1459
 
1389
- /** `host.ui` of one window, by its id. */
1460
+ /**
1461
+ * `host.ui` of one window, by its id.
1462
+ *
1463
+ * @param windowId — The window to reach, by its id.
1464
+ */
1390
1465
  ui(windowId: string): HostUi {
1391
1466
  return new HostUi(this.link, windowId);
1392
1467
  }
@@ -1442,6 +1517,12 @@ export class HostUi extends HostObject {
1442
1517
  *
1443
1518
  * A page never builds one of these: `bridge.host` is already the
1444
1519
  * right one, and a second would be a second conversation.
1520
+ *
1521
+ * @param link — The link this object talks to the host through.
1522
+ * @param window — The window it was reached through, or null for
1523
+ * the one the page is in.
1524
+ * @param session — The session it was reached through, or null for
1525
+ * the one on screen.
1445
1526
  */
1446
1527
  constructor(
1447
1528
  link: HostLink,
@@ -1471,7 +1552,12 @@ export class HostUi extends HostObject {
1471
1552
  this.scrolled = new Signal("ui.scrolled");
1472
1553
  }
1473
1554
 
1474
- /** Open a page at the top of the stack, as a header link does. */
1555
+ /**
1556
+ * Open a page at the top of the stack, as a header link does.
1557
+ *
1558
+ * @param page — A page kind: `plugins`, `extensions`, an extension's page.
1559
+ * @param params — The page's parameters.
1560
+ */
1475
1561
  navigate(page: string, params?: Record<string, string>): Promise<Page[]> {
1476
1562
  return this.call<Page[]>("navigate", { page, params });
1477
1563
  }
@@ -1481,7 +1567,12 @@ export class HostUi extends HostObject {
1481
1567
  return this.call<Page[]>("back", {});
1482
1568
  }
1483
1569
 
1484
- /** Open a panel over the chat, closing the one that was open. */
1570
+ /**
1571
+ * Open a panel over the chat, closing the one that was open.
1572
+ *
1573
+ * @param kind — `notifications`, `search`, `login` or `dir-picker`.
1574
+ * @param params — The panel's own parameters: what the panel shows, in the panel's own shape.
1575
+ */
1485
1576
  open_panel(kind: string, params?: Record<string, JsonValue>): Promise<Panel> {
1486
1577
  return this.call<Panel>("open_panel", { kind, params });
1487
1578
  }
@@ -1491,12 +1582,22 @@ export class HostUi extends HostObject {
1491
1582
  return this.call<void>("close_panel", {});
1492
1583
  }
1493
1584
 
1494
- /** Open or close the sidebar, and size it or bring a section into view. */
1585
+ /**
1586
+ * Open or close the sidebar, and size it or bring a section into view.
1587
+ *
1588
+ * @param open — Whether the sidebar is open.
1589
+ * @param width — In pixels, 180 to 600.
1590
+ * @param section — `links` or `sessions`.
1591
+ */
1495
1592
  set_sidebar(open: boolean, width?: number, section?: string): Promise<Sidebar> {
1496
1593
  return this.call<Sidebar>("set_sidebar", { open, width, section });
1497
1594
  }
1498
1595
 
1499
- /** Preview a file of the project. (`preview` is the property.) */
1596
+ /**
1597
+ * Preview a file of the project. (`preview` is the property.)
1598
+ *
1599
+ * @param path — The file to preview, by its path in the project.
1600
+ */
1500
1601
  open_preview(path: string): Promise<Preview> {
1501
1602
  return this.call<Preview>("open_preview", { path });
1502
1603
  }
@@ -1506,32 +1607,61 @@ export class HostUi extends HostObject {
1506
1607
  return this.call<void>("close_preview", {});
1507
1608
  }
1508
1609
 
1509
- /** Select a message, text or file. The parts left out are cleared. */
1610
+ /**
1611
+ * Select a message, text or file. The parts left out are cleared.
1612
+ *
1613
+ * @param selection — What is selected: a message, text or a file; the parts left out are cleared.
1614
+ */
1510
1615
  select(selection: SelectionState): Promise<SelectionState> {
1511
1616
  return this.call<SelectionState>("select", { selection });
1512
1617
  }
1513
1618
 
1514
- /** Replace the draft. */
1619
+ /**
1620
+ * Replace the draft.
1621
+ *
1622
+ * @param text — The draft to put in the composer.
1623
+ * @param attachments — Files to refer to: each becomes an `@path` the draft does not already have.
1624
+ * @param mode — `chat`, `command` or `shell`; unchanged if left out.
1625
+ */
1515
1626
  set_composer(text: string, attachments?: string[], mode?: string): Promise<Composer> {
1516
1627
  return this.call<Composer>("set_composer", { text, attachments, mode });
1517
1628
  }
1518
1629
 
1519
- /** Show a transient message, labelled as this extension's. */
1630
+ /**
1631
+ * Show a transient message, labelled as this extension's.
1632
+ *
1633
+ * @param text — The toast's first line.
1634
+ * @param kind — `info` (default), `success`, `warning`, `error`.
1635
+ * @param body — A second line.
1636
+ * @param target — Where clicking it goes.
1637
+ */
1520
1638
  toast(text: string, kind?: string, body?: string, target?: Page): Promise<Toast> {
1521
1639
  return this.call<Toast>("toast", { text, kind, body, target });
1522
1640
  }
1523
1641
 
1524
- /** Take one of this extension's toasts away. */
1642
+ /**
1643
+ * Take one of this extension's toasts away.
1644
+ *
1645
+ * @param toast_id — The toast to take away, by its id.
1646
+ */
1525
1647
  dismiss_toast(toast_id: string): Promise<void> {
1526
1648
  return this.call<void>("dismiss_toast", { toast_id });
1527
1649
  }
1528
1650
 
1529
- /** Show a dialog and wait for the person's answer. `spec` is `{title, body, buttons: [{id, label, primary}], input: {label, placeholder, value}}` — `buttons` defaults to one OK, `input` is optional. Answers `{button, value}`, or `None` when the dialog was dismissed, or replaced by another. (`dialog` is the property.) */
1651
+ /**
1652
+ * Show a dialog and wait for the person's answer. `spec` is `{title, body, buttons: [{id, label, primary}], input: {label, placeholder, value}}` — `buttons` defaults to one OK, `input` is optional. Answers `{button, value}`, or `None` when the dialog was dismissed, or replaced by another. (`dialog` is the property.)
1653
+ *
1654
+ * @param spec — The dialog to show: its title, body, buttons and input.
1655
+ */
1530
1656
  show_dialog(spec: JsonValue): Promise<JsonValue> {
1531
1657
  return this.call<JsonValue>("show_dialog", { spec });
1532
1658
  }
1533
1659
 
1534
- /** Scroll the transcript to a message, by its run; `bottom` for the newest. */
1660
+ /**
1661
+ * Scroll the transcript to a message, by its run; `bottom` for the newest.
1662
+ *
1663
+ * @param message_id — The message to scroll to, named by the run it belongs to; `bottom` for the newest.
1664
+ */
1535
1665
  scroll_to(message_id: string): Promise<Scroll> {
1536
1666
  return this.call<Scroll>("scroll_to", { message_id });
1537
1667
  }
@@ -1559,6 +1689,12 @@ export class HostSessions extends HostObject {
1559
1689
  *
1560
1690
  * A page never builds one of these: `bridge.host` is already the
1561
1691
  * right one, and a second would be a second conversation.
1692
+ *
1693
+ * @param link — The link this object talks to the host through.
1694
+ * @param window — The window it was reached through, or null for
1695
+ * the one the page is in.
1696
+ * @param session — The session it was reached through, or null for
1697
+ * the one on screen.
1562
1698
  */
1563
1699
  constructor(
1564
1700
  link: HostLink,
@@ -1574,22 +1710,41 @@ export class HostSessions extends HostObject {
1574
1710
  this.named = new Signal("sessions.named");
1575
1711
  }
1576
1712
 
1577
- /** Show a session in the active window. */
1713
+ /**
1714
+ * Show a session in the active window.
1715
+ *
1716
+ * @param session_id — The session to open, by its id.
1717
+ */
1578
1718
  open(session_id: string): Promise<SessionChange> {
1579
1719
  return this.call<SessionChange>("open", { session_id });
1580
1720
  }
1581
1721
 
1582
- /** Start a new session, in a folder or in this project. It moves no window unless `focus` is true: reach it with `host.sessions.chat(session_id)`. A `title` names it at once, kept as a service's chat title is, so no auto-name replaces it. */
1722
+ /**
1723
+ * Start a new session, in a folder or in this project. It moves no window unless `focus` is true: reach it with `host.sessions.chat(session_id)`. A `title` names it at once, kept as a service's chat title is, so no auto-name replaces it.
1724
+ *
1725
+ * @param project_dir — The folder the new session works in; this project when left out.
1726
+ * @param title — Its name in the session list.
1727
+ * @param focus — Show it in the caller's window — a page's own, else the active one. False by default.
1728
+ */
1583
1729
  create(project_dir?: string, title?: string, focus?: boolean): Promise<SessionAttached> {
1584
1730
  return this.call<SessionAttached>("create", { project_dir, title, focus });
1585
1731
  }
1586
1732
 
1587
- /** Make sure a session is live, without showing it. */
1733
+ /**
1734
+ * Make sure a session is live, without showing it.
1735
+ *
1736
+ * @param session_id — The session to make live, by its id.
1737
+ * @param project_dir — The folder the session works in; it must belong to that session.
1738
+ */
1588
1739
  attach(session_id: string, project_dir?: string): Promise<SessionAttached> {
1589
1740
  return this.call<SessionAttached>("attach", { session_id, project_dir });
1590
1741
  }
1591
1742
 
1592
- /** `host.chat` of any session of this project, by its id, without showing it. The session on screen's id is `host.chat` itself. */
1743
+ /**
1744
+ * `host.chat` of any session of this project, by its id, without showing it. The session on screen's id is `host.chat` itself.
1745
+ *
1746
+ * @param sessionId — The session to reach, by its id.
1747
+ */
1593
1748
  chat(sessionId: string): HostChat {
1594
1749
  return new HostChat(this.link, null, sessionId);
1595
1750
  }
@@ -1665,6 +1820,12 @@ export class HostChat extends HostObject {
1665
1820
  *
1666
1821
  * A page never builds one of these: `bridge.host` is already the
1667
1822
  * right one, and a second would be a second conversation.
1823
+ *
1824
+ * @param link — The link this object talks to the host through.
1825
+ * @param window — The window it was reached through, or null for
1826
+ * the one the page is in.
1827
+ * @param session — The session it was reached through, or null for
1828
+ * the one on screen.
1668
1829
  */
1669
1830
  constructor(
1670
1831
  link: HostLink,
@@ -1704,27 +1865,52 @@ export class HostChat extends HostObject {
1704
1865
  this.history_changed = new Signal("chat.history_changed");
1705
1866
  }
1706
1867
 
1707
- /** Post a message in the chat, labelled as this extension. The agent sees it and answers in the chat as usual. In a session that is not on screen it starts a run, or is queued for the run going there (working or waiting on an approval) — then without attachments. */
1868
+ /**
1869
+ * Post a message in the chat, labelled as this extension. The agent sees it and answers in the chat as usual. In a session that is not on screen it starts a run, or is queued for the run going there (working or waiting on an approval) — then without attachments.
1870
+ *
1871
+ * @param text — The message to post, labelled as this extension's.
1872
+ * @param attachments — Path → content.
1873
+ */
1708
1874
  post(text: string, attachments?: Record<string, string>): Promise<void> {
1709
1875
  return this.call<void>("post", { text, attachments });
1710
1876
  }
1711
1877
 
1712
- /** Post a message for the next turn, labelled as this extension. */
1878
+ /**
1879
+ * Post a message for the next turn, labelled as this extension.
1880
+ *
1881
+ * @param text — The message to queue for the next turn.
1882
+ */
1713
1883
  queue(text: string): Promise<void> {
1714
1884
  return this.call<void>("queue", { text });
1715
1885
  }
1716
1886
 
1717
- /** Show a json-render block in the transcript. Shown to the person, never sent to the model. Returns its id. */
1887
+ /**
1888
+ * Show a json-render block in the transcript. Shown to the person, never sent to the model. Returns its id.
1889
+ *
1890
+ * @param view — A json-render spec: `{root, elements}`.
1891
+ * @param title — The view's title, as it is shown in the transcript.
1892
+ */
1718
1893
  append(view: JsonValue, title?: string): Promise<string> {
1719
1894
  return this.call<string>("append", { view, title });
1720
1895
  }
1721
1896
 
1722
- /** Replace a block this extension appended. */
1897
+ /**
1898
+ * Replace a block this extension appended.
1899
+ *
1900
+ * @param view_id — The view to replace, by the id `append` returned.
1901
+ * @param view — The new json-render spec: `{root, elements}`.
1902
+ * @param title — The view's new title.
1903
+ */
1723
1904
  replace(view_id: string, view: JsonValue, title?: string): Promise<void> {
1724
1905
  return this.call<void>("replace", { view_id, view, title });
1725
1906
  }
1726
1907
 
1727
- /** Search the transcript. */
1908
+ /**
1909
+ * Search the transcript.
1910
+ *
1911
+ * @param query — The text to find in the transcript.
1912
+ * @param limit — At most this many; 50 by default.
1913
+ */
1728
1914
  search(query: string, limit?: number): Promise<JsonValue[]> {
1729
1915
  return this.call<JsonValue[]>("search", { query, limit });
1730
1916
  }
@@ -1734,12 +1920,20 @@ export class HostChat extends HostObject {
1734
1920
  return this.call<void>("cancel", {});
1735
1921
  }
1736
1922
 
1737
- /** Stop one sub-agent's run. */
1923
+ /**
1924
+ * Stop one sub-agent's run.
1925
+ *
1926
+ * @param run_id — The sub-agent's run to stop, by its id.
1927
+ */
1738
1928
  cancel_agent(run_id: string): Promise<void> {
1739
1929
  return this.call<void>("cancel_agent", { run_id });
1740
1930
  }
1741
1931
 
1742
- /** Remove a run and everything after it. */
1932
+ /**
1933
+ * Remove a run and everything after it.
1934
+ *
1935
+ * @param run_id — The run to remove, with every run after it.
1936
+ */
1743
1937
  truncate(run_id: string): Promise<JsonValue> {
1744
1938
  return this.call<JsonValue>("truncate", { run_id });
1745
1939
  }
@@ -1749,17 +1943,40 @@ export class HostChat extends HostObject {
1749
1943
  return this.call<SessionCleared | null>("compact", {});
1750
1944
  }
1751
1945
 
1752
- /** Have the agent note what a turn taught it. */
1946
+ /**
1947
+ * Have the agent note what a turn taught it.
1948
+ *
1949
+ * @param user_msg — The turn's message, the one the person wrote.
1950
+ * @param assistant_msg — The turn's answer, the one the agent gave.
1951
+ */
1753
1952
  extract_learnings(user_msg: string, assistant_msg: string): Promise<void> {
1754
1953
  return this.call<void>("extract_learnings", { user_msg, assistant_msg });
1755
1954
  }
1756
1955
 
1757
- /** Forget an interrupted run. */
1956
+ /**
1957
+ * Forget an interrupted run.
1958
+ *
1959
+ * @param message_id — The interrupted run to forget, named by the message that started it.
1960
+ */
1758
1961
  discard_interrupted(message_id: string): Promise<JsonValue> {
1759
1962
  return this.call<JsonValue>("discard_interrupted", { message_id });
1760
1963
  }
1761
1964
 
1762
- /** Upload an attachment for a later `post`. */
1965
+ /**
1966
+ * Forget a message whose run never finished.
1967
+ *
1968
+ * @param message_id — The pending message to forget, by its id.
1969
+ */
1970
+ discard_pending(message_id: string): Promise<JsonValue> {
1971
+ return this.call<JsonValue>("discard_pending", { message_id });
1972
+ }
1973
+
1974
+ /**
1975
+ * Upload an attachment for a later `post`.
1976
+ *
1977
+ * @param filename — The file's name, made safe for the disk.
1978
+ * @param content_base64 — The file's bytes, base64-encoded.
1979
+ */
1763
1980
  upload(filename: string, content_base64: string): Promise<JsonValue> {
1764
1981
  return this.call<JsonValue>("upload", { filename, content_base64 });
1765
1982
  }
@@ -1779,6 +1996,12 @@ export class HostPlan extends HostObject {
1779
1996
  *
1780
1997
  * A page never builds one of these: `bridge.host` is already the
1781
1998
  * right one, and a second would be a second conversation.
1999
+ *
2000
+ * @param link — The link this object talks to the host through.
2001
+ * @param window — The window it was reached through, or null for
2002
+ * the one the page is in.
2003
+ * @param session — The session it was reached through, or null for
2004
+ * the one on screen.
1782
2005
  */
1783
2006
  constructor(
1784
2007
  link: HostLink,
@@ -1790,12 +2013,20 @@ export class HostPlan extends HostObject {
1790
2013
  this.changed = new Signal("plan.changed");
1791
2014
  }
1792
2015
 
1793
- /** Approve the plan. */
2016
+ /**
2017
+ * Approve the plan.
2018
+ *
2019
+ * @param run_id — The run that submitted the plan.
2020
+ */
1794
2021
  approve(run_id?: string): Promise<PlanDecision> {
1795
2022
  return this.call<PlanDecision>("approve", { run_id });
1796
2023
  }
1797
2024
 
1798
- /** Send the plan back. */
2025
+ /**
2026
+ * Send the plan back.
2027
+ *
2028
+ * @param run_id — The run that submitted the plan.
2029
+ */
1799
2030
  dismiss(run_id?: string): Promise<PlanDecision> {
1800
2031
  return this.call<PlanDecision>("dismiss", { run_id });
1801
2032
  }
@@ -1823,6 +2054,12 @@ export class HostTasks extends HostObject {
1823
2054
  *
1824
2055
  * A page never builds one of these: `bridge.host` is already the
1825
2056
  * right one, and a second would be a second conversation.
2057
+ *
2058
+ * @param link — The link this object talks to the host through.
2059
+ * @param window — The window it was reached through, or null for
2060
+ * the one the page is in.
2061
+ * @param session — The session it was reached through, or null for
2062
+ * the one on screen.
1826
2063
  */
1827
2064
  constructor(
1828
2065
  link: HostLink,
@@ -1853,6 +2090,12 @@ export class HostLoop extends HostObject {
1853
2090
  *
1854
2091
  * A page never builds one of these: `bridge.host` is already the
1855
2092
  * right one, and a second would be a second conversation.
2093
+ *
2094
+ * @param link — The link this object talks to the host through.
2095
+ * @param window — The window it was reached through, or null for
2096
+ * the one the page is in.
2097
+ * @param session — The session it was reached through, or null for
2098
+ * the one on screen.
1856
2099
  */
1857
2100
  constructor(
1858
2101
  link: HostLink,
@@ -1903,6 +2146,12 @@ export class HostCommands extends HostObject {
1903
2146
  *
1904
2147
  * A page never builds one of these: `bridge.host` is already the
1905
2148
  * right one, and a second would be a second conversation.
2149
+ *
2150
+ * @param link — The link this object talks to the host through.
2151
+ * @param window — The window it was reached through, or null for
2152
+ * the one the page is in.
2153
+ * @param session — The session it was reached through, or null for
2154
+ * the one on screen.
1906
2155
  */
1907
2156
  constructor(
1908
2157
  link: HostLink,
@@ -1916,7 +2165,11 @@ export class HostCommands extends HostObject {
1916
2165
  this.skill_details = new Property(this, "skill_details", false);
1917
2166
  }
1918
2167
 
1919
- /** Run a slash command, as the extension. The answer comes back here. */
2168
+ /**
2169
+ * Run a slash command, as the extension. The answer comes back here.
2170
+ *
2171
+ * @param command — With its slash: `/ctx`.
2172
+ */
1920
2173
  run(command: string): Promise<CommandOutcome> {
1921
2174
  return this.call<CommandOutcome>("run", { command });
1922
2175
  }
@@ -1936,6 +2189,12 @@ export class HostAgents extends HostObject {
1936
2189
  *
1937
2190
  * A page never builds one of these: `bridge.host` is already the
1938
2191
  * right one, and a second would be a second conversation.
2192
+ *
2193
+ * @param link — The link this object talks to the host through.
2194
+ * @param window — The window it was reached through, or null for
2195
+ * the one the page is in.
2196
+ * @param session — The session it was reached through, or null for
2197
+ * the one on screen.
1939
2198
  */
1940
2199
  constructor(
1941
2200
  link: HostLink,
@@ -1947,12 +2206,21 @@ export class HostAgents extends HostObject {
1947
2206
  this.changed = new Signal("agents.changed");
1948
2207
  }
1949
2208
 
1950
- /** Keep an agent made for one task, as `/agents promote` does. */
2209
+ /**
2210
+ * Keep an agent made for one task, as `/agents promote` does.
2211
+ *
2212
+ * @param name — The agent to keep, by its name.
2213
+ * @param target — `project` (the default): `.igni/agents/`, committed and the team's, as `--project`; or `personal`: `.igni/agents.local/`, kept out of git and yours only, as `--personal`.
2214
+ */
1951
2215
  promote_ephemeral(name: string, target?: string): Promise<PromoteResult> {
1952
2216
  return this.call<PromoteResult>("promote_ephemeral", { name, target });
1953
2217
  }
1954
2218
 
1955
- /** Drop an agent made for one task. */
2219
+ /**
2220
+ * Drop an agent made for one task.
2221
+ *
2222
+ * @param name — The agent to drop, by its name.
2223
+ */
1956
2224
  discard_ephemeral(name: string): Promise<DiscardResult> {
1957
2225
  return this.call<DiscardResult>("discard_ephemeral", { name });
1958
2226
  }
@@ -1972,6 +2240,12 @@ export class HostWorkflows extends HostObject {
1972
2240
  *
1973
2241
  * A page never builds one of these: `bridge.host` is already the
1974
2242
  * right one, and a second would be a second conversation.
2243
+ *
2244
+ * @param link — The link this object talks to the host through.
2245
+ * @param window — The window it was reached through, or null for
2246
+ * the one the page is in.
2247
+ * @param session — The session it was reached through, or null for
2248
+ * the one on screen.
1975
2249
  */
1976
2250
  constructor(
1977
2251
  link: HostLink,
@@ -1983,12 +2257,21 @@ export class HostWorkflows extends HostObject {
1983
2257
  this.changed = new Signal("workflows.changed");
1984
2258
  }
1985
2259
 
1986
- /** Start a workflow. */
2260
+ /**
2261
+ * Start a workflow.
2262
+ *
2263
+ * @param name — The workflow to start, by its name.
2264
+ * @param input — The workflow's input, a JSON object it reads as it defines.
2265
+ */
1987
2266
  run(name: string, input?: Record<string, JsonValue>): Promise<WorkflowRun> {
1988
2267
  return this.call<WorkflowRun>("run", { name, input });
1989
2268
  }
1990
2269
 
1991
- /** Stop a workflow run. */
2270
+ /**
2271
+ * Stop a workflow run.
2272
+ *
2273
+ * @param workflow_run_id — The run to stop, by its id.
2274
+ */
1992
2275
  cancel(workflow_run_id: string): Promise<boolean> {
1993
2276
  return this.call<boolean>("cancel", { workflow_run_id });
1994
2277
  }
@@ -2008,6 +2291,12 @@ export class HostScheduler extends HostObject {
2008
2291
  *
2009
2292
  * A page never builds one of these: `bridge.host` is already the
2010
2293
  * right one, and a second would be a second conversation.
2294
+ *
2295
+ * @param link — The link this object talks to the host through.
2296
+ * @param window — The window it was reached through, or null for
2297
+ * the one the page is in.
2298
+ * @param session — The session it was reached through, or null for
2299
+ * the one on screen.
2011
2300
  */
2012
2301
  constructor(
2013
2302
  link: HostLink,
@@ -2024,12 +2313,20 @@ export class HostScheduler extends HostObject {
2024
2313
  return this.call<void>("start", {});
2025
2314
  }
2026
2315
 
2027
- /** Run a scheduled task now. */
2316
+ /**
2317
+ * Run a scheduled task now.
2318
+ *
2319
+ * @param task_id — The scheduled task to run now, by its id.
2320
+ */
2028
2321
  run_now(task_id: string): Promise<string> {
2029
2322
  return this.call<string>("run_now", { task_id });
2030
2323
  }
2031
2324
 
2032
- /** Cancel a scheduled task. */
2325
+ /**
2326
+ * Cancel a scheduled task.
2327
+ *
2328
+ * @param task_id — The scheduled task to cancel, by its id.
2329
+ */
2033
2330
  cancel(task_id: string): Promise<void> {
2034
2331
  return this.call<void>("cancel", { task_id });
2035
2332
  }
@@ -2049,6 +2346,12 @@ export class HostProcesses extends HostObject {
2049
2346
  *
2050
2347
  * A page never builds one of these: `bridge.host` is already the
2051
2348
  * right one, and a second would be a second conversation.
2349
+ *
2350
+ * @param link — The link this object talks to the host through.
2351
+ * @param window — The window it was reached through, or null for
2352
+ * the one the page is in.
2353
+ * @param session — The session it was reached through, or null for
2354
+ * the one on screen.
2052
2355
  */
2053
2356
  constructor(
2054
2357
  link: HostLink,
@@ -2060,17 +2363,30 @@ export class HostProcesses extends HostObject {
2060
2363
  this.changed = new Signal("processes.changed");
2061
2364
  }
2062
2365
 
2063
- /** A shell's last lines. */
2366
+ /**
2367
+ * A shell's last lines.
2368
+ *
2369
+ * @param pid — The shell to read the last lines of, by its process id.
2370
+ * @param lines — 200 by default.
2371
+ */
2064
2372
  tail(pid: number, lines?: number): Promise<ProcessTail> {
2065
2373
  return this.call<ProcessTail>("tail", { pid, lines });
2066
2374
  }
2067
2375
 
2068
- /** Stop a shell. */
2376
+ /**
2377
+ * Stop a shell.
2378
+ *
2379
+ * @param pid — The shell to stop, by its process id.
2380
+ */
2069
2381
  stop(pid: number): Promise<ProcessStop> {
2070
2382
  return this.call<ProcessStop>("stop", { pid });
2071
2383
  }
2072
2384
 
2073
- /** Run a command in the project and wait for it. */
2385
+ /**
2386
+ * Run a command in the project and wait for it.
2387
+ *
2388
+ * @param command — The command line to run in the project.
2389
+ */
2074
2390
  run(command: string): Promise<ShellResult> {
2075
2391
  return this.call<ShellResult>("run", { command });
2076
2392
  }
@@ -2094,6 +2410,12 @@ export class HostWorkspace extends HostObject {
2094
2410
  *
2095
2411
  * A page never builds one of these: `bridge.host` is already the
2096
2412
  * right one, and a second would be a second conversation.
2413
+ *
2414
+ * @param link — The link this object talks to the host through.
2415
+ * @param window — The window it was reached through, or null for
2416
+ * the one the page is in.
2417
+ * @param session — The session it was reached through, or null for
2418
+ * the one on screen.
2097
2419
  */
2098
2420
  constructor(
2099
2421
  link: HostLink,
@@ -2107,22 +2429,38 @@ export class HostWorkspace extends HostObject {
2107
2429
  this.files_changed = new Signal("workspace.files-changed");
2108
2430
  }
2109
2431
 
2110
- /** Read a file in the project. */
2432
+ /**
2433
+ * Read a file in the project.
2434
+ *
2435
+ * @param path — The file to read, by its path in the project.
2436
+ */
2111
2437
  read(path: string): Promise<JsonValue> {
2112
2438
  return this.call<JsonValue>("read", { path });
2113
2439
  }
2114
2440
 
2115
- /** List a directory in the project. */
2441
+ /**
2442
+ * List a directory in the project.
2443
+ *
2444
+ * @param dir — The directory to list, by its path in the project; the project itself when left out.
2445
+ */
2116
2446
  list(dir?: string): Promise<JsonValue> {
2117
2447
  return this.call<JsonValue>("list", { dir });
2118
2448
  }
2119
2449
 
2120
- /** Complete a path, as `@` does. */
2450
+ /**
2451
+ * Complete a path, as `@` does.
2452
+ *
2453
+ * @param prefix — The path typed so far after `@`.
2454
+ */
2121
2455
  complete(prefix: string): Promise<JsonValue> {
2122
2456
  return this.call<JsonValue>("complete", { prefix });
2123
2457
  }
2124
2458
 
2125
- /** Search the code. */
2459
+ /**
2460
+ * Search the code.
2461
+ *
2462
+ * @param query — The text to search the code for.
2463
+ */
2126
2464
  search(query: string): Promise<JsonValue> {
2127
2465
  return this.call<JsonValue>("search", { query });
2128
2466
  }
@@ -2132,7 +2470,11 @@ export class HostWorkspace extends HostObject {
2132
2470
  return this.call<JsonValue>("pick_dir", {});
2133
2471
  }
2134
2472
 
2135
- /** Open a file in the project with the application this machine opens it with — what an extension whose process is sandboxed cannot do itself. Only a file the workspace grant reaches (`refused` outside the project, `not_granted` outside `workspacePaths`), and only a document: `.csv`, `.gif`, `.htm`, `.html`, `.jpeg`, `.jpg`, `.md`, `.pdf`, `.png`, `.svg`, `.txt`, `.webp` (`invalid` otherwise, and for an executable file). `failed` when nothing here opened it. */
2473
+ /**
2474
+ * Open a file in the project with the application this machine opens it with — what an extension whose process is sandboxed cannot do itself. Only a file the workspace grant reaches (`refused` outside the project, `not_granted` outside `workspacePaths`), and only a document: `.csv`, `.gif`, `.htm`, `.html`, `.jpeg`, `.jpg`, `.md`, `.pdf`, `.png`, `.svg`, `.txt`, `.webp` (`invalid` otherwise, and for an executable file). `failed` when nothing here opened it.
2475
+ *
2476
+ * @param path — Relative to the project, or absolute inside it.
2477
+ */
2136
2478
  open(path: string): Promise<void> {
2137
2479
  return this.call<void>("open", { path });
2138
2480
  }
@@ -2154,6 +2496,12 @@ export class HostModels extends HostObject {
2154
2496
  *
2155
2497
  * A page never builds one of these: `bridge.host` is already the
2156
2498
  * right one, and a second would be a second conversation.
2499
+ *
2500
+ * @param link — The link this object talks to the host through.
2501
+ * @param window — The window it was reached through, or null for
2502
+ * the one the page is in.
2503
+ * @param session — The session it was reached through, or null for
2504
+ * the one on screen.
2157
2505
  */
2158
2506
  constructor(
2159
2507
  link: HostLink,
@@ -2185,6 +2533,12 @@ export class HostMcp extends HostObject {
2185
2533
  *
2186
2534
  * A page never builds one of these: `bridge.host` is already the
2187
2535
  * right one, and a second would be a second conversation.
2536
+ *
2537
+ * @param link — The link this object talks to the host through.
2538
+ * @param window — The window it was reached through, or null for
2539
+ * the one the page is in.
2540
+ * @param session — The session it was reached through, or null for
2541
+ * the one on screen.
2188
2542
  */
2189
2543
  constructor(
2190
2544
  link: HostLink,
@@ -2198,12 +2552,20 @@ export class HostMcp extends HostObject {
2198
2552
  this.changed = new Signal("mcp.changed");
2199
2553
  }
2200
2554
 
2201
- /** Connect a server. */
2555
+ /**
2556
+ * Connect a server.
2557
+ *
2558
+ * @param name — The server to connect, by its name in the MCP configuration.
2559
+ */
2202
2560
  connect(name: string): Promise<void> {
2203
2561
  return this.call<void>("connect", { name });
2204
2562
  }
2205
2563
 
2206
- /** Disconnect a server. */
2564
+ /**
2565
+ * Disconnect a server.
2566
+ *
2567
+ * @param name — The server to disconnect, by its name in the MCP configuration.
2568
+ */
2207
2569
  disconnect(name: string): Promise<void> {
2208
2570
  return this.call<void>("disconnect", { name });
2209
2571
  }
@@ -2213,7 +2575,13 @@ export class HostMcp extends HostObject {
2213
2575
  return this.call<McpInit>("ensure", {});
2214
2576
  }
2215
2577
 
2216
- /** Offer or withhold one tool. */
2578
+ /**
2579
+ * Offer or withhold one tool.
2580
+ *
2581
+ * @param server — The server the tool belongs to, by its name.
2582
+ * @param tool — The tool to offer or withhold, by its name.
2583
+ * @param on — Whether the tool is offered.
2584
+ */
2217
2585
  set_tool_enabled(server: string, tool: string, on: boolean): Promise<McpToolToggle> {
2218
2586
  return this.call<McpToolToggle>("set_tool_enabled", { server, tool, on });
2219
2587
  }
@@ -2235,6 +2603,12 @@ export class HostPlugins extends HostObject {
2235
2603
  *
2236
2604
  * A page never builds one of these: `bridge.host` is already the
2237
2605
  * right one, and a second would be a second conversation.
2606
+ *
2607
+ * @param link — The link this object talks to the host through.
2608
+ * @param window — The window it was reached through, or null for
2609
+ * the one the page is in.
2610
+ * @param session — The session it was reached through, or null for
2611
+ * the one on screen.
2238
2612
  */
2239
2613
  constructor(
2240
2614
  link: HostLink,
@@ -2247,47 +2621,88 @@ export class HostPlugins extends HostObject {
2247
2621
  this.changed = new Signal("plugins.changed");
2248
2622
  }
2249
2623
 
2250
- /** What a plugin carries. */
2624
+ /**
2625
+ * What a plugin carries.
2626
+ *
2627
+ * @param name — The installed plugin to describe, by its name.
2628
+ */
2251
2629
  contents(name: string): Promise<PluginContents> {
2252
2630
  return this.call<PluginContents>("contents", { name });
2253
2631
  }
2254
2632
 
2255
- /** What a plugin would install. */
2633
+ /**
2634
+ * What a plugin would install.
2635
+ *
2636
+ * @param source — The plugin's git URL, optionally followed by a subfolder.
2637
+ * @param branch — The branch, tag or commit to read; the default branch when left out.
2638
+ * @param subdir — The plugin's folder inside the repository, which wins over one in `source`.
2639
+ */
2256
2640
  preview(source: string, branch?: string, subdir?: string): Promise<PluginContents> {
2257
2641
  return this.call<PluginContents>("preview", { source, branch, subdir });
2258
2642
  }
2259
2643
 
2260
- /** Install a plugin. */
2644
+ /**
2645
+ * Install a plugin.
2646
+ *
2647
+ * @param ref — The plugin to install: a git URL or `@<marketplace>/<plugin>`.
2648
+ * @param install_ref — The branch, tag or commit to check out; the marketplace's, or the default branch, when left out.
2649
+ */
2261
2650
  install(ref: string, install_ref?: string): Promise<void> {
2262
2651
  return this.call<void>("install", { ref, install_ref });
2263
2652
  }
2264
2653
 
2265
- /** Update a plugin. */
2654
+ /**
2655
+ * Update a plugin.
2656
+ *
2657
+ * @param name — The installed plugin to move, by its name.
2658
+ * @param install_ref — The branch, tag or commit to move to; the remote's default branch when left out.
2659
+ */
2266
2660
  update(name: string, install_ref?: string): Promise<void> {
2267
2661
  return this.call<void>("update", { name, install_ref });
2268
2662
  }
2269
2663
 
2270
- /** Remove a plugin. */
2664
+ /**
2665
+ * Remove a plugin.
2666
+ *
2667
+ * @param name — The installed plugin to remove, by its name.
2668
+ */
2271
2669
  remove(name: string): Promise<void> {
2272
2670
  return this.call<void>("remove", { name });
2273
2671
  }
2274
2672
 
2275
- /** Enable or disable a plugin. */
2673
+ /**
2674
+ * Enable or disable a plugin.
2675
+ *
2676
+ * @param name — The installed plugin to switch on or off, by its name.
2677
+ * @param on — Whether the plugin is enabled.
2678
+ */
2276
2679
  set_enabled(name: string, on: boolean): Promise<void> {
2277
2680
  return this.call<void>("set_enabled", { name, on });
2278
2681
  }
2279
2682
 
2280
- /** Add a marketplace. */
2683
+ /**
2684
+ * Add a marketplace.
2685
+ *
2686
+ * @param url — The marketplace's git URL.
2687
+ */
2281
2688
  add_marketplace(url: string): Promise<void> {
2282
2689
  return this.call<void>("add_marketplace", { url });
2283
2690
  }
2284
2691
 
2285
- /** Remove a marketplace. */
2692
+ /**
2693
+ * Remove a marketplace.
2694
+ *
2695
+ * @param name — The marketplace to forget, by its name.
2696
+ */
2286
2697
  remove_marketplace(name: string): Promise<void> {
2287
2698
  return this.call<void>("remove_marketplace", { name });
2288
2699
  }
2289
2700
 
2290
- /** Refresh marketplaces. */
2701
+ /**
2702
+ * Refresh marketplaces.
2703
+ *
2704
+ * @param name — The marketplace to fetch again; every one of them when left out.
2705
+ */
2291
2706
  refresh_marketplaces(name?: string): Promise<void> {
2292
2707
  return this.call<void>("refresh_marketplaces", { name });
2293
2708
  }
@@ -2307,6 +2722,12 @@ export class HostExtensions extends HostObject {
2307
2722
  *
2308
2723
  * A page never builds one of these: `bridge.host` is already the
2309
2724
  * right one, and a second would be a second conversation.
2725
+ *
2726
+ * @param link — The link this object talks to the host through.
2727
+ * @param window — The window it was reached through, or null for
2728
+ * the one the page is in.
2729
+ * @param session — The session it was reached through, or null for
2730
+ * the one on screen.
2310
2731
  */
2311
2732
  constructor(
2312
2733
  link: HostLink,
@@ -2318,7 +2739,11 @@ export class HostExtensions extends HostObject {
2318
2739
  this.state_changed = new Signal("extension.state-changed");
2319
2740
  }
2320
2741
 
2321
- /** Change this extension's own settings. */
2742
+ /**
2743
+ * Change this extension's own settings.
2744
+ *
2745
+ * @param values — The settings to change, as key to value.
2746
+ */
2322
2747
  set_settings(values: Record<string, JsonValue>): Promise<SettingsChange> {
2323
2748
  return this.call<SettingsChange>("set_settings", { values });
2324
2749
  }
@@ -2338,6 +2763,12 @@ export class HostHooks extends HostObject {
2338
2763
  *
2339
2764
  * A page never builds one of these: `bridge.host` is already the
2340
2765
  * right one, and a second would be a second conversation.
2766
+ *
2767
+ * @param link — The link this object talks to the host through.
2768
+ * @param window — The window it was reached through, or null for
2769
+ * the one the page is in.
2770
+ * @param session — The session it was reached through, or null for
2771
+ * the one on screen.
2341
2772
  */
2342
2773
  constructor(
2343
2774
  link: HostLink,
@@ -2374,6 +2805,12 @@ export class HostPermissions extends HostObject {
2374
2805
  *
2375
2806
  * A page never builds one of these: `bridge.host` is already the
2376
2807
  * right one, and a second would be a second conversation.
2808
+ *
2809
+ * @param link — The link this object talks to the host through.
2810
+ * @param window — The window it was reached through, or null for
2811
+ * the one the page is in.
2812
+ * @param session — The session it was reached through, or null for
2813
+ * the one on screen.
2377
2814
  */
2378
2815
  constructor(
2379
2816
  link: HostLink,
@@ -2385,12 +2822,23 @@ export class HostPermissions extends HostObject {
2385
2822
  this.mode_changed = new Signal("permissions.mode_changed");
2386
2823
  }
2387
2824
 
2388
- /** Would this tool call be allowed, asked or denied? One of `allow`, `ask` or `deny`. */
2825
+ /**
2826
+ * Would this tool call be allowed, asked or denied? One of `allow`, `ask` or `deny`.
2827
+ *
2828
+ * @param tool_name — The tool the call would use, by its name.
2829
+ * @param func_name — The function of that tool the call would reach.
2830
+ * @param tool_args — The call's arguments, which argument rules match against.
2831
+ */
2389
2832
  check(tool_name: string, func_name: string, tool_args?: Record<string, JsonValue>): Promise<string> {
2390
2833
  return this.call<string>("check", { tool_name, func_name, tool_args });
2391
2834
  }
2392
2835
 
2393
- /** Save a permission rule. */
2836
+ /**
2837
+ * Save a permission rule.
2838
+ *
2839
+ * @param rule — The rule to save: `Bash(git status)`, a tool name.
2840
+ * @param level — `allow`, `ask` or `deny`.
2841
+ */
2394
2842
  save_rule(rule: string, level: string): Promise<void> {
2395
2843
  return this.call<void>("save_rule", { rule, level });
2396
2844
  }
@@ -2408,6 +2856,12 @@ export class HostPolicy extends HostObject {
2408
2856
  *
2409
2857
  * A page never builds one of these: `bridge.host` is already the
2410
2858
  * right one, and a second would be a second conversation.
2859
+ *
2860
+ * @param link — The link this object talks to the host through.
2861
+ * @param window — The window it was reached through, or null for
2862
+ * the one the page is in.
2863
+ * @param session — The session it was reached through, or null for
2864
+ * the one on screen.
2411
2865
  */
2412
2866
  constructor(
2413
2867
  link: HostLink,
@@ -2433,6 +2887,12 @@ export class HostAccount extends HostObject {
2433
2887
  *
2434
2888
  * A page never builds one of these: `bridge.host` is already the
2435
2889
  * right one, and a second would be a second conversation.
2890
+ *
2891
+ * @param link — The link this object talks to the host through.
2892
+ * @param window — The window it was reached through, or null for
2893
+ * the one the page is in.
2894
+ * @param session — The session it was reached through, or null for
2895
+ * the one on screen.
2436
2896
  */
2437
2897
  constructor(
2438
2898
  link: HostLink,
@@ -2471,6 +2931,12 @@ export class HostNotifications extends HostObject {
2471
2931
  *
2472
2932
  * A page never builds one of these: `bridge.host` is already the
2473
2933
  * right one, and a second would be a second conversation.
2934
+ *
2935
+ * @param link — The link this object talks to the host through.
2936
+ * @param window — The window it was reached through, or null for
2937
+ * the one the page is in.
2938
+ * @param session — The session it was reached through, or null for
2939
+ * the one on screen.
2474
2940
  */
2475
2941
  constructor(
2476
2942
  link: HostLink,
@@ -2483,12 +2949,21 @@ export class HostNotifications extends HostObject {
2483
2949
  this.changed = new Signal("notifications.changed");
2484
2950
  }
2485
2951
 
2486
- /** Tell the person at this machine something. It never leaves the machine. */
2952
+ /**
2953
+ * Tell the person at this machine something. It never leaves the machine.
2954
+ *
2955
+ * @param notification — What to tell the person at this machine.
2956
+ */
2487
2957
  notify(notification: LocalNotification): Promise<void> {
2488
2958
  return this.call<void>("notify", { notification });
2489
2959
  }
2490
2960
 
2491
- /** Mark notifications read: these ids, one source, or all of them. */
2961
+ /**
2962
+ * Mark notifications read: these ids, one source, or all of them.
2963
+ *
2964
+ * @param ids — The notifications to mark read, by their ids.
2965
+ * @param source — The source whose notifications to mark read; every one of them when left out.
2966
+ */
2492
2967
  mark_read(ids?: string[], source?: string): Promise<NotificationCounts> {
2493
2968
  return this.call<NotificationCounts>("mark_read", { ids, source });
2494
2969
  }
@@ -2516,6 +2991,12 @@ export class HostSelf extends HostObject {
2516
2991
  *
2517
2992
  * A page never builds one of these: `bridge.host` is already the
2518
2993
  * right one, and a second would be a second conversation.
2994
+ *
2995
+ * @param link — The link this object talks to the host through.
2996
+ * @param window — The window it was reached through, or null for
2997
+ * the one the page is in.
2998
+ * @param session — The session it was reached through, or null for
2999
+ * the one on screen.
2519
3000
  */
2520
3001
  constructor(
2521
3002
  link: HostLink,
@@ -2531,12 +3012,21 @@ export class HostSelf extends HostObject {
2531
3012
  this.state_changed = new Signal("self.state_changed");
2532
3013
  }
2533
3014
 
2534
- /** Say this extension is working inside igni's process, so the process is not suspended under it (in the cloud, its VM). A lease for `reason`: it expires after `ttl_seconds` (default and at most 600) unless renewed by calling again with the same reason, so an extension that stops answering cannot keep igni awake. Shown in `app.activity`'s `busy`. */
3015
+ /**
3016
+ * Say this extension is working inside igni's process, so the process is not suspended under it (in the cloud, its VM). A lease for `reason`: it expires after `ttl_seconds` (default and at most 600) unless renewed by calling again with the same reason, so an extension that stops answering cannot keep igni awake. Shown in `app.activity`'s `busy`.
3017
+ *
3018
+ * @param reason — Why the extension is working inside igni's process.
3019
+ * @param ttl_seconds — Default and at most 600.
3020
+ */
2535
3021
  busy(reason: string, ttl_seconds?: number): Promise<BusyLease> {
2536
3022
  return this.call<BusyLease>("busy", { reason, ttl_seconds });
2537
3023
  }
2538
3024
 
2539
- /** Let go of the lease `busy` took for `reason`. Nothing happens if there is none. */
3025
+ /**
3026
+ * Let go of the lease `busy` took for `reason`. Nothing happens if there is none.
3027
+ *
3028
+ * @param reason — The reason the lease was taken for.
3029
+ */
2540
3030
  done(reason: string): Promise<void> {
2541
3031
  return this.call<void>("done", { reason });
2542
3032
  }
@@ -2602,6 +3092,12 @@ export class Host extends HostObject {
2602
3092
  *
2603
3093
  * A page never builds one of these: `bridge.host` is already the
2604
3094
  * right one, and a second would be a second conversation.
3095
+ *
3096
+ * @param link — The link this object talks to the host through.
3097
+ * @param window — The window it was reached through, or null for
3098
+ * the one the page is in.
3099
+ * @param session — The session it was reached through, or null for
3100
+ * the one on screen.
2605
3101
  */
2606
3102
  constructor(
2607
3103
  link: HostLink,
@@ -2636,12 +3132,22 @@ export class Host extends HostObject {
2636
3132
  this.changed = new Signal("changed");
2637
3133
  }
2638
3134
 
2639
- /** Ask igni's local decision model (Laya) typed questions about a context, in one pass on this machine. `context` is named text fields — at most 8, 6,000 characters in all — that the questions quote in backticks; `questions` are 1–16 `DecisionQuestion`s. A context the model would have to cut is refused (`invalid`), never answered from part of it; a model that cannot be loaded answers `unavailable`. Zero-shot accuracy is modest: measure it on your own data before acting on an answer, and use the probabilities, not just the answer. */
3135
+ /**
3136
+ * Ask igni's local decision model (Laya) typed questions about a context, in one pass on this machine. `context` is named text fields — at most 8, 6,000 characters in all — that the questions quote in backticks; `questions` are 1–16 `DecisionQuestion`s. A context the model would have to cut is refused (`invalid`), never answered from part of it; a model that cannot be loaded answers `unavailable`. Zero-shot accuracy is modest: measure it on your own data before acting on an answer, and use the probabilities, not just the answer.
3137
+ *
3138
+ * @param context — Named text fields.
3139
+ * @param questions — The questions to ask, each with its own text and answer type.
3140
+ */
2640
3141
  decide(context: Record<string, string>, questions: DecisionQuestion[]): Promise<Decision> {
2641
3142
  return this.call<Decision>("decide", { context, questions });
2642
3143
  }
2643
3144
 
2644
- /** `decide` for up to 16 contexts at once, sharing forward passes. One decision per context, in order. */
3145
+ /**
3146
+ * `decide` for up to 16 contexts at once, sharing forward passes. One decision per context, in order.
3147
+ *
3148
+ * @param contexts — The contexts to ask about, one decision each, in order.
3149
+ * @param questions — The questions to ask of every context.
3150
+ */
2645
3151
  decide_batch(contexts: (Record<string, string>)[], questions: DecisionQuestion[]): Promise<Decision[]> {
2646
3152
  return this.call<Decision[]>("decide_batch", { contexts, questions });
2647
3153
  }