@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
  import { HostObject, Property, Signal } from "./hostModel.js";
6
6
  /**
7
7
  * The version of igni's host schema this file was generated from.
@@ -23,21 +23,40 @@ export class HostAppState extends HostObject {
23
23
  *
24
24
  * A page never builds one of these: `bridge.host` is already the
25
25
  * right one, and a second would be a second conversation.
26
+ *
27
+ * @param link — The link this object talks to the host through.
28
+ * @param window — The window it was reached through, or null for
29
+ * the one the page is in.
30
+ * @param session — The session it was reached through, or null for
31
+ * the one on screen.
26
32
  */
27
33
  constructor(link, window = null, session = null) {
28
34
  super(link, "app.state", window, session);
29
35
  this.values = new Property(this, "values", false);
30
36
  this.changed = new Signal("app.state.changed");
31
37
  }
32
- /** One value, or `None`. */
38
+ /**
39
+ * One value, or `None`.
40
+ *
41
+ * @param key — The key to read the value of.
42
+ */
33
43
  get(key) {
34
44
  return this.call("get", { key });
35
45
  }
36
- /** Store one value. */
46
+ /**
47
+ * Store one value.
48
+ *
49
+ * @param key — The key to store the value under.
50
+ * @param value — The value to store.
51
+ */
37
52
  set(key, value) {
38
53
  return this.call("set", { key, value });
39
54
  }
40
- /** Remove one key. */
55
+ /**
56
+ * Remove one key.
57
+ *
58
+ * @param key — The key to remove.
59
+ */
41
60
  delete(key) {
42
61
  return this.call("delete", { key });
43
62
  }
