@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.
@@ -1046,13 +1046,32 @@ export declare class HostAppState extends HostObject {
1046
1046
  *
1047
1047
  * A page never builds one of these: `bridge.host` is already the
1048
1048
  * right one, and a second would be a second conversation.
1049
+ *
1050
+ * @param link — The link this object talks to the host through.
1051
+ * @param window — The window it was reached through, or null for
1052
+ * the one the page is in.
1053
+ * @param session — The session it was reached through, or null for
1054
+ * the one on screen.
1049
1055
  */
1050
1056
  constructor(link: HostLink, window?: string | null, session?: string | null);
1051
- /** One value, or `None`. */
1057
+ /**
1058
+ * One value, or `None`.
1059
+ *
1060
+ * @param key — The key to read the value of.
1061
+ */
1052
1062
  get(key: string): Promise<string | null>;
1053
- /** Store one value. */
1063
+ /**
1064
+ * Store one value.
1065
+ *
1066
+ * @param key — The key to store the value under.
1067
+ * @param value — The value to store.
1068
+ */
1054
1069
  set(key: string, value: string): Promise<void>;
1055
- /** Remove one key. */
1070
+ /**
1071
+ * Remove one key.
1072
+ *
1073
+ * @param key — The key to remove.
1074
+ */
1056
1075
  delete(key: string): Promise<void>;
1057
1076
  }
1058
1077
  /** The agent asking to act, and the answers. Through `host.sessions.chat(id)` `waiting` reads that session; an approval is answered only in the session on screen. */
@@ -1074,11 +1093,27 @@ export declare class HostChatApprovals extends HostObject {
1074
1093
  *
1075
1094
  * A page never builds one of these: `bridge.host` is already the
1076
1095
  * right one, and a second would be a second conversation.
1096
+ *
1097
+ * @param link — The link this object talks to the host through.
1098
+ * @param window — The window it was reached through, or null for
1099
+ * the one the page is in.
1100
+ * @param session — The session it was reached through, or null for
1101
+ * the one on screen.
1077
1102
  */
1078
1103
  constructor(link: HostLink, window?: string | null, session?: string | null);
1079
- /** Answer one request, as the person's dialog does. */
1104
+ /**
1105
+ * Answer one request, as the person's dialog does.
1106
+ *
1107
+ * @param requirement_id — The waiting request to answer, by its id.
1108
+ * @param action — `confirm` or `reject`.
1109
+ * @param choice — `once`, `always` or `similar`.
1110
+ */
1080
1111
  answer(requirement_id: string, action: string, choice?: string): Promise<void>;
1081
- /** Answer every request of a pause at once. */
1112
+ /**
1113
+ * Answer every request of a pause at once.
1114
+ *
1115
+ * @param answers — The answers to give, one per waiting request.
1116
+ */
1082
1117
  answer_all(answers: ApprovalAnswer[]): Promise<void>;
1083
1118
  }
1084
1119
  /** json-render blocks in the transcript — the visualizer's and extensions'. Through `host.sessions.chat(id)` `list` reads that session; `dispatch` acts only in the session on screen. */
@@ -1096,9 +1131,21 @@ export declare class HostChatViews extends HostObject {
1096
1131
  *
1097
1132
  * A page never builds one of these: `bridge.host` is already the
1098
1133
  * right one, and a second would be a second conversation.
1134
+ *
1135
+ * @param link — The link this object talks to the host through.
1136
+ * @param window — The window it was reached through, or null for
1137
+ * the one the page is in.
1138
+ * @param session — The session it was reached through, or null for
1139
+ * the one on screen.
1099
1140
  */
1100
1141
  constructor(link: HostLink, window?: string | null, session?: string | null);
1101
- /** Act on a view as if the person had. */
1142
+ /**
1143
+ * Act on a view as if the person had.
1144
+ *
1145
+ * @param view_id — The view the action was used on, by its id.
1146
+ * @param action — The control's action name.
1147
+ * @param params — The values the view attached to the action.
1148
+ */
1102
1149
  dispatch(view_id: string, action: string, params?: Record<string, JsonValue>): Promise<JsonValue>;
1103
1150
  }
1104
1151
  /** igni itself: how it presents things, which version, whether it is connected. */
@@ -1130,15 +1177,33 @@ export declare class HostApp extends HostObject {
1130
1177
  *
1131
1178
  * A page never builds one of these: `bridge.host` is already the
1132
1179
  * right one, and a second would be a second conversation.
1180
+ *
1181
+ * @param link — The link this object talks to the host through.
1182
+ * @param window — The window it was reached through, or null for
1183
+ * the one the page is in.
1184
+ * @param session — The session it was reached through, or null for
1185
+ * the one on screen.
1133
1186
  */
1134
1187
  constructor(link: HostLink, window?: string | null, session?: string | null);
1135
- /** Show or hide routing detail. */
1188
+ /**
1189
+ * Show or hide routing detail.
1190
+ *
1191
+ * @param on — Whether routing detail is shown.
1192
+ */
1136
1193
  set_verbose(on: boolean): Promise<Display>;
1137
- /** Switch the output style, as `/output-style <name>` does. */
1194
+ /**
1195
+ * Switch the output style, as `/output-style <name>` does.
1196
+ *
1197
+ * @param name — The output style to switch to, by its name.
1198
+ */
1138
1199
  set_output_style(name: string): Promise<Display>;
1139
1200
  /** Ask whether a newer igni exists: `None` when none does. A check that could not reach an answer (offline, an HTTP error, an unreadable reply) is refused (`refused`) rather than answered `None`. */
1140
1201
  check_for_update(): Promise<UpdateInfo | null>;
1141
- /** 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`). */
1202
+ /**
1203
+ * 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`).
1204
+ *
1205
+ * @param url — The link: `https://` only.
1206
+ */
1142
1207
  open_external(url: string): Promise<void>;
1143
1208
  }
