mirror of
https://github.com/agent0ai/a0-launcher.git
synced 2026-12-04 01:09:29 +00:00
Add Agent Zero v3 to Launcher Versions
Pin the v3 Docker channel beside latest and ready so testers can install agent0ai/agent-zero:v3 from Versions. Offer v3 in Create local Instance and reuse the existing download and update flow.
This commit is contained in:
1 parent
db2db7b366
commit
4952d98808
11 files changed
+58
-52
No files matched your search
@@ -58,7 +58,7 @@ This scope owns:
|
||||
- Operation progress should keep actionable recovery affordances for user-fixable failures. For Docker Hub pull-rate limits, keep the error visible and offer the shell-owned Docker sign-in wrapper plus retry instead of a dead-end message.
|
||||
- Operation progress failures must remain visible with the stable renderer-facing error message after the async operation finishes.
|
||||
- Operation progress may show a cancel action only when the Docker Manager progress payload marks the current phase as cancelable.
|
||||
- Official version cards must distinguish available, installable, installed, active, visible channel tags (`latest`, `ready`), local builds, matching digest, and differing digest states without exposing raw Docker mechanics as the main story. Fresh machines must have a visible install action once Docker is ready. The `latest` and `ready` cards should show channel update dates when Docker Manager provides them, falling back to the matched numbered release date when available. Their primary card meta should stay compact: visible date plus size only, even when structured match/digest hints are present in state. Numbered release cards should be grouped by major version, with every numbered series collapsed by default so only pinned channel cards such as `latest` and `ready` are immediately visible. The unmaintained `testing` tag is intentionally hidden from the Versions view. The Versions view may offer an `All` / `Installed` filter; `Installed` should keep entries that already have a local image, differ from the published digest, are active, or are currently installing. Shared Instance and Version card visuals should keep title glows unclipped and avoid inset divider lines inside the colored artwork area.
|
||||
- Official version cards must distinguish available, installable, installed, active, visible channel tags (`latest`, `ready`, `v3`), local builds, matching digest, and differing digest states without exposing raw Docker mechanics as the main story. Fresh machines must have a visible install action once Docker is ready. The `latest`, `ready`, and `v3` cards should show channel update dates when Docker Manager provides them, falling back to the matched numbered release date when available. Their primary card meta should stay compact: visible date plus size only, even when structured match/digest hints are present in state. Numbered release cards should be grouped by major version, with every numbered series collapsed by default so only pinned channel cards `latest`, `ready`, and `v3` are immediately visible. The unmaintained `testing` tag is intentionally hidden from the Versions view. The Versions view may offer an `All` / `Installed` filter; `Installed` should keep entries that already have a local image, differ from the published digest, are active, or are currently installing. Shared Instance and Version card visuals should keep title glows unclipped and avoid inset divider lines inside the colored artwork area.
|
||||
- Running an installed tag from Versions creates another managed local instance and must not stop existing instances or require a data-loss acknowledgement. Stale installed tags should keep `Run` visible; updating belongs on the specific Instance card. After the run operation reports completed with the UI-ready marker, the renderer should switch to the Instances tab so the new managed Instance is visible. Removing an installed tag must go through Docker Manager image removal and must be non-forced so Docker refuses images still used by an Instance. Destructive switch, update, and retained-instance activation flows must keep the backup/proceed acknowledgement.
|
||||
- Versions renders the remote catalog even when the local runtime is unavailable. Its primary image action opens the existing Runtime Setup modal until Docker is reachable; include runtime availability in the card render key so ready-state changes restore Install/Run without waiting for catalog changes.
|
||||
- Activation may offer optional model provider/model/API-key helpers under Advanced as `Choose your models`, compile helpers to Agent Zero environment defaults, save edited helpers as Instance Defaults for future runs, and preserve Advanced environment variables as the explicit escape hatch. Activation may also offer optional web login username/password helpers that compile to Agent Zero auth environment defaults; blank values must preserve Agent Zero's normal onboarding/default behavior.
|
||||
@@ -91,7 +91,7 @@ This scope owns:
|
||||
- Instance tab chrome keeps a Launcher tab as the first tab whenever any instance UI tab is open. Selecting Launcher clears the active shell-owned view and leaves the launcher surface usable below the tab strip. Dragging an attached tab label reorders attached tabs; releasing it outside the strip uses the existing shell-owned detach path. After the drag threshold, temporarily hide the active native view so it cannot intercept the gesture; restore its bounds on reorder or cancellation. Keep the real tab stationary during the gesture and show a floating tab copy plus an insertion marker. Connected instance tabs should display only the tab/instance name, not the URL, so short names stay compact in the tab strip.
|
||||
- Each Instance tab shows a separately accessible computer button immediately after its name. The icon is green only while Connected and grey otherwise; clicking it opens the Launcher-owned settings modal. A header control may collapse Instance names to their selected icon and computer icons. Opening settings must keep that Instance selected, temporarily hiding only the shell-owned view while the Launcher modal is open and restoring it when the modal closes. Agent Zero pages expose no Host access menu or controls. Instance cards must not repeat the Host access icon or settings button; connection and scope changes belong in an open Launcher Instance tab or its detached Launcher window. Existing unconfigured Instances stay off; an unset remote folder in Host access settings is prefilled from the Launcher default.
|
||||
- File read and file write are separate permissions. Write depends on read, and Code execution depends on write. Permission choices render as a compact icon/title/description list inside a native disclosure that starts collapsed; its summary must always identify whether Browser and Computer Use are on or off so those controls remain discoverable. Summarize all five permissions while Host access is on, show only that Host access is off when the master switch is off, in existing-Instance Host access settings place that master switch and the folder field inside the same disclosure, and keep live Disconnect/Reconnect beside the connection status. Use Agent Zero-style switch controls in every Host access view. Create/Add Instance is the single initial Host access choice and must not be followed by a global onboarding prompt. New local forms inherit Settings defaults, enabled when no preference is saved. New remote forms always start Host access off regardless of those defaults; enabling it is intentional, with a local folder choice or saved folder default. Configure preserves the saved remote choice. Existing Instances without saved configuration remain off. Keep the initial master switch and folder outside the permission disclosure; the remote folder must be visible and chosen when no default exists. Local creation defaults select Computer Use alongside file read, file write, and commands, with Browser off. Remote creation keeps Computer Use off. Saved choices and missing Computer Use on legacy Instances must not be upgraded by these defaults; platform permission setup remains in force. Do not add a CLI installation helper to Create/Add Instance or Host access settings; Launcher owns CLI preparation independently of permission opt-in. One Agent Zero-style switch owns the persisted master permission state and visibly disables its dependent permissions. Label the selected path `Local folder for files and commands` (`Default local folder for files and commands` in Settings), explain both roles in plain language, and make clear that commands may use other locations available to the Launcher user. Keep browser selection and Connection/Computer Use diagnostics in a collapsed Advanced settings disclosure with a short summary. Browser preparation and Computer Use permission failures are Needs action states, not silent browser relaunches or hidden permission grants. A Needs action summary must show the concrete browser, permission, restart, or runtime reason in the visible modal body; do not substitute generic tab-lease copy in a modal that is already opened from the owning Instance tab. A missing host Browser dependency must become a concise `Set up browser` repair action; do not hide that action merely because no supported host browser is currently detected, and do not send Launcher users to an A0 CLI slash command. Safari setup must name Show features for web developers in Safari's Advanced settings, then Allow remote automation in Developer settings; Chromium-family setup keeps its browser-specific remote-debugging guidance. Hide Browser support diagnostics and repair actions while the current modal choice does not allow `Use my Browser`; retained runtime metadata must not imply that Browser is required. Render a saved capability choice independently from runtime readiness as `Not allowed`, `Allowed · Setup needed`, `Allowed · Checking`, or `Allowed · Ready`; runtime metadata must never turn an allowed switch off. Computer Use checking copy must follow the advertised backend; macOS permission wording is valid only for a macOS backend, while other backends use neutral Computer Use copy unless they provide something more specific. When Computer Use is newly enabled on macOS, open the staged setup surface after the gateway connects. Later launches preflight silently, with one explicit retry or restart action when required. Name the pending macOS service on that action (`Open Accessibility Settings`, `Allow Screen Recording`, or `Check Computer Use`) instead of repeating a generic permission button. Present capability metadata as human labels and offer Computer Use setup only for actionable approval, rearm, restart, or error states—not healthy trust modes. Compatibility copy must name advertised Launcher gateway support rather than assume a specific A0 CLI release number.
|
||||
- Local creation defaults channel updates on for `latest` and `ready`; users may turn the checkbox off only when an installed image exists. A missing channel image downloads automatically, hides that checkbox, and changes the primary action to `Download & create`. Local sign-in stays visible as `Set Instance login`, requires both fields or neither, and separately offers remembering credentials in Launcher. Keep Docker naming/rollback jargon out of the basic form. The local workspace folder is chosen automatically under the saved workspace root (normally `~/agent-zero/<Instance name>`) and stays visible while access is enabled. Change folder opens the native chooser and switches host-directory storage to that exact workspace, keeping Advanced storage and Host access aligned; cancellation leaves the automatic choice intact. Named-volume storage instead changes only its separate host-access folder. Advanced retains model, port, storage, and environment options.
|
||||
- Local creation defaults channel updates on for `latest`, `ready`, and `v3`; users may turn the checkbox off only when an installed image exists. A missing channel image downloads automatically, hides that checkbox, and changes the primary action to `Download & create`. Local sign-in stays visible as `Set Instance login`, requires both fields or neither, and separately offers remembering credentials in Launcher. Keep Docker naming/rollback jargon out of the basic form. The local workspace folder is chosen automatically under the saved workspace root (normally `~/agent-zero/<Instance name>`) and stays visible while access is enabled. Change folder opens the native chooser and switches host-directory storage to that exact workspace, keeping Advanced storage and Host access aligned; cancellation leaves the automatic choice intact. Named-volume storage instead changes only its separate host-access folder. Advanced retains model, port, storage, and environment options.
|
||||
|
||||
## Work Guidance
|
||||
|
||||
|
||||
@@ -111,7 +111,7 @@ function versionVisualLabel(value, fallback = "Version") {
|
||||
const raw = String(value || "").trim();
|
||||
if (!raw) return fallback;
|
||||
const tag = raw.includes(":") ? raw.slice(raw.lastIndexOf(":") + 1) : raw;
|
||||
return tag.replace(/^v(?=\d)/i, "") || fallback;
|
||||
return tag.replace(/^v(?=\d+\.)/i, "") || fallback;
|
||||
}
|
||||
|
||||
function createVersionVisual(value, options = {}) {
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
} from "../run-instance-dialog.js";
|
||||
import { byId, closeDialog, escapeHtml } from "../component-utils.js";
|
||||
import { progressPresentedAsToast } from "../progress-eta.js";
|
||||
import { isVisibleChannelEntry } from "../release-entries.js";
|
||||
|
||||
let logsRequestSeq = 0;
|
||||
let lastInstanceCardDiagnosticsKey = "";
|
||||
@@ -126,7 +127,7 @@ function instanceCurrentReleaseTag(c) {
|
||||
|
||||
const imageTag = imageTagForContainer(c);
|
||||
const matchedReleaseTag = String(c?.matchedReleaseTag || "").trim();
|
||||
if ((imageTag === "latest" || imageTag === "ready") && isReleaseTag(matchedReleaseTag)) {
|
||||
if (isVisibleChannelEntry({ tag: imageTag, isBackendImage: c?.isBackendImage }) && isReleaseTag(matchedReleaseTag)) {
|
||||
return matchedReleaseTag;
|
||||
}
|
||||
if (isReleaseTag(imageTag)) return imageTag;
|
||||
@@ -157,7 +158,7 @@ function instanceVisualBadge(c) {
|
||||
|
||||
const imageTag = imageTagForContainer(c);
|
||||
const matchedReleaseTag = releaseTagLabel(c?.matchedReleaseTag);
|
||||
if ((imageTag === "latest" || imageTag === "ready") && matchedReleaseTag) {
|
||||
if (isVisibleChannelEntry({ tag: imageTag, isBackendImage: c?.isBackendImage }) && matchedReleaseTag) {
|
||||
return matchedReleaseTag;
|
||||
}
|
||||
if (isReleaseTag(imageTag)) return releaseTagLabel(imageTag);
|
||||
|
||||
@@ -2,7 +2,7 @@ import { createVersionVisual } from "../card-visuals.js";
|
||||
import { defaultInstanceName } from "../instance-defaults.js";
|
||||
import { openRunInstanceDialog } from "../run-instance-dialog.js";
|
||||
import { byId } from "../component-utils.js";
|
||||
import { compareReleaseTags, isLatestEntry, isReadyEntry, isTestingEntry, normalizeDate, parseReleaseTagParts } from "../release-entries.js";
|
||||
import { compareReleaseTags, compareVisibleChannels, isLatestEntry, isVisibleChannelEntry, isTestingEntry, normalizeDate, parseReleaseTagParts } from "../release-entries.js";
|
||||
|
||||
function fmtDate(v) {
|
||||
if (!v) return "";
|
||||
@@ -20,10 +20,6 @@ function fmtSize(bytes) {
|
||||
return `${val.toFixed(i > 1 ? 1 : 0)} ${units[i]}`;
|
||||
}
|
||||
|
||||
function isPinnedChannelEntry(entry) {
|
||||
return isLatestEntry(entry) || isReadyEntry(entry);
|
||||
}
|
||||
|
||||
function isHiddenEntry(entry) {
|
||||
return isTestingEntry(entry);
|
||||
}
|
||||
@@ -57,15 +53,8 @@ function isReleaseTag(entry) {
|
||||
|
||||
function orderedEntries(entries) {
|
||||
return [...entries].sort((left, right) => {
|
||||
const leftLatest = isLatestEntry(left);
|
||||
const rightLatest = isLatestEntry(right);
|
||||
if (leftLatest && !rightLatest) return -1;
|
||||
if (!leftLatest && rightLatest) return 1;
|
||||
|
||||
const leftReady = isReadyEntry(left);
|
||||
const rightReady = isReadyEntry(right);
|
||||
if (leftReady && !rightReady) return -1;
|
||||
if (!leftReady && rightReady) return 1;
|
||||
const channelCompare = compareVisibleChannels(left, right);
|
||||
if (channelCompare !== 0) return channelCompare;
|
||||
|
||||
const leftTesting = isTestingEntry(left);
|
||||
const rightTesting = isTestingEntry(right);
|
||||
@@ -104,7 +93,7 @@ function latestReleaseEntry(entries) {
|
||||
|
||||
function displayDateForEntry(entry, entries = []) {
|
||||
if (!entry) return null;
|
||||
if (isPinnedChannelEntry(entry)) {
|
||||
if (isVisibleChannelEntry(entry)) {
|
||||
if (entry.updatedAt) return { label: "Updated", value: entry.updatedAt };
|
||||
|
||||
const releaseTag = entry.matchedReleaseTag || (isLatestEntry(entry) ? latestReleaseEntry(entries)?.tag : "");
|
||||
@@ -127,10 +116,9 @@ function metaPartsForEntry(entry, entries = []) {
|
||||
if (date?.value) parts.push(`${date.label} ${fmtDate(date.value)}`);
|
||||
if (entry?.sizeBytes) parts.push(fmtSize(entry.sizeBytes));
|
||||
|
||||
if (isPinnedChannelEntry(entry)) return parts;
|
||||
if (isVisibleChannelEntry(entry)) return parts;
|
||||
|
||||
if (entry?.imageRef) parts.unshift(entry.imageRef);
|
||||
if (isReadyEntry(entry)) parts.push("Development image with alpha features under test");
|
||||
if (entry?.matchHint) parts.push(entry.matchHint);
|
||||
if (entry?.digestHint) parts.push(entry.digestHint);
|
||||
return parts;
|
||||
@@ -143,7 +131,7 @@ function buildInstallCatalogModel(entries) {
|
||||
const majorGroups = new Map();
|
||||
|
||||
for (const entry of ordered) {
|
||||
if (isPinnedChannelEntry(entry)) {
|
||||
if (isVisibleChannelEntry(entry)) {
|
||||
channels.push(entry);
|
||||
continue;
|
||||
}
|
||||
@@ -325,7 +313,7 @@ function bindInstallFilterControls() {
|
||||
|
||||
function renderEntryCard(entry, state, entries) {
|
||||
const card = document.createElement("div");
|
||||
card.className = isPinnedChannelEntry(entry) ? "dm-card dm-card-highlight" : "dm-card";
|
||||
card.className = isVisibleChannelEntry(entry) ? "dm-card dm-card-highlight" : "dm-card";
|
||||
|
||||
const visual = createVersionVisual(entry.title || entry.tag, { seed: entry.tag || entry.title });
|
||||
|
||||
@@ -346,7 +334,7 @@ function renderEntryCard(entry, state, entries) {
|
||||
badge.textContent = "local";
|
||||
title.appendChild(badge);
|
||||
}
|
||||
if (isPinnedChannelEntry(entry) && entry.matchedReleaseTag) {
|
||||
if (isVisibleChannelEntry(entry) && entry.matchedReleaseTag) {
|
||||
const badge = document.createElement("span");
|
||||
badge.className = "badge badge-release-match";
|
||||
badge.textContent = releaseMatchBadgeLabel(entry.matchedReleaseTag);
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { test } from 'node:test';
|
||||
import { versionVisualLabel } from '../card-visuals.js';
|
||||
|
||||
globalThis.document = {
|
||||
getElementById: () => null
|
||||
@@ -206,9 +207,10 @@ test('channel version card meta keeps only date and size', () => {
|
||||
]);
|
||||
});
|
||||
|
||||
test('version catalog collapses numbered version groups by default', () => {
|
||||
test('version catalog pins v3 and collapses numbered version groups by default', () => {
|
||||
const model = buildInstallCatalogModel([
|
||||
{ tag: 'v1.20', title: '1.20' },
|
||||
{ tag: 'v3', title: 'v3', availability: 'available' },
|
||||
{ tag: 'ready', title: 'ready' },
|
||||
{ tag: 'v0.9', title: '0.9' },
|
||||
{ tag: 'v2.0', title: '2.0' },
|
||||
@@ -216,7 +218,10 @@ test('version catalog collapses numbered version groups by default', () => {
|
||||
{ tag: 'v1.19', title: '1.19' }
|
||||
]);
|
||||
|
||||
assert.deepEqual(model.channels.map((entry) => entry.tag), ['latest', 'ready']);
|
||||
assert.deepEqual(model.channels.map((entry) => entry.tag), ['latest', 'ready', 'v3']);
|
||||
assert.equal(actionForEntry(model.channels[2], { dockerAvailable: true }).label, 'Install');
|
||||
assert.equal(versionVisualLabel(model.channels[2].title), 'v3');
|
||||
assert.equal(versionVisualLabel('v3.1'), '3.1');
|
||||
assert.deepEqual(model.groups.map((group) => group.major), [2, 1, 0]);
|
||||
assert.deepEqual(model.groups.map((group) => group.defaultOpen), [false, false, false]);
|
||||
assert.deepEqual(model.groups[1].entries.map((entry) => entry.tag), ['v1.20', 'v1.19']);
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
const VISIBLE_CHANNEL_TAGS = ["latest", "ready", "v3"];
|
||||
|
||||
function parseReleaseTagParts(tag) {
|
||||
const normalized = String(tag || "").trim().replace(/^v/, "");
|
||||
const match = normalized.match(/^(\d+)\.(\d+)(?:\.(\d+))?$/);
|
||||
@@ -13,8 +15,17 @@ function isLatestEntry(entry) {
|
||||
return entry?.isBackendImage !== false && entry?.tag === "latest";
|
||||
}
|
||||
|
||||
function isReadyEntry(entry) {
|
||||
return entry?.isBackendImage !== false && entry?.tag === "ready";
|
||||
function channelOrder(entry) {
|
||||
const index = entry?.isBackendImage === false ? -1 : VISIBLE_CHANNEL_TAGS.indexOf(entry?.tag);
|
||||
return index < 0 ? VISIBLE_CHANNEL_TAGS.length : index;
|
||||
}
|
||||
|
||||
function isVisibleChannelEntry(entry) {
|
||||
return channelOrder(entry) < VISIBLE_CHANNEL_TAGS.length;
|
||||
}
|
||||
|
||||
function compareVisibleChannels(left, right) {
|
||||
return channelOrder(left) - channelOrder(right);
|
||||
}
|
||||
|
||||
function isTestingEntry(entry) {
|
||||
@@ -41,7 +52,8 @@ function normalizeDate(value) {
|
||||
export {
|
||||
parseReleaseTagParts,
|
||||
isLatestEntry,
|
||||
isReadyEntry,
|
||||
isVisibleChannelEntry,
|
||||
compareVisibleChannels,
|
||||
isTestingEntry,
|
||||
compareReleaseTags,
|
||||
normalizeDate
|
||||
|
||||
@@ -19,7 +19,7 @@ import {
|
||||
} from "./host-access-dialog.js";
|
||||
import { closeDialog, escapeHtml } from "./component-utils.js";
|
||||
import { progressPresentedAsToast } from "./progress-eta.js";
|
||||
import { compareReleaseTags, isLatestEntry, isReadyEntry, isTestingEntry, normalizeDate } from "./release-entries.js";
|
||||
import { compareReleaseTags, compareVisibleChannels, isVisibleChannelEntry, isTestingEntry, normalizeDate } from "./release-entries.js";
|
||||
|
||||
function escapeAttribute(value) {
|
||||
return escapeHtml(value);
|
||||
@@ -90,7 +90,7 @@ function directWorkspaceFolder(root, instanceName) {
|
||||
}
|
||||
|
||||
function isChannelVersionChoice(entry = {}) {
|
||||
return isLatestEntry(entry) || isReadyEntry(entry);
|
||||
return isVisibleChannelEntry(entry);
|
||||
}
|
||||
|
||||
function isInstalledRunEntry(entry) {
|
||||
@@ -103,15 +103,8 @@ function isInstalledRunEntry(entry) {
|
||||
}
|
||||
|
||||
function installedVersionSort(left, right) {
|
||||
const leftLatest = isLatestEntry(left);
|
||||
const rightLatest = isLatestEntry(right);
|
||||
if (leftLatest && !rightLatest) return -1;
|
||||
if (!leftLatest && rightLatest) return 1;
|
||||
|
||||
const leftReady = isReadyEntry(left);
|
||||
const rightReady = isReadyEntry(right);
|
||||
if (leftReady && !rightReady) return -1;
|
||||
if (!leftReady && rightReady) return 1;
|
||||
const channelCompare = compareVisibleChannels(left, right);
|
||||
if (channelCompare !== 0) return channelCompare;
|
||||
|
||||
const tagCompare = compareReleaseTags(left?.tag, right?.tag);
|
||||
if (tagCompare !== 0) return tagCompare;
|
||||
|
||||
@@ -21,6 +21,7 @@ test('version choices pin channels, include installed versions and hide testing'
|
||||
{ id: 'ready', displayVersion: 'ready', availability: 'available', installability: 'installable' },
|
||||
{ id: 'latest', displayVersion: 'latest', availability: 'installed' },
|
||||
{ id: 'v2.0', displayVersion: '2.0', availability: 'available' },
|
||||
{ id: 'v3', displayVersion: 'v3', availability: 'available', installability: 'installable' },
|
||||
{ id: 'v1.20', displayVersion: '1.20', availability: 'available', differsFromPublished: true },
|
||||
{ id: 'v1.19', displayVersion: '1.19', availability: 'installing' },
|
||||
{ id: 'testing', displayVersion: 'testing', availability: 'installed' },
|
||||
@@ -38,6 +39,7 @@ test('version choices pin channels, include installed versions and hide testing'
|
||||
assert.deepEqual(choices.map((choice) => choice.tag), [
|
||||
'latest',
|
||||
'ready',
|
||||
'v3',
|
||||
'v1.20',
|
||||
'local',
|
||||
'main'
|
||||
@@ -48,6 +50,8 @@ test('version choices pin channels, include installed versions and hide testing'
|
||||
test('channel pull defaults on for every channel choice', () => {
|
||||
assert.equal(isChannelVersionChoice({ tag: 'latest' }), true);
|
||||
assert.equal(isChannelVersionChoice({ tag: 'v2.0' }), false);
|
||||
assert.equal(channelPullDefault({ tag: 'v3', availability: 'available' }), true);
|
||||
assert.equal(channelPullDefault({ tag: 'v3', isBackendImage: false }), false);
|
||||
assert.equal(channelPullDefault({ tag: 'v2.0', availability: 'installed' }), false);
|
||||
assert.equal(channelPullDefault({ tag: 'latest', availability: 'available' }), true);
|
||||
assert.equal(channelPullDefault({ tag: 'ready', availability: 'installed', differsFromPublished: true }), true);
|
||||
|
||||
@@ -24,7 +24,7 @@ This scope owns:
|
||||
- Backend image repo defaults to `agent0ai/agent-zero` and may be overridden by `A0_BACKEND_IMAGE_REPO`.
|
||||
- Backend GitHub repo defaults to `agent0ai/agent-zero` and may be overridden by `A0_BACKEND_GITHUB_REPO`.
|
||||
- Build the release catalog with the same GitHub and registry paths whether Docker is reachable or not; unavailable Docker supplies empty local image/container inventories. A first offline launch without a release cache still publishes local preferences and Remote Instances, with `offline: true` and no invented numbered releases.
|
||||
- Installable tags must be safe tags and limited to semver-like release tags (`vX.Y` or `vX.Y.Z`), channel tags (`latest`, `ready`, `testing`), or canonical local tags (`local`, `development`, `main`).
|
||||
- Installable tags must be safe tags and limited to semver-like release tags (`vX.Y` or `vX.Y.Z`), channel tags (`latest`, `ready`, `v3`, `testing`), or canonical local tags (`local`, `development`, `main`).
|
||||
- Activation can target installed local builds, but still must reject unsafe tag strings.
|
||||
- Once an image inventory is scoped to its repository, activation must identify the local image by tag, not Docker's presentation-specific image reference.
|
||||
- Developer custom-image runs may target safe arbitrary Docker image repositories and tags. Validate image names, tags, environment variables, port mappings, and mounts before Dockerode sees them; label created containers with `a0.launcher.role=developer` so the Instances tab can manage them.
|
||||
@@ -66,7 +66,7 @@ This scope owns:
|
||||
- A host repository bind at `/a0` exposes its nested `/a0/usr` as persistent custom storage for folder opening, but it is not launcher-owned storage and must never be offered for deletion with the Instance.
|
||||
- Long-running operations return an operation id and emit progress.
|
||||
- Concurrent state refreshes are newest-wins. Before publishing a refreshed state, reapply the latest cached local and remote runtime identity so an older Docker/image snapshot cannot make an Instance disappear or replace a health-confirmed version with image provenance.
|
||||
- Image installs may target Docker channel tags (`latest`, `ready`, `testing`) in addition to semver releases and local development tags, because first-run setup uses `latest` as the default image choice.
|
||||
- Image installs may target Docker channel tags (`latest`, `ready`, `v3`, `testing`) in addition to semver releases and local development tags, because first-run setup uses `latest` as the default image choice.
|
||||
- Successful Agent Zero image pulls may clean up the previous local image id for the same tag, but only through non-forced Docker image removal. If Docker says the old image is still referenced by any container or another tag, keep it.
|
||||
- Image removal from Versions must validate the tag, target a locally installed Agent Zero image, and call Docker image removal without force. If Docker reports the image is still used by a container, return a stable UI error instead of deleting related Instances or storage.
|
||||
- Progress payloads may include `headline`, `detail`, `phase`, `steps`, and `indeterminate` in addition to the legacy `message` and numeric progress fields. Runtime setup progress uses those fields for the blocking startup modal.
|
||||
|
||||
@@ -49,9 +49,9 @@ test('release catalog works without Docker and preserves cached/offline and reac
|
||||
getRuntimeDiagnostics: async () => ({ reachable: scenario === 'diagnostic-ready' }),
|
||||
listLocalImages: async () => { localCalls.push('images'); return [{ tag: 'latest', imageId: 'local-image' }]; },
|
||||
listContainers: async () => { localCalls.push('containers'); return []; },
|
||||
listRemoteTags: async () => ['latest', 'ready', 'testing', 'v2.0'],
|
||||
listRemoteTags: async () => ['latest', 'ready', 'v3', 'testing', 'v2.0'],
|
||||
getRemoteDigest: async () => ({ exists: true, digest: 'sha256:published' }),
|
||||
getRemoteTagMetadata: async () => ({ updatedAt: '2026-06-24T12:00:00Z' }),
|
||||
getRemoteTagMetadata: async () => ({ exists: true, updatedAt: '2026-06-24T12:00:00Z' }),
|
||||
getRemoteLayerSizes: async () => { throw Object.assign(new Error('Stop warmup'), { code: 'REGISTRY_RATE_LIMIT' }); }
|
||||
};
|
||||
t.mock.method(adapter, 'getDocker', async () => docker);
|
||||
@@ -59,6 +59,9 @@ test('release catalog works without Docker and preserves cached/offline and reac
|
||||
delete require.cache[managerPath];
|
||||
const manager = require('./index');
|
||||
|
||||
assert.equal(manager.assertTagAllowedForInstall('v3'), 'v3');
|
||||
assert.throws(() => manager.assertTagAllowedForInstall('v4'), { code: 'TAG_NOT_ALLOWED' });
|
||||
|
||||
for (scenario of ['missing', 'offline-cached', 'offline-empty', 'ready', 'diagnostic-ready']) {
|
||||
for (const forceRefresh of [false, true]) {
|
||||
localCalls.length = 0;
|
||||
@@ -69,6 +72,10 @@ test('release catalog works without Docker and preserves cached/offline and reac
|
||||
assert.equal(state.offline, scenario.startsWith('offline'));
|
||||
assert.equal(state.lastSyncedAt, scenario === 'offline-empty' ? null : '2026-06-24T12:00:00Z');
|
||||
assert.equal(state.versions.find((entry) => entry.id === 'latest').availability, available ? 'installed' : 'available');
|
||||
const v3 = state.versions.find((entry) => entry.id === 'v3');
|
||||
assert.equal(v3?.category, 'official_release');
|
||||
assert.equal(v3?.installability, 'installable');
|
||||
assert.equal(v3?.updatedAt, '2026-06-24T12:00:00.000Z');
|
||||
assert.deepEqual(localCalls, available ? ['images', 'containers'] : []);
|
||||
assert.equal(state.runtime.state, available ? 'ready' : 'not_provisioned');
|
||||
assert.equal(state.remoteInstances[0].launcherCredentials.username, 'alice');
|
||||
|
||||
@@ -168,7 +168,7 @@ const CLONE_SETTINGS_FIELDS = Object.freeze({
|
||||
])
|
||||
});
|
||||
|
||||
const CHANNEL_TAGS = Object.freeze(['latest', 'ready', 'testing']);
|
||||
const CHANNEL_TAGS = Object.freeze(['latest', 'ready', 'v3', 'testing']);
|
||||
const CANONICAL_LOCAL_TAGS = Object.freeze(['local', 'development', 'main']);
|
||||
const instanceHealthCache = new Map();
|
||||
const instanceHealthPending = new Map();
|
||||
@@ -346,16 +346,12 @@ function isLatestTag(tag) {
|
||||
return (tag || '').trim() === 'latest';
|
||||
}
|
||||
|
||||
function isReadyTag(tag) {
|
||||
return (tag || '').trim() === 'ready';
|
||||
}
|
||||
|
||||
function isChannelTag(tag) {
|
||||
return isLatestTag(tag) || isReadyTag(tag) || isTestingTag(tag);
|
||||
return CHANNEL_TAGS.includes((tag || '').trim());
|
||||
}
|
||||
|
||||
function isVisibleChannelTag(tag) {
|
||||
return isLatestTag(tag) || isReadyTag(tag);
|
||||
return isChannelTag(tag) && !isTestingTag(tag);
|
||||
}
|
||||
|
||||
function isCanonicalLocalTag(tag) {
|
||||
|
||||
Reference in new issue
Block a user