@@ -61,6 +80,12 @@ export class HostChatApprovals extends HostObject {
61
80
  *
62
81
  * A page never builds one of these: `bridge.host` is already the
63
82
  * right one, and a second would be a second conversation.
83
+ *
84
+ * @param link — The link this object talks to the host through.
85
+ * @param window — The window it was reached through, or null for
86
+ * the one the page is in.
87
+ * @param session — The session it was reached through, or null for
88
+ * the one on screen.
64
89
  */
65
90
  constructor(link, window = null, session = null) {
66
91
  super(link, "chat.approvals", window, session);
@@ -70,11 +95,21 @@ export class HostChatApprovals extends HostObject {
70
95
  this.details = new Signal("chat.approvals.details");
71
96
  this.changed = new Signal("chat.approvals.changed");
72
97
  }
73
- /** Answer one request, as the person's dialog does. */
98
+ /**
99
+ * Answer one request, as the person's dialog does.
100
+ *
101
+ * @param requirement_id — The waiting request to answer, by its id.
102
+ * @param action — `confirm` or `reject`.
103
+ * @param choice — `once`, `always` or `similar`.
104
+ */
74
105
  answer(requirement_id, action, choice) {
75
106
  return this.call("answer", { requirement_id, action, choice });
76
107
  }
77
- /** Answer every request of a pause at once. */
108
+ /**
109
+ * Answer every request of a pause at once.
110
+ *
111
+ * @param answers — The answers to give, one per waiting request.
112
+ */
78
113
  answer_all(answers) {
79
114
  return this.call("answer_all", { answers });
80
115
  }
@@ -94,6 +129,12 @@ export class HostChatViews extends HostObject {
94
129
  *
95
130
  * A page never builds one of these: `bridge.host` is already the
96
131
  * right one, and a second would be a second conversation.
132
+ *
133
+ * @param link — The link this object talks to the host through.
134
+ * @param window — The window it was reached through, or null for
135
+ * the one the page is in.
136
+ * @param session — The session it was reached through, or null for
137
+ * the one on screen.
97
138
  */
98
139
  constructor(link, window = null, session = null) {
99
140
  super(link, "chat.views", window, session);
@@ -101,7 +142,13 @@ export class HostChatViews extends HostObject {
101
142
  this.shown = new Signal("chat.views.shown");
102
143
  this.action = new Signal("chat.views.action");
103
144
  }
104
- /** Act on a view as if the person had. */
145
+ /**
146
+ * Act on a view as if the person had.
147
+ *
148
+ * @param view_id — The view the action was used on, by its id.
149
+ * @param action — The control's action name.
150
+ * @param params — The values the view attached to the action.
151
+ */
105
152
  dispatch(view_id, action, params) {
106
153
  return this.call("dispatch", { view_id, action, params });
107
154
  }
@@ -135,6 +182,12 @@ export class HostApp extends HostObject {
135
182
  *
136
183
  * A page never builds one of these: `bridge.host` is already the
137
184
  * right one, and a second would be a second conversation.
185
+ *
186
+ * @param link — The link this object talks to the host through.
187
+ * @param window — The window it was reached through, or null for
188
+ * the one the page is in.
189
+ * @param session — The session it was reached through, or null for
190
+ * the one on screen.
138
191
  */
139
192
  constructor(link, window = null, session = null) {
140
193
  super(link, "app", window, session);
@@ -149,11 +202,19 @@ export class HostApp extends HostObject {
149
202
  this.update_changed = new Signal("app.update_changed");
150
203
  this.activity_changed = new Signal("app.activity_changed");
151
204
  }
152
- /** Show or hide routing detail. */
205
+ /**
206
+ * Show or hide routing detail.
207
+ *
208
+ * @param on — Whether routing detail is shown.
209
+ */
153
210
  set_verbose(on) {
154
211
  return this.call("set_verbose", { on });
155
212
  }
156
- /** Switch the output style, as `/output-style <name>` does. */
213
+ /**
214
+ * Switch the output style, as `/output-style <name>` does.
215
+ *
216
+ * @param name — The output style to switch to, by its name.
217
+ */
157
218
  set_output_style(name) {
158
219
  return this.call("set_output_style", { name });
159
220
  }
@@ -161,7 +222,11 @@ export class HostApp extends HostObject {
161
222
  check_for_update() {
162
223
  return this.call("check_for_update", {});
163
224
  }
164
- /** 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`). */
225
+ /**
226
+ * 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`).
227
+ *
228
+ * @param url — The link: `https://` only.
229
+ */
165
230
  open_external(url) {
166
231
  return this.call("open_external", { url });
167
232
  }
@@ -185,6 +250,12 @@ export class HostWindows extends HostObject {
185
250
  *
186
251
  * A page never builds one of these: `bridge.host` is already the
187
252
  * right one, and a second would be a second conversation.
253
+ *
254
+ * @param link — The link this object talks to the host through.
255
+ * @param window — The window it was reached through, or null for
256
+ * the one the page is in.
257
+ * @param session — The session it was reached through, or null for
258
+ * the one on screen.
188
259
  */
189
260
  constructor(link, window = null, session = null) {
190
261
  super(link, "windows", window, session);
@@ -194,7 +265,11 @@ export class HostWindows extends HostObject {
194
265
  this.closed = new Signal("windows.closed");
195
266
  this.focus_changed = new Signal("windows.focus_changed");
196
267
  }
197
- /** `host.ui` of one window, by its id. */
268
+ /**
269
+ * `host.ui` of one window, by its id.
270
+ *
271
+ * @param windowId — The window to reach, by its id.
272
+ */
198
273
  ui(windowId) {
199
274
  return new HostUi(this.link, windowId);
200
275
  }
@@ -248,6 +323,12 @@ export class HostUi extends HostObject {
248
323
  *
249
324
  * A page never builds one of these: `bridge.host` is already the
250
325
  * right one, and a second would be a second conversation.
326
+ *
327
+ * @param link — The link this object talks to the host through.
328
+ * @param window — The window it was reached through, or null for
329
+ * the one the page is in.
330
+ * @param session — The session it was reached through, or null for
331
+ * the one on screen.
251
332
  */
252
333
  constructor(link, window = null, session = null) {
253
334
  super(link, "ui", window, session);
@@ -272,7 +353,12 @@ export class HostUi extends HostObject {
272
353
  this.dialog_closed = new Signal("ui.dialog_closed");
273
354
  this.scrolled = new Signal("ui.scrolled");
274
355
  }
275
- /** Open a page at the top of the stack, as a header link does. */
356
+ /**
357
+ * Open a page at the top of the stack, as a header link does.
358
+ *
359
+ * @param page — A page kind: `plugins`, `extensions`, an extension's page.
360
+ * @param params — The page's parameters.
361
+ */
276
362
  navigate(page, params) {
277
363
  return this.call("navigate", { page, params });
278
364
  }
@@ -280,7 +366,12 @@ export class HostUi extends HostObject {
280
366
  back() {
281
367
  return this.call("back", {});
282
368
  }
283
- /** Open a panel over the chat, closing the one that was open. */
369
+ /**
370
+ * Open a panel over the chat, closing the one that was open.
371
+ *
372
+ * @param kind — `notifications`, `search`, `login` or `dir-picker`.
373
+ * @param params — The panel's own parameters: what the panel shows, in the panel's own shape.
374
+ */
284
375
  open_panel(kind, params) {
285
376
  return this.call("open_panel", { kind, params });
286
377
  }
@@ -288,11 +379,21 @@ export class HostUi extends HostObject {
288
379
  close_panel() {
289
380
  return this.call("close_panel", {});
290
381
  }
291
- /** Open or close the sidebar, and size it or bring a section into view. */
382
+ /**
383
+ * Open or close the sidebar, and size it or bring a section into view.
384
+ *
385
+ * @param open — Whether the sidebar is open.
386
+ * @param width — In pixels, 180 to 600.
387
+ * @param section — `links` or `sessions`.
388
+ */
292
389
  set_sidebar(open, width, section) {
293
390
  return this.call("set_sidebar", { open, width, section });
294
391
  }
295
- /** Preview a file of the project. (`preview` is the property.) */
392
+ /**
393
+ * Preview a file of the project. (`preview` is the property.)
394
+ *
395
+ * @param path — The file to preview, by its path in the project.
396
+ */
296
397
  open_preview(path) {
297
398
  return this.call("open_preview", { path });
298
399
  }
@@ -300,27 +401,56 @@ export class HostUi extends HostObject {
300
401
  close_preview() {
301
402
  return this.call("close_preview", {});
302
403
  }
303
- /** Select a message, text or file. The parts left out are cleared. */
404
+ /**
405
+ * Select a message, text or file. The parts left out are cleared.
406
+ *
407
+ * @param selection — What is selected: a message, text or a file; the parts left out are cleared.
408
+ */
304
409
  select(selection) {
305
410
  return this.call("select", { selection });
306
411
  }
307
- /** Replace the draft. */
412
+ /**
413
+ * Replace the draft.
414
+ *
415
+ * @param text — The draft to put in the composer.
416
+ * @param attachments — Files to refer to: each becomes an `@path` the draft does not already have.
417
+ * @param mode — `chat`, `command` or `shell`; unchanged if left out.
418
+ */
308
419
  set_composer(text, attachments, mode) {
309
420
  return this.call("set_composer", { text, attachments, mode });
310
421
  }
311
- /** Show a transient message, labelled as this extension's. */
422
+ /**
423
+ * Show a transient message, labelled as this extension's.
424
+ *
425
+ * @param text — The toast's first line.
426
+ * @param kind — `info` (default), `success`, `warning`, `error`.
427
+ * @param body — A second line.
428
+ * @param target — Where clicking it goes.
429
+ */
312
430
  toast(text, kind, body, target) {
313
431
  return this.call("toast", { text, kind, body, target });
314
432
  }
315
- /** Take one of this extension's toasts away. */
433
+ /**
434
+ * Take one of this extension's toasts away.
435
+ *
436
+ * @param toast_id — The toast to take away, by its id.
437
+ */
316
438
  dismiss_toast(toast_id) {
317
439
  return this.call("dismiss_toast", { toast_id });
318
440
  }
319
- /** 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.) */
441
+ /**
442
+ * 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.)
443
+ *
444
+ * @param spec — The dialog to show: its title, body, buttons and input.
445
+ */
320
446
  show_dialog(spec) {
321
447
  return this.call("show_dialog", { spec });
322
448
  }
323
- /** Scroll the transcript to a message, by its run; `bottom` for the newest. */
449
+ /**
450
+ * Scroll the transcript to a message, by its run; `bottom` for the newest.
451
+ *
452
+ * @param message_id — The message to scroll to, named by the run it belongs to; `bottom` for the newest.
453
+ */
324
454
  scroll_to(message_id) {
325
455
  return this.call("scroll_to", { message_id });
326
456
  }
@@ -346,6 +476,12 @@ export class HostSessions extends HostObject {
346
476
  *
347
477
  * A page never builds one of these: `bridge.host` is already the
348
478
  * right one, and a second would be a second conversation.
479
+ *
480
+ * @param link — The link this object talks to the host through.
481
+ * @param window — The window it was reached through, or null for
482
+ * the one the page is in.
483
+ * @param session — The session it was reached through, or null for
484
+ * the one on screen.
349
485
  */
350
486
  constructor(link, window = null, session = null) {
351
487
  super(link, "sessions", window, session);
@@ -356,19 +492,38 @@ export class HostSessions extends HostObject {
356
492
  this.cleared = new Signal("sessions.cleared");
357
493
  this.named = new Signal("sessions.named");
358
494
  }
359
- /** Show a session in the active window. */
495
+ /**
496
+ * Show a session in the active window.
497
+ *
498
+ * @param session_id — The session to open, by its id.
499
+ */
360
500
  open(session_id) {
361
501
  return this.call("open", { session_id });
362
502
  }
363
- /** 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. */
503
+ /**
504
+ * 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.
505
+ *
506
+ * @param project_dir — The folder the new session works in; this project when left out.
507
+ * @param title — Its name in the session list.
508
+ * @param focus — Show it in the caller's window — a page's own, else the active one. False by default.
509
+ */
364
510
  create(project_dir, title, focus) {
365
511
  return this.call("create", { project_dir, title, focus });
366
512
  }
367
- /** Make sure a session is live, without showing it. */
513
+ /**
514
+ * Make sure a session is live, without showing it.
515
+ *
516
+ * @param session_id — The session to make live, by its id.
517
+ * @param project_dir — The folder the session works in; it must belong to that session.
518
+ */
368
519
  attach(session_id, project_dir) {
369
520
  return this.call("attach", { session_id, project_dir });
370
521
  }
371
- /** `host.chat` of any session of this project, by its id, without showing it. The session on screen's id is `host.chat` itself. */
522
+ /**
523
+ * `host.chat` of any session of this project, by its id, without showing it. The session on screen's id is `host.chat` itself.
524
+ *
525
+ * @param sessionId — The session to reach, by its id.
526
+ */
372
527
  chat(sessionId) {
373
528
  return new HostChat(this.link, null, sessionId);
374
529
  }
@@ -442,6 +597,12 @@ export class HostChat extends HostObject {
442
597
  *
443
598
  * A page never builds one of these: `bridge.host` is already the
444
599
  * right one, and a second would be a second conversation.
600
+ *
601
+ * @param link — The link this object talks to the host through.
602
+ * @param window — The window it was reached through, or null for
603
+ * the one the page is in.
604
+ * @param session — The session it was reached through, or null for
605
+ * the one on screen.
445
606
  */
446
607
  constructor(link, window = null, session = null) {
447
608
  super(link, "chat", window, session);
@@ -476,23 +637,48 @@ export class HostChat extends HostObject {
476
637
  this.retry = new Signal("chat.retry");
477
638
  this.history_changed = new Signal("chat.history_changed");
478
639
  }
479
- /** 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. */
640
+ /**
641
+ * 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.
642
+ *
643
+ * @param text — The message to post, labelled as this extension's.
644
+ * @param attachments — Path → content.
645
+ */
480
646
  post(text, attachments) {
481
647
  return this.call("post", { text, attachments });
482
648
  }
483
- /** Post a message for the next turn, labelled as this extension. */
649
+ /**
650
+ * Post a message for the next turn, labelled as this extension.
651
+ *
652
+ * @param text — The message to queue for the next turn.
653
+ */
484
654
  queue(text) {
485
655
  return this.call("queue", { text });
486
656
  }
487
- /** Show a json-render block in the transcript. Shown to the person, never sent to the model. Returns its id. */
657
+ /**
658
+ * Show a json-render block in the transcript. Shown to the person, never sent to the model. Returns its id.
659
+ *
660
+ * @param view — A json-render spec: `{root, elements}`.
661
+ * @param title — The view's title, as it is shown in the transcript.
662
+ */
488
663
  append(view, title) {
489
664
  return this.call("append", { view, title });
490
665
  }
491
- /** Replace a block this extension appended. */
666
+ /**
667
+ * Replace a block this extension appended.
668
+ *
669
+ * @param view_id — The view to replace, by the id `append` returned.
670
+ * @param view — The new json-render spec: `{root, elements}`.
671
+ * @param title — The view's new title.
672
+ */
492
673
  replace(view_id, view, title) {
493
674
  return this.call("replace", { view_id, view, title });
494
675
  }
495
- /** Search the transcript. */
676
+ /**
677
+ * Search the transcript.
678
+ *
679
+ * @param query — The text to find in the transcript.
680
+ * @param limit — At most this many; 50 by default.
681
+ */
496
682
  search(query, limit) {
497
683
  return this.call("search", { query, limit });
498
684
  }
@@ -500,11 +686,19 @@ export class HostChat extends HostObject {
500
686
  cancel() {
501
687
  return this.call("cancel", {});
502
688
  }
503
- /** Stop one sub-agent's run. */
689
+ /**
690
+ * Stop one sub-agent's run.
691
+ *
692
+ * @param run_id — The sub-agent's run to stop, by its id.
693
+ */
504
694
  cancel_agent(run_id) {
505
695
  return this.call("cancel_agent", { run_id });
506
696
  }
507
- /** Remove a run and everything after it. */
697
+ /**
698
+ * Remove a run and everything after it.
699
+ *
700
+ * @param run_id — The run to remove, with every run after it.
701
+ */
508
702
  truncate(run_id) {
509
703
  return this.call("truncate", { run_id });
510
704
  }
@@ -512,15 +706,37 @@ export class HostChat extends HostObject {
512
706
  compact() {
513
707
  return this.call("compact", {});
514
708
  }
515
- /** Have the agent note what a turn taught it. */
709
+ /**
710
+ * Have the agent note what a turn taught it.
711
+ *
712
+ * @param user_msg — The turn's message, the one the person wrote.
713
+ * @param assistant_msg — The turn's answer, the one the agent gave.
714
+ */
516
715
  extract_learnings(user_msg, assistant_msg) {
517
716
  return this.call("extract_learnings", { user_msg, assistant_msg });
518
717
  }
519
- /** Forget an interrupted run. */
718
+ /**
719
+ * Forget an interrupted run.
720
+ *
721
+ * @param message_id — The interrupted run to forget, named by the message that started it.
722
+ */
520
723
  discard_interrupted(message_id) {
521
724
  return this.call("discard_interrupted", { message_id });
522
725
  }
523
- /** Upload an attachment for a later `post`. */
726
+ /**
727
+ * Forget a message whose run never finished.
728
+ *
729
+ * @param message_id — The pending message to forget, by its id.
730
+ */
731
+ discard_pending(message_id) {
732
+ return this.call("discard_pending", { message_id });
733
+ }
734
+ /**
735
+ * Upload an attachment for a later `post`.
736
+ *
737
+ * @param filename — The file's name, made safe for the disk.
738
+ * @param content_base64 — The file's bytes, base64-encoded.
739
+ */
524
740
  upload(filename, content_base64) {
525
741
  return this.call("upload", { filename, content_base64 });
526
742
  }
@@ -538,17 +754,31 @@ export class HostPlan extends HostObject {
538
754
  *
539
755
  * A page never builds one of these: `bridge.host` is already the
540
756
  * right one, and a second would be a second conversation.
757
+ *
758
+ * @param link — The link this object talks to the host through.
759
+ * @param window — The window it was reached through, or null for
760
+ * the one the page is in.
761
+ * @param session — The session it was reached through, or null for
762
+ * the one on screen.
541
763
  */
542
764
  constructor(link, window = null, session = null) {
543
765
  super(link, "plan", window, session);
544
766
  this.latest = new Property(this, "latest", false);
545
767
  this.changed = new Signal("plan.changed");
546
768
  }
547
- /** Approve the plan. */
769
+ /**
770
+ * Approve the plan.
771
+ *
772
+ * @param run_id — The run that submitted the plan.
773
+ */
548
774
  approve(run_id) {
549
775
  return this.call("approve", { run_id });
550
776
  }
551
- /** Send the plan back. */
777
+ /**
778
+ * Send the plan back.
779
+ *
780
+ * @param run_id — The run that submitted the plan.
781
+ */
552
782
  dismiss(run_id) {
553
783
  return this.call("dismiss", { run_id });
554
784
  }
@@ -574,6 +804,12 @@ export class HostTasks extends HostObject {
574
804
  *
575
805
  * A page never builds one of these: `bridge.host` is already the
576
806
  * right one, and a second would be a second conversation.
807
+ *
808
+ * @param link — The link this object talks to the host through.
809
+ * @param window — The window it was reached through, or null for
810
+ * the one the page is in.
811
+ * @param session — The session it was reached through, or null for
812
+ * the one on screen.
577
813
  */
578
814
  constructor(link, window = null, session = null) {
579
815
  super(link, "tasks", window, session);
@@ -598,6 +834,12 @@ export class HostLoop extends HostObject {
598
834
  *
599
835
  * A page never builds one of these: `bridge.host` is already the
600
836
  * right one, and a second would be a second conversation.
837
+ *
838
+ * @param link — The link this object talks to the host through.
839
+ * @param window — The window it was reached through, or null for
840
+ * the one the page is in.
841
+ * @param session — The session it was reached through, or null for
842
+ * the one on screen.
601
843
  */
602
844
  constructor(link, window = null, session = null) {
603
845
  super(link, "loop", window, session);
@@ -638,6 +880,12 @@ export class HostCommands extends HostObject {
638
880
  *
639
881
  * A page never builds one of these: `bridge.host` is already the
640
882
  * right one, and a second would be a second conversation.
883
+ *
884
+ * @param link — The link this object talks to the host through.
885
+ * @param window — The window it was reached through, or null for
886
+ * the one the page is in.
887
+ * @param session — The session it was reached through, or null for
888
+ * the one on screen.
641
889
  */
642
890
  constructor(link, window = null, session = null) {
643
891
  super(link, "commands", window, session);
@@ -646,7 +894,11 @@ export class HostCommands extends HostObject {
646
894
  this.skill_definitions = new Property(this, "skill_definitions", false);
647
895
  this.skill_details = new Property(this, "skill_details", false);
648
896
  }
649
- /** Run a slash command, as the extension. The answer comes back here. */
897
+ /**
898
+ * Run a slash command, as the extension. The answer comes back here.
899
+ *
900
+ * @param command — With its slash: `/ctx`.
901
+ */
650
902
  run(command) {
651
903
  return this.call("run", { command });
652
904
  }
@@ -664,17 +916,32 @@ export class HostAgents extends HostObject {
664
916
  *
665
917
  * A page never builds one of these: `bridge.host` is already the
666
918
  * right one, and a second would be a second conversation.
919
+ *
920
+ * @param link — The link this object talks to the host through.
921
+ * @param window — The window it was reached through, or null for
922
+ * the one the page is in.
923
+ * @param session — The session it was reached through, or null for
924
+ * the one on screen.
667
925
  */
668
926
  constructor(link, window = null, session = null) {
669
927
  super(link, "agents", window, session);
670
928
  this.details = new Property(this, "details", false);
671
929
  this.changed = new Signal("agents.changed");
672
930
  }
673
- /** Keep an agent made for one task, as `/agents promote` does. */
931
+ /**
932
+ * Keep an agent made for one task, as `/agents promote` does.
933
+ *
934
+ * @param name — The agent to keep, by its name.
935
+ * @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`.
936
+ */
674
937
  promote_ephemeral(name, target) {
675
938
  return this.call("promote_ephemeral", { name, target });
676
939
  }
677
- /** Drop an agent made for one task. */
940
+ /**
941
+ * Drop an agent made for one task.
942
+ *
943
+ * @param name — The agent to drop, by its name.
944
+ */
678
945
  discard_ephemeral(name) {
679
946
  return this.call("discard_ephemeral", { name });
680
947
  }
@@ -692,17 +959,32 @@ export class HostWorkflows extends HostObject {
692
959
  *
693
960
  * A page never builds one of these: `bridge.host` is already the
694
961
  * right one, and a second would be a second conversation.
962
+ *
963
+ * @param link — The link this object talks to the host through.
964
+ * @param window — The window it was reached through, or null for
965
+ * the one the page is in.
966
+ * @param session — The session it was reached through, or null for
967
+ * the one on screen.
695
968
  */
696
969
  constructor(link, window = null, session = null) {
697
970
  super(link, "workflows", window, session);
698
971
  this.list = new Property(this, "list", false);
699
972
  this.changed = new Signal("workflows.changed");
700
973
  }
701
- /** Start a workflow. */
974
+ /**
975
+ * Start a workflow.
976
+ *
977
+ * @param name — The workflow to start, by its name.
978
+ * @param input — The workflow's input, a JSON object it reads as it defines.
979
+ */
702
980
  run(name, input) {
703
981
  return this.call("run", { name, input });
704
982
  }
705
- /** Stop a workflow run. */
983
+ /**
984
+ * Stop a workflow run.
985
+ *
986
+ * @param workflow_run_id — The run to stop, by its id.
987
+ */
706
988
  cancel(workflow_run_id) {
707
989
  return this.call("cancel", { workflow_run_id });
708
990
  }
@@ -720,6 +1002,12 @@ export class HostScheduler extends HostObject {
720
1002
  *
721
1003
  * A page never builds one of these: `bridge.host` is already the
722
1004
  * right one, and a second would be a second conversation.
1005
+ *
1006
+ * @param link — The link this object talks to the host through.
1007
+ * @param window — The window it was reached through, or null for
1008
+ * the one the page is in.
1009
+ * @param session — The session it was reached through, or null for
1010
+ * the one on screen.
723
1011
  */
724
1012
  constructor(link, window = null, session = null) {
725
1013
  super(link, "scheduler", window, session);
@@ -730,11 +1018,19 @@ export class HostScheduler extends HostObject {
730
1018
  start() {
731
1019
  return this.call("start", {});
732
1020
  }
733
- /** Run a scheduled task now. */
1021
+ /**
1022
+ * Run a scheduled task now.
1023
+ *
1024
+ * @param task_id — The scheduled task to run now, by its id.
1025
+ */
734
1026
  run_now(task_id) {
735
1027
  return this.call("run_now", { task_id });
736
1028
  }
737
- /** Cancel a scheduled task. */
1029
+ /**
1030
+ * Cancel a scheduled task.
1031
+ *
1032
+ * @param task_id — The scheduled task to cancel, by its id.
1033
+ */
738
1034
  cancel(task_id) {
739
1035
  return this.call("cancel", { task_id });
740
1036
  }
@@ -752,21 +1048,40 @@ export class HostProcesses extends HostObject {
752
1048
  *
753
1049
  * A page never builds one of these: `bridge.host` is already the
754
1050
  * right one, and a second would be a second conversation.
1051
+ *
1052
+ * @param link — The link this object talks to the host through.
1053
+ * @param window — The window it was reached through, or null for
1054
+ * the one the page is in.
1055
+ * @param session — The session it was reached through, or null for
1056
+ * the one on screen.
755
1057
  */
756
1058
  constructor(link, window = null, session = null) {
757
1059
  super(link, "processes", window, session);
758
1060
  this.list = new Property(this, "list", false);
759
1061
  this.changed = new Signal("processes.changed");
760
1062
  }
761
- /** A shell's last lines. */
1063
+ /**
1064
+ * A shell's last lines.
1065
+ *
1066
+ * @param pid — The shell to read the last lines of, by its process id.
1067
+ * @param lines — 200 by default.
1068
+ */
762
1069
  tail(pid, lines) {
763
1070
  return this.call("tail", { pid, lines });
764
1071
  }
765
- /** Stop a shell. */
1072
+ /**
1073
+ * Stop a shell.
1074
+ *
1075
+ * @param pid — The shell to stop, by its process id.
1076
+ */
766
1077
  stop(pid) {
767
1078
  return this.call("stop", { pid });
768
1079
  }
769
- /** Run a command in the project and wait for it. */
1080
+ /**
1081
+ * Run a command in the project and wait for it.
1082
+ *
1083
+ * @param command — The command line to run in the project.
1084
+ */
770
1085
  run(command) {
771
1086
  return this.call("run", { command });
772
1087
  }
@@ -788,6 +1103,12 @@ export class HostWorkspace extends HostObject {
788
1103
  *
789
1104
  * A page never builds one of these: `bridge.host` is already the
790
1105
  * right one, and a second would be a second conversation.
1106
+ *
1107
+ * @param link — The link this object talks to the host through.
1108
+ * @param window — The window it was reached through, or null for
1109
+ * the one the page is in.
1110
+ * @param session — The session it was reached through, or null for
1111
+ * the one on screen.
791
1112
  */
792
1113
  constructor(link, window = null, session = null) {
793
1114
  super(link, "workspace", window, session);
@@ -796,19 +1117,35 @@ export class HostWorkspace extends HostObject {
796
1117
  this.head_changed = new Signal("workspace.head-changed");
797
1118
  this.files_changed = new Signal("workspace.files-changed");
798
1119
  }
799
- /** Read a file in the project. */
1120
+ /**
1121
+ * Read a file in the project.
1122
+ *
1123
+ * @param path — The file to read, by its path in the project.
1124
+ */
800
1125
  read(path) {
801
1126
  return this.call("read", { path });
802
1127
  }
803
- /** List a directory in the project. */
1128
+ /**
1129
+ * List a directory in the project.
1130
+ *
1131
+ * @param dir — The directory to list, by its path in the project; the project itself when left out.
1132
+ */
804
1133
  list(dir) {
805
1134
  return this.call("list", { dir });
806
1135
  }
807
- /** Complete a path, as `@` does. */
1136
+ /**
1137
+ * Complete a path, as `@` does.
1138
+ *
1139
+ * @param prefix — The path typed so far after `@`.
1140
+ */
808
1141
  complete(prefix) {
809
1142
  return this.call("complete", { prefix });
810
1143
  }
811
- /** Search the code. */
1144
+ /**
1145
+ * Search the code.
1146
+ *
1147
+ * @param query — The text to search the code for.
1148
+ */
812
1149
  search(query) {
813
1150
  return this.call("search", { query });
814
1151
  }
@@ -816,7 +1153,11 @@ export class HostWorkspace extends HostObject {
816
1153
  pick_dir() {
817
1154
  return this.call("pick_dir", {});
818
1155
  }
819
- /** 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. */
1156
+ /**
1157
+ * 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.
1158
+ *
1159
+ * @param path — Relative to the project, or absolute inside it.
1160
+ */
820
1161
  open(path) {
821
1162
  return this.call("open", { path });
822
1163
  }
@@ -836,6 +1177,12 @@ export class HostModels extends HostObject {
836
1177
  *
837
1178
  * A page never builds one of these: `bridge.host` is already the
838
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.
839
1186
  */
840
1187
  constructor(link, window = null, session = null) {
841
1188
  super(link, "models", window, session);
@@ -861,6 +1208,12 @@ export class HostMcp extends HostObject {
861
1208
  *
862
1209
  * A page never builds one of these: `bridge.host` is already the
863
1210
  * right one, and a second would be a second conversation.
1211
+ *
1212
+ * @param link — The link this object talks to the host through.
1213
+ * @param window — The window it was reached through, or null for
1214
+ * the one the page is in.
1215
+ * @param session — The session it was reached through, or null for
1216
+ * the one on screen.
864
1217
  */
865
1218
  constructor(link, window = null, session = null) {
866
1219
  super(link, "mcp", window, session);
@@ -869,11 +1222,19 @@ export class HostMcp extends HostObject {
869
1222
  this.details = new Property(this, "details", false);
870
1223
  this.changed = new Signal("mcp.changed");
871
1224
  }
872
- /** Connect a server. */
1225
+ /**
1226
+ * Connect a server.
1227
+ *
1228
+ * @param name — The server to connect, by its name in the MCP configuration.
1229
+ */
873
1230
  connect(name) {
874
1231
  return this.call("connect", { name });
875
1232
  }
876
- /** Disconnect a server. */
1233
+ /**
1234
+ * Disconnect a server.
1235
+ *
1236
+ * @param name — The server to disconnect, by its name in the MCP configuration.
1237
+ */
877
1238
  disconnect(name) {
878
1239
  return this.call("disconnect", { name });
879
1240
  }
@@ -881,7 +1242,13 @@ export class HostMcp extends HostObject {
881
1242
  ensure() {
882
1243
  return this.call("ensure", {});
883
1244
  }
884
- /** Offer or withhold one tool. */
1245
+ /**
1246
+ * Offer or withhold one tool.
1247
+ *
1248
+ * @param server — The server the tool belongs to, by its name.
1249
+ * @param tool — The tool to offer or withhold, by its name.
1250
+ * @param on — Whether the tool is offered.
1251
+ */
885
1252
  set_tool_enabled(server, tool, on) {
886
1253
  return this.call("set_tool_enabled", { server, tool, on });
887
1254
  }
@@ -901,6 +1268,12 @@ export class HostPlugins extends HostObject {
901
1268
  *
902
1269
  * A page never builds one of these: `bridge.host` is already the
903
1270
  * right one, and a second would be a second conversation.
1271
+ *
1272
+ * @param link — The link this object talks to the host through.
1273
+ * @param window — The window it was reached through, or null for
1274
+ * the one the page is in.
1275
+ * @param session — The session it was reached through, or null for
1276
+ * the one on screen.
904
1277
  */
905
1278
  constructor(link, window = null, session = null) {
906
1279
  super(link, "plugins", window, session);
@@ -908,39 +1281,80 @@ export class HostPlugins extends HostObject {
908
1281
  this.marketplaces = new Property(this, "marketplaces", false);
909
1282
  this.changed = new Signal("plugins.changed");
910
1283
  }
911
- /** What a plugin carries. */
1284
+ /**
1285
+ * What a plugin carries.
1286
+ *
1287
+ * @param name — The installed plugin to describe, by its name.
1288
+ */
912
1289
  contents(name) {
913
1290
  return this.call("contents", { name });
914
1291
  }
915
- /** What a plugin would install. */
1292
+ /**
1293
+ * What a plugin would install.
1294
+ *
1295
+ * @param source — The plugin's git URL, optionally followed by a subfolder.
1296
+ * @param branch — The branch, tag or commit to read; the default branch when left out.
1297
+ * @param subdir — The plugin's folder inside the repository, which wins over one in `source`.
1298
+ */
916
1299
  preview(source, branch, subdir) {
917
1300
  return this.call("preview", { source, branch, subdir });
918
1301
  }
919
- /** Install a plugin. */
1302
+ /**
1303
+ * Install a plugin.
1304
+ *
1305
+ * @param ref — The plugin to install: a git URL or `@<marketplace>/<plugin>`.
1306
+ * @param install_ref — The branch, tag or commit to check out; the marketplace's, or the default branch, when left out.
1307
+ */
920
1308
  install(ref, install_ref) {
921
1309
  return this.call("install", { ref, install_ref });
922
1310
  }
923
- /** Update a plugin. */
1311
+ /**
1312
+ * Update a plugin.
1313
+ *
1314
+ * @param name — The installed plugin to move, by its name.
1315
+ * @param install_ref — The branch, tag or commit to move to; the remote's default branch when left out.
1316
+ */
924
1317
  update(name, install_ref) {
925
1318
  return this.call("update", { name, install_ref });
926
1319
  }
927
- /** Remove a plugin. */
1320
+ /**
1321
+ * Remove a plugin.
1322
+ *
1323
+ * @param name — The installed plugin to remove, by its name.
1324
+ */
928
1325
  remove(name) {
929
1326
  return this.call("remove", { name });
930
1327
  }
931
- /** Enable or disable a plugin. */
1328
+ /**
1329
+ * Enable or disable a plugin.
1330
+ *
1331
+ * @param name — The installed plugin to switch on or off, by its name.
1332
+ * @param on — Whether the plugin is enabled.
1333
+ */
932
1334
  set_enabled(name, on) {
933
1335
  return this.call("set_enabled", { name, on });
934
1336
  }
935
- /** Add a marketplace. */
1337
+ /**
1338
+ * Add a marketplace.
1339
+ *
1340
+ * @param url — The marketplace's git URL.
1341
+ */
936
1342
  add_marketplace(url) {
937
1343
  return this.call("add_marketplace", { url });
938
1344
  }
939
- /** Remove a marketplace. */
1345
+ /**
1346
+ * Remove a marketplace.
1347
+ *
1348
+ * @param name — The marketplace to forget, by its name.
1349
+ */
940
1350
  remove_marketplace(name) {
941
1351
  return this.call("remove_marketplace", { name });
942
1352
  }
943
- /** Refresh marketplaces. */
1353
+ /**
1354
+ * Refresh marketplaces.
1355
+ *
1356
+ * @param name — The marketplace to fetch again; every one of them when left out.
1357
+ */
944
1358
  refresh_marketplaces(name) {
945
1359
  return this.call("refresh_marketplaces", { name });
946
1360
  }
@@ -958,13 +1372,23 @@ export class HostExtensions extends HostObject {
958
1372
  *
959
1373
  * A page never builds one of these: `bridge.host` is already the
960
1374
  * right one, and a second would be a second conversation.
1375
+ *
1376
+ * @param link — The link this object talks to the host through.
1377
+ * @param window — The window it was reached through, or null for
1378
+ * the one the page is in.
1379
+ * @param session — The session it was reached through, or null for
1380
+ * the one on screen.
961
1381
  */
962
1382
  constructor(link, window = null, session = null) {
963
1383
  super(link, "extensions", window, session);
964
1384
  this.installed = new Property(this, "installed", false);
965
1385
  this.state_changed = new Signal("extension.state-changed");
966
1386
  }
967
- /** Change this extension's own settings. */
1387
+ /**
1388
+ * Change this extension's own settings.
1389
+ *
1390
+ * @param values — The settings to change, as key to value.
1391
+ */
968
1392
  set_settings(values) {
969
1393
  return this.call("set_settings", { values });
970
1394
  }
@@ -982,6 +1406,12 @@ export class HostHooks extends HostObject {
982
1406
  *
983
1407
  * A page never builds one of these: `bridge.host` is already the
984
1408
  * right one, and a second would be a second conversation.
1409
+ *
1410
+ * @param link — The link this object talks to the host through.
1411
+ * @param window — The window it was reached through, or null for
1412
+ * the one the page is in.
1413
+ * @param session — The session it was reached through, or null for
1414
+ * the one on screen.
985
1415
  */
986
1416
  constructor(link, window = null, session = null) {
987
1417
  super(link, "hooks", window, session);
@@ -1010,17 +1440,34 @@ export class HostPermissions extends HostObject {
1010
1440
  *
1011
1441
  * A page never builds one of these: `bridge.host` is already the
1012
1442
  * right one, and a second would be a second conversation.
1443
+ *
1444
+ * @param link — The link this object talks to the host through.
1445
+ * @param window — The window it was reached through, or null for
1446
+ * the one the page is in.
1447
+ * @param session — The session it was reached through, or null for
1448
+ * the one on screen.
1013
1449
  */
1014
1450
  constructor(link, window = null, session = null) {
1015
1451
  super(link, "permissions", window, session);
1016
1452
  this.mode = new Property(this, "mode", false);
1017
1453
  this.mode_changed = new Signal("permissions.mode_changed");
1018
1454
  }
1019
- /** Would this tool call be allowed, asked or denied? One of `allow`, `ask` or `deny`. */
1455
+ /**
1456
+ * Would this tool call be allowed, asked or denied? One of `allow`, `ask` or `deny`.
1457
+ *
1458
+ * @param tool_name — The tool the call would use, by its name.
1459
+ * @param func_name — The function of that tool the call would reach.
1460
+ * @param tool_args — The call's arguments, which argument rules match against.
1461
+ */
1020
1462
  check(tool_name, func_name, tool_args) {
1021
1463
  return this.call("check", { tool_name, func_name, tool_args });
1022
1464
  }
1023
- /** Save a permission rule. */
1465
+ /**
1466
+ * Save a permission rule.
1467
+ *
1468
+ * @param rule — The rule to save: `Bash(git status)`, a tool name.
1469
+ * @param level — `allow`, `ask` or `deny`.
1470
+ */
1024
1471
  save_rule(rule, level) {
1025
1472
  return this.call("save_rule", { rule, level });
1026
1473
  }
@@ -1036,6 +1483,12 @@ export class HostPolicy extends HostObject {
1036
1483
  *
1037
1484
  * A page never builds one of these: `bridge.host` is already the
1038
1485
  * right one, and a second would be a second conversation.
1486
+ *
1487
+ * @param link — The link this object talks to the host through.
1488
+ * @param window — The window it was reached through, or null for
1489
+ * the one the page is in.
1490
+ * @param session — The session it was reached through, or null for
1491
+ * the one on screen.
1039
1492
  */
1040
1493
  constructor(link, window = null, session = null) {
1041
1494
  super(link, "policy", window, session);
@@ -1055,6 +1508,12 @@ export class HostAccount extends HostObject {
1055
1508
  *
1056
1509
  * A page never builds one of these: `bridge.host` is already the
1057
1510
  * right one, and a second would be a second conversation.
1511
+ *
1512
+ * @param link — The link this object talks to the host through.
1513
+ * @param window — The window it was reached through, or null for
1514
+ * the one the page is in.
1515
+ * @param session — The session it was reached through, or null for
1516
+ * the one on screen.
1058
1517
  */
1059
1518
  constructor(link, window = null, session = null) {
1060
1519
  super(link, "account", window, session);
@@ -1085,6 +1544,12 @@ export class HostNotifications extends HostObject {
1085
1544
  *
1086
1545
  * A page never builds one of these: `bridge.host` is already the
1087
1546
  * right one, and a second would be a second conversation.
1547
+ *
1548
+ * @param link — The link this object talks to the host through.
1549
+ * @param window — The window it was reached through, or null for
1550
+ * the one the page is in.
1551
+ * @param session — The session it was reached through, or null for
1552
+ * the one on screen.
1088
1553
  */
1089
1554
  constructor(link, window = null, session = null) {
1090
1555
  super(link, "notifications", window, session);
@@ -1092,11 +1557,20 @@ export class HostNotifications extends HostObject {
1092
1557
  this.unread = new Property(this, "unread", false);
1093
1558
  this.changed = new Signal("notifications.changed");
1094
1559
  }
1095
- /** Tell the person at this machine something. It never leaves the machine. */
1560
+ /**
1561
+ * Tell the person at this machine something. It never leaves the machine.
1562
+ *
1563
+ * @param notification — What to tell the person at this machine.
1564
+ */
1096
1565
  notify(notification) {
1097
1566
  return this.call("notify", { notification });
1098
1567
  }
1099
- /** Mark notifications read: these ids, one source, or all of them. */
1568
+ /**
1569
+ * Mark notifications read: these ids, one source, or all of them.
1570
+ *
1571
+ * @param ids — The notifications to mark read, by their ids.
1572
+ * @param source — The source whose notifications to mark read; every one of them when left out.
1573
+ */
1100
1574
  mark_read(ids, source) {
1101
1575
  return this.call("mark_read", { ids, source });
1102
1576
  }
@@ -1122,6 +1596,12 @@ export class HostSelf extends HostObject {
1122
1596
  *
1123
1597
  * A page never builds one of these: `bridge.host` is already the
1124
1598
  * right one, and a second would be a second conversation.
1599
+ *
1600
+ * @param link — The link this object talks to the host through.
1601
+ * @param window — The window it was reached through, or null for
1602
+ * the one the page is in.
1603
+ * @param session — The session it was reached through, or null for
1604
+ * the one on screen.
1125
1605
  */
1126
1606
  constructor(link, window = null, session = null) {
1127
1607
  super(link, "self", window, session);
@@ -1132,11 +1612,20 @@ export class HostSelf extends HostObject {
1132
1612
  this.settings_changed = new Signal("self.settings_changed");
1133
1613
  this.state_changed = new Signal("self.state_changed");
1134
1614
  }
1135
- /** 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`. */
1615
+ /**
1616
+ * 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`.
1617
+ *
1618
+ * @param reason — Why the extension is working inside igni's process.
1619
+ * @param ttl_seconds — Default and at most 600.
1620
+ */
1136
1621
  busy(reason, ttl_seconds) {
1137
1622
  return this.call("busy", { reason, ttl_seconds });
1138
1623
  }
1139
- /** Let go of the lease `busy` took for `reason`. Nothing happens if there is none. */
1624
+ /**
1625
+ * Let go of the lease `busy` took for `reason`. Nothing happens if there is none.
1626
+ *
1627
+ * @param reason — The reason the lease was taken for.
1628
+ */
1140
1629
  done(reason) {
1141
1630
  return this.call("done", { reason });
1142
1631
  }
@@ -1200,6 +1689,12 @@ export class Host extends HostObject {
1200
1689
  *
1201
1690
  * A page never builds one of these: `bridge.host` is already the
1202
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.
1203
1698
  */
1204
1699
  constructor(link, window = null, session = null) {
1205
1700
  super(link, "", window, session);
@@ -1229,11 +1724,21 @@ export class Host extends HostObject {
1229
1724
  this.self = new HostSelf(link, window, session);
1230
1725
  this.changed = new Signal("changed");
1231
1726
  }
1232
- /** 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. */
1727
+ /**
1728
+ * 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.
1729
+ *
1730
+ * @param context — Named text fields.
1731
+ * @param questions — The questions to ask, each with its own text and answer type.
1732
+ */
1233
1733
  decide(context, questions) {
1234
1734
  return this.call("decide", { context, questions });
1235
1735
  }
1236
- /** `decide` for up to 16 contexts at once, sharing forward passes. One decision per context, in order. */
1736
+ /**
1737
+ * `decide` for up to 16 contexts at once, sharing forward passes. One decision per context, in order.
1738
+ *
1739
+ * @param contexts — The contexts to ask about, one decision each, in order.
1740
+ * @param questions — The questions to ask of every context.
1741
+ */
1237
1742
  decide_batch(contexts, questions) {
1238
1743
  return this.call("decide_batch", { contexts, questions });
1239
1744
  }