1144
1209
  /** Every open igni window. Address one window's UI with `host.windows.ui(id)`. */
@@ -1160,9 +1225,19 @@ export declare class HostWindows extends HostObject {
1160
1225
  *
1161
1226
  * A page never builds one of these: `bridge.host` is already the
1162
1227
  * right one, and a second would be a second conversation.
1228
+ *
1229
+ * @param link — The link this object talks to the host through.
1230
+ * @param window — The window it was reached through, or null for
1231
+ * the one the page is in.
1232
+ * @param session — The session it was reached through, or null for
1233
+ * the one on screen.
1163
1234
  */
1164
1235
  constructor(link: HostLink, window?: string | null, session?: string | null);
1165
- /** `host.ui` of one window, by its id. */
1236
+ /**
1237
+ * `host.ui` of one window, by its id.
1238
+ *
1239
+ * @param windowId — The window to reach, by its id.
1240
+ */
1166
1241
  ui(windowId: string): HostUi;
1167
1242
  }
1168
1243
  /** What a window shows — the model its views bind to. `host.ui` is the active window, the one the person last used; `host.windows.ui(id)` any window. igni's own views write here too, by the same path, so every change below is a signal whoever made it. */
@@ -1214,33 +1289,88 @@ export declare class HostUi extends HostObject {
1214
1289
  *
1215
1290
  * A page never builds one of these: `bridge.host` is already the
1216
1291
  * right one, and a second would be a second conversation.
1292
+ *
1293
+ * @param link — The link this object talks to the host through.
1294
+ * @param window — The window it was reached through, or null for
1295
+ * the one the page is in.
1296
+ * @param session — The session it was reached through, or null for
1297
+ * the one on screen.
1217
1298
  */
1218
1299
  constructor(link: HostLink, window?: string | null, session?: string | null);
1219
- /** Open a page at the top of the stack, as a header link does. */
1300
+ /**
1301
+ * Open a page at the top of the stack, as a header link does.
1302
+ *
1303
+ * @param page — A page kind: `plugins`, `extensions`, an extension's page.
1304
+ * @param params — The page's parameters.
1305
+ */
1220
1306
  navigate(page: string, params?: Record<string, string>): Promise<Page[]>;
1221
1307
  /** Go back one level; at the root, back to the chat. */
1222
1308
  back(): Promise<Page[]>;
1223
- /** Open a panel over the chat, closing the one that was open. */
1309
+ /**
1310
+ * Open a panel over the chat, closing the one that was open.
1311
+ *
1312
+ * @param kind — `notifications`, `search`, `login` or `dir-picker`.
1313
+ * @param params — The panel's own parameters: what the panel shows, in the panel's own shape.
1314
+ */
1224
1315
  open_panel(kind: string, params?: Record<string, JsonValue>): Promise<Panel>;
1225
1316
  /** Close the panel. */
1226
1317
  close_panel(): Promise<void>;
1227
- /** Open or close the sidebar, and size it or bring a section into view. */
1318
+ /**
1319
+ * Open or close the sidebar, and size it or bring a section into view.
1320
+ *
1321
+ * @param open — Whether the sidebar is open.
1322
+ * @param width — In pixels, 180 to 600.
1323
+ * @param section — `links` or `sessions`.
1324
+ */
1228
1325
  set_sidebar(open: boolean, width?: number, section?: string): Promise<Sidebar>;
1229
- /** Preview a file of the project. (`preview` is the property.) */
1326
+ /**
1327
+ * Preview a file of the project. (`preview` is the property.)
1328
+ *
1329
+ * @param path — The file to preview, by its path in the project.
1330
+ */
1230
1331
  open_preview(path: string): Promise<Preview>;
1231
1332
  /** Close the preview. */
1232
1333
  close_preview(): Promise<void>;
1233
- /** Select a message, text or file. The parts left out are cleared. */
1334
+ /**
1335
+ * Select a message, text or file. The parts left out are cleared.
1336
+ *
1337
+ * @param selection — What is selected: a message, text or a file; the parts left out are cleared.
1338
+ */
1234
1339
  select(selection: SelectionState): Promise<SelectionState>;
1235
- /** Replace the draft. */
1340
+ /**
1341
+ * Replace the draft.
1342
+ *
1343
+ * @param text — The draft to put in the composer.
1344
+ * @param attachments — Files to refer to: each becomes an `@path` the draft does not already have.
1345
+ * @param mode — `chat`, `command` or `shell`; unchanged if left out.
1346
+ */
1236
1347
  set_composer(text: string, attachments?: string[], mode?: string): Promise<Composer>;
1237
- /** Show a transient message, labelled as this extension's. */
1348
+ /**
1349
+ * Show a transient message, labelled as this extension's.
1350
+ *
1351
+ * @param text — The toast's first line.
1352
+ * @param kind — `info` (default), `success`, `warning`, `error`.
1353
+ * @param body — A second line.
1354
+ * @param target — Where clicking it goes.
1355
+ */
1238
1356
  toast(text: string, kind?: string, body?: string, target?: Page): Promise<Toast>;
1239
- /** Take one of this extension's toasts away. */
1357
+ /**
1358
+ * Take one of this extension's toasts away.
1359
+ *
1360
+ * @param toast_id — The toast to take away, by its id.
1361
+ */
1240
1362
  dismiss_toast(toast_id: string): Promise<void>;
1241
- /** 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.) */
1363
+ /**
1364
+ * 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.)
1365
+ *
1366
+ * @param spec — The dialog to show: its title, body, buttons and input.
1367
+ */
1242
1368
  show_dialog(spec: JsonValue): Promise<JsonValue>;
1243
- /** Scroll the transcript to a message, by its run; `bottom` for the newest. */
1369
+ /**
1370
+ * Scroll the transcript to a message, by its run; `bottom` for the newest.
1371
+ *
1372
+ * @param message_id — The message to scroll to, named by the run it belongs to; `bottom` for the newest.
1373
+ */
1244
1374
  scroll_to(message_id: string): Promise<Scroll>;
1245
1375
  }
