@kb-labs/studio-data-client 2.94.0 → 2.98.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/index.d.ts +52 -1
- package/dist/index.js +96 -10
- package/dist/index.js.map +1 -1
- package/package.json +13 -13
package/dist/index.d.ts
CHANGED
|
@@ -1256,8 +1256,29 @@ interface RoutesResponse {
|
|
|
1256
1256
|
routes: RouteInfo[];
|
|
1257
1257
|
raw?: string;
|
|
1258
1258
|
}
|
|
1259
|
+
interface PlatformHealthComponent {
|
|
1260
|
+
id: string;
|
|
1261
|
+
version?: string;
|
|
1262
|
+
restRoutes?: number;
|
|
1263
|
+
studioWidgets?: number;
|
|
1264
|
+
lastError?: string;
|
|
1265
|
+
}
|
|
1266
|
+
interface PlatformHealthSnapshot {
|
|
1267
|
+
status: 'healthy' | 'degraded';
|
|
1268
|
+
uptimeSec: number;
|
|
1269
|
+
registry: {
|
|
1270
|
+
total: number;
|
|
1271
|
+
withRest: number;
|
|
1272
|
+
withStudio: number;
|
|
1273
|
+
errors: number;
|
|
1274
|
+
partial: boolean;
|
|
1275
|
+
stale: boolean;
|
|
1276
|
+
};
|
|
1277
|
+
components: PlatformHealthComponent[];
|
|
1278
|
+
}
|
|
1259
1279
|
interface SystemDataSource {
|
|
1260
1280
|
getHealth(): Promise<HealthStatus>;
|
|
1281
|
+
getPlatformHealth?(): Promise<PlatformHealthSnapshot>;
|
|
1261
1282
|
getReady?(): Promise<ReadyResponse | NotReadyResponse>;
|
|
1262
1283
|
getInfo?(): Promise<SystemInfoPayload>;
|
|
1263
1284
|
getCapabilities?(): Promise<SystemCapabilitiesPayload>;
|
|
@@ -1823,6 +1844,16 @@ interface PluginsDataSource {
|
|
|
1823
1844
|
* Ask AI a question about a specific plugin
|
|
1824
1845
|
*/
|
|
1825
1846
|
askAboutPlugin(pluginId: string, request: PluginAskRequest): Promise<PluginAskResponse>;
|
|
1847
|
+
/**
|
|
1848
|
+
* Get README.md content for a plugin.
|
|
1849
|
+
* Returns raw markdown text, or null if README.md does not exist.
|
|
1850
|
+
*/
|
|
1851
|
+
getPluginReadme(pluginId: string): Promise<string | null>;
|
|
1852
|
+
/**
|
|
1853
|
+
* Get CHANGELOG.md content for a plugin.
|
|
1854
|
+
* Returns raw markdown text, or null if CHANGELOG.md does not exist.
|
|
1855
|
+
*/
|
|
1856
|
+
getPluginChangelog(pluginId: string): Promise<string | null>;
|
|
1826
1857
|
}
|
|
1827
1858
|
|
|
1828
1859
|
/**
|
|
@@ -1836,6 +1867,7 @@ interface PluginsDataSource {
|
|
|
1836
1867
|
declare class HttpSystemSource implements SystemDataSource {
|
|
1837
1868
|
private client;
|
|
1838
1869
|
constructor(client: HttpClient);
|
|
1870
|
+
getPlatformHealth(): Promise<PlatformHealthSnapshot>;
|
|
1839
1871
|
getHealth(): Promise<HealthStatus>;
|
|
1840
1872
|
/**
|
|
1841
1873
|
* Get ready status
|
|
@@ -2048,10 +2080,14 @@ declare class HttpPluginsSource implements PluginsDataSource {
|
|
|
2048
2080
|
constructor(client: HttpClient);
|
|
2049
2081
|
getPlugins(): Promise<PluginsRegistryResponse>;
|
|
2050
2082
|
askAboutPlugin(pluginId: string, request: PluginAskRequest): Promise<PluginAskResponse>;
|
|
2083
|
+
getPluginReadme(pluginId: string): Promise<string | null>;
|
|
2084
|
+
getPluginChangelog(pluginId: string): Promise<string | null>;
|
|
2085
|
+
private splitPluginId;
|
|
2051
2086
|
}
|
|
2052
2087
|
|
|
2053
2088
|
declare class MockSystemSource implements SystemDataSource {
|
|
2054
2089
|
getHealth(): Promise<HealthStatus>;
|
|
2090
|
+
getPlatformHealth(): Promise<PlatformHealthSnapshot>;
|
|
2055
2091
|
getRoutes(): Promise<RoutesResponse>;
|
|
2056
2092
|
getBaseUrl(): string;
|
|
2057
2093
|
}
|
|
@@ -2233,6 +2269,8 @@ declare class MockPluginsSource implements PluginsDataSource {
|
|
|
2233
2269
|
completionTokens: number;
|
|
2234
2270
|
};
|
|
2235
2271
|
}>;
|
|
2272
|
+
getPluginReadme(_pluginId: string): Promise<string | null>;
|
|
2273
|
+
getPluginChangelog(_pluginId: string): Promise<string | null>;
|
|
2236
2274
|
}
|
|
2237
2275
|
|
|
2238
2276
|
interface DataSourcesConfig {
|
|
@@ -2329,10 +2367,15 @@ declare const qk: {
|
|
|
2329
2367
|
readonly live: () => readonly ["system", "health", "live"];
|
|
2330
2368
|
readonly ready: () => readonly ["system", "health", "ready"];
|
|
2331
2369
|
};
|
|
2370
|
+
readonly platformHealth: () => readonly ["system", "platform-health"];
|
|
2332
2371
|
readonly info: () => readonly ["system", "info"];
|
|
2333
2372
|
readonly capabilities: () => readonly ["system", "capabilities"];
|
|
2334
2373
|
readonly config: () => readonly ["system", "config"];
|
|
2335
2374
|
};
|
|
2375
|
+
readonly plugins: {
|
|
2376
|
+
readonly all: readonly ["plugins"];
|
|
2377
|
+
readonly registry: () => readonly ["plugins", "registry"];
|
|
2378
|
+
};
|
|
2336
2379
|
readonly workflows: {
|
|
2337
2380
|
readonly all: readonly ["workflows"];
|
|
2338
2381
|
readonly list: (filters?: WorkflowRunsFilters) => readonly ["workflows", "list", WorkflowRunsFilters];
|
|
@@ -2430,10 +2473,15 @@ declare const queryKeys: {
|
|
|
2430
2473
|
readonly live: () => readonly ["system", "health", "live"];
|
|
2431
2474
|
readonly ready: () => readonly ["system", "health", "ready"];
|
|
2432
2475
|
};
|
|
2476
|
+
readonly platformHealth: () => readonly ["system", "platform-health"];
|
|
2433
2477
|
readonly info: () => readonly ["system", "info"];
|
|
2434
2478
|
readonly capabilities: () => readonly ["system", "capabilities"];
|
|
2435
2479
|
readonly config: () => readonly ["system", "config"];
|
|
2436
2480
|
};
|
|
2481
|
+
readonly plugins: {
|
|
2482
|
+
readonly all: readonly ["plugins"];
|
|
2483
|
+
readonly registry: () => readonly ["plugins", "registry"];
|
|
2484
|
+
};
|
|
2437
2485
|
readonly workflows: {
|
|
2438
2486
|
readonly all: readonly ["workflows"];
|
|
2439
2487
|
readonly list: (filters?: WorkflowRunsFilters) => readonly ["workflows", "list", WorkflowRunsFilters];
|
|
@@ -2464,6 +2512,7 @@ declare const queryKeys: {
|
|
|
2464
2512
|
};
|
|
2465
2513
|
};
|
|
2466
2514
|
|
|
2515
|
+
declare function usePlatformHealth(source: SystemDataSource): _tanstack_react_query.UseQueryResult<PlatformHealthSnapshot | null, Error>;
|
|
2467
2516
|
declare function useHealthStatus(source: SystemDataSource): _tanstack_react_query.UseQueryResult<HealthStatus, Error>;
|
|
2468
2517
|
declare function useReadyStatus(source: SystemDataSource): _tanstack_react_query.UseQueryResult<_kb_labs_rest_api_contracts.ReadyResponse | _kb_labs_rest_api_contracts.NotReadyResponse | {
|
|
2469
2518
|
ready: true;
|
|
@@ -2484,6 +2533,8 @@ declare function useCapabilities(source: SystemDataSource): _tanstack_react_quer
|
|
|
2484
2533
|
};
|
|
2485
2534
|
}, Error>;
|
|
2486
2535
|
|
|
2536
|
+
declare function usePluginsRegistry(source: PluginsDataSource): _tanstack_react_query.UseQueryResult<PluginsRegistryResponse, Error>;
|
|
2537
|
+
|
|
2487
2538
|
declare function useWorkflowRuns(source: WorkflowDataSource, filters?: WorkflowRunsFilters): _tanstack_react_query.UseQueryResult<WorkflowRunsListResponse, Error>;
|
|
2488
2539
|
declare function useWorkflowRun(runId: string | null, source: WorkflowDataSource): _tanstack_react_query.UseQueryResult<WorkflowRun | null, Error>;
|
|
2489
2540
|
declare function useCancelWorkflowRun(source: WorkflowDataSource): _tanstack_react_query.UseMutationResult<WorkflowRun, Error, string, unknown>;
|
|
@@ -2767,4 +2818,4 @@ interface UseNotificationsResult {
|
|
|
2767
2818
|
*/
|
|
2768
2819
|
declare function useNotifications(source: ObservabilityDataSource, maxNotifications?: number): UseNotificationsResult;
|
|
2769
2820
|
|
|
2770
|
-
export { type ActionResult, type AdaptersDataSource, type AnalyticsDataSource, type CacheDataSource, type CacheInvalidationResult, type CacheUsageStats, type CronInfo, type CronListResponse, type DailyStats, type DashboardStatsResponse, type DataSources, type DataSourcesConfig, type DateRangeOptions, type DevKitHealth, type EmbeddingsUsageStats, type ErrorInterceptor, type FetchOptions, type HealthEvent, type HealthStatus, type HeatmapCell, type HistoricalDataPoint, HttpAdaptersSource, HttpAnalyticsSource, HttpCacheSource, HttpClient, HttpObservabilitySource, HttpPlatformSource, HttpPluginsSource, HttpSystemSource, HttpWorkflowSource, type ID, type ISODate, type Incident, type IncidentAnalysis, type IncidentAnalysisResponse, type IncidentCreatePayload, type IncidentDetailResponse, type IncidentQuery, type IncidentResolveRequest, type IncidentSeverity, type IncidentType, type IncidentsListResponse, type JobEvent, type JobEventType, type JobListFilter, type JobListResponse, type JobLogsResponse, type JobRun, type JobStatusInfo, type JobStepInfo, type JobStepsResponse, KBError, type LLMModelStats, type LLMUsageStats, type LogEvent, type LogNotification, type LogQuery, type LogQueryResponse, type LogRecord, type LogStats, type LogSummarizeContext, type LogSummarizeRequest, type LogSummarizeResponse, type MetricsHeatmapQuery, type MetricsHistoryQuery, MockAdaptersSource, MockAnalyticsSource, MockCacheSource, MockObservabilitySource, MockPlatformSource, MockPluginsSource, MockSystemSource, MockWorkflowSource, type NamespaceStats, type ObservabilityDataSource, type PackageRef, type PendingApproval, type PendingApprovalsResponse, type PlatformDataSource, type PluginAskRequest, type PluginAskResponse, type PluginManifestEntry, type PluginMetrics, type PluginSource, type PluginsDataSource, type PluginsRegistryResponse, type PrometheusMetrics, type RegistryEvent, type RelatedData, type RelatedLogsData, type RelatedMetricsData, type RequestInterceptor, type ResolveApprovalParams, type ResponseError, type ResponseInterceptor, type RootCauseItem, type RouteInfo, type RoutesResponse, type RunRef, SCHEMA_VERSION, type SlowRequest, type StateBrokerStats, type StepRun, type StorageUsageStats, type SystemDataSource, type SystemEvent, type TenantMetrics, type TimelineEvent, type UseJobEventsOptions, type UseJobEventsResult, type UseNotificationsResult, type UseWorkflowEventsOptions, type UseWorkflowLogsOptions, type VectorStoreUsageStats, type WorkflowDataSource, type WorkflowExecutionResult, type WorkflowInfo, type WorkflowListResponse, type WorkflowLogEvent, type WorkflowPresenterEvent, type WorkflowResultError, type WorkflowResultMetrics, type WorkflowRun, type WorkflowRunHistoryResponse, type WorkflowRunInfo, type WorkflowRunParams, type WorkflowRunResponse, type WorkflowRunsFilters, type WorkflowRunsListResponse, type WorkflowSpec, type WorkflowStatus, type WorkflowTrigger, actionResultSchema, auditCheckSchema, auditPackageReportSchema, auditSummarySchema, createDataSources, createEnvelopeInterceptor, errorCodes, extractEnvelopeMeta, healthStatusSchema, idSchema, isoDateSchema, mapErrorEnvelope, mapFetchError, packageRefSchema, qk, queryKeys, releasePreviewSchema, runRefSchema, useAdaptersCacheDailyStats, useAdaptersCacheUsage, useAdaptersEmbeddingsDailyStats, useAdaptersEmbeddingsUsage, useAdaptersLLMDailyStats, useAdaptersLLMUsage, useAdaptersStorageDailyStats, useAdaptersStorageUsage, useAdaptersVectorStoreDailyStats, useAdaptersVectorStoreUsage, useAnalyticsBufferStatus, useAnalyticsDlqStatus, useAnalyticsEvents, useAnalyticsStats, useCancelWorkflowRun, useCapabilities, useDevKitHealth, useHealthStatus, useIncidents, useJobEvents, useLogStream, useMetricsHeatmap, useMetricsHistory, useNotifications, usePlatformConfig, usePrometheusMetrics, useReadyStatus, useResolveApproval, useRunWorkflow, useStateBrokerStats, useSystemEvents, useSystemInfo, useWorkflowEvents, useWorkflowLogs, useWorkflowRun, useWorkflowRuns };
|
|
2821
|
+
export { type ActionResult, type AdaptersDataSource, type AnalyticsDataSource, type CacheDataSource, type CacheInvalidationResult, type CacheUsageStats, type CronInfo, type CronListResponse, type DailyStats, type DashboardStatsResponse, type DataSources, type DataSourcesConfig, type DateRangeOptions, type DevKitHealth, type EmbeddingsUsageStats, type ErrorInterceptor, type FetchOptions, type HealthEvent, type HealthStatus, type HeatmapCell, type HistoricalDataPoint, HttpAdaptersSource, HttpAnalyticsSource, HttpCacheSource, HttpClient, HttpObservabilitySource, HttpPlatformSource, HttpPluginsSource, HttpSystemSource, HttpWorkflowSource, type ID, type ISODate, type Incident, type IncidentAnalysis, type IncidentAnalysisResponse, type IncidentCreatePayload, type IncidentDetailResponse, type IncidentQuery, type IncidentResolveRequest, type IncidentSeverity, type IncidentType, type IncidentsListResponse, type JobEvent, type JobEventType, type JobListFilter, type JobListResponse, type JobLogsResponse, type JobRun, type JobStatusInfo, type JobStepInfo, type JobStepsResponse, KBError, type LLMModelStats, type LLMUsageStats, type LogEvent, type LogNotification, type LogQuery, type LogQueryResponse, type LogRecord, type LogStats, type LogSummarizeContext, type LogSummarizeRequest, type LogSummarizeResponse, type MetricsHeatmapQuery, type MetricsHistoryQuery, MockAdaptersSource, MockAnalyticsSource, MockCacheSource, MockObservabilitySource, MockPlatformSource, MockPluginsSource, MockSystemSource, MockWorkflowSource, type NamespaceStats, type ObservabilityDataSource, type PackageRef, type PendingApproval, type PendingApprovalsResponse, type PlatformDataSource, type PlatformHealthComponent, type PlatformHealthSnapshot, type PluginAskRequest, type PluginAskResponse, type PluginManifestEntry, type PluginMetrics, type PluginSource, type PluginsDataSource, type PluginsRegistryResponse, type PrometheusMetrics, type RegistryEvent, type RelatedData, type RelatedLogsData, type RelatedMetricsData, type RequestInterceptor, type ResolveApprovalParams, type ResponseError, type ResponseInterceptor, type RootCauseItem, type RouteInfo, type RoutesResponse, type RunRef, SCHEMA_VERSION, type SlowRequest, type StateBrokerStats, type StepRun, type StorageUsageStats, type SystemDataSource, type SystemEvent, type TenantMetrics, type TimelineEvent, type UseJobEventsOptions, type UseJobEventsResult, type UseNotificationsResult, type UseWorkflowEventsOptions, type UseWorkflowLogsOptions, type VectorStoreUsageStats, type WorkflowDataSource, type WorkflowExecutionResult, type WorkflowInfo, type WorkflowListResponse, type WorkflowLogEvent, type WorkflowPresenterEvent, type WorkflowResultError, type WorkflowResultMetrics, type WorkflowRun, type WorkflowRunHistoryResponse, type WorkflowRunInfo, type WorkflowRunParams, type WorkflowRunResponse, type WorkflowRunsFilters, type WorkflowRunsListResponse, type WorkflowSpec, type WorkflowStatus, type WorkflowTrigger, actionResultSchema, auditCheckSchema, auditPackageReportSchema, auditSummarySchema, createDataSources, createEnvelopeInterceptor, errorCodes, extractEnvelopeMeta, healthStatusSchema, idSchema, isoDateSchema, mapErrorEnvelope, mapFetchError, packageRefSchema, qk, queryKeys, releasePreviewSchema, runRefSchema, useAdaptersCacheDailyStats, useAdaptersCacheUsage, useAdaptersEmbeddingsDailyStats, useAdaptersEmbeddingsUsage, useAdaptersLLMDailyStats, useAdaptersLLMUsage, useAdaptersStorageDailyStats, useAdaptersStorageUsage, useAdaptersVectorStoreDailyStats, useAdaptersVectorStoreUsage, useAnalyticsBufferStatus, useAnalyticsDlqStatus, useAnalyticsEvents, useAnalyticsStats, useCancelWorkflowRun, useCapabilities, useDevKitHealth, useHealthStatus, useIncidents, useJobEvents, useLogStream, useMetricsHeatmap, useMetricsHistory, useNotifications, usePlatformConfig, usePlatformHealth, usePluginsRegistry, usePrometheusMetrics, useReadyStatus, useResolveApproval, useRunWorkflow, useStateBrokerStats, useSystemEvents, useSystemInfo, useWorkflowEvents, useWorkflowLogs, useWorkflowRun, useWorkflowRuns };
|
package/dist/index.js
CHANGED
|
@@ -327,6 +327,9 @@ var HttpSystemSource = class {
|
|
|
327
327
|
this.client = client;
|
|
328
328
|
}
|
|
329
329
|
client;
|
|
330
|
+
async getPlatformHealth() {
|
|
331
|
+
return this.client.fetch("/health");
|
|
332
|
+
}
|
|
330
333
|
async getHealth() {
|
|
331
334
|
const snapshot = await this.client.fetch("/observability/health");
|
|
332
335
|
const degraded = snapshot.status === "degraded" || snapshot.state === "partial_observability";
|
|
@@ -1410,6 +1413,35 @@ var HttpPluginsSource = class {
|
|
|
1410
1413
|
data: request
|
|
1411
1414
|
});
|
|
1412
1415
|
}
|
|
1416
|
+
async getPluginReadme(pluginId) {
|
|
1417
|
+
const [scope, name] = this.splitPluginId(pluginId);
|
|
1418
|
+
try {
|
|
1419
|
+
return await this.client.fetch(`/plugins/@${scope}/${name}/readme`, { responseType: "text" });
|
|
1420
|
+
} catch (error) {
|
|
1421
|
+
if (error instanceof KBError && error.status === 404) {
|
|
1422
|
+
return null;
|
|
1423
|
+
}
|
|
1424
|
+
throw error;
|
|
1425
|
+
}
|
|
1426
|
+
}
|
|
1427
|
+
async getPluginChangelog(pluginId) {
|
|
1428
|
+
const [scope, name] = this.splitPluginId(pluginId);
|
|
1429
|
+
try {
|
|
1430
|
+
return await this.client.fetch(`/plugins/@${scope}/${name}/changelog`, { responseType: "text" });
|
|
1431
|
+
} catch (error) {
|
|
1432
|
+
if (error instanceof KBError && error.status === 404) {
|
|
1433
|
+
return null;
|
|
1434
|
+
}
|
|
1435
|
+
throw error;
|
|
1436
|
+
}
|
|
1437
|
+
}
|
|
1438
|
+
splitPluginId(pluginId) {
|
|
1439
|
+
const match = /^@([^/]+)\/(.+)$/.exec(pluginId);
|
|
1440
|
+
if (!match || !match[1] || !match[2]) {
|
|
1441
|
+
throw new KBError("VALIDATION_ERROR", `Invalid plugin ID format: ${pluginId}`, 400);
|
|
1442
|
+
}
|
|
1443
|
+
return [match[1], match[2]];
|
|
1444
|
+
}
|
|
1413
1445
|
};
|
|
1414
1446
|
|
|
1415
1447
|
// src/mocks/mock-system-source.ts
|
|
@@ -1458,6 +1490,29 @@ var MockSystemSource = class {
|
|
|
1458
1490
|
snapshot
|
|
1459
1491
|
};
|
|
1460
1492
|
}
|
|
1493
|
+
async getPlatformHealth() {
|
|
1494
|
+
await delay(120);
|
|
1495
|
+
return {
|
|
1496
|
+
status: "healthy",
|
|
1497
|
+
uptimeSec: 3600,
|
|
1498
|
+
registry: {
|
|
1499
|
+
total: 6,
|
|
1500
|
+
withRest: 4,
|
|
1501
|
+
withStudio: 3,
|
|
1502
|
+
errors: 0,
|
|
1503
|
+
partial: false,
|
|
1504
|
+
stale: false
|
|
1505
|
+
},
|
|
1506
|
+
components: [
|
|
1507
|
+
{ id: "@kb-labs/quality", version: "0.1.0", restRoutes: 11, studioWidgets: 1 },
|
|
1508
|
+
{ id: "@kb-labs/workflow", version: "0.1.0", restRoutes: 6, studioWidgets: 1 },
|
|
1509
|
+
{ id: "@kb-labs/marketplace", version: "0.1.0", restRoutes: 5, studioWidgets: 1 },
|
|
1510
|
+
{ id: "@kb-labs/mind", version: "0.1.0", restRoutes: 3, studioWidgets: 0 },
|
|
1511
|
+
{ id: "@kb-labs/commit", version: "0.1.0", restRoutes: 0, studioWidgets: 0 },
|
|
1512
|
+
{ id: "@kb-labs/release", version: "0.1.0", restRoutes: 4, studioWidgets: 0 }
|
|
1513
|
+
]
|
|
1514
|
+
};
|
|
1515
|
+
}
|
|
1461
1516
|
async getRoutes() {
|
|
1462
1517
|
await delay(100);
|
|
1463
1518
|
return {
|
|
@@ -2913,8 +2968,7 @@ var mockManifests = {
|
|
|
2913
2968
|
cli: {
|
|
2914
2969
|
commands: [
|
|
2915
2970
|
{
|
|
2916
|
-
|
|
2917
|
-
group: "mind",
|
|
2971
|
+
path: "mind search",
|
|
2918
2972
|
describe: "Query the RAG index",
|
|
2919
2973
|
handler: "./dist/commands/rag-query.js",
|
|
2920
2974
|
flags: [
|
|
@@ -2923,8 +2977,7 @@ var mockManifests = {
|
|
|
2923
2977
|
]
|
|
2924
2978
|
},
|
|
2925
2979
|
{
|
|
2926
|
-
|
|
2927
|
-
group: "mind",
|
|
2980
|
+
path: "mind index",
|
|
2928
2981
|
describe: "Build RAG index",
|
|
2929
2982
|
handler: "./dist/commands/rag-index.js",
|
|
2930
2983
|
flags: [
|
|
@@ -2980,8 +3033,7 @@ var mockManifests = {
|
|
|
2980
3033
|
cli: {
|
|
2981
3034
|
commands: [
|
|
2982
3035
|
{
|
|
2983
|
-
|
|
2984
|
-
group: "workflow",
|
|
3036
|
+
path: "workflow run",
|
|
2985
3037
|
describe: "Run a workflow",
|
|
2986
3038
|
handler: "./dist/commands/run.js",
|
|
2987
3039
|
flags: [
|
|
@@ -3057,11 +3109,11 @@ These permissions are necessary for RAG indexing and semantic search functionali
|
|
|
3057
3109
|
} else if (question.includes("command") || question.includes("cli")) {
|
|
3058
3110
|
answer = `The plugin provides 2 CLI commands:
|
|
3059
3111
|
|
|
3060
|
-
1. **
|
|
3112
|
+
1. **mind search** - Query the RAG index
|
|
3061
3113
|
- Required: --text (query text)
|
|
3062
3114
|
- Optional: --agent (use agent mode)
|
|
3063
3115
|
|
|
3064
|
-
2. **
|
|
3116
|
+
2. **mind index** - Build RAG index
|
|
3065
3117
|
- Optional: --scope (default: 'default')
|
|
3066
3118
|
|
|
3067
3119
|
Use these commands to perform semantic code search across your codebase.`;
|
|
@@ -3078,7 +3130,7 @@ This endpoint allows integration with external tools and web interfaces.`;
|
|
|
3078
3130
|
answer = `This is the Mind RAG Plugin (v0.1.0) - a semantic code search and RAG system.
|
|
3079
3131
|
|
|
3080
3132
|
Key features:
|
|
3081
|
-
- 2 CLI commands (
|
|
3133
|
+
- 2 CLI commands (mind search, mind index)
|
|
3082
3134
|
- 1 REST API endpoint (/search)
|
|
3083
3135
|
- AI-powered semantic search
|
|
3084
3136
|
- Read-only file system access
|
|
@@ -3094,6 +3146,18 @@ The plugin helps developers find relevant code using natural language queries.`;
|
|
|
3094
3146
|
}
|
|
3095
3147
|
};
|
|
3096
3148
|
}
|
|
3149
|
+
async getPluginReadme(_pluginId) {
|
|
3150
|
+
await new Promise((resolve) => {
|
|
3151
|
+
setTimeout(() => resolve(), 200);
|
|
3152
|
+
});
|
|
3153
|
+
return "# Plugin README\n\nThis is a mock README for development purposes.";
|
|
3154
|
+
}
|
|
3155
|
+
async getPluginChangelog(_pluginId) {
|
|
3156
|
+
await new Promise((resolve) => {
|
|
3157
|
+
setTimeout(() => resolve(), 200);
|
|
3158
|
+
});
|
|
3159
|
+
return null;
|
|
3160
|
+
}
|
|
3097
3161
|
};
|
|
3098
3162
|
|
|
3099
3163
|
// src/factory.ts
|
|
@@ -3169,10 +3233,16 @@ var qk = {
|
|
|
3169
3233
|
live: () => [...qk.system.all, "health", "live"],
|
|
3170
3234
|
ready: () => [...qk.system.all, "health", "ready"]
|
|
3171
3235
|
},
|
|
3236
|
+
platformHealth: () => [...qk.system.all, "platform-health"],
|
|
3172
3237
|
info: () => [...qk.system.all, "info"],
|
|
3173
3238
|
capabilities: () => [...qk.system.all, "capabilities"],
|
|
3174
3239
|
config: () => [...qk.system.all, "config"]
|
|
3175
3240
|
},
|
|
3241
|
+
// Plugins queries
|
|
3242
|
+
plugins: {
|
|
3243
|
+
all: ["plugins"],
|
|
3244
|
+
registry: () => [...qk.plugins.all, "registry"]
|
|
3245
|
+
},
|
|
3176
3246
|
workflows: {
|
|
3177
3247
|
all: ["workflows"],
|
|
3178
3248
|
list: (filters) => [...qk.workflows.all, "list", filters ?? {}],
|
|
@@ -3201,6 +3271,14 @@ var qk = {
|
|
|
3201
3271
|
}
|
|
3202
3272
|
};
|
|
3203
3273
|
var queryKeys = qk;
|
|
3274
|
+
function usePlatformHealth(source) {
|
|
3275
|
+
return useQuery({
|
|
3276
|
+
queryKey: qk.system.platformHealth(),
|
|
3277
|
+
queryFn: () => source.getPlatformHealth?.() ?? Promise.resolve(null),
|
|
3278
|
+
refetchInterval: 3e4,
|
|
3279
|
+
staleTime: 15e3
|
|
3280
|
+
});
|
|
3281
|
+
}
|
|
3204
3282
|
function useHealthStatus(source) {
|
|
3205
3283
|
return useQuery({
|
|
3206
3284
|
queryKey: qk.system.health.live(),
|
|
@@ -3281,6 +3359,14 @@ function useCapabilities(source) {
|
|
|
3281
3359
|
staleTime: 6e4
|
|
3282
3360
|
});
|
|
3283
3361
|
}
|
|
3362
|
+
function usePluginsRegistry(source) {
|
|
3363
|
+
return useQuery({
|
|
3364
|
+
queryKey: qk.plugins.registry(),
|
|
3365
|
+
queryFn: () => source.getPlugins(),
|
|
3366
|
+
refetchInterval: 6e4,
|
|
3367
|
+
staleTime: 3e4
|
|
3368
|
+
});
|
|
3369
|
+
}
|
|
3284
3370
|
function useWorkflowRuns(source, filters) {
|
|
3285
3371
|
const queryKey = useMemo(() => qk.workflows.list(filters), [filters]);
|
|
3286
3372
|
return useQuery({
|
|
@@ -3964,6 +4050,6 @@ function useNotifications(source, maxNotifications = MAX_NOTIFICATIONS) {
|
|
|
3964
4050
|
};
|
|
3965
4051
|
}
|
|
3966
4052
|
|
|
3967
|
-
export { HttpAdaptersSource, HttpAnalyticsSource, HttpCacheSource, HttpClient, HttpObservabilitySource, HttpPlatformSource, HttpPluginsSource, HttpSystemSource, HttpWorkflowSource, KBError, MockAdaptersSource, MockAnalyticsSource, MockCacheSource, MockObservabilitySource, MockPlatformSource, MockPluginsSource, MockSystemSource, MockWorkflowSource, SCHEMA_VERSION, actionResultSchema, auditCheckSchema, auditPackageReportSchema, auditSummarySchema, createDataSources, createEnvelopeInterceptor, errorCodes, extractEnvelopeMeta, healthStatusSchema, idSchema, isoDateSchema, mapErrorEnvelope, mapFetchError, packageRefSchema, qk, queryKeys, releasePreviewSchema, runRefSchema, useAdaptersCacheDailyStats, useAdaptersCacheUsage, useAdaptersEmbeddingsDailyStats, useAdaptersEmbeddingsUsage, useAdaptersLLMDailyStats, useAdaptersLLMUsage, useAdaptersStorageDailyStats, useAdaptersStorageUsage, useAdaptersVectorStoreDailyStats, useAdaptersVectorStoreUsage, useAnalyticsBufferStatus, useAnalyticsDlqStatus, useAnalyticsEvents, useAnalyticsStats, useCancelWorkflowRun, useCapabilities, useDevKitHealth, useHealthStatus, useIncidents, useJobEvents, useLogStream, useMetricsHeatmap, useMetricsHistory, useNotifications, usePlatformConfig, usePrometheusMetrics, useReadyStatus, useResolveApproval, useRunWorkflow, useStateBrokerStats, useSystemEvents, useSystemInfo, useWorkflowEvents, useWorkflowLogs, useWorkflowRun, useWorkflowRuns };
|
|
4053
|
+
export { HttpAdaptersSource, HttpAnalyticsSource, HttpCacheSource, HttpClient, HttpObservabilitySource, HttpPlatformSource, HttpPluginsSource, HttpSystemSource, HttpWorkflowSource, KBError, MockAdaptersSource, MockAnalyticsSource, MockCacheSource, MockObservabilitySource, MockPlatformSource, MockPluginsSource, MockSystemSource, MockWorkflowSource, SCHEMA_VERSION, actionResultSchema, auditCheckSchema, auditPackageReportSchema, auditSummarySchema, createDataSources, createEnvelopeInterceptor, errorCodes, extractEnvelopeMeta, healthStatusSchema, idSchema, isoDateSchema, mapErrorEnvelope, mapFetchError, packageRefSchema, qk, queryKeys, releasePreviewSchema, runRefSchema, useAdaptersCacheDailyStats, useAdaptersCacheUsage, useAdaptersEmbeddingsDailyStats, useAdaptersEmbeddingsUsage, useAdaptersLLMDailyStats, useAdaptersLLMUsage, useAdaptersStorageDailyStats, useAdaptersStorageUsage, useAdaptersVectorStoreDailyStats, useAdaptersVectorStoreUsage, useAnalyticsBufferStatus, useAnalyticsDlqStatus, useAnalyticsEvents, useAnalyticsStats, useCancelWorkflowRun, useCapabilities, useDevKitHealth, useHealthStatus, useIncidents, useJobEvents, useLogStream, useMetricsHeatmap, useMetricsHistory, useNotifications, usePlatformConfig, usePlatformHealth, usePluginsRegistry, usePrometheusMetrics, useReadyStatus, useResolveApproval, useRunWorkflow, useStateBrokerStats, useSystemEvents, useSystemInfo, useWorkflowEvents, useWorkflowLogs, useWorkflowRun, useWorkflowRuns };
|
|
3968
4054
|
//# sourceMappingURL=index.js.map
|
|
3969
4055
|
//# sourceMappingURL=index.js.map
|