Add ACP replay harness and session lifecycle support
- Add replay agent and fixture-driven ACP transcript testing - Support session lifecycle, auth methods, and session resume/fork flows - Expand orchestration V2 adapter coverage and debug tooling
This commit is contained in:
1 parent
9d38de8628
commit
1161529645
65 files changed
+9914
-74
No files matched your search
@@ -13,7 +13,7 @@ import { useSettings, useUpdateSettings } from "../../hooks/useSettings";
|
||||
import { cn } from "../../lib/utils";
|
||||
import { normalizeProviderAccentColor } from "../../providerInstances";
|
||||
import { Button } from "../ui/button";
|
||||
import { ACPRegistryIcon, Gemini, GithubCopilotIcon, PiAgentIcon, type Icon } from "../Icons";
|
||||
import { Gemini, GithubCopilotIcon, PiAgentIcon, type Icon } from "../Icons";
|
||||
import {
|
||||
Dialog,
|
||||
DialogDescription,
|
||||
@@ -81,11 +81,6 @@ const COMING_SOON_DRIVER_OPTIONS: readonly ComingSoonDriverOption[] = [
|
||||
label: "Gemini",
|
||||
icon: Gemini,
|
||||
},
|
||||
{
|
||||
value: ProviderDriverKind.make("acpRegistry"),
|
||||
label: "ACP Registry",
|
||||
icon: ACPRegistryIcon,
|
||||
},
|
||||
{
|
||||
value: ProviderDriverKind.make("piAgent"),
|
||||
label: "Pi Agent",
|
||||
|
||||
@@ -36,6 +36,18 @@ describe("ProviderSettingsForm helpers", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("exposes ACP Registry as an instance-only configurable driver", () => {
|
||||
const acpRegistry = DRIVER_OPTION_BY_VALUE[ProviderDriverKind.make("acpRegistry")];
|
||||
|
||||
expect(acpRegistry).toBeDefined();
|
||||
expect(acpRegistry?.hasDefaultInstance).toBe(false);
|
||||
expect(deriveProviderSettingsFields(acpRegistry!).map((field) => field.key)).toEqual([
|
||||
"agentId",
|
||||
"commandPath",
|
||||
"authMethodId",
|
||||
]);
|
||||
});
|
||||
|
||||
it("preserves unknown config keys while omitting empty configurable fields", () => {
|
||||
const opencode = DRIVER_OPTION_BY_VALUE[ProviderDriverKind.make("opencode")];
|
||||
expect(opencode).toBeDefined();
|
||||
|
||||
@@ -1233,6 +1233,35 @@ describe("GeneralSettingsPanel observability", () => {
|
||||
await expect.element(page.getByPlaceholder("Optional")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("renders configured ACP Registry instances without a blank default card", async () => {
|
||||
const instanceId = ProviderInstanceId.make("acpRegistry_devin");
|
||||
setServerConfigSnapshot({
|
||||
...createBaseServerConfig(),
|
||||
settings: {
|
||||
...DEFAULT_SERVER_SETTINGS,
|
||||
providerInstances: {
|
||||
[instanceId]: {
|
||||
driver: ProviderDriverKind.make("acpRegistry"),
|
||||
displayName: "Devin ACP",
|
||||
config: { agentId: "devin" },
|
||||
},
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
mounted = await render(
|
||||
<AppAtomRegistryProvider>
|
||||
<ProviderSettingsPanel />
|
||||
</AppAtomRegistryProvider>,
|
||||
);
|
||||
|
||||
await expect
|
||||
.element(page.getByLabelText("Toggle ACP Registry details"))
|
||||
.not.toBeInTheDocument();
|
||||
await page.getByLabelText("Toggle Devin ACP details").click();
|
||||
await expect.element(page.getByText("Registry agent ID")).toBeInTheDocument();
|
||||
});
|
||||
|
||||
it("runs one-click provider updates from the provider card", async () => {
|
||||
const updateProvider = vi.fn<LocalApi["server"]["updateProvider"]>().mockResolvedValue({
|
||||
providers: [createOutdatedProvider("codex")],
|
||||
|
||||
@@ -121,6 +121,7 @@ function withoutProviderInstanceFavorites(
|
||||
|
||||
const PROVIDER_SETTINGS = DRIVER_OPTIONS.map((definition) => ({
|
||||
provider: definition.value,
|
||||
hasDefaultInstance: definition.hasDefaultInstance !== false,
|
||||
}));
|
||||
|
||||
function ProviderLastChecked({ lastCheckedAt }: { lastCheckedAt: string | null }) {
|
||||
@@ -1032,9 +1033,9 @@ export function ProviderSettingsPanel() {
|
||||
}
|
||||
|
||||
const defaultSlotIdsBySource = new Set<string>(
|
||||
visibleProviderSettings.map((providerSettings) =>
|
||||
String(defaultInstanceIdForDriver(providerSettings.provider)),
|
||||
),
|
||||
visibleProviderSettings
|
||||
.filter((providerSettings) => providerSettings.hasDefaultInstance)
|
||||
.map((providerSettings) => String(defaultInstanceIdForDriver(providerSettings.provider))),
|
||||
);
|
||||
|
||||
const rows: InstanceRow[] = [];
|
||||
@@ -1043,6 +1044,12 @@ export function ProviderSettingsPanel() {
|
||||
);
|
||||
|
||||
for (const providerSettings of visibleProviderSettings) {
|
||||
if (!providerSettings.hasDefaultInstance) {
|
||||
for (const [id, instance] of instancesByDriver.get(providerSettings.provider) ?? []) {
|
||||
rows.push({ instanceId: id, instance, driver: instance.driver, isDefault: false });
|
||||
}
|
||||
continue;
|
||||
}
|
||||
type LegacyProviderSettings = (typeof settings.providers)[keyof typeof settings.providers];
|
||||
const legacyProviders = settings.providers as Record<string, LegacyProviderSettings>;
|
||||
const defaultLegacyProviders = DEFAULT_UNIFIED_SETTINGS.providers as Record<
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import {
|
||||
AcpRegistrySettings,
|
||||
ClaudeSettings,
|
||||
CodexSettings,
|
||||
CursorSettings,
|
||||
@@ -7,7 +8,15 @@ import {
|
||||
ProviderDriverKind,
|
||||
} from "@t3tools/contracts";
|
||||
import type * as Schema from "effect/Schema";
|
||||
import { ClaudeAI, CursorIcon, GrokIcon, type Icon, OpenAI, OpenCodeIcon } from "../Icons";
|
||||
import {
|
||||
ACPRegistryIcon,
|
||||
ClaudeAI,
|
||||
CursorIcon,
|
||||
GrokIcon,
|
||||
type Icon,
|
||||
OpenAI,
|
||||
OpenCodeIcon,
|
||||
} from "../Icons";
|
||||
|
||||
type ProviderSettingsSchema = {
|
||||
readonly fields: Readonly<Record<string, Schema.Top>>;
|
||||
@@ -24,6 +33,8 @@ export interface ProviderClientDefinition {
|
||||
readonly label: string;
|
||||
readonly icon: Icon;
|
||||
readonly settingsSchema: ProviderSettingsSchema;
|
||||
/** Whether this driver has a built-in default instance backed by legacy settings. */
|
||||
readonly hasDefaultInstance?: boolean;
|
||||
/**
|
||||
* Optional short label rendered as a `variant="warning"` badge next to
|
||||
* the instance title. Used to flag drivers that still ship under an
|
||||
@@ -61,6 +72,14 @@ export const PROVIDER_CLIENT_DEFINITIONS: readonly ProviderClientDefinition[] =
|
||||
badgeLabel: "Early Access",
|
||||
settingsSchema: GrokSettings,
|
||||
},
|
||||
{
|
||||
value: ProviderDriverKind.make("acpRegistry"),
|
||||
label: "ACP Registry",
|
||||
icon: ACPRegistryIcon,
|
||||
badgeLabel: "V2 Preview",
|
||||
settingsSchema: AcpRegistrySettings,
|
||||
hasDefaultInstance: false,
|
||||
},
|
||||
{
|
||||
value: ProviderDriverKind.make("opencode"),
|
||||
label: "OpenCode",
|
||||
|
||||
Reference in new issue
Block a user