@acarmisc/backstage-plugin-ai-agents 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ import { FetchApi } from '@backstage/core-plugin-api';
2
+ import type { CatalogApi } from '@backstage/catalog-client';
3
+ import { AiAgent, AgentStatus } from './types';
4
+ export interface AiAgentsApiInterface {
5
+ listAgents(): Promise<AiAgent[]>;
6
+ getAgent(entityRef: string): Promise<AiAgent | undefined>;
7
+ /** Probe live status for the given entity refs via the backend. */
8
+ getStatuses(entityRefs: string[]): Promise<Record<string, AgentStatus>>;
9
+ }
10
+ export declare const aiAgentsApiRef: import("@backstage/core-plugin-api").ApiRef<AiAgentsApiInterface>;
11
+ export declare class AiAgentsApi implements AiAgentsApiInterface {
12
+ private readonly opts;
13
+ private readonly basePath;
14
+ constructor(opts: {
15
+ fetchApi: FetchApi;
16
+ catalogApi: CatalogApi;
17
+ }, basePath?: string);
18
+ listAgents(): Promise<AiAgent[]>;
19
+ getAgent(entityRef: string): Promise<AiAgent | undefined>;
20
+ getStatuses(entityRefs: string[]): Promise<Record<string, AgentStatus>>;
21
+ }
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ export interface AgentAvatarProps {
3
+ name: string;
4
+ avatarUrl?: string;
5
+ size?: number;
6
+ }
7
+ export declare const AgentAvatar: React.FC<AgentAvatarProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { AgentCapability } from '../types';
3
+ export interface AgentCapabilitiesProps {
4
+ capabilities: AgentCapability[];
5
+ max?: number;
6
+ size?: 'small' | 'medium';
7
+ }
8
+ export declare const AgentCapabilities: React.FC<AgentCapabilitiesProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { AiAgent } from '../types';
3
+ export interface AgentCardProps {
4
+ agent: AiAgent;
5
+ onClick?: (agent: AiAgent) => void;
6
+ onRuntimeClick?: (runtime: string) => void;
7
+ }
8
+ export declare const AgentCard: React.FC<AgentCardProps>;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { AiAgent } from '../types';
3
+ export interface AgentDetailDrawerProps {
4
+ agent: AiAgent | null;
5
+ open: boolean;
6
+ onClose: () => void;
7
+ onRefreshStatus?: (entityRef: string) => void;
8
+ }
9
+ export declare const AgentDetailDrawer: React.FC<AgentDetailDrawerProps>;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { AiAgent } from '../types';
3
+ import type { AgentFilters } from '../hooks/useAgents';
4
+ export interface AgentFiltersBarProps {
5
+ agents: AiAgent[];
6
+ filters: AgentFilters;
7
+ onChange: (patch: Partial<AgentFilters>) => void;
8
+ onReset: () => void;
9
+ }
10
+ export declare const AgentFiltersBar: React.FC<AgentFiltersBarProps>;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { AgentStatus } from '../types';
3
+ export interface AgentStatusBadgeProps {
4
+ status?: AgentStatus;
5
+ }
6
+ export declare const AgentStatusBadge: React.FC<AgentStatusBadgeProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { AiAgent } from '../types';
3
+ export interface AgentsGridProps {
4
+ agents: AiAgent[];
5
+ onAgentClick?: (agent: AiAgent) => void;
6
+ onRuntimeClick?: (runtime: string) => void;
7
+ }
8
+ export declare const AgentsGrid: React.FC<AgentsGridProps>;
@@ -0,0 +1,2 @@
1
+ import React from 'react';
2
+ export declare const AgentsPage: React.FC;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { AgentBilling } from '../types';
3
+ export interface BillingBadgeProps {
4
+ billing: AgentBilling;
5
+ }
6
+ export declare const BillingBadge: React.FC<BillingBadgeProps>;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import type { AgentRuntimeName } from '../types';
3
+ export interface RuntimeBadgeProps {
4
+ runtime: AgentRuntimeName;
5
+ size?: 'small' | 'medium';
6
+ onClick?: (runtime: string) => void;
7
+ }
8
+ export declare const RuntimeBadge: React.FC<RuntimeBadgeProps>;
@@ -0,0 +1,20 @@
1
+ import type { AiAgent } from '../types';
2
+ export interface AgentFilters {
3
+ search: string;
4
+ runtime: string[];
5
+ capability: string[];
6
+ lifecycle: string[];
7
+ owner: string[];
8
+ }
9
+ export declare const initialFilters: AgentFilters;
10
+ export declare function applyFilters(agents: AiAgent[], filters: AgentFilters): AiAgent[];
11
+ export declare function useAgents(): {
12
+ agents: AiAgent[];
13
+ allAgents: AiAgent[];
14
+ loading: boolean;
15
+ error: Error | undefined;
16
+ retry: (() => void) | (() => void) | (() => void) | (() => void);
17
+ filters: AgentFilters;
18
+ update: (patch: Partial<AgentFilters>) => void;
19
+ reset: () => void;
20
+ };