@adonis-agora/agent-dashboard 0.4.0 → 0.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,47 @@
1
1
  # @adonis-agora/agent-dashboard
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`58783fb`](https://github.com/DavideCarvalho/adonis-agora-agent/commit/58783fb433fd3c641dc9a42b80eaba09f2c9a62b) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - `@adonis-agora/agent` now ships its own governance dashboard — `node ace configure @adonis-agora/agent` registers an embedded `dashboard_provider` that serves the `@adonis-agora/agent-dashboard` SPA straight out of `@adonis-agora/agent`'s own build (`../dashboard/dist/spa` is copied into `dist/assets/spa` at build time), so a new app needs no separate install or provider registration to get the console. Configure it via the same optional `config('agent').dashboard` block as before.
8
+
9
+ This is purely additive: the standalone `@adonis-agora/agent-dashboard` package and its own `agent_dashboard_provider` keep working exactly as before for apps that already install and register it directly — both providers now share one implementation (`@adonis-agora/agent/dashboard`, a new subpath export) so their behavior is byte-for-byte identical. Register only one of the two in a given app; mounting both at the same path throws AdonisJS's "duplicate route" error at boot.
10
+
11
+ `@adonis-agora/agent-dashboard`'s peer dependency floor on `@adonis-agora/agent` moves to `>=0.21.0` (the version that introduces the shared `@adonis-agora/agent/dashboard` export its provider now imports from); already-published `agent-dashboard` versions are unaffected.
12
+
13
+ ## 0.5.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [`4e3a372`](https://github.com/DavideCarvalho/adonis-agent/commit/4e3a372e9ecf53ec4c34bbe31ab6177262b0dcd5) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Add `GET`/`POST /agent/governance/pricing` and a Pricing panel in the console.
18
+
19
+ The `pricingStore` bound to the agent (default-mirrored from a Lucid `store`, or opt-in for other
20
+ backends) was already driving cost accounting for runs, but had no read/write surface of its own —
21
+ operators had to reach for the database directly to see or change a model's per-1M-token rates. The
22
+ two new routes expose `AgentPricingStore.listCurrentPrices()`/`upsertModelPrice()` behind the same
23
+ authenticated + authorized governance gate as every other `/agent/governance/*` route, mounted only
24
+ when a pricing store is bound. The dashboard's new "Pricing" section reads and edits rates through
25
+ them.
26
+
27
+ - [`4e3a372`](https://github.com/DavideCarvalho/adonis-agent/commit/4e3a372e9ecf53ec4c34bbe31ab6177262b0dcd5) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - Add a thread governance drill-down: `GET /agent/governance/threads/:id` and a `ThreadDetailView` you
28
+ reach by clicking a row in the console's Recent threads table.
29
+
30
+ `AgentGovernanceQueries` gets a new optional `threadDetail(threadId)` method returning the thread's
31
+ metadata plus a lifetime usage rollup (total tokens, cost, run/message counts) and its most recent
32
+ runs/messages — implemented in both `LucidGovernanceQueries` and `InMemoryGovernanceQueries`. It's
33
+ optional so a third-party or pre-existing adapter that predates it doesn't break: the route responds
34
+ `501` instead of the dashboard hitting a missing endpoint.
35
+
36
+ The Recent threads and Tool calls panels also gain "Load more" pagination instead of a fixed row cap.
37
+
38
+ - [`4e3a372`](https://github.com/DavideCarvalho/adonis-agent/commit/4e3a372e9ecf53ec4c34bbe31ab6177262b0dcd5) Thanks [@DavideCarvalho](https://github.com/DavideCarvalho)! - `RunReliability` (from `GET /agent/governance/reliability`) gains two optional fields: `byAgent` (run
39
+ and failure counts per agent, highest call count first) and `trend` (daily run/failure counts over the
40
+ same range, oldest first) — implemented in both `LucidGovernanceQueries` and
41
+ `InMemoryGovernanceQueries`. Both are optional so an adapter that predates them can keep returning the
42
+ existing shape; the dashboard's Reliability section renders a trend chart and a by-agent breakdown when
43
+ present and stays as before when absent.
44
+
3
45
  ## 0.4.0
4
46
 
5
47
  ### Minor Changes
package/README.md CHANGED
@@ -20,7 +20,17 @@ All data comes from the agent provider's **real** routes — the SPA is a pure c
20
20
 
21
21
  ## Install
22
22
 
23
+ As of `@adonis-agora/agent@0.21.0`, **you don't need to install this package at all**:
24
+ `node ace configure @adonis-agora/agent` registers an embedded dashboard provider that serves this
25
+ exact SPA (bundled straight into `@adonis-agora/agent`'s own `dist/` at build time) at
26
+ `<agentPath>/dashboard` — no separate install, no separate provider registration. See the
27
+ [`@adonis-agora/agent` README's Dashboard section](../adonis/README.md#dashboard).
28
+
29
+ This package still ships and installs standalone, for apps that configured it before the embedded
30
+ provider existed, or that want its independent release cadence:
31
+
23
32
  ```sh
33
+ pnpm add @adonis-agora/agent-dashboard
24
34
  node ace add @adonis-agora/agent-dashboard
25
35
  ```
26
36
 
@@ -35,7 +45,8 @@ providers: [
35
45
 
36
46
  The dashboard reads `config/agent.ts` for the agent `path` and `actorResolver`, mounts the SPA at
37
47
  `<agentPath>/dashboard` (default `/agent/dashboard`), and gates every request through the **same**
38
- actor resolver as the governance routes. Toggle or relocate it with an optional block:
48
+ actor resolver as the governance routes. Toggle or relocate it with an optional block — the SAME block
49
+ the embedded provider reads, so switching between the two needs no config change:
39
50
 
40
51
  ```ts
41
52
  // config/agent.ts
@@ -45,6 +56,9 @@ export default defineConfig({
45
56
  })
46
57
  ```
47
58
 
59
+ Register only ONE of the two providers (the embedded one from `@adonis-agora/agent`, or this
60
+ package's): mounting both at the same path throws AdonisJS's "duplicate route" error at boot.
61
+
48
62
  ## Browser client
49
63
 
50
64
  The framework-free fetch client is exported for reuse:
@@ -17,6 +17,16 @@ import type { ApplicationService } from '@adonisjs/core/types';
17
17
  * every panel but Quota. The provider declines and logs why (see `decideDashboardMount`).
18
18
  *
19
19
  * Enable/disable and override the mount via the optional `config('agent').dashboard` block.
20
+ *
21
+ * As of `@adonis-agora/agent@0.21.0`, THIS is no longer the only way to get the console: the agent
22
+ * package now ALSO ships its own embedded `@adonis-agora/agent/dashboard_provider`, wired
23
+ * automatically by `node ace configure @adonis-agora/agent`, that serves the identical SPA bundled
24
+ * straight into `@adonis-agora/agent`'s own `dist/`. This standalone package keeps working exactly as
25
+ * before for apps that already install and register it directly — nothing here changed except WHERE
26
+ * the shared config/gate/path logic lives (`@adonis-agora/agent/dashboard`, imported above, rather
27
+ * than a local `src/server/*` copy) so both providers stay byte-for-byte identical in behavior. An
28
+ * app should register ONE of the two: registering both at the same mount path throws AdonisJS's
29
+ * "duplicate route" error at boot.
20
30
  */
21
31
  export default class AgentDashboardProvider {
22
32
  protected app: ApplicationService;
@@ -1 +1 @@
1
- {"version":3,"file":"agent_dashboard_provider.d.ts","sourceRoot":"","sources":["../../providers/agent_dashboard_provider.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAiB/D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,OAAO,OAAO,sBAAsB;IAC7B,SAAS,CAAC,GAAG,EAAE,kBAAkB;gBAAvB,GAAG,EAAE,kBAAkB;IAE7C,+FAA+F;IAC/F,OAAO,CAAC,SAAS,CAAuC;IAElD,IAAI;IAsDV;;;;;OAKG;YACW,IAAI;IAalB;;;OAGG;YACW,SAAS;IAOvB,4FAA4F;YAC9E,SAAS;CAmBxB"}
1
+ {"version":3,"file":"agent_dashboard_provider.d.ts","sourceRoot":"","sources":["../../providers/agent_dashboard_provider.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,CAAC,OAAO,OAAO,sBAAsB;IAC7B,SAAS,CAAC,GAAG,EAAE,kBAAkB;gBAAvB,GAAG,EAAE,kBAAkB;IAE7C,+FAA+F;IAC/F,OAAO,CAAC,SAAS,CAAuC;IAElD,IAAI;IAsDV;;;;;OAKG;YACW,IAAI;IAalB;;;OAGG;YACW,SAAS;IAOvB,4FAA4F;YAC9E,SAAS;CAmBxB"}
@@ -1,7 +1,5 @@
1
1
  import { readFile } from 'node:fs/promises';
2
- import { decideDashboardMount, resolveDashboardConfig, } from '../src/server/define_config.js';
3
- import { evaluateDashboardGate } from '../src/server/gate.js';
4
- import { apiBaseFor, contentTypeFor, injectApiBase, injectBaseHref, mountPathFor, safeAssetSegments, } from '../src/server/paths.js';
2
+ import { apiBaseFor, contentTypeFor, decideDashboardMount, evaluateDashboardGate, injectApiBase, injectBaseHref, mountPathFor, resolveDashboardConfig, safeAssetSegments, } from '@adonis-agora/agent/dashboard';
5
3
  /**
6
4
  * Serves the `@adonis-agora/agent-dashboard` governance SPA (a Vite build in `dist/spa`) as static
7
5
  * assets under `<agentPath>/dashboard`, behind the SAME actor gating as the agent's governance
@@ -20,6 +18,16 @@ import { apiBaseFor, contentTypeFor, injectApiBase, injectBaseHref, mountPathFor
20
18
  * every panel but Quota. The provider declines and logs why (see `decideDashboardMount`).
21
19
  *
22
20
  * Enable/disable and override the mount via the optional `config('agent').dashboard` block.
21
+ *
22
+ * As of `@adonis-agora/agent@0.21.0`, THIS is no longer the only way to get the console: the agent
23
+ * package now ALSO ships its own embedded `@adonis-agora/agent/dashboard_provider`, wired
24
+ * automatically by `node ace configure @adonis-agora/agent`, that serves the identical SPA bundled
25
+ * straight into `@adonis-agora/agent`'s own `dist/`. This standalone package keeps working exactly as
26
+ * before for apps that already install and register it directly — nothing here changed except WHERE
27
+ * the shared config/gate/path logic lives (`@adonis-agora/agent/dashboard`, imported above, rather
28
+ * than a local `src/server/*` copy) so both providers stay byte-for-byte identical in behavior. An
29
+ * app should register ONE of the two: registering both at the same mount path throws AdonisJS's
30
+ * "duplicate route" error at boot.
23
31
  */
24
32
  export default class AgentDashboardProvider {
25
33
  app;
@@ -1 +1 @@
1
- {"version":3,"file":"agent_dashboard_provider.js","sourceRoot":"","sources":["../../providers/agent_dashboard_provider.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAI5C,OAAO,EAGL,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;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