1246
1376
  /** The sessions of this project, and which one the active window shows. Reach any session's chat, without showing it, with `host.sessions.chat(id)`. */
@@ -1264,15 +1394,40 @@ export declare class HostSessions extends HostObject {
1264
1394
  *
1265
1395
  * A page never builds one of these: `bridge.host` is already the
1266
1396
  * right one, and a second would be a second conversation.
1397
+ *
1398
+ * @param link — The link this object talks to the host through.
1399
+ * @param window — The window it was reached through, or null for
1400
+ * the one the page is in.
1401
+ * @param session — The session it was reached through, or null for
1402
+ * the one on screen.
1267
1403
  */
1268
1404
  constructor(link: HostLink, window?: string | null, session?: string | null);
1269
- /** Show a session in the active window. */
1405
+ /**
1406
+ * Show a session in the active window.
1407
+ *
1408
+ * @param session_id — The session to open, by its id.
1409
+ */
1270
1410
  open(session_id: string): Promise<SessionChange>;
1271
- /** 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. */
1411
+ /**
1412
+ * 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.
1413
+ *
1414
+ * @param project_dir — The folder the new session works in; this project when left out.
1415
+ * @param title — Its name in the session list.
1416
+ * @param focus — Show it in the caller's window — a page's own, else the active one. False by default.
1417
+ */
1272
1418
  create(project_dir?: string, title?: string, focus?: boolean): Promise<SessionAttached>;
1273
- /** Make sure a session is live, without showing it. */
1419
+ /**
1420
+ * Make sure a session is live, without showing it.
1421
+ *
1422
+ * @param session_id — The session to make live, by its id.
1423
+ * @param project_dir — The folder the session works in; it must belong to that session.
1424
+ */
1274
1425
  attach(session_id: string, project_dir?: string): Promise<SessionAttached>;
1275
- /** `host.chat` of any session of this project, by its id, without showing it. The session on screen's id is `host.chat` itself. */
1426
+ /**
1427
+ * `host.chat` of any session of this project, by its id, without showing it. The session on screen's id is `host.chat` itself.
1428
+ *
1429
+ * @param sessionId — The session to reach, by its id.
1430
+ */
1276
1431
  chat(sessionId: string): HostChat;
1277
1432
  }
1278
1433
  /** The conversation in the current session. Signals carry the session they happened in, and arrive for every live session. `host.sessions.chat(id)` is the same object for any session of this project, without showing it: its properties read that session, and `post`, `queue`, `append` and `replace` write there (with `sessions.post` as well). A message posted there starts a run, or waits for the run already going there — never answering an approval. Its other methods act only on the session on screen. */
@@ -1344,31 +1499,90 @@ export declare class HostChat extends HostObject {
1344
1499
  *
1345
1500
  * A page never builds one of these: `bridge.host` is already the
1346
1501
  * right one, and a second would be a second conversation.
1502
+ *
1503
+ * @param link — The link this object talks to the host through.
1504
+ * @param window — The window it was reached through, or null for
1505
+ * the one the page is in.
1506
+ * @param session — The session it was reached through, or null for
1507
+ * the one on screen.
1347
1508
  */
1348
1509
  constructor(link: HostLink, window?: string | null, session?: string | null);
1349
- /** 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. */
1510
+ /**
1511
+ * 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.
1512
+ *
1513
+ * @param text — The message to post, labelled as this extension's.
1514
+ * @param attachments — Path → content.
1515
+ */
1350
1516
  post(text: string, attachments?: Record<string, string>): Promise<void>;
1351
- /** Post a message for the next turn, labelled as this extension. */
1517
+ /**
1518
+ * Post a message for the next turn, labelled as this extension.
1519
+ *
1520
+ * @param text — The message to queue for the next turn.
1521
+ */
1352
1522
  queue(text: string): Promise<void>;
1353
- /** Show a json-render block in the transcript. Shown to the person, never sent to the model. Returns its id. */
1523
+ /**
1524
+ * Show a json-render block in the transcript. Shown to the person, never sent to the model. Returns its id.
1525
+ *
1526
+ * @param view — A json-render spec: `{root, elements}`.
1527
+ * @param title — The view's title, as it is shown in the transcript.
1528
+ */
1354
1529
  append(view: JsonValue, title?: string): Promise<string>;
1355
- /** Replace a block this extension appended. */
1530
+ /**
1531
+ * Replace a block this extension appended.
1532
+ *
1533
+ * @param view_id — The view to replace, by the id `append` returned.
1534
+ * @param view — The new json-render spec: `{root, elements}`.
1535
+ * @param title — The view's new title.
1536
+ */
1356
1537
  replace(view_id: string, view: JsonValue, title?: string): Promise<void>;
1357
- /** Search the transcript. */
1538
+ /**
1539
+ * Search the transcript.
1540
+ *
1541
+ * @param query — The text to find in the transcript.
1542
+ * @param limit — At most this many; 50 by default.
1543
+ */
1358
1544
  search(query: string, limit?: number): Promise<JsonValue[]>;
1359
1545
  /** Stop the run. */
1360
1546
  cancel(): Promise<void>;
1361
- /** Stop one sub-agent's run. */
1547
+ /**
1548
+ * Stop one sub-agent's run.
1549
+ *
1550
+ * @param run_id — The sub-agent's run to stop, by its id.
1551
+ */
1362
1552
  cancel_agent(run_id: string): Promise<void>;
1363
- /** Remove a run and everything after it. */
1553
+ /**
1554
+ * Remove a run and everything after it.
1555
+ *
1556
+ * @param run_id — The run to remove, with every run after it.
1557
+ */
1364
1558
  truncate(run_id: string): Promise<JsonValue>;
1365
1559
  /** Compact the conversation if it needs it, as igni does after a run. */
1366
1560
  compact(): Promise<SessionCleared | null>;
1367
- /** Have the agent note what a turn taught it. */
1561
+ /**
1562
+ * Have the agent note what a turn taught it.
1563
+ *
1564
+ * @param user_msg — The turn's message, the one the person wrote.
1565
+ * @param assistant_msg — The turn's answer, the one the agent gave.
1566
+ */
1368
1567
  extract_learnings(user_msg: string, assistant_msg: string): Promise<void>;
1369
- /** Forget an interrupted run. */
1568
+ /**
1569
+ * Forget an interrupted run.
1570
+ *
1571
+ * @param message_id — The interrupted run to forget, named by the message that started it.
1572
+ */
1370
1573
  discard_interrupted(message_id: string): Promise<JsonValue>;
1371
- /** Upload an attachment for a later `post`. */
1574
+ /**
1575
+ * Forget a message whose run never finished.
1576
+ *
1577
+ * @param message_id — The pending message to forget, by its id.
1578
+ */
1579
+ discard_pending(message_id: string): Promise<JsonValue>;
1580
+ /**
1581
+ * Upload an attachment for a later `post`.
1582
+ *
1583
+ * @param filename — The file's name, made safe for the disk.
1584
+ * @param content_base64 — The file's bytes, base64-encoded.
1585
+ */
1372
1586
  upload(filename: string, content_base64: string): Promise<JsonValue>;
1373
1587
  }
