@copilotz/admin 0.9.38 → 0.9.40
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.cjs +1090 -396
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +110 -1
- package/dist/index.d.ts +110 -1
- package/dist/index.js +1045 -344
- package/dist/index.js.map +1 -1
- package/dist/styles.css +61 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -137,6 +137,112 @@ interface AdminEventFilters {
|
|
|
137
137
|
limit?: number;
|
|
138
138
|
offset?: number;
|
|
139
139
|
}
|
|
140
|
+
type AdminBrainLayer = "all" | "knowledge" | "working" | (string & {});
|
|
141
|
+
type AdminBrainStatus = "all" | "active" | "superseded" | "archived" | (string & {});
|
|
142
|
+
type AdminBrainSearchMode = "keyword" | "semantic" | "hybrid";
|
|
143
|
+
interface AdminBrainFilters {
|
|
144
|
+
namespace?: string;
|
|
145
|
+
memorySpaceId?: string;
|
|
146
|
+
checkpointId?: string;
|
|
147
|
+
agentId?: string;
|
|
148
|
+
threadId?: string;
|
|
149
|
+
layer?: AdminBrainLayer;
|
|
150
|
+
kind?: string;
|
|
151
|
+
status?: AdminBrainStatus;
|
|
152
|
+
search?: string;
|
|
153
|
+
searchMode?: AdminBrainSearchMode;
|
|
154
|
+
focusNodeId?: string;
|
|
155
|
+
includeRelated?: boolean;
|
|
156
|
+
includeSimilar?: boolean;
|
|
157
|
+
similarLimit?: number;
|
|
158
|
+
minSimilarity?: number;
|
|
159
|
+
relationDepth?: 1;
|
|
160
|
+
relationTypes?: string[];
|
|
161
|
+
limit?: number;
|
|
162
|
+
offset?: number;
|
|
163
|
+
}
|
|
164
|
+
interface AdminBrainNode {
|
|
165
|
+
id: string;
|
|
166
|
+
namespace: string;
|
|
167
|
+
name: string;
|
|
168
|
+
content: string;
|
|
169
|
+
layer: string;
|
|
170
|
+
kind: string;
|
|
171
|
+
status: string;
|
|
172
|
+
memorySpaceId: string | null;
|
|
173
|
+
checkpointId: string | null;
|
|
174
|
+
agentId: string | null;
|
|
175
|
+
threadId: string | null;
|
|
176
|
+
confidence: number | null;
|
|
177
|
+
sourceMessageIds: string[];
|
|
178
|
+
sourceField: string | null;
|
|
179
|
+
sourceType: string | null;
|
|
180
|
+
sourceId: string | null;
|
|
181
|
+
createdAt: string | null;
|
|
182
|
+
updatedAt: string | null;
|
|
183
|
+
clusterId: string;
|
|
184
|
+
x: number;
|
|
185
|
+
y: number;
|
|
186
|
+
data: Record<string, unknown>;
|
|
187
|
+
}
|
|
188
|
+
interface AdminBrainMatch {
|
|
189
|
+
keyword?: boolean;
|
|
190
|
+
similarity?: number;
|
|
191
|
+
relationDistance?: number;
|
|
192
|
+
reasons: string[];
|
|
193
|
+
}
|
|
194
|
+
interface AdminBrainEdge {
|
|
195
|
+
id: string;
|
|
196
|
+
sourceNodeId: string;
|
|
197
|
+
targetNodeId: string;
|
|
198
|
+
type: string;
|
|
199
|
+
weight: number | null;
|
|
200
|
+
createdAt: string | null;
|
|
201
|
+
data: Record<string, unknown> | null;
|
|
202
|
+
}
|
|
203
|
+
interface AdminBrainCluster {
|
|
204
|
+
id: string;
|
|
205
|
+
label: string;
|
|
206
|
+
layer: string;
|
|
207
|
+
kind: string;
|
|
208
|
+
count: number;
|
|
209
|
+
x: number;
|
|
210
|
+
y: number;
|
|
211
|
+
}
|
|
212
|
+
interface AdminBrainStats {
|
|
213
|
+
total: number;
|
|
214
|
+
byLayer: Record<string, number>;
|
|
215
|
+
byKind: Record<string, number>;
|
|
216
|
+
byStatus: Record<string, number>;
|
|
217
|
+
}
|
|
218
|
+
interface AdminBrainRelated {
|
|
219
|
+
node: AdminBrainNode;
|
|
220
|
+
edge: AdminBrainEdge;
|
|
221
|
+
direction: "in" | "out";
|
|
222
|
+
}
|
|
223
|
+
interface AdminBrainSimilar {
|
|
224
|
+
node: AdminBrainNode;
|
|
225
|
+
similarity: number;
|
|
226
|
+
}
|
|
227
|
+
interface AdminBrainResponse {
|
|
228
|
+
nodes: AdminBrainNode[];
|
|
229
|
+
edges: AdminBrainEdge[];
|
|
230
|
+
clusters: AdminBrainCluster[];
|
|
231
|
+
stats: AdminBrainStats;
|
|
232
|
+
matches?: Record<string, AdminBrainMatch>;
|
|
233
|
+
related?: AdminBrainRelated[];
|
|
234
|
+
similar?: AdminBrainSimilar[];
|
|
235
|
+
semantic?: {
|
|
236
|
+
requested: boolean;
|
|
237
|
+
available: boolean;
|
|
238
|
+
error: string | null;
|
|
239
|
+
};
|
|
240
|
+
pageInfo: {
|
|
241
|
+
limit: number;
|
|
242
|
+
offset: number;
|
|
243
|
+
returned: number;
|
|
244
|
+
};
|
|
245
|
+
}
|
|
140
246
|
interface AdminThreadDetail {
|
|
141
247
|
id: string;
|
|
142
248
|
name: string;
|
|
@@ -248,6 +354,7 @@ interface CopilotzAdminClient {
|
|
|
248
354
|
}): Promise<AdminMessagePage>;
|
|
249
355
|
listEvents(options?: AdminEventFilters): Promise<AdminQueueEvent[]>;
|
|
250
356
|
getThreadEvent(threadId: string): Promise<AdminQueueEvent | undefined>;
|
|
357
|
+
getBrain(filters?: AdminBrainFilters): Promise<AdminBrainResponse>;
|
|
251
358
|
listCollections(): Promise<string[]>;
|
|
252
359
|
listCollectionItems(collection: string, options?: AdminListOptions): Promise<AdminCollectionItem[]>;
|
|
253
360
|
getCollectionItem(collection: string, itemId: string, options?: {
|
|
@@ -387,6 +494,8 @@ declare function firstAccessibleRoute(modules: AdminModule[], permissions?: Admi
|
|
|
387
494
|
|
|
388
495
|
declare function agentsModule(): AdminModule;
|
|
389
496
|
|
|
497
|
+
declare function brainModule(): AdminModule;
|
|
498
|
+
|
|
390
499
|
declare function collectionsModule(): AdminModule;
|
|
391
500
|
|
|
392
501
|
declare function eventsModule(): AdminModule;
|
|
@@ -544,4 +653,4 @@ declare function StatusBadge({ status }: {
|
|
|
544
653
|
status?: string | null;
|
|
545
654
|
}): react_jsx_runtime.JSX.Element;
|
|
546
655
|
|
|
547
|
-
export { ADMIN_GROUP_LABELS, ADMIN_GROUP_ORDER, type AdminActivityInterval, type AdminActivityPoint, type AdminAgentSummary, type AdminBranding, type AdminClientConfig, type AdminClientOptions, type AdminClientPaths, type AdminCollectionItem, type AdminCollectionPage, type AdminDatePreset, type AdminDetailPanel, type AdminEventFilters, type AdminMessage, type AdminMessagePage, type AdminMessagePageInfo, type AdminModule, type AdminModuleGroup, type AdminNavItem, type AdminOverview, type AdminParticipantDetail, type AdminParticipantSummary, type AdminPermissions, type AdminQueueEvent, type AdminRouteDefinition, type AdminRouteState, type AdminRuntimeContext, type AdminScope, type AdminThreadDetail, type AdminThreadSummary, type AdminUsageAttribution, type AdminUsageBreakdown, type AdminUsageDimension, type AdminUsageFilters, type AdminUsageGroupBy, type AdminUsageInterval, type AdminUsageKind, type AdminUsageMetricKind, type AdminUsagePoint, type AdminUsageResponse, type AdminUsageTotals, type AggregatedUsageRow, type CollectionEditor, type CollectionEditorProps, CopilotzAdmin, type CopilotzAdminClient, type CopilotzAdminProps, EMPTY_USAGE_TOTALS, EmptyState, FilterBar, InspectorPanel, JsonPanel, type LegacyAdminConfig, MetricStrip, type MetricStripItem, PageHeader, type RequestHeadersProvider, ResourceTable, type ResourceTableColumn, StatusBadge, type UsageCalculationOptions, type UsageChartSeries, type UsageChartState, type UseCopilotzAdminOptions, type UseCopilotzAdminResult, addUsageTotals, agentsModule, aggregateUsageRows, buildUsageChartState, canAccessAdminPermission, collectAdminNavItems, collectAdminRoutes, collectCollectionEditors, collectionsModule, createAdminClient, defaultAdminConfig, defaultCopilotzModules, eventsModule, firstAccessibleRoute, formatCompactMetric, formatMetricValue, formatNumber, formatPercent, formatUsageBucket, getUsageDimensionLabel, getUsageGroupLabel, getUsageMetricLabel, getUsageRange, getUsageTotalValue, mergeAdminConfig, overviewModule, participantsModule, threadsModule, usageModule, useAdmin, useCopilotzAdmin };
|
|
656
|
+
export { ADMIN_GROUP_LABELS, ADMIN_GROUP_ORDER, type AdminActivityInterval, type AdminActivityPoint, type AdminAgentSummary, type AdminBrainCluster, type AdminBrainEdge, type AdminBrainFilters, type AdminBrainLayer, type AdminBrainMatch, type AdminBrainNode, type AdminBrainRelated, type AdminBrainResponse, type AdminBrainSearchMode, type AdminBrainSimilar, type AdminBrainStats, type AdminBrainStatus, type AdminBranding, type AdminClientConfig, type AdminClientOptions, type AdminClientPaths, type AdminCollectionItem, type AdminCollectionPage, type AdminDatePreset, type AdminDetailPanel, type AdminEventFilters, type AdminMessage, type AdminMessagePage, type AdminMessagePageInfo, type AdminModule, type AdminModuleGroup, type AdminNavItem, type AdminOverview, type AdminParticipantDetail, type AdminParticipantSummary, type AdminPermissions, type AdminQueueEvent, type AdminRouteDefinition, type AdminRouteState, type AdminRuntimeContext, type AdminScope, type AdminThreadDetail, type AdminThreadSummary, type AdminUsageAttribution, type AdminUsageBreakdown, type AdminUsageDimension, type AdminUsageFilters, type AdminUsageGroupBy, type AdminUsageInterval, type AdminUsageKind, type AdminUsageMetricKind, type AdminUsagePoint, type AdminUsageResponse, type AdminUsageTotals, type AggregatedUsageRow, type CollectionEditor, type CollectionEditorProps, CopilotzAdmin, type CopilotzAdminClient, type CopilotzAdminProps, EMPTY_USAGE_TOTALS, EmptyState, FilterBar, InspectorPanel, JsonPanel, type LegacyAdminConfig, MetricStrip, type MetricStripItem, PageHeader, type RequestHeadersProvider, ResourceTable, type ResourceTableColumn, StatusBadge, type UsageCalculationOptions, type UsageChartSeries, type UsageChartState, type UseCopilotzAdminOptions, type UseCopilotzAdminResult, addUsageTotals, agentsModule, aggregateUsageRows, brainModule, buildUsageChartState, canAccessAdminPermission, collectAdminNavItems, collectAdminRoutes, collectCollectionEditors, collectionsModule, createAdminClient, defaultAdminConfig, defaultCopilotzModules, eventsModule, firstAccessibleRoute, formatCompactMetric, formatMetricValue, formatNumber, formatPercent, formatUsageBucket, getUsageDimensionLabel, getUsageGroupLabel, getUsageMetricLabel, getUsageRange, getUsageTotalValue, mergeAdminConfig, overviewModule, participantsModule, threadsModule, usageModule, useAdmin, useCopilotzAdmin };
|
package/dist/index.d.ts
CHANGED
|
@@ -137,6 +137,112 @@ interface AdminEventFilters {
|
|
|
137
137
|
limit?: number;
|
|
138
138
|
offset?: number;
|
|
139
139
|
}
|
|
140
|
+
type AdminBrainLayer = "all" | "knowledge" | "working" | (string & {});
|
|
141
|
+
type AdminBrainStatus = "all" | "active" | "superseded" | "archived" | (string & {});
|
|
142
|
+
type AdminBrainSearchMode = "keyword" | "semantic" | "hybrid";
|
|
143
|
+
interface AdminBrainFilters {
|
|
144
|
+
namespace?: string;
|
|
145
|
+
memorySpaceId?: string;
|
|
146
|
+
checkpointId?: string;
|
|
147
|
+
agentId?: string;
|
|
148
|
+
threadId?: string;
|
|
149
|
+
layer?: AdminBrainLayer;
|
|
150
|
+
kind?: string;
|
|
151
|
+
status?: AdminBrainStatus;
|
|
152
|
+
search?: string;
|
|
153
|
+
searchMode?: AdminBrainSearchMode;
|
|
154
|
+
focusNodeId?: string;
|
|
155
|
+
includeRelated?: boolean;
|
|
156
|
+
includeSimilar?: boolean;
|
|
157
|
+
similarLimit?: number;
|
|
158
|
+
minSimilarity?: number;
|
|
159
|
+
relationDepth?: 1;
|
|
160
|
+
relationTypes?: string[];
|
|
161
|
+
limit?: number;
|
|
162
|
+
offset?: number;
|
|
163
|
+
}
|
|
164
|
+
interface AdminBrainNode {
|
|
165
|
+
id: string;
|
|
166
|
+
namespace: string;
|
|
167
|
+
name: string;
|
|
168
|
+
content: string;
|
|
169
|
+
layer: string;
|
|
170
|
+
kind: string;
|
|
171
|
+
status: string;
|
|
172
|
+
memorySpaceId: string | null;
|
|
173
|
+
checkpointId: string | null;
|
|
174
|
+
agentId: string | null;
|
|
175
|
+
threadId: string | null;
|
|
176
|
+
confidence: number | null;
|
|
177
|
+
sourceMessageIds: string[];
|
|
178
|
+
sourceField: string | null;
|
|
179
|
+
sourceType: string | null;
|
|
180
|
+
sourceId: string | null;
|
|
181
|
+
createdAt: string | null;
|
|
182
|
+
updatedAt: string | null;
|
|
183
|
+
clusterId: string;
|
|
184
|
+
x: number;
|
|
185
|
+
y: number;
|
|
186
|
+
data: Record<string, unknown>;
|
|
187
|
+
}
|
|
188
|
+
interface AdminBrainMatch {
|
|
189
|
+
keyword?: boolean;
|
|
190
|
+
similarity?: number;
|
|
191
|
+
relationDistance?: number;
|
|
192
|
+
reasons: string[];
|
|
193
|
+
}
|
|
194
|
+
interface AdminBrainEdge {
|
|
195
|
+
id: string;
|
|
196
|
+
sourceNodeId: string;
|
|
197
|
+
targetNodeId: string;
|
|
198
|
+
type: string;
|
|
199
|
+
weight: number | null;
|
|
200
|
+
createdAt: string | null;
|
|
201
|
+
data: Record<string, unknown> | null;
|
|
202
|
+
}
|
|
203
|
+
interface AdminBrainCluster {
|
|
204
|
+
id: string;
|
|
205
|
+
label: string;
|
|
206
|
+
layer: string;
|
|
207
|
+
kind: string;
|
|
208
|
+
count: number;
|
|
209
|
+
x: number;
|
|
210
|
+
y: number;
|
|
211
|
+
}
|
|
212
|
+
interface AdminBrainStats {
|
|
213
|
+
total: number;
|
|
214
|
+
byLayer: Record<string, number>;
|
|
215
|
+
byKind: Record<string, number>;
|
|
216
|
+
byStatus: Record<string, number>;
|
|
217
|
+
}
|
|
218
|
+
interface AdminBrainRelated {
|
|
219
|
+
node: AdminBrainNode;
|
|
220
|
+
edge: AdminBrainEdge;
|
|
221
|
+
direction: "in" | "out";
|
|
222
|
+
}
|
|
223
|
+
interface AdminBrainSimilar {
|
|
224
|
+
node: AdminBrainNode;
|
|
225
|
+
similarity: number;
|
|
226
|
+
}
|
|
227
|
+
interface AdminBrainResponse {
|
|
228
|
+
nodes: AdminBrainNode[];
|
|
229
|
+
edges: AdminBrainEdge[];
|
|
230
|
+
clusters: AdminBrainCluster[];
|
|
231
|
+
stats: AdminBrainStats;
|
|
232
|
+
matches?: Record<string, AdminBrainMatch>;
|
|
233
|
+
related?: AdminBrainRelated[];
|
|
234
|
+
similar?: AdminBrainSimilar[];
|
|
235
|
+
semantic?: {
|
|
236
|
+
requested: boolean;
|
|
237
|
+
available: boolean;
|
|
238
|
+
error: string | null;
|
|
239
|
+
};
|
|
240
|
+
pageInfo: {
|
|
241
|
+
limit: number;
|
|
242
|
+
offset: number;
|
|
243
|
+
returned: number;
|
|
244
|
+
};
|
|
245
|
+
}
|
|
140
246
|
interface AdminThreadDetail {
|
|
141
247
|
id: string;
|
|
142
248
|
name: string;
|
|
@@ -248,6 +354,7 @@ interface CopilotzAdminClient {
|
|
|
248
354
|
}): Promise<AdminMessagePage>;
|
|
249
355
|
listEvents(options?: AdminEventFilters): Promise<AdminQueueEvent[]>;
|
|
250
356
|
getThreadEvent(threadId: string): Promise<AdminQueueEvent | undefined>;
|
|
357
|
+
getBrain(filters?: AdminBrainFilters): Promise<AdminBrainResponse>;
|
|
251
358
|
listCollections(): Promise<string[]>;
|
|
252
359
|
listCollectionItems(collection: string, options?: AdminListOptions): Promise<AdminCollectionItem[]>;
|
|
253
360
|
getCollectionItem(collection: string, itemId: string, options?: {
|
|
@@ -387,6 +494,8 @@ declare function firstAccessibleRoute(modules: AdminModule[], permissions?: Admi
|
|
|
387
494
|
|
|
388
495
|
declare function agentsModule(): AdminModule;
|
|
389
496
|
|
|
497
|
+
declare function brainModule(): AdminModule;
|
|
498
|
+
|
|
390
499
|
declare function collectionsModule(): AdminModule;
|
|
391
500
|
|
|
392
501
|
declare function eventsModule(): AdminModule;
|
|
@@ -544,4 +653,4 @@ declare function StatusBadge({ status }: {
|
|
|
544
653
|
status?: string | null;
|
|
545
654
|
}): react_jsx_runtime.JSX.Element;
|
|
546
655
|
|
|
547
|
-
export { ADMIN_GROUP_LABELS, ADMIN_GROUP_ORDER, type AdminActivityInterval, type AdminActivityPoint, type AdminAgentSummary, type AdminBranding, type AdminClientConfig, type AdminClientOptions, type AdminClientPaths, type AdminCollectionItem, type AdminCollectionPage, type AdminDatePreset, type AdminDetailPanel, type AdminEventFilters, type AdminMessage, type AdminMessagePage, type AdminMessagePageInfo, type AdminModule, type AdminModuleGroup, type AdminNavItem, type AdminOverview, type AdminParticipantDetail, type AdminParticipantSummary, type AdminPermissions, type AdminQueueEvent, type AdminRouteDefinition, type AdminRouteState, type AdminRuntimeContext, type AdminScope, type AdminThreadDetail, type AdminThreadSummary, type AdminUsageAttribution, type AdminUsageBreakdown, type AdminUsageDimension, type AdminUsageFilters, type AdminUsageGroupBy, type AdminUsageInterval, type AdminUsageKind, type AdminUsageMetricKind, type AdminUsagePoint, type AdminUsageResponse, type AdminUsageTotals, type AggregatedUsageRow, type CollectionEditor, type CollectionEditorProps, CopilotzAdmin, type CopilotzAdminClient, type CopilotzAdminProps, EMPTY_USAGE_TOTALS, EmptyState, FilterBar, InspectorPanel, JsonPanel, type LegacyAdminConfig, MetricStrip, type MetricStripItem, PageHeader, type RequestHeadersProvider, ResourceTable, type ResourceTableColumn, StatusBadge, type UsageCalculationOptions, type UsageChartSeries, type UsageChartState, type UseCopilotzAdminOptions, type UseCopilotzAdminResult, addUsageTotals, agentsModule, aggregateUsageRows, buildUsageChartState, canAccessAdminPermission, collectAdminNavItems, collectAdminRoutes, collectCollectionEditors, collectionsModule, createAdminClient, defaultAdminConfig, defaultCopilotzModules, eventsModule, firstAccessibleRoute, formatCompactMetric, formatMetricValue, formatNumber, formatPercent, formatUsageBucket, getUsageDimensionLabel, getUsageGroupLabel, getUsageMetricLabel, getUsageRange, getUsageTotalValue, mergeAdminConfig, overviewModule, participantsModule, threadsModule, usageModule, useAdmin, useCopilotzAdmin };
|
|
656
|
+
export { ADMIN_GROUP_LABELS, ADMIN_GROUP_ORDER, type AdminActivityInterval, type AdminActivityPoint, type AdminAgentSummary, type AdminBrainCluster, type AdminBrainEdge, type AdminBrainFilters, type AdminBrainLayer, type AdminBrainMatch, type AdminBrainNode, type AdminBrainRelated, type AdminBrainResponse, type AdminBrainSearchMode, type AdminBrainSimilar, type AdminBrainStats, type AdminBrainStatus, type AdminBranding, type AdminClientConfig, type AdminClientOptions, type AdminClientPaths, type AdminCollectionItem, type AdminCollectionPage, type AdminDatePreset, type AdminDetailPanel, type AdminEventFilters, type AdminMessage, type AdminMessagePage, type AdminMessagePageInfo, type AdminModule, type AdminModuleGroup, type AdminNavItem, type AdminOverview, type AdminParticipantDetail, type AdminParticipantSummary, type AdminPermissions, type AdminQueueEvent, type AdminRouteDefinition, type AdminRouteState, type AdminRuntimeContext, type AdminScope, type AdminThreadDetail, type AdminThreadSummary, type AdminUsageAttribution, type AdminUsageBreakdown, type AdminUsageDimension, type AdminUsageFilters, type AdminUsageGroupBy, type AdminUsageInterval, type AdminUsageKind, type AdminUsageMetricKind, type AdminUsagePoint, type AdminUsageResponse, type AdminUsageTotals, type AggregatedUsageRow, type CollectionEditor, type CollectionEditorProps, CopilotzAdmin, type CopilotzAdminClient, type CopilotzAdminProps, EMPTY_USAGE_TOTALS, EmptyState, FilterBar, InspectorPanel, JsonPanel, type LegacyAdminConfig, MetricStrip, type MetricStripItem, PageHeader, type RequestHeadersProvider, ResourceTable, type ResourceTableColumn, StatusBadge, type UsageCalculationOptions, type UsageChartSeries, type UsageChartState, type UseCopilotzAdminOptions, type UseCopilotzAdminResult, addUsageTotals, agentsModule, aggregateUsageRows, brainModule, buildUsageChartState, canAccessAdminPermission, collectAdminNavItems, collectAdminRoutes, collectCollectionEditors, collectionsModule, createAdminClient, defaultAdminConfig, defaultCopilotzModules, eventsModule, firstAccessibleRoute, formatCompactMetric, formatMetricValue, formatNumber, formatPercent, formatUsageBucket, getUsageDimensionLabel, getUsageGroupLabel, getUsageMetricLabel, getUsageRange, getUsageTotalValue, mergeAdminConfig, overviewModule, participantsModule, threadsModule, usageModule, useAdmin, useCopilotzAdmin };
|