Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/cli/operations/dev/web-ui/api-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* TODO: Extract these types into a shared package so both repos import
* from a single source of truth instead of manually duplicating.
*/
import type { HarnessModel } from '../../../../schema';
import type { HarnessModelConfiguration, HarnessTool } from '../../../aws/agentcore-harness';
import type { CloudWatchSpanRecord, CloudWatchTraceRecord } from '../../traces/types';

Expand Down Expand Up @@ -463,7 +464,9 @@ export interface StatusHarness {

export interface ResourceHarness {
name: string;
/** @deprecated Use modelConfig instead. */
model: string;
modelConfig?: HarnessModel;
tools: string[];
deploymentStatus?: ResourceDeploymentStatus;
deployed?: DeployedHarnessState;
Expand Down
3 changes: 3 additions & 0 deletions src/cli/operations/dev/web-ui/handlers/resources.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,12 @@ export async function handleResources(ctx: RouteContext, res: ServerResponse, or
const harnesses: ResourceHarness[] = [];
for (const h of project.harnesses ?? []) {
let model = '';
let modelConfig: ResourceHarness['modelConfig'];
let tools: string[] = [];
try {
const spec = await configIO.readHarnessSpec(h.name);
model = `${spec.model.provider}/${spec.model.modelId}`;
modelConfig = spec.model;
tools = spec.tools.map(t => t.name);
} catch {
// harness spec may be unreadable — show what we can
Expand All @@ -131,6 +133,7 @@ export async function handleResources(ctx: RouteContext, res: ServerResponse, or
harnesses.push({
name: h.name,
model,
modelConfig,
tools,
deploymentStatus: statusByTypeAndName.get(`harness:${h.name}`),
deployed: deployed ? { harnessId: deployed.harnessId, harnessArn: deployed.harnessArn } : undefined,
Expand Down
Loading