@dudousxd/nestjs-agent-dashboard 0.16.0 → 0.18.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/client/agent-client.d.ts +56 -0
- package/dist/client/agent-client.d.ts.map +1 -1
- package/dist/client/agent-client.js.map +1 -1
- package/dist/client/merge-live-events.d.ts.map +1 -1
- package/dist/client/merge-live-events.js +3 -1
- package/dist/client/merge-live-events.js.map +1 -1
- package/dist/server/index.cjs +9 -3
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +6 -1
- package/dist/server/index.d.ts +6 -1
- package/dist/server/index.js +9 -3
- package/dist/server/index.js.map +1 -1
- package/dist/spa/assets/index-B1znMy6W.css +1 -0
- package/dist/spa/assets/{index-Dri7bktH.js → index-DzukxAmy.js} +1 -1
- package/dist/spa/assets/index-eW1zMwDF.js +25 -0
- package/dist/spa/assets/preview-Ch59R-LE.js +1 -0
- package/dist/spa/index.html +3 -3
- package/dist/spa/preview.html +3 -3
- package/package.json +2 -2
- package/dist/spa/assets/index-CnY2UUny.js +0 -25
- package/dist/spa/assets/index-DM4zr-AZ.css +0 -1
- package/dist/spa/assets/preview-DQADeKT4.js +0 -1
package/dist/server/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActorSpendRow, AgentGovernanceQueries, ActorDirectory, AgentPricingStore, AgentApprovalPort, GovernanceRange, ModelSpendRow, UsageTrendPoint, ThreadSpendRow, RunMetrics, RunAgentBreakdownRow, RunErrorBreakdownRow, RunTrendPoint, RecentRunRow, ToolCallActivityRow, GovernancePageQuery, ToolCallWhere, GovernancePage, RunWhere, PendingApprovalRow, ApprovalWhere, GovernanceRunDetail, GovernanceThreadDetailQuery, GovernanceThreadDetail, ThreadActivityRow, ToolStatRow, GenuiStats, ThreadWhere, CurrentModelPrice, ActorResolver, ModelPriceInput } from '@dudousxd/nestjs-agent-core';
|
|
1
|
+
import { ActorSpendRow, AgentGovernanceQueries, ActorDirectory, AgentPricingStore, AgentApprovalPort, GovernanceRange, ModelSpendRow, UsageTrendPoint, FeatureSpendRow, ThreadSpendRow, RunMetrics, RunAgentBreakdownRow, RunErrorBreakdownRow, RunTrendPoint, RecentRunRow, ToolCallActivityRow, GovernancePageQuery, ToolCallWhere, GovernancePage, RunWhere, PendingApprovalRow, ApprovalWhere, GovernanceRunDetail, GovernanceThreadDetailQuery, GovernanceThreadDetail, ThreadActivityRow, ToolStatRow, GenuiStats, ThreadWhere, CurrentModelPrice, ActorResolver, ModelPriceInput } from '@dudousxd/nestjs-agent-core';
|
|
2
2
|
export { ActorDirectory } from '@dudousxd/nestjs-agent-core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { DynamicModule, Type, CanActivate, Provider, InjectionToken, OptionalFactoryDependency, StreamableFile } from '@nestjs/common';
|
|
@@ -27,6 +27,11 @@ interface SpendOverview {
|
|
|
27
27
|
byModel: ModelSpendRow[];
|
|
28
28
|
byActor: ActorSpendRowWithLabel[];
|
|
29
29
|
trend: UsageTrendPoint[];
|
|
30
|
+
/**
|
|
31
|
+
* Spend per feature — agent turns and usage recorded outside them side by side. Absent when the
|
|
32
|
+
* bound governance adapter has no `spendByFeature`.
|
|
33
|
+
*/
|
|
34
|
+
byFeature?: FeatureSpendRow[];
|
|
30
35
|
}
|
|
31
36
|
/** The run-reliability overview the SPA renders on its Reliability section (`GET <api>/reliability`). */
|
|
32
37
|
interface ReliabilityOverview {
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActorSpendRow, AgentGovernanceQueries, ActorDirectory, AgentPricingStore, AgentApprovalPort, GovernanceRange, ModelSpendRow, UsageTrendPoint, ThreadSpendRow, RunMetrics, RunAgentBreakdownRow, RunErrorBreakdownRow, RunTrendPoint, RecentRunRow, ToolCallActivityRow, GovernancePageQuery, ToolCallWhere, GovernancePage, RunWhere, PendingApprovalRow, ApprovalWhere, GovernanceRunDetail, GovernanceThreadDetailQuery, GovernanceThreadDetail, ThreadActivityRow, ToolStatRow, GenuiStats, ThreadWhere, CurrentModelPrice, ActorResolver, ModelPriceInput } from '@dudousxd/nestjs-agent-core';
|
|
1
|
+
import { ActorSpendRow, AgentGovernanceQueries, ActorDirectory, AgentPricingStore, AgentApprovalPort, GovernanceRange, ModelSpendRow, UsageTrendPoint, FeatureSpendRow, ThreadSpendRow, RunMetrics, RunAgentBreakdownRow, RunErrorBreakdownRow, RunTrendPoint, RecentRunRow, ToolCallActivityRow, GovernancePageQuery, ToolCallWhere, GovernancePage, RunWhere, PendingApprovalRow, ApprovalWhere, GovernanceRunDetail, GovernanceThreadDetailQuery, GovernanceThreadDetail, ThreadActivityRow, ToolStatRow, GenuiStats, ThreadWhere, CurrentModelPrice, ActorResolver, ModelPriceInput } from '@dudousxd/nestjs-agent-core';
|
|
2
2
|
export { ActorDirectory } from '@dudousxd/nestjs-agent-core';
|
|
3
3
|
import { Observable } from 'rxjs';
|
|
4
4
|
import { DynamicModule, Type, CanActivate, Provider, InjectionToken, OptionalFactoryDependency, StreamableFile } from '@nestjs/common';
|
|
@@ -27,6 +27,11 @@ interface SpendOverview {
|
|
|
27
27
|
byModel: ModelSpendRow[];
|
|
28
28
|
byActor: ActorSpendRowWithLabel[];
|
|
29
29
|
trend: UsageTrendPoint[];
|
|
30
|
+
/**
|
|
31
|
+
* Spend per feature — agent turns and usage recorded outside them side by side. Absent when the
|
|
32
|
+
* bound governance adapter has no `spendByFeature`.
|
|
33
|
+
*/
|
|
34
|
+
byFeature?: FeatureSpendRow[];
|
|
30
35
|
}
|
|
31
36
|
/** The run-reliability overview the SPA renders on its Reliability section (`GET <api>/reliability`). */
|
|
32
37
|
interface ReliabilityOverview {
|
package/dist/server/index.js
CHANGED
|
@@ -497,6 +497,8 @@ var AGENT_EVENTS = [
|
|
|
497
497
|
"tool-call",
|
|
498
498
|
"quota.exceeded",
|
|
499
499
|
"run.finished",
|
|
500
|
+
"run.failed",
|
|
501
|
+
"run.cancelled",
|
|
500
502
|
"delegated"
|
|
501
503
|
];
|
|
502
504
|
function isAgentEnvelope(message) {
|
|
@@ -519,16 +521,20 @@ var DashboardService = class {
|
|
|
519
521
|
}
|
|
520
522
|
/** Spend/usage overview for a day range: by-model + by-actor spend and the daily trend, in parallel. */
|
|
521
523
|
async spend(range) {
|
|
522
|
-
const [byModel, byActorRaw, trend] = await Promise.all([
|
|
524
|
+
const [byModel, byActorRaw, trend, byFeature] = await Promise.all([
|
|
523
525
|
this.queries.spendByModel(range),
|
|
524
526
|
this.queries.spendByActor(range),
|
|
525
|
-
this.queries.usageTrend(range)
|
|
527
|
+
this.queries.usageTrend(range),
|
|
528
|
+
this.queries.spendByFeature?.(range)
|
|
526
529
|
]);
|
|
527
530
|
const byActor = await this.withActorLabels(byActorRaw);
|
|
528
531
|
return {
|
|
529
532
|
byModel,
|
|
530
533
|
byActor,
|
|
531
|
-
trend
|
|
534
|
+
trend,
|
|
535
|
+
...byFeature !== void 0 ? {
|
|
536
|
+
byFeature
|
|
537
|
+
} : {}
|
|
532
538
|
};
|
|
533
539
|
}
|
|
534
540
|
/** Top threads by cost for a day range (default 10, highest cost first). */
|