@aragon-agent/cli 0.6.50 → 0.6.52
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2800 -2723
- package/README.md +81 -6
- package/dist/agent/controller.d.ts +91 -5
- package/dist/agent/controller.js +252 -31
- package/dist/agent/image-history.d.ts +93 -0
- package/dist/agent/image-history.js +239 -0
- package/dist/agent/image-input-prompt.d.ts +17 -0
- package/dist/agent/image-input-prompt.js +56 -0
- package/dist/agent/image-support.d.ts +51 -0
- package/dist/agent/image-support.js +40 -0
- package/dist/agent/prompt-options.d.ts +18 -0
- package/dist/agent/system-prompt.d.ts +13 -0
- package/dist/agent/system-prompt.js +2 -0
- package/dist/agent/team-mode-wiring.d.ts +108 -0
- package/dist/agent/team-mode-wiring.js +221 -0
- package/dist/app/App.js +55 -14
- package/dist/app/use-team-mode.d.ts +53 -0
- package/dist/app/use-team-mode.js +107 -0
- package/dist/commands/catalog.js +1 -1
- package/dist/commands/team-command.d.ts +6 -4
- package/dist/commands/team-command.js +67 -27
- package/dist/compaction/archive.js +6 -1
- package/dist/compaction/compactor.js +5 -0
- package/dist/compaction/memory-input.d.ts +21 -0
- package/dist/compaction/memory-input.js +66 -3
- package/dist/governance/engine/engine.d.ts +8 -0
- package/dist/governance/engine/engine.js +11 -1
- package/dist/governance/store/atomic.d.ts +10 -0
- package/dist/governance/store/atomic.js +16 -8
- package/dist/governance/store/run-lock.d.ts +4 -0
- package/dist/governance/store/run-lock.js +4 -2
- package/dist/host/interaction.d.ts +6 -1
- package/dist/host/interaction.js +47 -8
- package/dist/session/persist.js +24 -2
- package/dist/session/validate-session.js +2 -2
- package/dist/team/forced-mode.d.ts +6 -2
- package/dist/team/forced-mode.js +11 -1
- package/dist/team/runtime.d.ts +6 -0
- package/dist/team/runtime.js +4 -0
- package/dist/team/subagent.d.ts +23 -2
- package/dist/team/subagent.js +44 -2
- package/dist/tools/fs-tools.d.ts +22 -0
- package/dist/tools/fs-tools.js +26 -3
- package/dist/tools/image-read.d.ts +69 -0
- package/dist/tools/image-read.js +183 -0
- package/dist/tools/index.d.ts +12 -0
- package/dist/tools/index.js +2 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -957,7 +957,7 @@ ignores them rather than rejecting the library):
|
|
|
957
957
|
| `/session [copy\|pin]` | Report this session's id, file and branch parent; `copy` puts `aragon --resume <id>` on the clipboard; `pin` makes `sessions prune` skip the file forever |
|
|
958
958
|
| `/plan [on\|off\|status]` | Toggle plan mode (and leave governance) - the keyboard-free equivalent of `Shift+Tab` |
|
|
959
959
|
| `/gov [status\|on\|plan\|off\|board\|runs\|report [id]\|resume [id]\|pause [cancel]\|abort\|budget <n\|off>\|help]` | **Governance mode**: a governed engineering team (dev / review / test / inspector) with a GT scoring economy. `on` = GOVERN, `plan` = PLAN+GOVERN (interview first), `board` opens the full-screen overview, `runs` lists past runs with phase / health / tokens / cost, `report` re-reads a run's report, `pause` stops at the end of the running stage (nothing is killed), `abort` stops the running stage at once (the run is resumable). See [Governance mode](#governance-mode) |
|
|
960
|
-
| `/team [on\|off\|status]` / `/team [-n <n>] [--parts a,b,c] [--read-only] <brief>` | **Force team mode and start now.** `/team <brief>` arms forced team mode and submits that work as a normal turn: the lead analyses and plans it, then calls `task` — the directive, the `<forced_team_mode>` prompt block and a mechanical end-of-turn gate all say so. `/team on` arms without submitting, `/team off` leaves
|
|
960
|
+
| `/team [on [n]\|off\|status]` / `/team [-n <n>] [--parts a,b,c] [--read-only] <brief>` | **Force team mode and start now.** `/team <brief>` arms forced team mode and submits that work as a normal turn: the lead analyses and plans it, then calls `task` — the directive, the `<forced_team_mode>` prompt block and a mechanical end-of-turn gate all say so. `/team on [n]` arms (optionally with a count) without submitting, `/team off` leaves - both take effect when the turn ends if one is running - and `/team` reports. The configuration it used to carry (team switch, width, concurrency, supervisor, subagent model) lives in `Settings > Team` |
|
|
961
961
|
| `/todo [on\|off\|panel on\|off\|follow <mode>\|acceptance on\|off\|reset\|clear\|continue]` | Todo planning: status, the on/off switch, the rail, follow-through, acceptance criteria, and picking an unfinished plan back up |
|
|
962
962
|
| `/retry [show\|on\|off\|max <n>]` | API retry: the effective ladder, the on/off switch, the retry count. Takes effect **in the running session**, children included |
|
|
963
963
|
| `/fast [on\|off\|model <id>\|provider <id>\|same\|review <n\|off>]` | Fast model tier: status and this session's totals, the on/off switch, which model, the review cadence |
|
|
@@ -1003,7 +1003,9 @@ completes, `Up` / `Down` moves the selection, `Esc` closes it.
|
|
|
1003
1003
|
| `Ctrl+C` ×2 | Exit (first press warns), once no services are running |
|
|
1004
1004
|
| `Ctrl+L` | **Branch this session into a new terminal**: opens a PowerShell (Windows) or bash (macOS/Linux) window at the current `/cwd` and runs `aragon --resume <id>` there, so the branch gets its own id and the session you branched from is untouched. Works while the agent is running - the child inherits the last settled turn. Same code path as `/branch` |
|
|
1005
1005
|
| `Ctrl+R` | Redraw the frame (moved here from `Ctrl+L`, which is now the branch key) |
|
|
1006
|
-
| `Ctrl+T` |
|
|
1006
|
+
| `Ctrl+T` | **Team mode on / off.** While on, every message fans out to subagents (the forced mode `/team` arms); the status bar shows the switch. Session state, never saved. See [The team mode switch](#the-team-mode-switch) |
|
|
1007
|
+
| `Ctrl+Up` / `Ctrl+Down` | **Team size**: one more / one fewer subagent per message, between 1 and `team.maxSubagents` (no wrap). Only while team mode is on. Inside the prompt library overlay these keys reorder prompts instead |
|
|
1008
|
+
| `Alt+T` | Show / hide thinking (**off by default**) for the entire session. This was `Ctrl+T`. On macOS Terminal.app turn on *Use Option as Meta key* or `Option+T` types `†` |
|
|
1007
1009
|
| `Ctrl+O` | Expand / collapse the most recent tool, team, compaction or **service** card — including a diff or a service's log tail. In native scroll mode printed rows cannot change, so it **prints an expanded copy** below instead. When no card is asking for the key it re-prints the **last finished answer** in full — the same escape hatch for a reply taller than the region |
|
|
1008
1010
|
| Terminal scrolling (native mode, the default) | The wheel, the scrollbar, `Shift+PgUp` / `Shift+PgDn`, text selection and in-terminal search are all your terminal's own — see [Scrolling](#scrolling) |
|
|
1009
1011
|
| `PgUp` / `PgDn` | Page through an open overlay; in full-screen mode also scroll the transcript a page |
|
|
@@ -1241,11 +1243,11 @@ off the top of the screen. It is written for the model, not for you. So it is of
|
|
|
1241
1243
|
by default, and a settled turn that thought leaves one muted row in its place:
|
|
1242
1244
|
|
|
1243
1245
|
```
|
|
1244
|
-
✱ thought for 12s ·
|
|
1246
|
+
✱ thought for 12s · alt+t to show
|
|
1245
1247
|
```
|
|
1246
1248
|
|
|
1247
1249
|
That row is the whole point — hiding information without saying that it exists
|
|
1248
|
-
is how a "clean" UI becomes a dishonest one. `
|
|
1250
|
+
is how a "clean" UI becomes a dishonest one. `Alt+T` shows the bodies for the
|
|
1249
1251
|
session, `showThinking: true` (or `--show-thinking`, or `ARAGON_SHOW_THINKING=1`)
|
|
1250
1252
|
shows them permanently, and `/settings` has a **Show thinking** row next to
|
|
1251
1253
|
**Thinking**.
|
|
@@ -1393,7 +1395,7 @@ gnome-terminal and friends.
|
|
|
1393
1395
|
printed, so a later window resize does not re-wrap it. The rows still *on* the screen
|
|
1394
1396
|
are redrawn in place when the layout has to move them (a reply landing, a draft
|
|
1395
1397
|
getting taller, the conversation outgrowing the region), at the same width, without
|
|
1396
|
-
duplicating anything. So `
|
|
1398
|
+
duplicating anything. So `Alt+T` (thinking) and `/theme` affect only *new* messages,
|
|
1397
1399
|
and `Ctrl+O` prints an expanded copy of a tool card instead of expanding the old one.
|
|
1398
1400
|
`/clear` prints a `---- conversation cleared ----` separator; it cannot erase
|
|
1399
1401
|
scrollback. Resizing in the middle of a long answer is the one case where rows can be
|
|
@@ -1951,6 +1953,45 @@ With background services on — also the default — two more are added:
|
|
|
1951
1953
|
`bash_output` and `bash_kill` (see below), and `bash` itself gains a `background`
|
|
1952
1954
|
parameter. `bash.background: false` removes all three again.
|
|
1953
1955
|
|
|
1956
|
+
### Looking at images (`read_file`)
|
|
1957
|
+
|
|
1958
|
+
`read_file` shows the model a picture when you point it at a PNG, JPEG, GIF or
|
|
1959
|
+
WebP file: the tool result is the image itself (preceded by a text label,
|
|
1960
|
+
`[read_file image: shots/login.png - PNG 1568x882, 412 KB]`), not a "binary file"
|
|
1961
|
+
error. No new tool is involved; the model just calls `read_file` on the path, whether
|
|
1962
|
+
you typed it, an "Attached files" list from the desktop app carried it, or the model
|
|
1963
|
+
found the file itself.
|
|
1964
|
+
|
|
1965
|
+
- **It depends on the active model.** The system prompt carries an `<image_input>`
|
|
1966
|
+
block written for the model in use: *it can see images*, *image support is
|
|
1967
|
+
unconfirmed* (a self-hosted or gateway model the tables do not know — the picture is
|
|
1968
|
+
tried, and if the provider rejects the request because of it the session records
|
|
1969
|
+
that this model cannot read images, tells you once, and the next message works), or
|
|
1970
|
+
*it cannot see images* (the model is told to say so plainly and ask you to switch,
|
|
1971
|
+
never to describe what it has not seen). Size and format complaints from a provider
|
|
1972
|
+
are not taken as "cannot see images".
|
|
1973
|
+
- **Limits.** One image per call, at most 5 MB and 8000 px per side. A larger file is
|
|
1974
|
+
refused with a command to shrink it (ImageMagick, `sips`, Pillow), which an agent
|
|
1975
|
+
with `bash` can run and then read the copy. SVG is read as text; PDF, BMP, TIFF and
|
|
1976
|
+
HEIC are named in the error with a conversion command. EXIF / GPS / IPTC metadata
|
|
1977
|
+
is removed from the picture before it is sent. Text inside an image is treated as
|
|
1978
|
+
content, not as instructions.
|
|
1979
|
+
- **Pictures in history are bounded.** A request carries at most the 8 most recent
|
|
1980
|
+
tool pictures (and no more than 16 MiB of them); older ones turn into their label
|
|
1981
|
+
plus a note, in steps of four so the provider's prompt cache is not rewritten on
|
|
1982
|
+
every read. Compaction and the session file (`/save`, checkpoints) and the
|
|
1983
|
+
compaction archive keep the label and a note, never the pixels — the agent re-reads
|
|
1984
|
+
the file if it needs the picture again. The `exec` event stream and the logs never
|
|
1985
|
+
contain image bytes.
|
|
1986
|
+
- **Subagents** use their own model for all of the above: a `team.model: fast` child
|
|
1987
|
+
on a text-only model is told it cannot see images even when the lead can.
|
|
1988
|
+
- **Privacy.** A picture is sent to your model provider like any file the agent reads.
|
|
1989
|
+
Treat screenshots as you would the text of a file.
|
|
1990
|
+
- **Turn it off** with `ARAGON_TOOL_IMAGES=0`: `read_file` goes back to text only, the
|
|
1991
|
+
prompt block disappears, subagents do not read pictures and refusals are not
|
|
1992
|
+
learned from. (`ARAGON_COMPACTION_DEMOTE_IMAGES=0` alone would make compaction
|
|
1993
|
+
protect tool pictures again; use `ARAGON_TOOL_IMAGES=0` to roll the feature back.)
|
|
1994
|
+
|
|
1954
1995
|
## Background services
|
|
1955
1996
|
|
|
1956
1997
|
The agent can write a web app; it also has to be able to **run** one. A command
|
|
@@ -2243,7 +2284,39 @@ does not depend on the model's cooperation — the submitted directive, a
|
|
|
2243
2284
|
that asks once (`Forced team mode: no dispatch last turn - asking the agent to
|
|
2244
2285
|
dispatch now.`) when a turn used tools and dispatched nothing. The gate never
|
|
2245
2286
|
fires twice for one request: a human submit refills the budget, a turn does not.
|
|
2246
|
-
|
|
2287
|
+
The status bar always carries the switch (`Team ──● 4` when on, `T4` on a narrow terminal) -
|
|
2288
|
+
see [The team mode switch](#the-team-mode-switch).
|
|
2289
|
+
|
|
2290
|
+
### The team mode switch
|
|
2291
|
+
|
|
2292
|
+
Forced team mode is a switch, not a command you have to remember:
|
|
2293
|
+
|
|
2294
|
+
| Key | What it does |
|
|
2295
|
+
|---|---|
|
|
2296
|
+
| `Ctrl+T` | Turn team mode on or off. The first time it is switched on in a session, a one-line notice says every message now fans out and uses more tokens |
|
|
2297
|
+
| `Ctrl+Up` / `Ctrl+Down` | Subagents per message, one at a time, from 1 to `team.maxSubagents`. It stops at the ends rather than wrapping, and says so |
|
|
2298
|
+
| `/team on [n]` / `/team off` | The same switch by command - the way to set the size where a terminal cannot send `Ctrl+Up` / `Ctrl+Down` |
|
|
2299
|
+
| `Alt+T` | Not team mode: show / hide thinking (it used to be `Ctrl+T`) |
|
|
2300
|
+
|
|
2301
|
+
The status bar shows it after the mode word, **whether it is on or off**, so you never have to guess:
|
|
2302
|
+
|
|
2303
|
+
```
|
|
2304
|
+
Idle | BUILD | Team ○── off | Context 12% | ... team mode off
|
|
2305
|
+
Idle | BUILD | Team ──● 4 | Context 12% | ... on, 4 subagents per message
|
|
2306
|
+
Idle | BUILD | Team ──● 4>off | ... off as soon as this turn ends
|
|
2307
|
+
Idle | BUILD | Team ──● paused | ... GOVERN is running its own team
|
|
2308
|
+
```
|
|
2309
|
+
|
|
2310
|
+
Pressing a key **while a turn is running** does not rewrite the prompt under it (that would also discard the
|
|
2311
|
+
provider's prompt cache): the field shows `4>off`, `off>4` or `4>6`, a toast says it will happen when the turn
|
|
2312
|
+
ends, and pressing the opposite key cancels it. A forced turn that you switch off in the middle is not nudged
|
|
2313
|
+
afterwards. The switch controls the *session*, not the capability: turning it off does not change `team.enabled`
|
|
2314
|
+
(Settings > Team), and turning it on while the capability is off in Settings enables it for this session only.
|
|
2315
|
+
Lowering `Max subagents` or switching `Team mode` off in Settings updates the switch and the system prompt at
|
|
2316
|
+
once. A session started with `--no-team` has no switch.
|
|
2317
|
+
|
|
2318
|
+
Two notes for particular terminals: `Ctrl+Up` / `Ctrl+Down` are taken by macOS Mission Control and some
|
|
2319
|
+
SSH/tmux setups (`/team on <n>` does not depend on them), and `Alt+T` needs *Option as Meta* on macOS Terminal.app.
|
|
2247
2320
|
|
|
2248
2321
|
`/team` with no argument reports the forced state, capacity, the subagent model
|
|
2249
2322
|
and where the switches live — and answers even in a `--no-team` session, where
|
|
@@ -3301,6 +3374,8 @@ env / `.env` → CLI flags**.
|
|
|
3301
3374
|
`ARAGON_TODO` (`0` disables todo planning entirely),
|
|
3302
3375
|
`ARAGON_TODO_FOLLOW` (`notify` / `auto` / `off`),
|
|
3303
3376
|
`ARAGON_TODO_ACCEPTANCE` (`0` plans steps only: no criteria, no verify phase),
|
|
3377
|
+
`ARAGON_TOOL_IMAGES` (`0` stops `read_file` from showing pictures to the model; see
|
|
3378
|
+
[Looking at images](#looking-at-images-read_file)),
|
|
3304
3379
|
`ARAGON_RETRY` (`0` disables API retry), `ARAGON_RETRY_MAX` (retry count; `0`
|
|
3305
3380
|
also disables),
|
|
3306
3381
|
`ARAGON_UPDATE` (`0` / `off` disables auto-update, `notify` reports without
|
|
@@ -14,7 +14,9 @@ import { type CompactionIdentity } from '../compaction/memory-identity.js';
|
|
|
14
14
|
* from the event stream by the reducer (TUI) and the headless writer.
|
|
15
15
|
*/
|
|
16
16
|
import type { PromptOptions, PromptOutcome } from './prompt-options.js';
|
|
17
|
-
import {
|
|
17
|
+
import { type ImageSupportResult } from './image-support.js';
|
|
18
|
+
import { type ImageUsage } from './image-history.js';
|
|
19
|
+
import { ModelRegistry, type AgentEvent, type AgentTool, type ContentPart, type Message, type ModelInfo, type ModelRef, type ProviderRegistry, type ThinkingLevel } from '@aragon-agent/core';
|
|
18
20
|
import type { CliConfig, CompactionConfig, FastConfig, RetryConfig, TeamConfig, ThemeName, TodoConfig } from '@aragon-agent/tui/model/config/schema';
|
|
19
21
|
import type { ModelRole } from '@aragon-agent/tui/model/config/model-profiles';
|
|
20
22
|
import { ModelWindows } from '../config/model-windows.js';
|
|
@@ -25,7 +27,8 @@ import type { ToolPermission } from '../exec/permission.js';
|
|
|
25
27
|
import { type ToolOutputListener } from '@aragon-agent/tui/model/tools/tool-output-store';
|
|
26
28
|
import type { FilePatch } from '@aragon-agent/tui/model/tools/patch';
|
|
27
29
|
import type { SubagentModelResolution } from '@aragon-agent/tui/model/team/model';
|
|
28
|
-
import type
|
|
30
|
+
import { type ForcedTeamState } from '../team/forced-mode.js';
|
|
31
|
+
import type { TeamModeOutcome, TeamModeRequest, TeamModeView } from '@aragon-agent/tui/model/team/team-mode';
|
|
29
32
|
import type { TeamEvent, TeamSnapshot } from '@aragon-agent/tui/model/team/types';
|
|
30
33
|
import { ProcSupervisor } from '../proc/supervisor.js';
|
|
31
34
|
import type { WaitEvent } from '@aragon-agent/tui/model/proc/wait-view';
|
|
@@ -315,7 +318,7 @@ export declare class AgentController {
|
|
|
315
318
|
* file only forwards. `registered` inside it is fixed at construction (D-22).
|
|
316
319
|
*/
|
|
317
320
|
private readonly governance;
|
|
318
|
-
private
|
|
321
|
+
private readonly teamMode;
|
|
319
322
|
private readonly todoRegistered;
|
|
320
323
|
private todoEnabled;
|
|
321
324
|
private readonly todos;
|
|
@@ -400,6 +403,21 @@ export declare class AgentController {
|
|
|
400
403
|
private abortRequested;
|
|
401
404
|
/** Only exact acceptance receipts release user messages from reviewer protection. */
|
|
402
405
|
private readonly pendingUserSteering;
|
|
406
|
+
private imageOverride;
|
|
407
|
+
/**
|
|
408
|
+
* The single switch for agent-image-reading (D-17). `ARAGON_TOOL_IMAGES=0` turns off EVERY
|
|
409
|
+
* producer and helper together: the `read_file` image port, the `<image_input>` block, the
|
|
410
|
+
* tool-picture window, the refusal learning, and the subagents' `imageSupportFor` (a second
|
|
411
|
+
* producer: a half-off switch would still hand pictures to a child). Read once, so the
|
|
412
|
+
* answer cannot change between the tool array and the prompt that describes it.
|
|
413
|
+
*/
|
|
414
|
+
private readonly toolImagesEnabled;
|
|
415
|
+
/**
|
|
416
|
+
* What the CURRENT prompt's `<image_input>` block was written for: the model and the support
|
|
417
|
+
* answer together (`provider/model:support`). The block names the model, so a switch between
|
|
418
|
+
* two vision models changes its text even though the answer stays `yes`.
|
|
419
|
+
*/
|
|
420
|
+
private promptImageKey;
|
|
403
421
|
/** Session changes must not make a delayed receipt match a new message. */
|
|
404
422
|
private readonly steeringPrefix;
|
|
405
423
|
private steeringSequence;
|
|
@@ -447,7 +465,24 @@ export declare class AgentController {
|
|
|
447
465
|
*/
|
|
448
466
|
private toolNames;
|
|
449
467
|
private composeSystemPrompt;
|
|
468
|
+
/**
|
|
469
|
+
* Whether GOVERN is dropping the team blocks (`task` is refused there, and advertising it
|
|
470
|
+
* would describe a refused capability). ONE predicate for the prompt composer and for the
|
|
471
|
+
* team switch's `paused` state, so the status bar and the prompt cannot disagree.
|
|
472
|
+
*
|
|
473
|
+
* `governBlock` lets the composer pass the block it already built for the prompt instead
|
|
474
|
+
* of building the Orchestrator text a second time.
|
|
475
|
+
*/
|
|
476
|
+
private teamBlocksDropped;
|
|
450
477
|
private rebuildSystemPrompt;
|
|
478
|
+
private currentImageKey;
|
|
479
|
+
/**
|
|
480
|
+
* Rewrite the prompt only when what the `<image_input>` block says has actually changed (a
|
|
481
|
+
* model switch, a user override, or model discovery turning `unknown` into a fact). Every
|
|
482
|
+
* rewrite breaks the provider's prompt cache from the system prompt on, so an unchanged
|
|
483
|
+
* answer costs nothing.
|
|
484
|
+
*/
|
|
485
|
+
private syncImageInputBlock;
|
|
451
486
|
/** Re-render the prompt from the current skill set and tell the UI. */
|
|
452
487
|
refreshSkills(): void;
|
|
453
488
|
getSkillService(): SkillService;
|
|
@@ -604,7 +639,7 @@ export declare class AgentController {
|
|
|
604
639
|
/** Queue automation/user guidance with the same protection as visible input. */
|
|
605
640
|
steer(text: string): void;
|
|
606
641
|
/** Return the opaque ID used by the view to match Core's acceptance receipt. */
|
|
607
|
-
queueUserMessage(text: string): string;
|
|
642
|
+
queueUserMessage(text: string, parts?: ContentPart[]): string;
|
|
608
643
|
private enqueueSteering;
|
|
609
644
|
/**
|
|
610
645
|
* Withdraw a queued user message by the id `queueUserMessage` returned.
|
|
@@ -845,8 +880,24 @@ export declare class AgentController {
|
|
|
845
880
|
armForcedTeam(count: number): number;
|
|
846
881
|
/** Disarm. IDEMPOTENT: disarming an unarmed session rewrites nothing. */
|
|
847
882
|
disarmForcedTeam(): void;
|
|
848
|
-
/**
|
|
883
|
+
/**
|
|
884
|
+
* The armed state the session honours, read at render time by `/team`'s status.
|
|
885
|
+
*
|
|
886
|
+
* DERIVED (team-mode-toggle-keys I-4): `null` whenever the tool is not registered or the
|
|
887
|
+
* capability is off, and narrowed to the current `maxSubagents`.
|
|
888
|
+
*/
|
|
849
889
|
getForcedTeam(): ForcedTeamState | null;
|
|
890
|
+
/** The team mode switch as every surface renders it. Cached; cheap to call per render. */
|
|
891
|
+
getTeamMode(): TeamModeView;
|
|
892
|
+
/**
|
|
893
|
+
* The ONE write entry for the team mode switch: Ctrl+T, Ctrl+Up/Down, `/team on|off` and
|
|
894
|
+
* the desktop chip all call this. A turn in flight defers the change to its end.
|
|
895
|
+
*/
|
|
896
|
+
setTeamMode(req: TeamModeRequest): TeamModeOutcome;
|
|
897
|
+
/** Land a deferred change at `agent_end`. `null` = nothing was pending. */
|
|
898
|
+
applyPendingTeamMode(): TeamModeOutcome | null;
|
|
899
|
+
/** Tell `listener` whenever the switch's view changes. Returns the unsubscribe. */
|
|
900
|
+
subscribeTeamMode(listener: () => void): () => void;
|
|
850
901
|
getTeamConfig(): TeamConfig;
|
|
851
902
|
/**
|
|
852
903
|
* Adopt a new team config for this session and re-render the prompt (the block
|
|
@@ -1134,6 +1185,41 @@ export declare class AgentController {
|
|
|
1134
1185
|
getConfig(): CliConfig;
|
|
1135
1186
|
getProviderRegistry(): ProviderRegistry;
|
|
1136
1187
|
getModelRegistry(): ModelRegistry;
|
|
1188
|
+
/**
|
|
1189
|
+
* Whether the ACTIVE model can read images (desktop-attachments-and-tool-voice §3.6).
|
|
1190
|
+
* Read live on every call: the model can change mid-session.
|
|
1191
|
+
*/
|
|
1192
|
+
getImageSupport(): ImageSupportResult & {
|
|
1193
|
+
tokenEstimate: number;
|
|
1194
|
+
};
|
|
1195
|
+
/**
|
|
1196
|
+
* The same answer for ANY model, not just the active one: the user's override first (it only
|
|
1197
|
+
* applies to the model it was set for), then the tables. A model switch is transactional and
|
|
1198
|
+
* pre-builds the system prompt for the incoming config, and a subagent may run a different
|
|
1199
|
+
* model from the lead, so neither can ask the single-model question above.
|
|
1200
|
+
*/
|
|
1201
|
+
resolveImageSupportFor(cfg: Pick<CliConfig, 'provider' | 'model' | 'baseUrl'>): ImageSupportResult;
|
|
1202
|
+
/**
|
|
1203
|
+
* The user's word on whether ONE model (`provider/model`) reads images. It only applies while
|
|
1204
|
+
* that model is active, and it is what makes request-time projection correct for a model the
|
|
1205
|
+
* tables do not know. `null` clears it. Session-scoped: the desktop re-sends it on attach.
|
|
1206
|
+
*/
|
|
1207
|
+
setImageSupportOverride(key: string, value: 'on' | 'off' | null): void;
|
|
1208
|
+
/**
|
|
1209
|
+
* D-12: a model of unconfirmed image support that the provider refuses a picture for is, for
|
|
1210
|
+
* the rest of the session, a model that cannot read pictures. Without this, trying (which
|
|
1211
|
+
* `unknown` allows) would lock a text-only model out of the conversation: every later
|
|
1212
|
+
* request would carry the same picture and fail the same way.
|
|
1213
|
+
*
|
|
1214
|
+
* Conservative on purpose, and silent when any condition fails: it acts on the error TEXT
|
|
1215
|
+
* (a token-count mention is classed as context overflow by the transport), never overrides
|
|
1216
|
+
* the user's own word, ignores size and format complaints (the model may read other
|
|
1217
|
+
* pictures fine), and needs a picture in the history to have been the cause. It does not
|
|
1218
|
+
* retry: the next send simply works, and the desktop has its own recovery for the same error.
|
|
1219
|
+
*/
|
|
1220
|
+
private learnImageRefusal;
|
|
1221
|
+
/** Image parts currently held by history (budget input; counts base64 chars, never decodes). */
|
|
1222
|
+
getImageUsageInHistory(): ImageUsage;
|
|
1137
1223
|
/** Resolve `ModelInfo` for the active model, falling back to a runtime model. */
|
|
1138
1224
|
getModelInfo(): ModelInfo;
|
|
1139
1225
|
/**
|