Files
LangBot/web/src/app/infra/entities/plugin/index.ts
RockChinQ 5bfa38cbf2 feat(plugins): show plugin logs on detail page via Docs/Logs tablist
Add a Logs tab beside Documentation on the plugin detail page, showing
the output a plugin prints through the standard Python logger (per the
wiki style guide). Logs are captured from the plugin's stderr by the
plugin runtime and fetched on demand.

- Bump langbot-plugin pin to 0.4.4 (adds GET_PLUGIN_LOGS action)
- plugin_connector/handler: get_plugin_logs RPC client
- HTTP route GET /api/v1/plugins/<author>/<name>/logs (limit + level)
- Frontend: wrap detail right panel in Docs/Logs Tabs; PluginLogs
  component with level filter, manual + 3s auto refresh, bottom-follow
- i18n: 7 new keys across all 8 locales
2026-06-13 08:01:18 -04:00

58 lines
1.2 KiB
TypeScript

import { ComponentManifest, I18nObject } from '@/app/infra/entities/common';
export interface Plugin {
status: 'intialized' | 'mounted' | 'unmounted';
priority: number;
plugin_config: object;
manifest: {
manifest: ComponentManifest;
};
debug: boolean;
enabled: boolean;
install_source: string;
install_info: Record<string, any>; // eslint-disable-line @typescript-eslint/no-explicit-any
components: PluginComponent[];
}
export interface PluginComponent {
component_config: object;
manifest: {
manifest: ComponentManifest;
};
}
// A single log line captured from a running plugin's stderr.
export interface PluginLogEntry {
ts: number;
level: string;
text: string;
}
// marketplace plugin v4
export enum PluginV4Status {
Any = 'any',
Live = 'live',
Deleted = 'deleted',
}
export interface PluginV4 {
id: number;
plugin_id: string;
mcp_id?: string;
skill_id?: string;
author: string;
name: string;
label: I18nObject;
description: I18nObject;
icon: string;
repository: string;
tags: string[];
install_count: number;
latest_version: string;
components: Record<string, number>;
status: PluginV4Status;
type?: 'plugin' | 'mcp' | 'skill';
created_at: string;
updated_at: string;
}