Add adapter environment testing infrastructure

Introduce testEnvironment() on ServerAdapterModule with structured
pass/warn/fail diagnostics for all four adapter types (claude_local,
codex_local, process, http). Adds POST test-environment endpoint,
shared types/validators, adapter test implementations, and UI API
client. Includes asset type foundations used by related features.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Forgotten
2026-02-20 12:50:23 -06:00
parent de3efdd16b
commit f80a802592
26 changed files with 720 additions and 6 deletions

View File

@@ -79,6 +79,12 @@ export const resetAgentSessionSchema = z.object({
export type ResetAgentSession = z.infer<typeof resetAgentSessionSchema>;
export const testAdapterEnvironmentSchema = z.object({
adapterConfig: adapterConfigSchema.optional().default({}),
});
export type TestAdapterEnvironment = z.infer<typeof testAdapterEnvironmentSchema>;
export const updateAgentPermissionsSchema = z.object({
canCreateAgents: z.boolean(),
});

View File

@@ -0,0 +1,14 @@
import { z } from "zod";
export const createAssetImageMetadataSchema = z.object({
namespace: z
.string()
.trim()
.min(1)
.max(120)
.regex(/^[a-zA-Z0-9/_-]+$/)
.optional(),
});
export type CreateAssetImageMetadata = z.infer<typeof createAssetImageMetadataSchema>;

View File

@@ -12,6 +12,7 @@ export {
createAgentKeySchema,
wakeAgentSchema,
resetAgentSessionSchema,
testAdapterEnvironmentSchema,
agentPermissionsSchema,
updateAgentPermissionsSchema,
type CreateAgent,
@@ -20,6 +21,7 @@ export {
type CreateAgentKey,
type WakeAgent,
type ResetAgentSession,
type TestAdapterEnvironment,
type UpdateAgentPermissions,
} from "./agent.js";
@@ -84,3 +86,8 @@ export {
type CreateCostEvent,
type UpdateBudget,
} from "./cost.js";
export {
createAssetImageMetadataSchema,
type CreateAssetImageMetadata,
} from "./asset.js";