github VictorAboba/DreamTeam v0.3.0
DreamTeam 0.3.0

57 minutes ago

English · Русский

English

HTTP API v1

A stable HTTP interface for running the swarm from another program: a site or a script uploads files, starts a
session with a goal, follows its timeline, answers the agents and takes the result and the files they made. It is
the HTTP form of dreamteam -p, under /api/v1, JSON in and out (#55).

  • Its own token. DREAMTEAM_API_TOKEN is needed even on 127.0.0.1. It opens only /api/v1, and only the
    sessions created through the API; the board, the settings, /mcp and your other sessions stay closed to it.
    With neither token set, the API answers api_disabled.
  • Uploads as the raw request body (POST /api/v1/uploads?filename=); a zip can be unpacked into the session.
  • Sessions: a goal, files, a saved team or a list of roles, a model profile by name, budget and limits. Creating
    one answers 202 and starts it in the background; client_ref makes a repeated create return the same session.
    Providers and API keys never go through the API.
  • Events for a timeline: long polls by id or Server-Sent Events resumed with Last-Event-ID. Every event has a
    ready-made text line in the session's language.
  • Questions and reviews: with "answers": "auto" the hub answers the agents itself, as -p does; with
    "manual" your program gets them as requests and answers them. stop_when_done stops the session when the goal is
    reached.
  • Result and files: the -p result object with the list of changed files, a file's bytes, or a zip of a folder.
    Links are never followed.
  • Folders on the hub's computer: roots you list in dreamteam.toml under [api.folders.<name>] can be copied
    into a session or, where you allow in_place, worked on in place. A client names a root and a path inside it,
    never an absolute path.
  • For access from another computer, run the hub in dreamteam sandbox, which mounts the [api] folders.

Guide: HTTP API. Settings:
HTTP API settings.

Other changes

  • Sessions created through the API are marked "API" on the board and HTTP API in dreamteam status, the session
    list and the TUI picker. dreamteam -c, console and traces pass over them; they are reached by name or id.
    dreamteam status prints the API address when an API token is set.
  • A session's folder (/cd, --workspace, session_cd, the API) can no longer be another DreamTeam home or a folder
    inside one, the hub-tokens folder, or on Linux and macOS a folder under /proc, /sys or /dev. Two sessions on
    one folder spelled in another letter case or Unicode form are refused where the file system folds them.
  • A new repository the Docker sandbox makes in a Windows folder gets core.filemode=false, and a Git for Windows
    checkout whose line endings differ in the container is refused with a hint about core.autocrlf.
  • The hub no longer spins at shutdown on Python 3.12+, and on Linux and macOS it raises a soft open-files limit below
    1024 to 1024 at start.

Sessions of 0.2.0 open as before: the agents' tool set has not changed. To update: uv tool upgrade dreamteam.

Русский

HTTP API v1

Стабильный HTTP-интерфейс, чтобы запускать рой из другой программы: сайт или скрипт загружает файлы, запускает
сессию с целью, следит за её ходом, отвечает агентам и забирает итог и сделанные ими файлы. Это HTTP-версия
dreamteam -p под /api/v1, на входе и на выходе JSON (#55).

  • Свой токен. DREAMTEAM_API_TOKEN нужен даже на 127.0.0.1. Он открывает только /api/v1 и только сессии,
    созданные через API: доска, настройки, /mcp и остальные ваши сессии ему закрыты. Если не задан ни один
    токен, API отвечает api_disabled.
  • Загрузка файлов телом запроса (POST /api/v1/uploads?filename=); zip можно распаковать в папку сессии.
  • Сессии: цель, файлы, сохранённая команда или список ролей, профиль модели по имени, бюджет и лимиты. Создание
    отвечает 202 и запускает сессию в фоне; с client_ref повторный запрос вернёт ту же сессию. Провайдеры и ключи
    API через API не передаются.
  • События для таймлайна: длинные опросы по id или Server-Sent Events с продолжением по Last-Event-ID. У каждого
    события есть готовая строка text на языке сессии.
  • Вопросы и ревью: с "answers": "auto" хаб отвечает агентам сам, как -p; с "manual" ваша программа
    получает их как запросы и отвечает на них. stop_when_done останавливает сессию, когда цель достигнута.
  • Итог и файлы: объект итога как у -p со списком изменённых файлов, отдельный файл или zip папки. Ссылки никогда
    не разыменовываются.
  • Папки на компьютере хаба: корни, которые вы перечислили в dreamteam.toml в [api.folders.<имя>], можно
    скопировать в сессию или, где вы разрешили in_place, работать прямо в них. Клиент называет корень и путь внутри
    него, но никогда не абсолютный путь.
  • Для доступа с другого компьютера запускайте хаб в dreamteam sandbox: песочница монтирует папки [api].

Руководство: HTTP API. Настройки:
Настройки HTTP API.

Прочее

  • Сессии, созданные через API, помечены «API» на доске и HTTP API в dreamteam status, списке сессий и выборе
    сессии в терминале. dreamteam -c, console и traces их пропускают: к ним обращаются по имени или id.
    dreamteam status печатает адрес API, когда задан токен API.
  • Папкой сессии (/cd, --workspace, session_cd, API) больше не может быть другая домашняя папка DreamTeam или
    папка внутри неё, папка токенов хаба, а в Linux и macOS — папка внутри /proc, /sys или /dev. Две сессии на одной
    папке, записанной в другом регистре или другой форме Unicode, отклоняются там, где файловая система их не различает.
  • Новый репозиторий, который песочница Docker создаёт в папке Windows, получает core.filemode=false, а checkout Git
    for Windows с другими окончаниями строк в контейнере отклоняется с подсказкой про core.autocrlf.
  • Хаб больше не крутится вхолостую при остановке на Python 3.12+, а в Linux и macOS при старте поднимает мягкий лимит
    открытых файлов до 1024, если он ниже.

Сессии 0.2.0 открываются как раньше: набор инструментов агентов не менялся. Обновление: uv tool upgrade dreamteam.

Don't miss a new DreamTeam release

NewReleases is sending notifications on new releases.