@copilotz/admin 0.9.24 → 0.9.27
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 +1204 -700
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +32 -2
- package/dist/index.d.ts +32 -2
- package/dist/index.js +1217 -697
- package/dist/index.js.map +1 -1
- package/dist/styles.css +183 -60
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -3,6 +3,10 @@ import React, { ReactNode } from 'react';
|
|
|
3
3
|
type RequestHeadersProvider = () => Record<string, string> | Promise<Record<string, string>>;
|
|
4
4
|
type AdminDatePreset = "24h" | "7d" | "30d";
|
|
5
5
|
type AdminActivityInterval = "hour" | "day";
|
|
6
|
+
type AdminUsageInterval = "minute" | "hour" | "day" | "week" | "month";
|
|
7
|
+
type AdminUsageMetricKind = "tokens" | "cost" | "calls";
|
|
8
|
+
type AdminUsageGroupBy = "thread" | "participant" | "namespace" | "provider" | "model";
|
|
9
|
+
type AdminUsageAttribution = "generatedBy" | "initiatedBy";
|
|
6
10
|
type AdminPage = "dashboard" | "threads" | "thread-detail" | "participants" | "participant-detail" | "agents" | "agent-detail" | "collection-items" | "collection-item-detail" | "events";
|
|
7
11
|
interface AdminRoute {
|
|
8
12
|
page: AdminPage;
|
|
@@ -49,6 +53,7 @@ interface AdminOverview {
|
|
|
49
53
|
total: number;
|
|
50
54
|
humans: number;
|
|
51
55
|
agents: number;
|
|
56
|
+
jobs?: number;
|
|
52
57
|
};
|
|
53
58
|
llmTotals: AdminUsageTotals;
|
|
54
59
|
}
|
|
@@ -73,13 +78,37 @@ interface AdminThreadSummary {
|
|
|
73
78
|
interface AdminParticipantSummary {
|
|
74
79
|
externalId: string;
|
|
75
80
|
displayName: string;
|
|
76
|
-
participantType: "human" | "agent";
|
|
81
|
+
participantType: "human" | "agent" | "job";
|
|
77
82
|
namespace: string;
|
|
78
83
|
isGlobal: boolean;
|
|
79
84
|
messageCount: number;
|
|
80
85
|
threadCount: number;
|
|
81
86
|
lastActivityAt: string | null;
|
|
82
87
|
}
|
|
88
|
+
interface AdminUsagePoint extends AdminUsageTotals {
|
|
89
|
+
bucket: string;
|
|
90
|
+
groupKey: string;
|
|
91
|
+
groupLabel: string;
|
|
92
|
+
}
|
|
93
|
+
interface AdminUsageResponse {
|
|
94
|
+
points: AdminUsagePoint[];
|
|
95
|
+
rows: AdminUsagePoint[];
|
|
96
|
+
totals: AdminUsageTotals;
|
|
97
|
+
}
|
|
98
|
+
interface AdminUsageFilters {
|
|
99
|
+
from?: string;
|
|
100
|
+
to?: string;
|
|
101
|
+
interval?: AdminUsageInterval;
|
|
102
|
+
metric?: AdminUsageMetricKind;
|
|
103
|
+
groupBy?: AdminUsageGroupBy;
|
|
104
|
+
attribution?: AdminUsageAttribution;
|
|
105
|
+
threadId?: string;
|
|
106
|
+
participantId?: string;
|
|
107
|
+
participantType?: "all" | "human" | "agent" | "job";
|
|
108
|
+
namespace?: string;
|
|
109
|
+
provider?: string;
|
|
110
|
+
model?: string;
|
|
111
|
+
}
|
|
83
112
|
interface AdminAgentSummary {
|
|
84
113
|
agentId: string;
|
|
85
114
|
displayName: string;
|
|
@@ -300,6 +329,7 @@ declare function fetchAdminActivity(range: AdminDatePreset, interval: AdminActiv
|
|
|
300
329
|
declare function fetchAdminThreads(search?: string, namespace?: string, options?: FetchOptions): Promise<AdminThreadSummary[]>;
|
|
301
330
|
declare function fetchAdminParticipants(search?: string, namespace?: string, options?: FetchOptions): Promise<AdminParticipantSummary[]>;
|
|
302
331
|
declare function fetchAdminAgents(search?: string, namespace?: string, options?: FetchOptions): Promise<AdminAgentSummary[]>;
|
|
332
|
+
declare function fetchAdminUsage(filters: AdminUsageFilters, options?: FetchOptions): Promise<AdminUsageResponse>;
|
|
303
333
|
declare function fetchParticipantDetail(participantId: string, options?: FetchOptions): Promise<AdminParticipantDetail | null>;
|
|
304
334
|
declare function updateParticipant(participantId: string, data: Record<string, unknown>, options?: FetchOptions): Promise<AdminParticipantDetail>;
|
|
305
335
|
declare function fetchCollectionNames(options?: FetchOptions): Promise<string[]>;
|
|
@@ -318,4 +348,4 @@ declare function fetchThreadEvents(threadId: string, options?: FetchOptions): Pr
|
|
|
318
348
|
declare const defaultAdminConfig: ResolvedAdminConfig;
|
|
319
349
|
declare function mergeAdminConfig(_baseConfig: ResolvedAdminConfig, userConfig?: Partial<AdminConfig>): ResolvedAdminConfig;
|
|
320
350
|
|
|
321
|
-
export { type AdminActivityInterval, type AdminActivityPoint, type AdminAgentSummary, type AdminCollectionItem, type AdminConfig, type AdminDatePreset, type AdminFilters, type AdminMessage, type AdminMessagePage, type AdminMessagePageInfo, type AdminOverview, type AdminPage, type AdminParticipantDetail, type AdminParticipantSummary, type AdminQueueEvent, type AdminRoute, type AdminSectionState, type AdminThreadDetail, type AdminThreadSummary, CopilotzAdmin, type RequestHeadersProvider, type UseCopilotzAdminOptions, type UseCopilotzAdminResult, createCollectionItem, defaultAdminConfig, deleteCollectionItem, fetchAdminActivity, fetchAdminAgents, fetchAdminOverview, fetchAdminParticipants, fetchAdminThreads, fetchCollectionItem, fetchCollectionItems, fetchCollectionNames, fetchParticipantDetail, fetchThreadEvents, mergeAdminConfig, updateCollectionItem, updateParticipant, useCopilotzAdmin };
|
|
351
|
+
export { type AdminActivityInterval, type AdminActivityPoint, type AdminAgentSummary, type AdminCollectionItem, type AdminConfig, type AdminDatePreset, type AdminFilters, type AdminMessage, type AdminMessagePage, type AdminMessagePageInfo, type AdminOverview, type AdminPage, type AdminParticipantDetail, type AdminParticipantSummary, type AdminQueueEvent, type AdminRoute, type AdminSectionState, type AdminThreadDetail, type AdminThreadSummary, type AdminUsageAttribution, type AdminUsageFilters, type AdminUsageGroupBy, type AdminUsageInterval, type AdminUsagePoint, type AdminUsageResponse, CopilotzAdmin, type RequestHeadersProvider, type UseCopilotzAdminOptions, type UseCopilotzAdminResult, createCollectionItem, defaultAdminConfig, deleteCollectionItem, fetchAdminActivity, fetchAdminAgents, fetchAdminOverview, fetchAdminParticipants, fetchAdminThreads, fetchAdminUsage, fetchCollectionItem, fetchCollectionItems, fetchCollectionNames, fetchParticipantDetail, fetchThreadEvents, mergeAdminConfig, updateCollectionItem, updateParticipant, useCopilotzAdmin };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,10 @@ import React, { ReactNode } from 'react';
|
|
|
3
3
|
type RequestHeadersProvider = () => Record<string, string> | Promise<Record<string, string>>;
|
|
4
4
|
type AdminDatePreset = "24h" | "7d" | "30d";
|
|
5
5
|
type AdminActivityInterval = "hour" | "day";
|
|
6
|
+
type AdminUsageInterval = "minute" | "hour" | "day" | "week" | "month";
|
|
7
|
+
type AdminUsageMetricKind = "tokens" | "cost" | "calls";
|
|
8
|
+
type AdminUsageGroupBy = "thread" | "participant" | "namespace" | "provider" | "model";
|
|
9
|
+
type AdminUsageAttribution = "generatedBy" | "initiatedBy";
|
|
6
10
|
type AdminPage = "dashboard" | "threads" | "thread-detail" | "participants" | "participant-detail" | "agents" | "agent-detail" | "collection-items" | "collection-item-detail" | "events";
|
|
7
11
|
interface AdminRoute {
|
|
8
12
|
page: AdminPage;
|
|
@@ -49,6 +53,7 @@ interface AdminOverview {
|
|
|
49
53
|
total: number;
|
|
50
54
|
humans: number;
|
|
51
55
|
agents: number;
|
|
56
|
+
jobs?: number;
|
|
52
57
|
};
|
|
53
58
|
llmTotals: AdminUsageTotals;
|
|
54
59
|
}
|
|
@@ -73,13 +78,37 @@ interface AdminThreadSummary {
|
|
|
73
78
|
interface AdminParticipantSummary {
|
|
74
79
|
externalId: string;
|
|
75
80
|
displayName: string;
|
|
76
|
-
participantType: "human" | "agent";
|
|
81
|
+
participantType: "human" | "agent" | "job";
|
|
77
82
|
namespace: string;
|
|
78
83
|
isGlobal: boolean;
|
|
79
84
|
messageCount: number;
|
|
80
85
|
threadCount: number;
|
|
81
86
|
lastActivityAt: string | null;
|
|
82
87
|
}
|
|
88
|
+
interface AdminUsagePoint extends AdminUsageTotals {
|
|
89
|
+
bucket: string;
|
|
90
|
+
groupKey: string;
|
|
91
|
+
groupLabel: string;
|
|
92
|
+
}
|
|
93
|
+
interface AdminUsageResponse {
|
|
94
|
+
points: AdminUsagePoint[];
|
|
95
|
+
rows: AdminUsagePoint[];
|
|
96
|
+
totals: AdminUsageTotals;
|
|
97
|
+
}
|
|
98
|
+
interface AdminUsageFilters {
|
|
99
|
+
from?: string;
|
|
100
|
+
to?: string;
|
|
101
|
+
interval?: AdminUsageInterval;
|
|
102
|
+
metric?: AdminUsageMetricKind;
|
|
103
|
+
groupBy?: AdminUsageGroupBy;
|
|
104
|
+
attribution?: AdminUsageAttribution;
|
|
105
|
+
threadId?: string;
|
|
106
|
+
participantId?: string;
|
|
107
|
+
participantType?: "all" | "human" | "agent" | "job";
|
|
108
|
+
namespace?: string;
|
|
109
|
+
provider?: string;
|
|
110
|
+
model?: string;
|
|
111
|
+
}
|
|
83
112
|
interface AdminAgentSummary {
|
|
84
113
|
agentId: string;
|
|
85
114
|
displayName: string;
|
|
@@ -300,6 +329,7 @@ declare function fetchAdminActivity(range: AdminDatePreset, interval: AdminActiv
|
|
|
300
329
|
declare function fetchAdminThreads(search?: string, namespace?: string, options?: FetchOptions): Promise<AdminThreadSummary[]>;
|
|
301
330
|
declare function fetchAdminParticipants(search?: string, namespace?: string, options?: FetchOptions): Promise<AdminParticipantSummary[]>;
|
|
302
331
|
declare function fetchAdminAgents(search?: string, namespace?: string, options?: FetchOptions): Promise<AdminAgentSummary[]>;
|
|
332
|
+
declare function fetchAdminUsage(filters: AdminUsageFilters, options?: FetchOptions): Promise<AdminUsageResponse>;
|
|
303
333
|
declare function fetchParticipantDetail(participantId: string, options?: FetchOptions): Promise<AdminParticipantDetail | null>;
|
|
304
334
|
declare function updateParticipant(participantId: string, data: Record<string, unknown>, options?: FetchOptions): Promise<AdminParticipantDetail>;
|
|
305
335
|
declare function fetchCollectionNames(options?: FetchOptions): Promise<string[]>;
|
|
@@ -318,4 +348,4 @@ declare function fetchThreadEvents(threadId: string, options?: FetchOptions): Pr
|
|
|
318
348
|
declare const defaultAdminConfig: ResolvedAdminConfig;
|
|
319
349
|
declare function mergeAdminConfig(_baseConfig: ResolvedAdminConfig, userConfig?: Partial<AdminConfig>): ResolvedAdminConfig;
|
|
320
350
|
|
|
321
|
-
export { type AdminActivityInterval, type AdminActivityPoint, type AdminAgentSummary, type AdminCollectionItem, type AdminConfig, type AdminDatePreset, type AdminFilters, type AdminMessage, type AdminMessagePage, type AdminMessagePageInfo, type AdminOverview, type AdminPage, type AdminParticipantDetail, type AdminParticipantSummary, type AdminQueueEvent, type AdminRoute, type AdminSectionState, type AdminThreadDetail, type AdminThreadSummary, CopilotzAdmin, type RequestHeadersProvider, type UseCopilotzAdminOptions, type UseCopilotzAdminResult, createCollectionItem, defaultAdminConfig, deleteCollectionItem, fetchAdminActivity, fetchAdminAgents, fetchAdminOverview, fetchAdminParticipants, fetchAdminThreads, fetchCollectionItem, fetchCollectionItems, fetchCollectionNames, fetchParticipantDetail, fetchThreadEvents, mergeAdminConfig, updateCollectionItem, updateParticipant, useCopilotzAdmin };
|
|
351
|
+
export { type AdminActivityInterval, type AdminActivityPoint, type AdminAgentSummary, type AdminCollectionItem, type AdminConfig, type AdminDatePreset, type AdminFilters, type AdminMessage, type AdminMessagePage, type AdminMessagePageInfo, type AdminOverview, type AdminPage, type AdminParticipantDetail, type AdminParticipantSummary, type AdminQueueEvent, type AdminRoute, type AdminSectionState, type AdminThreadDetail, type AdminThreadSummary, type AdminUsageAttribution, type AdminUsageFilters, type AdminUsageGroupBy, type AdminUsageInterval, type AdminUsagePoint, type AdminUsageResponse, CopilotzAdmin, type RequestHeadersProvider, type UseCopilotzAdminOptions, type UseCopilotzAdminResult, createCollectionItem, defaultAdminConfig, deleteCollectionItem, fetchAdminActivity, fetchAdminAgents, fetchAdminOverview, fetchAdminParticipants, fetchAdminThreads, fetchAdminUsage, fetchCollectionItem, fetchCollectionItems, fetchCollectionNames, fetchParticipantDetail, fetchThreadEvents, mergeAdminConfig, updateCollectionItem, updateParticipant, useCopilotzAdmin };
|