- Add IopConsoleContract and IopConsoleOverview components - Update iop_console.dart entry point - Update iop_agent_panel with new console integration - Update iop_console_shell for workbench embedding - Add agent task documentation for m-embeddable-iop-console-workbench
63 lines
1.8 KiB
Dart
63 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'iop_console_shell.dart';
|
|
|
|
/// Configuration for the IOP Console, providing endpoints and auth references for Control Plane interaction.
|
|
class IopConsoleConfig {
|
|
final String controlPlaneHttpUrl;
|
|
final String controlPlaneWireUrl;
|
|
final String? authTokenReference; // auth/token reference
|
|
|
|
const IopConsoleConfig({
|
|
required this.controlPlaneHttpUrl,
|
|
required this.controlPlaneWireUrl,
|
|
this.authTokenReference,
|
|
});
|
|
}
|
|
|
|
/// Theme adapter to customize the appearance of embeddable IOP Console components.
|
|
class IopConsoleThemeAdapter {
|
|
final Color primaryColor;
|
|
final Color backgroundColor;
|
|
final Color railBackgroundColor;
|
|
final Color borderColor;
|
|
final Color textColor;
|
|
final Color textSecondaryColor;
|
|
|
|
const IopConsoleThemeAdapter({
|
|
this.primaryColor = const Color(0xFF10B981),
|
|
this.backgroundColor = const Color(0xFF0F172A),
|
|
this.railBackgroundColor = const Color(0xFF111827),
|
|
this.borderColor = const Color(0xFF263043),
|
|
this.textColor = Colors.white,
|
|
this.textSecondaryColor = Colors.white60,
|
|
});
|
|
}
|
|
|
|
/// Navigation contract allowing hosts to listen to section routing changes.
|
|
typedef IopConsoleNavigationCallback = void Function(IopConsoleSection section);
|
|
|
|
class IopConsoleNavigation {
|
|
final IopConsoleNavigationCallback? onNavigate;
|
|
|
|
const IopConsoleNavigation({this.onNavigate});
|
|
}
|
|
|
|
/// Represents a single specialized operations capability supported by the console/agent.
|
|
class IopCapability {
|
|
final String name;
|
|
final String description;
|
|
final IconData? icon;
|
|
|
|
const IopCapability({
|
|
required this.name,
|
|
required this.description,
|
|
this.icon,
|
|
});
|
|
}
|
|
|
|
/// A pack of multiple [IopCapability] items.
|
|
class IopCapabilityPack {
|
|
final List<IopCapability> capabilities;
|
|
|
|
const IopCapabilityPack({required this.capabilities});
|
|
}
|