1374
1588
  /** Plan mode: the plan the agent proposed. */
@@ -1384,11 +1598,25 @@ export declare class HostPlan extends HostObject {
1384
1598
  *
1385
1599
  * A page never builds one of these: `bridge.host` is already the
1386
1600
  * right one, and a second would be a second conversation.
1601
+ *
1602
+ * @param link — The link this object talks to the host through.
1603
+ * @param window — The window it was reached through, or null for
1604
+ * the one the page is in.
1605
+ * @param session — The session it was reached through, or null for
1606
+ * the one on screen.
1387
1607
  */
1388
1608
  constructor(link: HostLink, window?: string | null, session?: string | null);
1389
- /** Approve the plan. */
1609
+ /**
1610
+ * Approve the plan.
1611
+ *
1612
+ * @param run_id — The run that submitted the plan.
1613
+ */
1390
1614
  approve(run_id?: string): Promise<PlanDecision>;
1391
- /** Send the plan back. */
1615
+ /**
1616
+ * Send the plan back.
1617
+ *
1618
+ * @param run_id — The run that submitted the plan.
1619
+ */
1392
1620
  dismiss(run_id?: string): Promise<PlanDecision>;
1393
1621
  }
1394
1622
  /** The agent's todo list and its sub-agent tasks. */
@@ -1412,6 +1640,12 @@ export declare class HostTasks extends HostObject {
1412
1640
  *
1413
1641
  * A page never builds one of these: `bridge.host` is already the
1414
1642
  * right one, and a second would be a second conversation.
1643
+ *
1644
+ * @param link — The link this object talks to the host through.
1645
+ * @param window — The window it was reached through, or null for
1646
+ * the one the page is in.
1647
+ * @param session — The session it was reached through, or null for
1648
+ * the one on screen.
1415
1649
  */
1416
1650
  constructor(link: HostLink, window?: string | null, session?: string | null);
1417
1651
  }
