@copilotz/admin 0.9.37 → 0.9.39
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 +996 -418
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +89 -1
- package/dist/index.d.ts +89 -1
- package/dist/index.js +950 -366
- package/dist/index.js.map +1 -1
- package/dist/styles.css +25 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -127,6 +127,90 @@ interface AdminUsageFilters {
|
|
|
127
127
|
operation?: string;
|
|
128
128
|
status?: string;
|
|
129
129
|
}
|
|
130
|
+
interface AdminEventFilters {
|
|
131
|
+
namespace?: string;
|
|
132
|
+
threadId?: string;
|
|
133
|
+
status?: string;
|
|
134
|
+
eventType?: string;
|
|
135
|
+
traceId?: string;
|
|
136
|
+
search?: string;
|
|
137
|
+
limit?: number;
|
|
138
|
+
offset?: number;
|
|
139
|
+
}
|
|
140
|
+
type AdminBrainLayer = "all" | "knowledge" | "working" | (string & {});
|
|
141
|
+
type AdminBrainStatus = "all" | "active" | "superseded" | "archived" | (string & {});
|
|
142
|
+
interface AdminBrainFilters {
|
|
143
|
+
namespace?: string;
|
|
144
|
+
memorySpaceId?: string;
|
|
145
|
+
checkpointId?: string;
|
|
146
|
+
agentId?: string;
|
|
147
|
+
threadId?: string;
|
|
148
|
+
layer?: AdminBrainLayer;
|
|
149
|
+
kind?: string;
|
|
150
|
+
status?: AdminBrainStatus;
|
|
151
|
+
search?: string;
|
|
152
|
+
limit?: number;
|
|
153
|
+
offset?: number;
|
|
154
|
+
}
|
|
155
|
+
interface AdminBrainNode {
|
|
156
|
+
id: string;
|
|
157
|
+
namespace: string;
|
|
158
|
+
name: string;
|
|
159
|
+
content: string;
|
|
160
|
+
layer: string;
|
|
161
|
+
kind: string;
|
|
162
|
+
status: string;
|
|
163
|
+
memorySpaceId: string | null;
|
|
164
|
+
checkpointId: string | null;
|
|
165
|
+
agentId: string | null;
|
|
166
|
+
threadId: string | null;
|
|
167
|
+
confidence: number | null;
|
|
168
|
+
sourceMessageIds: string[];
|
|
169
|
+
sourceField: string | null;
|
|
170
|
+
sourceType: string | null;
|
|
171
|
+
sourceId: string | null;
|
|
172
|
+
createdAt: string | null;
|
|
173
|
+
updatedAt: string | null;
|
|
174
|
+
clusterId: string;
|
|
175
|
+
x: number;
|
|
176
|
+
y: number;
|
|
177
|
+
data: Record<string, unknown>;
|
|
178
|
+
}
|
|
179
|
+
interface AdminBrainEdge {
|
|
180
|
+
id: string;
|
|
181
|
+
sourceNodeId: string;
|
|
182
|
+
targetNodeId: string;
|
|
183
|
+
type: string;
|
|
184
|
+
weight: number | null;
|
|
185
|
+
createdAt: string | null;
|
|
186
|
+
data: Record<string, unknown> | null;
|
|
187
|
+
}
|
|
188
|
+
interface AdminBrainCluster {
|
|
189
|
+
id: string;
|
|
190
|
+
label: string;
|
|
191
|
+
layer: string;
|
|
192
|
+
kind: string;
|
|
193
|
+
count: number;
|
|
194
|
+
x: number;
|
|
195
|
+
y: number;
|
|
196
|
+
}
|
|
197
|
+
interface AdminBrainStats {
|
|
198
|
+
total: number;
|
|
199
|
+
byLayer: Record<string, number>;
|
|
200
|
+
byKind: Record<string, number>;
|
|
201
|
+
byStatus: Record<string, number>;
|
|
202
|
+
}
|
|
203
|
+
interface AdminBrainResponse {
|
|
204
|
+
nodes: AdminBrainNode[];
|
|
205
|
+
edges: AdminBrainEdge[];
|
|
206
|
+
clusters: AdminBrainCluster[];
|
|
207
|
+
stats: AdminBrainStats;
|
|
208
|
+
pageInfo: {
|
|
209
|
+
limit: number;
|
|
210
|
+
offset: number;
|
|
211
|
+
returned: number;
|
|
212
|
+
};
|
|
213
|
+
}
|
|
130
214
|
interface AdminThreadDetail {
|
|
131
215
|
id: string;
|
|
132
216
|
name: string;
|
|
@@ -236,7 +320,9 @@ interface CopilotzAdminClient {
|
|
|
236
320
|
limit?: number;
|
|
237
321
|
before?: string;
|
|
238
322
|
}): Promise<AdminMessagePage>;
|
|
323
|
+
listEvents(options?: AdminEventFilters): Promise<AdminQueueEvent[]>;
|
|
239
324
|
getThreadEvent(threadId: string): Promise<AdminQueueEvent | undefined>;
|
|
325
|
+
getBrain(filters?: AdminBrainFilters): Promise<AdminBrainResponse>;
|
|
240
326
|
listCollections(): Promise<string[]>;
|
|
241
327
|
listCollectionItems(collection: string, options?: AdminListOptions): Promise<AdminCollectionItem[]>;
|
|
242
328
|
getCollectionItem(collection: string, itemId: string, options?: {
|
|
@@ -376,6 +462,8 @@ declare function firstAccessibleRoute(modules: AdminModule[], permissions?: Admi
|
|
|
376
462
|
|
|
377
463
|
declare function agentsModule(): AdminModule;
|
|
378
464
|
|
|
465
|
+
declare function brainModule(): AdminModule;
|
|
466
|
+
|
|
379
467
|
declare function collectionsModule(): AdminModule;
|
|
380
468
|
|
|
381
469
|
declare function eventsModule(): AdminModule;
|
|
@@ -533,4 +621,4 @@ declare function StatusBadge({ status }: {
|
|
|
533
621
|
status?: string | null;
|
|
534
622
|
}): react_jsx_runtime.JSX.Element;
|
|
535
623
|
|
|
536
|
-
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 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 };
|
|
624
|
+
export { ADMIN_GROUP_LABELS, ADMIN_GROUP_ORDER, type AdminActivityInterval, type AdminActivityPoint, type AdminAgentSummary, type AdminBrainCluster, type AdminBrainEdge, type AdminBrainFilters, type AdminBrainLayer, type AdminBrainNode, type AdminBrainResponse, 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
|
@@ -127,6 +127,90 @@ interface AdminUsageFilters {
|
|
|
127
127
|
operation?: string;
|
|
128
128
|
status?: string;
|
|
129
129
|
}
|
|
130
|
+
interface AdminEventFilters {
|
|
131
|
+
namespace?: string;
|
|
132
|
+
threadId?: string;
|
|
133
|
+
status?: string;
|
|
134
|
+
eventType?: string;
|
|
135
|
+
traceId?: string;
|
|
136
|
+
search?: string;
|
|
137
|
+
limit?: number;
|
|
138
|
+
offset?: number;
|
|
139
|
+
}
|
|
140
|
+
type AdminBrainLayer = "all" | "knowledge" | "working" | (string & {});
|
|
141
|
+
type AdminBrainStatus = "all" | "active" | "superseded" | "archived" | (string & {});
|
|
142
|
+
interface AdminBrainFilters {
|
|
143
|
+
namespace?: string;
|
|
144
|
+
memorySpaceId?: string;
|
|
145
|
+
checkpointId?: string;
|
|
146
|
+
agentId?: string;
|
|
147
|
+
threadId?: string;
|
|
148
|
+
layer?: AdminBrainLayer;
|
|
149
|
+
kind?: string;
|
|
150
|
+
status?: AdminBrainStatus;
|
|
151
|
+
search?: string;
|
|
152
|
+
limit?: number;
|
|
153
|
+
offset?: number;
|
|
154
|
+
}
|
|
155
|
+
interface AdminBrainNode {
|
|
156
|
+
id: string;
|
|
157
|
+
namespace: string;
|
|
158
|
+
name: string;
|
|
159
|
+
content: string;
|
|
160
|
+
layer: string;
|
|
161
|
+
kind: string;
|
|
162
|
+
status: string;
|
|
163
|
+
memorySpaceId: string | null;
|
|
164
|
+
checkpointId: string | null;
|
|
165
|
+
agentId: string | null;
|
|
166
|
+
threadId: string | null;
|
|
167
|
+
confidence: number | null;
|
|
168
|
+
sourceMessageIds: string[];
|
|
169
|
+
sourceField: string | null;
|
|
170
|
+
sourceType: string | null;
|
|
171
|
+
sourceId: string | null;
|
|
172
|
+
createdAt: string | null;
|
|
173
|
+
updatedAt: string | null;
|
|
174
|
+
clusterId: string;
|
|
175
|
+
x: number;
|
|
176
|
+
y: number;
|
|
177
|
+
data: Record<string, unknown>;
|
|
178
|
+
}
|
|
179
|
+
interface AdminBrainEdge {
|
|
180
|
+
id: string;
|
|
181
|
+
sourceNodeId: string;
|
|
182
|
+
targetNodeId: string;
|
|
183
|
+
type: string;
|
|
184
|
+
weight: number | null;
|
|
185
|
+
createdAt: string | null;
|
|
186
|
+
data: Record<string, unknown> | null;
|
|
187
|
+
}
|
|
188
|
+
interface AdminBrainCluster {
|
|
189
|
+
id: string;
|
|
190
|
+
label: string;
|
|
191
|
+
layer: string;
|
|
192
|
+
kind: string;
|
|
193
|
+
count: number;
|
|
194
|
+
x: number;
|
|
195
|
+
y: number;
|
|
196
|
+
}
|
|
197
|
+
interface AdminBrainStats {
|
|
198
|
+
total: number;
|
|
199
|
+
byLayer: Record<string, number>;
|
|
200
|
+
byKind: Record<string, number>;
|
|
201
|
+
byStatus: Record<string, number>;
|
|
202
|
+
}
|
|
203
|
+
interface AdminBrainResponse {
|
|
204
|
+
nodes: AdminBrainNode[];
|
|
205
|
+
edges: AdminBrainEdge[];
|
|
206
|
+
clusters: AdminBrainCluster[];
|
|
207
|
+
stats: AdminBrainStats;
|
|
208
|
+
pageInfo: {
|
|
209
|
+
limit: number;
|
|
210
|
+
offset: number;
|
|
211
|
+
returned: number;
|
|
212
|
+
};
|
|
213
|
+
}
|
|
130
214
|
interface AdminThreadDetail {
|
|
131
215
|
id: string;
|
|
132
216
|
name: string;
|
|
@@ -236,7 +320,9 @@ interface CopilotzAdminClient {
|
|
|
236
320
|
limit?: number;
|
|
237
321
|
before?: string;
|
|
238
322
|
}): Promise<AdminMessagePage>;
|
|
323
|
+
listEvents(options?: AdminEventFilters): Promise<AdminQueueEvent[]>;
|
|
239
324
|
getThreadEvent(threadId: string): Promise<AdminQueueEvent | undefined>;
|
|
325
|
+
getBrain(filters?: AdminBrainFilters): Promise<AdminBrainResponse>;
|
|
240
326
|
listCollections(): Promise<string[]>;
|
|
241
327
|
listCollectionItems(collection: string, options?: AdminListOptions): Promise<AdminCollectionItem[]>;
|
|
242
328
|
getCollectionItem(collection: string, itemId: string, options?: {
|
|
@@ -376,6 +462,8 @@ declare function firstAccessibleRoute(modules: AdminModule[], permissions?: Admi
|
|
|
376
462
|
|
|
377
463
|
declare function agentsModule(): AdminModule;
|
|
378
464
|
|
|
465
|
+
declare function brainModule(): AdminModule;
|
|
466
|
+
|
|
379
467
|
declare function collectionsModule(): AdminModule;
|
|
380
468
|
|
|
381
469
|
declare function eventsModule(): AdminModule;
|
|
@@ -533,4 +621,4 @@ declare function StatusBadge({ status }: {
|
|
|
533
621
|
status?: string | null;
|
|
534
622
|
}): react_jsx_runtime.JSX.Element;
|
|
535
623
|
|
|
536
|
-
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 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 };
|
|
624
|
+
export { ADMIN_GROUP_LABELS, ADMIN_GROUP_ORDER, type AdminActivityInterval, type AdminActivityPoint, type AdminAgentSummary, type AdminBrainCluster, type AdminBrainEdge, type AdminBrainFilters, type AdminBrainLayer, type AdminBrainNode, type AdminBrainResponse, 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 };
|