@@ -1428,6 +1662,12 @@ export declare class HostLoop extends HostObject {
1428
1662
  *
1429
1663
  * A page never builds one of these: `bridge.host` is already the
1430
1664
  * right one, and a second would be a second conversation.
1665
+ *
1666
+ * @param link — The link this object talks to the host through.
1667
+ * @param window — The window it was reached through, or null for
1668
+ * the one the page is in.
1669
+ * @param session — The session it was reached through, or null for
1670
+ * the one on screen.
1431
1671
  */
1432
1672
  constructor(link: HostLink, window?: string | null, session?: string | null);
1433
1673
  /** Pause after this iteration. */
@@ -1456,9 +1696,19 @@ export declare class HostCommands extends HostObject {
1456
1696
  *
1457
1697
  * A page never builds one of these: `bridge.host` is already the
1458
1698
  * right one, and a second would be a second conversation.
1699
+ *
1700
+ * @param link — The link this object talks to the host through.
1701
+ * @param window — The window it was reached through, or null for
1702
+ * the one the page is in.
1703
+ * @param session — The session it was reached through, or null for
1704
+ * the one on screen.
1459
1705
  */
1460
1706
  constructor(link: HostLink, window?: string | null, session?: string | null);
1461
- /** Run a slash command, as the extension. The answer comes back here. */
1707
+ /**
1708
+ * Run a slash command, as the extension. The answer comes back here.
1709
+ *
1710
+ * @param command — With its slash: `/ctx`.
1711
+ */
1462
1712
  run(command: string): Promise<CommandOutcome>;
1463
1713
  }
1464
1714
  /** Agent definitions. */
@@ -1474,11 +1724,26 @@ export declare class HostAgents extends HostObject {
1474
1724
  *
1475
1725
  * A page never builds one of these: `bridge.host` is already the
1476
1726
  * right one, and a second would be a second conversation.
1727
+ *
1728
+ * @param link — The link this object talks to the host through.
1729
+ * @param window — The window it was reached through, or null for
1730
+ * the one the page is in.
1731
+ * @param session — The session it was reached through, or null for
1732
+ * the one on screen.
1477
1733
  */
1478
1734
  constructor(link: HostLink, window?: string | null, session?: string | null);
1479
- /** Keep an agent made for one task, as `/agents promote` does. */
1735
+ /**
1736
+ * Keep an agent made for one task, as `/agents promote` does.
1737
+ *
1738
+ * @param name — The agent to keep, by its name.
1739
+ * @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`.
1740
+ */
1480
1741
  promote_ephemeral(name: string, target?: string): Promise<PromoteResult>;
1481
- /** Drop an agent made for one task. */
1742
+ /**
1743
+ * Drop an agent made for one task.
1744
+ *
1745
+ * @param name — The agent to drop, by its name.
1746
+ */
1482
1747
  discard_ephemeral(name: string): Promise<DiscardResult>;
1483
1748
  }
1484
1749
  /** Workflows: scripted runs. */
@@ -1494,11 +1759,26 @@ export declare class HostWorkflows extends HostObject {
1494
1759
  *
1495
1760
  * A page never builds one of these: `bridge.host` is already the
1496
1761
  * right one, and a second would be a second conversation.
1762
+ *
1763
+ * @param link — The link this object talks to the host through.
1764
+ * @param window — The window it was reached through, or null for
1765
+ * the one the page is in.
1766
+ * @param session — The session it was reached through, or null for
1767
+ * the one on screen.
1497
1768
  */
1498
1769
  constructor(link: HostLink, window?: string | null, session?: string | null);
1499
- /** Start a workflow. */
1770
+ /**
1771
+ * Start a workflow.
1772
+ *
1773
+ * @param name — The workflow to start, by its name.
1774
+ * @param input — The workflow's input, a JSON object it reads as it defines.
1775
+ */
1500
1776
  run(name: string, input?: Record<string, JsonValue>): Promise<WorkflowRun>;
1501
- /** Stop a workflow run. */
1777
+ /**
1778
+ * Stop a workflow run.
1779
+ *
1780
+ * @param workflow_run_id — The run to stop, by its id.
1781
+ */
1502
1782
  cancel(workflow_run_id: string): Promise<boolean>;
1503
1783
  }
1504
1784
  /** Scheduled tasks. */
@@ -1514,13 +1794,27 @@ export declare class HostScheduler extends HostObject {
1514
1794
  *
1515
1795
  * A page never builds one of these: `bridge.host` is already the
1516
1796
  * right one, and a second would be a second conversation.
1797
+ *
1798
+ * @param link — The link this object talks to the host through.
1799
+ * @param window — The window it was reached through, or null for
1800
+ * the one the page is in.
1801
+ * @param session — The session it was reached through, or null for
1802
+ * the one on screen.
1517
1803
  */
1518
1804
  constructor(link: HostLink, window?: string | null, session?: string | null);
1519
1805
  /** Start the scheduler. */
1520
1806
  start(): Promise<void>;
1521
- /** Run a scheduled task now. */
1807
+ /**
1808
+ * Run a scheduled task now.
1809
+ *
1810
+ * @param task_id — The scheduled task to run now, by its id.
1811
+ */
1522
1812
  run_now(task_id: string): Promise<string>;
1523
- /** Cancel a scheduled task. */
1813
+ /**
1814
+ * Cancel a scheduled task.
1815
+ *
1816
+ * @param task_id — The scheduled task to cancel, by its id.
1817
+ */
1524
1818
  cancel(task_id: string): Promise<void>;
1525
1819
  }
1526
1820
  /** Background shells. */
@@ -1536,13 +1830,32 @@ export declare class HostProcesses extends HostObject {
1536
1830
  *
1537
1831
  * A page never builds one of these: `bridge.host` is already the
1538
1832
  * right one, and a second would be a second conversation.
1833
+ *
1834
+ * @param link — The link this object talks to the host through.
1835
+ * @param window — The window it was reached through, or null for
1836
+ * the one the page is in.
1837
+ * @param session — The session it was reached through, or null for
1838
+ * the one on screen.
1539
1839
  */
1540
1840
  constructor(link: HostLink, window?: string | null, session?: string | null);
1541
- /** A shell's last lines. */
1841
+ /**
1842
+ * A shell's last lines.
1843
+ *
1844
+ * @param pid — The shell to read the last lines of, by its process id.
1845
+ * @param lines — 200 by default.
1846
+ */
1542
1847
  tail(pid: number, lines?: number): Promise<ProcessTail>;
1543
- /** Stop a shell. */
1848
+ /**
1849
+ * Stop a shell.
1850
+ *
1851
+ * @param pid — The shell to stop, by its process id.
1852
+ */
1544
1853
  stop(pid: number): Promise<ProcessStop>;
1545
- /** Run a command in the project and wait for it. */
1854
+ /**
1855
+ * Run a command in the project and wait for it.
1856
+ *
1857
+ * @param command — The command line to run in the project.
1858
+ */
1546
1859
  run(command: string): Promise<ShellResult>;
1547
1860
  }
1548
1861
  /** The project, as far as the extension's workspace grant reaches. */
@@ -1562,19 +1875,45 @@ export declare class HostWorkspace extends HostObject {
1562
1875
  *
1563
1876
  * A page never builds one of these: `bridge.host` is already the
1564
1877
  * right one, and a second would be a second conversation.
1878
+ *
1879
+ * @param link — The link this object talks to the host through.
1880
+ * @param window — The window it was reached through, or null for
1881
+ * the one the page is in.
1882
+ * @param session — The session it was reached through, or null for
1883
+ * the one on screen.
1565
1884
  */
1566
1885
  constructor(link: HostLink, window?: string | null, session?: string | null);
1567
- /** Read a file in the project. */
1886
+ /**
1887
+ * Read a file in the project.
1888
+ *
1889
+ * @param path — The file to read, by its path in the project.
1890
+ */
1568
1891
  read(path: string): Promise<JsonValue>;
1569
- /** List a directory in the project. */
1892
+ /**
1893
+ * List a directory in the project.
1894
+ *
1895
+ * @param dir — The directory to list, by its path in the project; the project itself when left out.
1896
+ */
1570
1897
  list(dir?: string): Promise<JsonValue>;
1571
- /** Complete a path, as `@` does. */
1898
+ /**
1899
+ * Complete a path, as `@` does.
1900
+ *
1901
+ * @param prefix — The path typed so far after `@`.
1902
+ */
1572
1903
  complete(prefix: string): Promise<JsonValue>;
1573
- /** Search the code. */
1904
+ /**
1905
+ * Search the code.
1906
+ *
1907
+ * @param query — The text to search the code for.
1908
+ */
1574
1909
  search(query: string): Promise<JsonValue>;
1575
1910
  /** Ask the person to pick a folder. */
1576
1911
  pick_dir(): Promise<JsonValue>;
1577
- /** 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. */
1912
+ /**
1913
+ * 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.
1914
+ *
1915
+ * @param path — Relative to the project, or absolute inside it.
1916
+ */
1578
1917
  open(path: string): Promise<void>;
1579
1918
  }
1580
1919
  /** Models. */
@@ -1592,6 +1931,12 @@ export declare class HostModels extends HostObject {
1592
1931
  *
1593
1932
  * A page never builds one of these: `bridge.host` is already the
1594
1933
  * right one, and a second would be a second conversation.
1934
+ *
1935
+ * @param link — The link this object talks to the host through.
1936
+ * @param window — The window it was reached through, or null for
1937
+ * the one the page is in.
1938
+ * @param session — The session it was reached through, or null for
1939
+ * the one on screen.
1595
1940
  */
1596
1941
  constructor(link: HostLink, window?: string | null, session?: string | null);
1597
1942
  }
@@ -1612,15 +1957,35 @@ export declare class HostMcp extends HostObject {
1612
1957
  *
1613
1958
  * A page never builds one of these: `bridge.host` is already the
1614
1959
  * right one, and a second would be a second conversation.
1960
+ *
1961
+ * @param link — The link this object talks to the host through.
1962
+ * @param window — The window it was reached through, or null for
1963
+ * the one the page is in.
1964
+ * @param session — The session it was reached through, or null for
1965
+ * the one on screen.
1615
1966
  */
1616
1967
  constructor(link: HostLink, window?: string | null, session?: string | null);
1617
- /** Connect a server. */
1968
+ /**
1969
+ * Connect a server.
1970
+ *
1971
+ * @param name — The server to connect, by its name in the MCP configuration.
1972
+ */
1618
1973
  connect(name: string): Promise<void>;
1619
- /** Disconnect a server. */
1974
+ /**
1975
+ * Disconnect a server.
1976
+ *
1977
+ * @param name — The server to disconnect, by its name in the MCP configuration.
1978
+ */
1620
1979
  disconnect(name: string): Promise<void>;
1621
1980
  /** Start the servers that should be running. */
1622
1981
  ensure(): Promise<McpInit>;
1623
- /** Offer or withhold one tool. */
1982
+ /**
1983
+ * Offer or withhold one tool.
1984
+ *
1985
+ * @param server — The server the tool belongs to, by its name.
1986
+ * @param tool — The tool to offer or withhold, by its name.
1987
+ * @param on — Whether the tool is offered.
1988
+ */
1624
1989
  set_tool_enabled(server: string, tool: string, on: boolean): Promise<McpToolToggle>;
1625
1990
  }
1626
1991
  /** Plugins and marketplaces. */
@@ -1638,25 +2003,72 @@ export declare class HostPlugins extends HostObject {
1638
2003
  *
1639
2004
  * A page never builds one of these: `bridge.host` is already the
1640
2005
  * right one, and a second would be a second conversation.
2006
+ *
2007
+ * @param link — The link this object talks to the host through.
2008
+ * @param window — The window it was reached through, or null for
2009
+ * the one the page is in.
2010
+ * @param session — The session it was reached through, or null for
2011
+ * the one on screen.
1641
2012
  */
1642
2013
  constructor(link: HostLink, window?: string | null, session?: string | null);
1643
- /** What a plugin carries. */
2014
+ /**
2015
+ * What a plugin carries.
2016
+ *
2017
+ * @param name — The installed plugin to describe, by its name.
2018
+ */
1644
2019
  contents(name: string): Promise<PluginContents>;
1645
- /** What a plugin would install. */
2020
+ /**
2021
+ * What a plugin would install.
2022
+ *
2023
+ * @param source — The plugin's git URL, optionally followed by a subfolder.
2024
+ * @param branch — The branch, tag or commit to read; the default branch when left out.
2025
+ * @param subdir — The plugin's folder inside the repository, which wins over one in `source`.
2026
+ */
1646
2027
  preview(source: string, branch?: string, subdir?: string): Promise<PluginContents>;
1647
- /** Install a plugin. */
2028
+ /**
2029
+ * Install a plugin.
2030
+ *
2031
+ * @param ref — The plugin to install: a git URL or `@<marketplace>/<plugin>`.
2032
+ * @param install_ref — The branch, tag or commit to check out; the marketplace's, or the default branch, when left out.
2033
+ */
1648
2034
  install(ref: string, install_ref?: string): Promise<void>;
1649
- /** Update a plugin. */
2035
+ /**
2036
+ * Update a plugin.
2037
+ *
2038
+ * @param name — The installed plugin to move, by its name.
2039
+ * @param install_ref — The branch, tag or commit to move to; the remote's default branch when left out.
2040
+ */
1650
2041
  update(name: string, install_ref?: string): Promise<void>;
1651
- /** Remove a plugin. */
2042
+ /**
2043
+ * Remove a plugin.
2044
+ *
2045
+ * @param name — The installed plugin to remove, by its name.
2046
+ */
1652
2047
  remove(name: string): Promise<void>;
1653
- /** Enable or disable a plugin. */
2048
+ /**
2049
+ * Enable or disable a plugin.
2050
+ *
2051
+ * @param name — The installed plugin to switch on or off, by its name.
2052
+ * @param on — Whether the plugin is enabled.
2053
+ */
1654
2054
  set_enabled(name: string, on: boolean): Promise<void>;
1655
- /** Add a marketplace. */
2055
+ /**
2056
+ * Add a marketplace.
2057
+ *
2058
+ * @param url — The marketplace's git URL.
2059
+ */
1656
2060
  add_marketplace(url: string): Promise<void>;
1657
- /** Remove a marketplace. */
2061
+ /**
2062
+ * Remove a marketplace.
2063
+ *
2064
+ * @param name — The marketplace to forget, by its name.
2065
+ */
1658
2066
  remove_marketplace(name: string): Promise<void>;
1659
- /** Refresh marketplaces. */
2067
+ /**
2068
+ * Refresh marketplaces.
2069
+ *
2070
+ * @param name — The marketplace to fetch again; every one of them when left out.
2071
+ */
1660
2072
  refresh_marketplaces(name?: string): Promise<void>;
1661
2073
  }
1662
2074
  /** Installed extensions. Read-only, apart from this extension's own settings. */
@@ -1672,9 +2084,19 @@ export declare class HostExtensions extends HostObject {
1672
2084
  *
1673
2085
  * A page never builds one of these: `bridge.host` is already the
1674
2086
  * right one, and a second would be a second conversation.
2087
+ *
2088
+ * @param link — The link this object talks to the host through.
2089
+ * @param window — The window it was reached through, or null for
2090
+ * the one the page is in.
2091
+ * @param session — The session it was reached through, or null for
2092
+ * the one on screen.
1675
2093
  */
1676
2094
  constructor(link: HostLink, window?: string | null, session?: string | null);
1677
- /** Change this extension's own settings. */
2095
+ /**
2096
+ * Change this extension's own settings.
2097
+ *
2098
+ * @param values — The settings to change, as key to value.
2099
+ */
1678
2100
  set_settings(values: Record<string, JsonValue>): Promise<SettingsChange>;
1679
2101
  }
1680
2102
  /** Hooks. */
@@ -1690,6 +2112,12 @@ export declare class HostHooks extends HostObject {
1690
2112
  *
1691
2113
  * A page never builds one of these: `bridge.host` is already the
1692
2114
  * right one, and a second would be a second conversation.
2115
+ *
2116
+ * @param link — The link this object talks to the host through.
2117
+ * @param window — The window it was reached through, or null for
2118
+ * the one the page is in.
2119
+ * @param session — The session it was reached through, or null for
2120
+ * the one on screen.
1693
2121
  */
1694
2122
  constructor(link: HostLink, window?: string | null, session?: string | null);
1695
2123
  /** Reload hooks. */
@@ -1710,11 +2138,28 @@ export declare class HostPermissions extends HostObject {
1710
2138
  *
1711
2139
  * A page never builds one of these: `bridge.host` is already the
1712
2140
  * right one, and a second would be a second conversation.
2141
+ *
2142
+ * @param link — The link this object talks to the host through.
2143
+ * @param window — The window it was reached through, or null for
2144
+ * the one the page is in.
2145
+ * @param session — The session it was reached through, or null for
2146
+ * the one on screen.
1713
2147
  */
1714
2148
  constructor(link: HostLink, window?: string | null, session?: string | null);
1715
- /** Would this tool call be allowed, asked or denied? One of `allow`, `ask` or `deny`. */
2149
+ /**
2150
+ * Would this tool call be allowed, asked or denied? One of `allow`, `ask` or `deny`.
2151
+ *
2152
+ * @param tool_name — The tool the call would use, by its name.
2153
+ * @param func_name — The function of that tool the call would reach.
2154
+ * @param tool_args — The call's arguments, which argument rules match against.
2155
+ */
1716
2156
  check(tool_name: string, func_name: string, tool_args?: Record<string, JsonValue>): Promise<string>;
1717
- /** Save a permission rule. */
2157
+ /**
2158
+ * Save a permission rule.
2159
+ *
2160
+ * @param rule — The rule to save: `Bash(git status)`, a tool name.
2161
+ * @param level — `allow`, `ask` or `deny`.
2162
+ */
1718
2163
  save_rule(rule: string, level: string): Promise<void>;
1719
2164
  }
1720
2165
  /** The group policy in force. */
@@ -1728,6 +2173,12 @@ export declare class HostPolicy extends HostObject {
1728
2173
  *
1729
2174
  * A page never builds one of these: `bridge.host` is already the
1730
2175
  * right one, and a second would be a second conversation.
2176
+ *
2177
+ * @param link — The link this object talks to the host through.
2178
+ * @param window — The window it was reached through, or null for
2179
+ * the one the page is in.
2180
+ * @param session — The session it was reached through, or null for
2181
+ * the one on screen.
1731
2182
  */
1732
2183
  constructor(link: HostLink, window?: string | null, session?: string | null);
1733
2184
  }
@@ -1744,6 +2195,12 @@ export declare class HostAccount extends HostObject {
1744
2195
  *
1745
2196
  * A page never builds one of these: `bridge.host` is already the
1746
2197
  * right one, and a second would be a second conversation.
2198
+ *
2199
+ * @param link — The link this object talks to the host through.
2200
+ * @param window — The window it was reached through, or null for
2201
+ * the one the page is in.
2202
+ * @param session — The session it was reached through, or null for
2203
+ * the one on screen.
1747
2204
  */
1748
2205
  constructor(link: HostLink, window?: string | null, session?: string | null);
1749
2206
  /** Start the person's own sign-in. Its result is theirs. */
@@ -1766,11 +2223,26 @@ export declare class HostNotifications extends HostObject {
1766
2223
  *
1767
2224
  * A page never builds one of these: `bridge.host` is already the
1768
2225
  * right one, and a second would be a second conversation.
2226
+ *
2227
+ * @param link — The link this object talks to the host through.
2228
+ * @param window — The window it was reached through, or null for
2229
+ * the one the page is in.
2230
+ * @param session — The session it was reached through, or null for
2231
+ * the one on screen.
1769
2232
  */
1770
2233
  constructor(link: HostLink, window?: string | null, session?: string | null);
1771
- /** Tell the person at this machine something. It never leaves the machine. */
2234
+ /**
2235
+ * Tell the person at this machine something. It never leaves the machine.
2236
+ *
2237
+ * @param notification — What to tell the person at this machine.
2238
+ */
1772
2239
  notify(notification: LocalNotification): Promise<void>;
1773
- /** Mark notifications read: these ids, one source, or all of them. */
2240
+ /**
2241
+ * Mark notifications read: these ids, one source, or all of them.
2242
+ *
2243
+ * @param ids — The notifications to mark read, by their ids.
2244
+ * @param source — The source whose notifications to mark read; every one of them when left out.
2245
+ */
1774
2246
  mark_read(ids?: string[], source?: string): Promise<NotificationCounts>;
1775
2247
  }
1776
2248
  /** This extension, as the host sees it. */
@@ -1794,11 +2266,26 @@ export declare class HostSelf extends HostObject {
1794
2266
  *
1795
2267
  * A page never builds one of these: `bridge.host` is already the
1796
2268
  * right one, and a second would be a second conversation.
2269
+ *
2270
+ * @param link — The link this object talks to the host through.
2271
+ * @param window — The window it was reached through, or null for
2272
+ * the one the page is in.
2273
+ * @param session — The session it was reached through, or null for
2274
+ * the one on screen.
1797
2275
  */
1798
2276
  constructor(link: HostLink, window?: string | null, session?: string | null);
1799
- /** 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`. */
2277
+ /**
2278
+ * 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`.
2279
+ *
2280
+ * @param reason — Why the extension is working inside igni's process.
2281
+ * @param ttl_seconds — Default and at most 600.
2282
+ */
1800
2283
  busy(reason: string, ttl_seconds?: number): Promise<BusyLease>;
1801
- /** Let go of the lease `busy` took for `reason`. Nothing happens if there is none. */
2284
+ /**
2285
+ * Let go of the lease `busy` took for `reason`. Nothing happens if there is none.
2286
+ *
2287
+ * @param reason — The reason the lease was taken for.
2288
+ */
1802
2289
  done(reason: string): Promise<void>;
1803
2290
  }
1804
2291
  /** The root. `changed` reports every change anywhere in the model, for an extension that wants to see all of it; each delivery needs the grant of the member that changed. */
@@ -1860,11 +2347,27 @@ export declare class Host extends HostObject {
1860
2347
  *
1861
2348
  * A page never builds one of these: `bridge.host` is already the
1862
2349
  * right one, and a second would be a second conversation.
2350
+ *
2351
+ * @param link — The link this object talks to the host through.
2352
+ * @param window — The window it was reached through, or null for
2353
+ * the one the page is in.
2354
+ * @param session — The session it was reached through, or null for
2355
+ * the one on screen.
1863
2356
  */
1864
2357
  constructor(link: HostLink, window?: string | null, session?: string | null);
1865
- /** 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. */
2358
+ /**
2359
+ * 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.
2360
+ *
2361
+ * @param context — Named text fields.
2362
+ * @param questions — The questions to ask, each with its own text and answer type.
2363
+ */
1866
2364
  decide(context: Record<string, string>, questions: DecisionQuestion[]): Promise<Decision>;
1867
- /** `decide` for up to 16 contexts at once, sharing forward passes. One decision per context, in order. */
2365
+ /**
2366
+ * `decide` for up to 16 contexts at once, sharing forward passes. One decision per context, in order.
2367
+ *
2368
+ * @param contexts — The contexts to ask about, one decision each, in order.
2369
+ * @param questions — The questions to ask of every context.
2370
+ */
1868
2371
  decide_batch(contexts: (Record<string, string>)[], questions: DecisionQuestion[]): Promise<Decision[]>;
1869
2372
  }
1870
2373
  //# sourceMappingURL=hostModel.generated.d.ts.map