@adonis-agora/agent 0.21.0 → 0.22.1

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.
Files changed (41) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/assets/spa/assets/index-DshcMnMD.css +1 -0
  3. package/dist/assets/spa/assets/{index-CkOAJYbh.js → index-HVy8whBx.js} +1 -1
  4. package/dist/assets/spa/index.html +8 -2
  5. package/dist/providers/agent_provider.d.ts.map +1 -1
  6. package/dist/providers/agent_provider.js +6 -0
  7. package/dist/providers/agent_provider.js.map +1 -1
  8. package/dist/src/index.d.ts +1 -1
  9. package/dist/src/index.js +1 -1
  10. package/dist/src/telescope/agent-governance-providers.d.ts +67 -0
  11. package/dist/src/telescope/agent-governance-providers.d.ts.map +1 -0
  12. package/dist/src/telescope/agent-governance-providers.js +312 -0
  13. package/dist/src/telescope/agent-governance-providers.js.map +1 -0
  14. package/dist/src/telescope/dashboard.d.ts +28 -8
  15. package/dist/src/telescope/dashboard.d.ts.map +1 -1
  16. package/dist/src/telescope/dashboard.js +233 -4
  17. package/dist/src/telescope/dashboard.js.map +1 -1
  18. package/dist/src/telescope/data-providers.d.ts +40 -1
  19. package/dist/src/telescope/data-providers.d.ts.map +1 -1
  20. package/dist/src/telescope/data-providers.js +19 -8
  21. package/dist/src/telescope/data-providers.js.map +1 -1
  22. package/dist/src/telescope/extension.d.ts +59 -14
  23. package/dist/src/telescope/extension.d.ts.map +1 -1
  24. package/dist/src/telescope/extension.js +90 -13
  25. package/dist/src/telescope/extension.js.map +1 -1
  26. package/dist/src/telescope/governance-registry.d.ts +15 -0
  27. package/dist/src/telescope/governance-registry.d.ts.map +1 -0
  28. package/dist/src/telescope/governance-registry.js +42 -0
  29. package/dist/src/telescope/governance-registry.js.map +1 -0
  30. package/dist/src/telescope/index.d.ts +4 -2
  31. package/dist/src/telescope/index.d.ts.map +1 -1
  32. package/dist/src/telescope/index.js +3 -1
  33. package/dist/src/telescope/index.js.map +1 -1
  34. package/dist/src/telescope/rag-data-providers.d.ts +69 -0
  35. package/dist/src/telescope/rag-data-providers.d.ts.map +1 -0
  36. package/dist/src/telescope/rag-data-providers.js +84 -0
  37. package/dist/src/telescope/rag-data-providers.js.map +1 -0
  38. package/dist/src/telescope/telescope-sdk.d.ts +11 -0
  39. package/dist/src/telescope/telescope-sdk.d.ts.map +1 -1
  40. package/package.json +2 -2
  41. package/dist/assets/spa/assets/index-BYLm0nq8.css +0 -1
@@ -1,9 +1,26 @@
1
+ import { agentActorSpendTableProvider, agentModelSpendTableProvider, agentPendingApprovalsCountProvider, agentPendingApprovalsTableProvider, agentRecentRunsTableProvider, agentRecentThreadsTableProvider, agentRecentToolCallsTableProvider, agentRunsByAgentTableProvider, agentRunsDurationProvider, agentRunsFailedProvider, agentRunsSuccessRateProvider, agentRunsTotalProvider, agentRunsTrendProvider, agentSpendByActorProvider, agentSpendByModelProvider, agentSpendTotalProvider, agentTokensTotalProvider, agentToolStatsTableProvider, agentUsageTrendProvider, } from './agent-governance-providers.js';
1
2
  import { agentDashboard } from './dashboard.js';
2
3
  import { agentActiveRunsProvider, agentDelegationsOverTimeProvider, agentRecentApprovalsProvider, agentRecentDelegationsProvider, agentRecentRunsProvider, agentRecentToolCallsProvider, agentRunsOverTimeProvider, agentTokenUsageProvider, agentTokensOverTimeProvider, agentToolCallSuccessRateProvider, agentToolCallsOverTimeProvider, } from './data-providers.js';
4
+ import { ragChunksProvider, ragRetrievalsProvider, ragTrendProvider, ragZeroHitRateProvider, } from './rag-data-providers.js';
5
+ /** The provider-name prefix this extension owns. A host contribution may not claim a name under it. */
6
+ const RESERVED_PROVIDER_PREFIX = 'agent.';
3
7
  /**
4
- * The first-class `@adonis-agora/telescope` extension for `@adonis-agora/agent` (the "Agent" tab): an
5
- * "Agent" overview dashboard surfacing recent runs, tool calls, approval decisions, delegations and
6
- * token usage, plus the data providers the panels bind to. Wire it into `config/telescope.ts`:
8
+ * The first-class `@adonis-agora/telescope` extension for `@adonis-agora/agent` (the "Agent" tab):
9
+ * the overview dashboard (`dashboard.ts`) plus every data provider its panels bind to, from three
10
+ * sources:
11
+ *
12
+ * - **Entry-backed** (`data-providers.ts`) — aggregates the `agora:agent:*` events Telescope's
13
+ * generic diagnostics bridge records as `type: 'diagnostic'`, `tag: 'lib:agent'`. Ephemeral
14
+ * (bounded by Telescope's own retention/entry cap), but needs zero host configuration.
15
+ * - **Governance-backed** (`agent-governance-providers.ts`) — reads `AgentGovernanceQueries`, the
16
+ * authoritative, restart-surviving read-model `AgentProvider#boot()` already builds from
17
+ * `config.governanceQueries` (the SAME read-model the `/agent/governance/*` routes and the
18
+ * standalone `@adonis-agora/agent-dashboard` SPA use). Degrades to an empty-but-valid shape when
19
+ * governance isn't configured.
20
+ * - **RAG** (`rag-data-providers.ts`) — entry-backed like the first group, scoped to what
21
+ * `agent-loop.ts`'s inject-mode retrieval actually publishes (`{ runId, queryLength, count }`).
22
+ * See that file's header for the FULL list of Nest-reference RAG panels this does NOT cover
23
+ * (latency, scores, store/collection breakdown) and why.
7
24
  *
8
25
  * ```ts
9
26
  * import { defineConfig } from '@adonis-agora/telescope'
@@ -12,22 +29,55 @@ import { agentActiveRunsProvider, agentDelegationsOverTimeProvider, agentRecentA
12
29
  * export default defineConfig({ extensions: [agentTelescopeExtension()] })
13
30
  * ```
14
31
  *
15
- * No watcher is contributed — `@adonis-agora/agent` already publishes `agora:agent:*` lifecycle events
16
- * onto the diagnostics bus (`src/diagnostics.ts`), and Telescope's generic diagnostics watcher records
17
- * them as `type: 'diagnostic'`, `tag: 'lib:agent'`; the entry-backed providers read those recorded
18
- * entries. `@adonis-agora/telescope` stays an OPTIONAL, never-imported peer — see `telescope-sdk.ts` for
19
- * why the returned object structurally (not nominally) satisfies its `TelescopeExtension` contract, and
20
- * why no NestJS-style DI/read-model is resolved (unlike the aviary port; capture is entirely entry-backed).
32
+ * ## No watcher, no `entryTypes` — a confirmed SDK constraint, not an oversight
33
+ *
34
+ * The Nest reference registers a LIVE watcher (`AgentTelescopeWatcher`/`RagTelescopeWatcher`) and two
35
+ * bespoke entry types (`agent`, `agent-rag`), because Nest's `TelescopeExtension` supports a
36
+ * `watchers` hook that lets an extension record entries under its OWN `type`. Checked against the
37
+ * REAL, current `@adonis-agora/telescope` contract (`~/adonis-telescope/packages/core/src/extension/types.ts`,
38
+ * mirrored in `telescope-sdk.ts`): `TelescopeExtension` exposes only `entryTypes` / `dashboards` /
39
+ * `dataProviders` — no `watchers` field exists AT ALL. Every `agora:agent:*` event (including
40
+ * `retrieved`) is captured by Telescope's ONE generic `DiagnosticsWatcher`, which ALWAYS records
41
+ * every library's events under the same `type: 'diagnostic'` — an extension has no way to make its
42
+ * own entries land under a different `type`, so contributing `entryTypes: () => [{ id: 'agent', ... }]`
43
+ * would add a nav filter that never matches anything real. Same reasoning `@adonis-agora/media`'s and
44
+ * `@adonis-agora/durable`'s telescope extensions already document for their own "no watcher"
45
+ * comments — extended here to also cover why RAG can't get its own entry type either, which the Nest
46
+ * reference relies on specifically so a busy retrieval stream can't crowd `run.*` entries out of the
47
+ * shared window (see `rag-data-providers.ts`'s header for the consequence: RAG and everything else
48
+ * share ONE capped `lib:agent` slice here).
49
+ *
50
+ * ## Governance wiring is a package-internal registry, not container DI
21
51
  *
22
- * No `entryTypes` are contributed: agent events are recorded under the generic `diagnostic` entry type
23
- * (`tag: 'lib:agent'`), so there is no dedicated `agent` entry type to navigate to — the "Agent"
24
- * dashboard is the entry point. (Same reasoning as `@adonis-agora/media/telescope`.)
52
+ * The Nest reference resolves `AGENT_GOVERNANCE_QUERIES` from the host's DI container
53
+ * (`ctx.moduleRef.get`). `ExtensionContext.container` exists on the Adonis side too, but
54
+ * `AgentProvider#boot()` doesn't bind `AgentGovernanceQueries` into AdonisJS's container — see
55
+ * `governance-registry.ts`'s header for exactly why, and for the smaller alternative it uses instead
56
+ * (`AgentProvider#boot()` pushes the resolved read-model into a package-internal registry;
57
+ * `agent-governance-providers.ts` reads it back out — no `ctx.container` involved).
58
+ *
59
+ * `threadHref`/`runHref` deep-link a table row's `threadId`/`runId` cell to a HOST's own thread/run
60
+ * viewer — passed straight through to {@link agentDashboard}. `providers`/`sections` let a host
61
+ * append its own panels to this dashboard (see {@link AgentTelescopeExtensionOptions.providers} and
62
+ * `AgentDashboardOptions.sections`).
25
63
  */
26
64
  export function agentTelescopeExtension(opts = {}) {
65
+ const hostProviders = opts.providers ?? [];
66
+ const reserved = hostProviders.filter((provider) => provider.name.startsWith(RESERVED_PROVIDER_PREFIX));
67
+ if (reserved.length > 0) {
68
+ throw new Error(`agentTelescopeExtension: host-contributed data providers may not use the reserved "${RESERVED_PROVIDER_PREFIX}" prefix — ` +
69
+ `rename ${reserved.map((provider) => `"${provider.name}"`).join(', ')} to your own namespace.`);
70
+ }
71
+ const dashboardOpts = {
72
+ ...(opts.runHref !== undefined ? { runHref: opts.runHref } : {}),
73
+ ...(opts.threadHref !== undefined ? { threadHref: opts.threadHref } : {}),
74
+ ...(opts.sections !== undefined ? { sections: opts.sections } : {}),
75
+ };
27
76
  return {
28
77
  name: 'agent',
29
- dashboards: () => [agentDashboard(opts)],
78
+ dashboards: () => [agentDashboard(dashboardOpts)],
30
79
  dataProviders: () => [
80
+ // Entry-backed (data-providers.ts).
31
81
  agentActiveRunsProvider(),
32
82
  agentTokenUsageProvider(),
33
83
  agentToolCallSuccessRateProvider(),
@@ -39,6 +89,33 @@ export function agentTelescopeExtension(opts = {}) {
39
89
  agentRecentApprovalsProvider(),
40
90
  agentDelegationsOverTimeProvider(),
41
91
  agentRecentDelegationsProvider(),
92
+ // Governance-backed (agent-governance-providers.ts).
93
+ agentSpendTotalProvider(),
94
+ agentTokensTotalProvider(),
95
+ agentSpendByModelProvider(),
96
+ agentModelSpendTableProvider(),
97
+ agentUsageTrendProvider(),
98
+ agentActorSpendTableProvider(),
99
+ agentSpendByActorProvider(),
100
+ agentRunsTotalProvider(),
101
+ agentRunsSuccessRateProvider(),
102
+ agentRunsFailedProvider(),
103
+ agentRunsDurationProvider(),
104
+ agentRunsByAgentTableProvider(),
105
+ agentRunsTrendProvider(),
106
+ agentRecentRunsTableProvider(),
107
+ agentRecentToolCallsTableProvider(),
108
+ agentRecentThreadsTableProvider(),
109
+ agentPendingApprovalsCountProvider(),
110
+ agentPendingApprovalsTableProvider(),
111
+ agentToolStatsTableProvider(),
112
+ // RAG (rag-data-providers.ts) — partial scope, see that file's header.
113
+ ragRetrievalsProvider(),
114
+ ragZeroHitRateProvider(),
115
+ ragChunksProvider(),
116
+ ragTrendProvider(),
117
+ // Host-contributed.
118
+ ...hostProviders,
42
119
  ],
43
120
  };
44
121
  }
@@ -1 +1 @@
1
- {"version":3,"file":"extension.js","sourceRoot":"","sources":["../../../src/telescope/extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EACL,uBAAuB,EACvB,gCAAgC,EAChC,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,GAC/B,MAAM,qBAAqB,CAAC;AAG7B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAA8B,EAAE;IACtE,OAAO;QACL,IAAI,EAAE,OAAO;QACb,UAAU,EAAE,GAAG,EAAE,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACxC,aAAa,EAAE,GAAG,EAAE,CAAC;YACnB,uBAAuB,EAAE;YACzB,uBAAuB,EAAE;YACzB,gCAAgC,EAAE;YAClC,yBAAyB,EAAE;YAC3B,2BAA2B,EAAE;YAC7B,uBAAuB,EAAE;YACzB,8BAA8B,EAAE;YAChC,4BAA4B,EAAE;YAC9B,4BAA4B,EAAE;YAC9B,gCAAgC,EAAE;YAClC,8BAA8B,EAAE;SACjC;KACF,CAAC;AACJ,CAAC"}
1
+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AE;YACzB,yBAAyB,EAAE;YAC3B,6BAA6B,EAAE;YAC/B,sBAAsB,EAAE;YACxB,4BAA4B,EAAE;YAC9B,iCAAiC,EAAE;YACnC,+BAA+B,EAAE;YACjC,kCAAkC,EAAE;YACpC,kCAAkC,EAAE;YACpC,2BAA2B,EAAE;YAC7B,uEAAuE;YACvE,qBAAqB,EAAE;YACvB,sBAAsB,EAAE;YACxB,iBAAiB,EAAE;YACnB,gBAAgB,EAAE;YAClB,oBAAoB;YACpB,GAAG,aAAa;SACjB;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { AgentGovernanceQueries } from '../spi/governance-queries.js';
2
+ /**
3
+ * Set by `AgentProvider#boot()` once `config.governanceQueries` resolves (or back to `undefined`
4
+ * when governance is disabled). Internal wiring only — not re-exported from `src/index.ts` or
5
+ * `src/telescope/index.ts`'s public surface, only imported directly by the two files that need it.
6
+ */
7
+ export declare function setTelescopeGovernanceQueries(queries: AgentGovernanceQueries | undefined): void;
8
+ /**
9
+ * Read by the governance-backed telescope providers. `undefined` before `AgentProvider#boot()` has
10
+ * run, or when the host has `governanceQueries: false` / never installed a store that defaults one —
11
+ * every provider in `agent-governance-providers.ts` degrades to an empty-but-valid shape in that case,
12
+ * mirroring the Nest reference's "host hasn't bound the token" degrade path.
13
+ */
14
+ export declare function getTelescopeGovernanceQueries(): AgentGovernanceQueries | undefined;
15
+ //# sourceMappingURL=governance-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"governance-registry.d.ts","sourceRoot":"","sources":["../../../src/telescope/governance-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,8BAA8B,CAAC;AA2B3E;;;;GAIG;AACH,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,sBAAsB,GAAG,SAAS,GAAG,IAAI,CAE/F;AAED;;;;;GAKG;AACH,wBAAgB,6BAA6B,IAAI,sBAAsB,GAAG,SAAS,CAElF"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * The package-internal slot `agent-governance-providers.ts` reads the governance read-model from.
3
+ *
4
+ * The Nest reference resolves `AGENT_GOVERNANCE_QUERIES` from the host's DI container at request
5
+ * time (`ctx.moduleRef.get(...)`) — Nest's module system makes any provider resolvable by any
6
+ * consumer that declares the token. AdonisJS's real IoC container (`@adonisjs/fold`) CAN bind
7
+ * arbitrary values too, but resolving one back out without an unsafe cast requires a
8
+ * `ContainerBindings` module augmentation naming the binding key's type — and that pattern has NO
9
+ * other precedent anywhere in this package: every binding `AgentProvider#boot()` registers today
10
+ * is class-keyed (`ToolRegistry`, `AgentRegistry`, `AgentService`), never an interface-shaped SPI
11
+ * value like `AgentGovernanceQueries`. `governanceQueries` itself stays a boot-time-local variable,
12
+ * used directly to mount the `/agent/governance/*` routes and never otherwise exposed. Introducing
13
+ * a brand-new container-augmentation pattern purely so ONE telescope file can read it would be a
14
+ * bigger footprint than the read is worth — and would need `packages/adonis/src/telescope/*` to
15
+ * gain a hard dependency on `@adonisjs/core`'s container types, which it currently has none of.
16
+ *
17
+ * So this registry is the smaller alternative already precedented one file over: `src/diagnostics.ts`
18
+ * publishes `emit`/`trace` on a `Symbol.for(...)` slot on `globalThis` so `@adonis-agora/agent` can
19
+ * read `@adonis-agora/diagnostics`' capability structurally, without importing it. The same shape,
20
+ * simplified: `providers/agent_provider.ts` (the producer) and this file (the consumer) are compiled
21
+ * into the SAME package, so there's no cross-`node_modules`-copy identity problem for `Symbol.for`
22
+ * to solve — an ordinary module-scoped variable is enough.
23
+ */
24
+ let current;
25
+ /**
26
+ * Set by `AgentProvider#boot()` once `config.governanceQueries` resolves (or back to `undefined`
27
+ * when governance is disabled). Internal wiring only — not re-exported from `src/index.ts` or
28
+ * `src/telescope/index.ts`'s public surface, only imported directly by the two files that need it.
29
+ */
30
+ export function setTelescopeGovernanceQueries(queries) {
31
+ current = queries;
32
+ }
33
+ /**
34
+ * Read by the governance-backed telescope providers. `undefined` before `AgentProvider#boot()` has
35
+ * run, or when the host has `governanceQueries: false` / never installed a store that defaults one —
36
+ * every provider in `agent-governance-providers.ts` degrades to an empty-but-valid shape in that case,
37
+ * mirroring the Nest reference's "host hasn't bound the token" degrade path.
38
+ */
39
+ export function getTelescopeGovernanceQueries() {
40
+ return current;
41
+ }
42
+ //# sourceMappingURL=governance-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"governance-registry.js","sourceRoot":"","sources":["../../../src/telescope/governance-registry.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,IAAI,OAA2C,CAAC;AAEhD;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAAC,OAA2C;IACvF,OAAO,GAAG,OAAO,CAAC;AACpB,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,6BAA6B;IAC3C,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,5 +1,7 @@
1
+ export { agentActorSpendTableProvider, agentModelSpendTableProvider, agentPendingApprovalsCountProvider, agentPendingApprovalsTableProvider, agentRecentRunsTableProvider, agentRecentThreadsTableProvider, agentRecentToolCallsTableProvider, agentRunsByAgentTableProvider, agentRunsDurationProvider, agentRunsFailedProvider, agentRunsSuccessRateProvider, agentRunsTotalProvider, agentRunsTrendProvider, agentSpendByActorProvider, agentSpendByModelProvider, agentSpendTotalProvider, agentTokensTotalProvider, agentToolStatsTableProvider, agentUsageTrendProvider, capErrorMessage, resolveRange, shiftUtcDay, } from './agent-governance-providers.js';
1
2
  export { type AgentDashboardOptions, agentDashboard } from './dashboard.js';
2
- export { agentTelescopeExtension } from './extension.js';
3
3
  export { agentActiveRunsProvider, agentDelegationsOverTimeProvider, agentRecentApprovalsProvider, agentRecentDelegationsProvider, agentRecentRunsProvider, agentRecentToolCallsProvider, agentRunsOverTimeProvider, agentTokenUsageProvider, agentTokensOverTimeProvider, agentToolCallSuccessRateProvider, agentToolCallsOverTimeProvider, } from './data-providers.js';
4
- export type { Column, ContainerLike, DataProvider, DashboardSpec, ExtensionContext, LinkSpec, TelescopeExtension, TelescopeStoreLike, TelescopeEntryLike, } from './telescope-sdk.js';
4
+ export { type AgentTelescopeExtensionOptions, agentTelescopeExtension } from './extension.js';
5
+ export { ragChunksProvider, ragRetrievalsProvider, ragTrendProvider, ragZeroHitRateProvider, zeroHitRate, meanChunks, } from './rag-data-providers.js';
6
+ export type { Column, ContainerLike, DashboardSection, DashboardSpec, DataBinding, DataProvider, ExtensionContext, LinkSpec, Panel, PanelThresholds, TelescopeExtension, TelescopeStoreLike, TelescopeEntryLike, } from './telescope-sdk.js';
5
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/telescope/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EACL,uBAAuB,EACvB,gCAAgC,EAChC,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,GAC/B,MAAM,qBAAqB,CAAC;AAC7B,YAAY,EACV,MAAM,EACN,aAAa,EACb,YAAY,EACZ,aAAa,EACb,gBAAgB,EAChB,QAAQ,EACR,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/telescope/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,kCAAkC,EAClC,4BAA4B,EAC5B,+BAA+B,EAC/B,iCAAiC,EACjC,6BAA6B,EAC7B,yBAAyB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,eAAe,EACf,YAAY,EACZ,WAAW,GACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,KAAK,qBAAqB,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EACL,uBAAuB,EACvB,gCAAgC,EAChC,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,GAC/B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,8BAA8B,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,WAAW,EACX,UAAU,GACX,MAAM,yBAAyB,CAAC;AACjC,YAAY,EACV,MAAM,EACN,aAAa,EACb,gBAAgB,EAChB,aAAa,EACb,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,QAAQ,EACR,KAAK,EACL,eAAe,EACf,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,oBAAoB,CAAC"}
@@ -1,4 +1,6 @@
1
+ export { agentActorSpendTableProvider, agentModelSpendTableProvider, agentPendingApprovalsCountProvider, agentPendingApprovalsTableProvider, agentRecentRunsTableProvider, agentRecentThreadsTableProvider, agentRecentToolCallsTableProvider, agentRunsByAgentTableProvider, agentRunsDurationProvider, agentRunsFailedProvider, agentRunsSuccessRateProvider, agentRunsTotalProvider, agentRunsTrendProvider, agentSpendByActorProvider, agentSpendByModelProvider, agentSpendTotalProvider, agentTokensTotalProvider, agentToolStatsTableProvider, agentUsageTrendProvider, capErrorMessage, resolveRange, shiftUtcDay, } from './agent-governance-providers.js';
1
2
  export { agentDashboard } from './dashboard.js';
2
- export { agentTelescopeExtension } from './extension.js';
3
3
  export { agentActiveRunsProvider, agentDelegationsOverTimeProvider, agentRecentApprovalsProvider, agentRecentDelegationsProvider, agentRecentRunsProvider, agentRecentToolCallsProvider, agentRunsOverTimeProvider, agentTokenUsageProvider, agentTokensOverTimeProvider, agentToolCallSuccessRateProvider, agentToolCallsOverTimeProvider, } from './data-providers.js';
4
+ export { agentTelescopeExtension } from './extension.js';
5
+ export { ragChunksProvider, ragRetrievalsProvider, ragTrendProvider, ragZeroHitRateProvider, zeroHitRate, meanChunks, } from './rag-data-providers.js';
4
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/telescope/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8B,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AACzD,OAAO,EACL,uBAAuB,EACvB,gCAAgC,EAChC,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,GAC/B,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/telescope/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,4BAA4B,EAC5B,4BAA4B,EAC5B,kCAAkC,EAClC,kCAAkC,EAClC,4BAA4B,EAC5B,+BAA+B,EAC/B,iCAAiC,EACjC,6BAA6B,EAC7B,yBAAyB,EACzB,uBAAuB,EACvB,4BAA4B,EAC5B,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,2BAA2B,EAC3B,uBAAuB,EACvB,eAAe,EACf,YAAY,EACZ,WAAW,GACZ,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAA8B,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EACL,uBAAuB,EACvB,gCAAgC,EAChC,4BAA4B,EAC5B,8BAA8B,EAC9B,uBAAuB,EACvB,4BAA4B,EAC5B,yBAAyB,EACzB,uBAAuB,EACvB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,GAC/B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAuC,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,WAAW,EACX,UAAU,GACX,MAAM,yBAAyB,CAAC"}
@@ -0,0 +1,69 @@
1
+ import type { DataProvider } from './telescope-sdk.js';
2
+ /**
3
+ * RAG data providers for the "Agent" Telescope tab — a DELIBERATELY PARTIAL port of the Nest
4
+ * reference's `rag-data-providers.ts`.
5
+ *
6
+ * ## What Adonis's retrieval instrumentation actually publishes
7
+ *
8
+ * `@adonis-agora/agent` has exactly ONE retrieval telemetry point today: `agent-loop.ts`'s
9
+ * inject-mode retrieval path (`deps.retriever` configured) publishes `agora:agent:retrieved` via
10
+ * `publishAgentRetrieved` (`src/diagnostics.ts`) with payload `{ runId, queryLength, count }` —
11
+ * nothing else. Telescope's generic diagnostics bridge records it as any other `lib:agent` event:
12
+ * `type: 'diagnostic'`, `tag: 'lib:agent'`, `content: { event: 'retrieved', payload: {...} }`.
13
+ *
14
+ * That payload has NO `store`, `collection`, `retriever` kind, `topScore`, or `durationMs` — unlike
15
+ * `@dudousxd/nestjs-agent-rag`'s dedicated `aviary:rag:retrieval` channel, which is what lets the
16
+ * Nest reference build latency histograms, score distributions, and store/collection breakdowns.
17
+ * `agent-loop.ts` DOES span the retrieval (`spannedAgent('retrieval', ...)`, which carries `topK` and
18
+ * a `count` result on its `asyncEnd`), but those spans ride raw `node:diagnostics_channel` sub-channels
19
+ * (`agora:agent:retrieval:start/end/asyncStart/asyncEnd/error`) that NOTHING in `@adonis-agora/telescope`
20
+ * subscribes to today — confirmed by reading its `diagnostics_watcher.ts` and every `metrics/*.ts` file:
21
+ * the generic bridge only auto-subscribes to POINT channels a producer registers via
22
+ * `@adonis-agora/diagnostics`'s `registry.channels`, and `spannedAgent` publishes on ad-hoc sub-channel
23
+ * names it never registers there (by design — it avoids importing `@adonis-agora/diagnostics` at all).
24
+ * So the span data is not lost, exactly, but nothing today turns it into a recorded Telescope entry;
25
+ * building that bridge is a `@adonis-agora/telescope` (or `@adonis-agora/diagnostics`) change, not
26
+ * something this file can conjure from the entries Telescope already has.
27
+ *
28
+ * ## What that leaves portable
29
+ *
30
+ * From `{ runId, queryLength, count }` alone: how many retrievals happened, what fraction came back
31
+ * empty (`count === 0`), the mean passage count, and a retrievals/zero-hits trend. That is FOUR of the
32
+ * Nest reference's ten RAG providers. The other six — latency distribution, score distribution,
33
+ * store breakdown, retriever breakdown, per-collection table, slowest-retrievals table — are NOT
34
+ * ported: there is no field in the recorded entry for any of them, and faking one (e.g. a
35
+ * `durationMs` of 0 for every row) would render a chart that looks real and lies. Widening
36
+ * `AgentRetrieved`'s payload (and `agent-loop.ts`'s publish call) to carry that data is the real fix;
37
+ * it's a `src/diagnostics.ts`/`src/agent-loop.ts` instrumentation change, out of scope for a telescope
38
+ * extension change, and is called out as the recommended follow-up.
39
+ *
40
+ * ## Shares the SAME 5,000-entry window as every other agent provider
41
+ *
42
+ * Unlike the Nest reference — where `RagTelescopeWatcher` gives retrieval events their OWN entry type
43
+ * (`agent-rag`) specifically so a busy retrieval stream can never crowd `run.finished` out of the
44
+ * agent window — Adonis has no per-extension entry-type/watcher mechanism (see `extension.ts`'s
45
+ * header for why), so `retrieved` entries live in the exact same capped `lib:agent` slice
46
+ * `data-providers.ts` reads. A retrieval-heavy deployment can push older `run.*`/`tool-call` entries
47
+ * out of that window, and vice versa. This is an accepted, documented limitation, not an oversight.
48
+ */
49
+ /** One retrieval, normalized out of an entry's `content.payload`. */
50
+ interface RagRetrieval {
51
+ at: number;
52
+ queryLength: number;
53
+ count: number;
54
+ }
55
+ /** Fraction (0–1) of retrievals that came back with nothing. `0` over an empty window. */
56
+ export declare function zeroHitRate(retrievals: RagRetrieval[]): number;
57
+ /** Mean passages returned per retrieval. `0` over an empty window. */
58
+ export declare function meanChunks(retrievals: RagRetrieval[]): number;
59
+ /** stat → retrievals recorded in the current window. */
60
+ export declare function ragRetrievalsProvider(): DataProvider;
61
+ /** stat (percent) → share of retrievals that returned nothing. */
62
+ export declare function ragZeroHitRateProvider(): DataProvider;
63
+ /** stat → mean passages returned per retrieval. */
64
+ export declare function ragChunksProvider(): DataProvider;
65
+ /** timeseries → retrievals and zero-hits per bucket, using the same bucketing every other agent
66
+ * timeseries provider uses (`data-providers.ts`'s `timeBuckets`), not a second bucketing scheme. */
67
+ export declare function ragTrendProvider(): DataProvider;
68
+ export {};
69
+ //# sourceMappingURL=rag-data-providers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rag-data-providers.d.ts","sourceRoot":"","sources":["../../../src/telescope/rag-data-providers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAwC,MAAM,oBAAoB,CAAC;AAE7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8CG;AAEH,qEAAqE;AACrE,UAAU,YAAY;IACpB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf;AA+BD,0FAA0F;AAC1F,wBAAgB,WAAW,CAAC,UAAU,EAAE,YAAY,EAAE,GAAG,MAAM,CAI9D;AAED,sEAAsE;AACtE,wBAAgB,UAAU,CAAC,UAAU,EAAE,YAAY,EAAE,GAAG,MAAM,CAG7D;AAeD,wDAAwD;AACxD,wBAAgB,qBAAqB,IAAI,YAAY,CAEpD;AAED,kEAAkE;AAClE,wBAAgB,sBAAsB,IAAI,YAAY,CAIrD;AAED,mDAAmD;AACnD,wBAAgB,iBAAiB,IAAI,YAAY,CAEhD;AAED;oGACoG;AACpG,wBAAgB,gBAAgB,IAAI,YAAY,CAoB/C"}
@@ -0,0 +1,84 @@
1
+ import { ENTRY_LIMIT, atOf, bucketIndexFor, fetchEntries, timeBuckets } from './data-providers.js';
2
+ const contentOf = (e) => (e.content ?? {});
3
+ /** Read every recorded `retrieved` entry (newest first, capped at {@link ENTRY_LIMIT}). */
4
+ async function readRetrievals(ctx) {
5
+ const entries = await fetchEntries(ctx, ENTRY_LIMIT);
6
+ const retrievals = [];
7
+ for (const entry of entries) {
8
+ const content = contentOf(entry);
9
+ if (content.event !== 'retrieved')
10
+ continue;
11
+ retrievals.push({
12
+ at: atOf(entry),
13
+ queryLength: content.payload?.queryLength ?? 0,
14
+ count: content.payload?.count ?? 0,
15
+ });
16
+ }
17
+ return retrievals;
18
+ }
19
+ function round(value, places) {
20
+ const factor = 10 ** places;
21
+ return Math.round(value * factor) / factor;
22
+ }
23
+ /** Fraction (0–1) of retrievals that came back with nothing. `0` over an empty window. */
24
+ export function zeroHitRate(retrievals) {
25
+ if (retrievals.length === 0)
26
+ return 0;
27
+ const zeroHits = retrievals.filter((r) => r.count === 0).length;
28
+ return round(zeroHits / retrievals.length, 4);
29
+ }
30
+ /** Mean passages returned per retrieval. `0` over an empty window. */
31
+ export function meanChunks(retrievals) {
32
+ if (retrievals.length === 0)
33
+ return 0;
34
+ return round(retrievals.reduce((sum, r) => sum + r.count, 0) / retrievals.length, 2);
35
+ }
36
+ /** Build a provider from one shaping step over every recorded retrieval. */
37
+ function retrievalProvider(name, format) {
38
+ return {
39
+ name,
40
+ async resolve(_query, ctx) {
41
+ return format(await readRetrievals(ctx));
42
+ },
43
+ };
44
+ }
45
+ /** stat → retrievals recorded in the current window. */
46
+ export function ragRetrievalsProvider() {
47
+ return retrievalProvider('agent.rag.retrievals', (retrievals) => ({ value: retrievals.length }));
48
+ }
49
+ /** stat (percent) → share of retrievals that returned nothing. */
50
+ export function ragZeroHitRateProvider() {
51
+ return retrievalProvider('agent.rag.zeroHitRate', (retrievals) => ({
52
+ value: zeroHitRate(retrievals),
53
+ }));
54
+ }
55
+ /** stat → mean passages returned per retrieval. */
56
+ export function ragChunksProvider() {
57
+ return retrievalProvider('agent.rag.chunks', (retrievals) => ({ value: meanChunks(retrievals) }));
58
+ }
59
+ /** timeseries → retrievals and zero-hits per bucket, using the same bucketing every other agent
60
+ * timeseries provider uses (`data-providers.ts`'s `timeBuckets`), not a second bucketing scheme. */
61
+ export function ragTrendProvider() {
62
+ return {
63
+ name: 'agent.rag.trend',
64
+ async resolve(query, ctx) {
65
+ const entries = await fetchEntries(ctx, ENTRY_LIMIT);
66
+ const buckets = Math.max(1, Number(query?.buckets ?? 24));
67
+ const retrievedEntries = entries.filter((e) => contentOf(e).event === 'retrieved');
68
+ const { rows, minTime, bucketSize } = timeBuckets(retrievedEntries, buckets, () => ({
69
+ retrievals: 0,
70
+ zeroHits: 0,
71
+ }));
72
+ for (const entry of retrievedEntries) {
73
+ const row = rows[bucketIndexFor(entry, minTime, bucketSize, buckets)];
74
+ if (!row)
75
+ continue;
76
+ row.retrievals += 1;
77
+ if ((contentOf(entry).payload?.count ?? 0) === 0)
78
+ row.zeroHits += 1;
79
+ }
80
+ return { rows };
81
+ },
82
+ };
83
+ }
84
+ //# sourceMappingURL=rag-data-providers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rag-data-providers.js","sourceRoot":"","sources":["../../../src/telescope/rag-data-providers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,IAAI,EAAE,cAAc,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AA+DnG,MAAM,SAAS,GAAG,CAAC,CAAqB,EAAyB,EAAE,CACjE,CAAC,CAAC,CAAC,OAAO,IAAI,EAAE,CAA0B,CAAC;AAE7C,2FAA2F;AAC3F,KAAK,UAAU,cAAc,CAAC,GAAqB;IACjD,MAAM,OAAO,GAAG,MAAM,YAAY,CAAC,GAAG,E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AgB,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,WAAW,CAAC,CAAC;YACnF,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,WAAW,CAAC,gBAAgB,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC;gBAClF,UAAU,EAAE,CAAC;gBACb,QAAQ,EAAE,CAAC;aACZ,CAAC,CAAC,CAAC;YACJ,KAAK,MAAM,KAAK,IAAI,gBAAgB,EAAE,CAAC;gBACrC,MAAM,GAAG,GAAG,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC,CAAC;gBACtE,IAAI,CAAC,GAAG;oBAAE,SAAS;gBACnB,GAAG,CAAC,UAAU,IAAI,CAAC,CAAC;gBACpB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE,KAAK,IAAI,CAAC,CAAC,KAAK,CAAC;oBAAE,GAAG,CAAC,QAAQ,IAAI,CAAC,CAAC;YACtE,CAAC;YACD,OAAO,EAAE,IAAI,EAAE,CAAC;QAClB,CAAC;KACF,CAAC;AACJ,CAAC"}
@@ -93,6 +93,17 @@ export type Panel = {
93
93
  title: string;
94
94
  data: DataBinding;
95
95
  columns: Column[];
96
+ /**
97
+ * Opt into paged-table mode: the UI renders prev/next controls and re-resolves this panel's
98
+ * provider with `query.page` (1-based) and `query.limit` merged in. The provider must then
99
+ * return `{ rows, total, page, limit }` instead of a bare `{ rows }`. Omit (or `false`) for
100
+ * the existing bare-rows table. Mirrors `@adonis-agora/telescope`'s `Panel` (table variant) —
101
+ * kept here so a host on a telescope version that ships it doesn't excess-property-error.
102
+ * None of this extension's OWN table providers opt in yet: see `agent-governance-providers.ts`
103
+ * for why (the governance read-model doesn't expose a page+total query for every table this
104
+ * would apply to).
105
+ */
106
+ paged?: boolean;
96
107
  } | {
97
108
  kind: 'distribution';
98
109
  title: string;
@@ -1 +1 @@
1
- {"version":3,"file":"telescope-sdk.d.ts","sourceRoot":"","sources":["../../../src/telescope/telescope-sdk.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,8DAA8D;AAC9D,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,IAAI,CAAC;CAClB;AAED,+FAA+F;AAC/F,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;CAC9F;AAED,sFAAsF;AACtF,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;CACrC;AAED,gGAAgG;AAChG,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,kBAAkB,CAAC;IACnC,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAC;IAClC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,QAAQ,GAAG,UAAU,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjB,MAAM,EAAE,KAAK,E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AC;CACvD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adonis-agora/agent",
3
- "version": "0.21.0",
3
+ "version": "0.22.1",
4
4
  "description": "Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -184,7 +184,7 @@
184
184
  "@adonisjs/core": "7.4.0",
185
185
  "@adonisjs/lucid": "22.4.2",
186
186
  "@qdrant/js-client-rest": "1.19.0",
187
- "@types/node": "22.20.0",
187
+ "@types/node": "22.20.1",
188
188
  "@types/react": "19.2.18",
189
189
  "ai": "7.0.59",
190
190
  "better-sqlite3": "11.10.0",
@@ -1 +0,0 @@
1
- :root{--agora-primary: #5a45ff;--agora-primary-soft: hsl(250 74% 51% / .14);--agora-accent: #06b6d4;--bg: hsl(240 10% 6.5%);--panel: hsl(240 9% 9%);--panel-2: hsl(240 9% 11%);--line: hsl(40 30% 82% / .1);--line-soft: hsl(40 30% 82% / .05);--text: hsl(40 28% 92%);--muted: hsl(40 12% 66%);--primary: var(--agora-primary);--primary-fg: hsl(40 40% 96%);--good: #34d399;--warn: #fbbf24;--bad: #f87171;--info: var(--agora-accent)}:root[data-theme=light],:root:not([data-theme=dark]){color-scheme:light}:root[data-theme=dark]{color-scheme:dark}@media(prefers-color-scheme:light){:root:not([data-theme=dark]){--bg: hsl(40 30% 96%);--panel: hsl(40 28% 98%);--panel-2: hsl(40 24% 95%);--line: hsl(240 10% 14% / .12);--line-soft: hsl(240 10% 14% / .06);--text: hsl(240 14% 12%);--muted: hsl(240 6% 42%);--primary-fg: hsl(40 40% 97%)}}:root[data-theme=light]{--bg: hsl(40 30% 96%);--panel: hsl(40 28% 98%);--panel-2: hsl(40 24% 95%);--line: hsl(240 10% 14% / .12);--line-soft: hsl(240 10% 14% / .06);--text: hsl(240 14% 12%);--muted: hsl(240 6% 42%);--primary-fg: hsl(40 40% 97%)}*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--bg);color:var(--text);font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,sans-serif;-webkit-font-smoothing:antialiased}.mono{font-family:ui-monospace,JetBrains Mono,SF Mono,Menlo,monospace}.tnum{font-variant-numeric:tabular-nums}.app-bg{position:fixed;inset:0;z-index:0;pointer-events:none;background-image:radial-gradient(900px 420px at 82% -10%,hsl(250 74% 51% / .12),transparent 70%),radial-gradient(700px 360px at 8% -12%,hsl(190 90% 50% / .06),transparent 70%);opacity:.9}.shell{position:relative;z-index:1;max-width:1180px;margin:0 auto;padding:28px 24px 64px}.masthead{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:22px}.brand{display:flex;align-items:center;gap:12px}.brand-mark{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;color:var(--primary-fg);background:linear-gradient(140deg,var(--agora-primary),#8b78ff);box-shadow:0 6px 20px #4426df59;font-weight:700}.brand h1{font-size:17px;margin:0;letter-spacing:-.01em}.brand p{margin:1px 0 0;font-size:12px;color:var(--muted)}.tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:20px}.tab{appearance:none;border:1px solid var(--line);background:var(--panel);color:var(--muted);border-radius:999px;padding:7px 14px;font-size:13px;cursor:pointer;display:inline-flex;align-items:center;gap:7px;transition:color .15s,border-color .15s,background .15s}.tab:hover{color:var(--text)}.tab[aria-selected=true]{color:var(--primary-fg);background:var(--primary);border-color:var(--primary)}.controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.range-input{background:var(--panel);border:1px solid var(--line);color:var(--text);border-radius:8px;padding:6px 9px;font-size:12px;font-family:inherit}.icon-btn{appearance:none;border:1px solid var(--line);background:var(--panel);color:var(--muted);border-radius:8px;width:34px;height:32px;cursor:pointer;display:grid;place-items:center}.icon-btn:hover{color:var(--text)}.panel{background:linear-gradient(180deg,var(--panel-2),var(--panel));border:1px solid var(--line);border-radius:14px;padding:18px}.grid{display:grid;gap:16px}.grid.cols-3{grid-template-columns:repeat(3,1fr)}.grid.cols-2{grid-template-columns:repeat(2,1fr)}.grid.stat-4{grid-template-columns:repeat(4,1fr)}@media(max-width:900px){.grid.cols-3,.grid.cols-2,.grid.stat-4{grid-template-columns:repeat(2,1fr)}}@media(max-width:560px){.grid.cols-3,.grid.cols-2,.grid.stat-4{grid-template-columns:1fr}}.stat .label{font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--muted);margin-bottom:8px}.stat .value{font-size:24px;font-weight:600;letter-spacing:-.02em}.stat .sub{font-size:12px;color:var(--muted);margin-top:4px}.section-title{display:flex;align-items:center;justify-content:space-between;margin:0 0 14px;gap:12px}.section-title h2{font-size:14px;margin:0;letter-spacing:.01em}.section-title .hint{font-size:12px;color:var(--muted)}.table{width:100%;border-collapse:collapse;font-size:13px}.table th{text-align:left;font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);padding:0 10px 10px;border-bottom:1px solid var(--line)}.table td{padding:10px;border-bottom:1px solid var(--line-soft);vertical-align:middle}.table tr:last-child td{border-bottom:none}.table .num{text-align:right}.table-wrap{overflow-x:auto}.bar{height:6px;border-radius:999px;background:var(--line);overflow:hidden;min-width:60px}.bar>span{display:block;height:100%;border-radius:999px;background:var(--primary)}.legend{display:flex;flex-direction:column;gap:8px;font-size:12px}.legend .row{display:flex;align-items:center;gap:8px}.swatch{width:10px;height:10px;border-radius:3px;flex:none}.legend .name{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.pill{display:inline-flex;align-items:center;gap:6px;padding:2px 9px;border-radius:999px;font-size:11px;border:1px solid var(--line);color:var(--muted)}.dot{width:7px;height:7px;border-radius:999px;background:currentColor;display:inline-block}.s-completed,.s-ok,.s-success,.s-approved{color:var(--good)}.s-running,.s-pending,.s-pending_approval,.s-awaiting_approval{color:var(--info)}.s-failed,.s-error,.s-rejected,.s-forbidden{color:var(--bad)}.s-cancelled,.s-canceled{color:var(--warn)}.btn{appearance:none;border:1px solid var(--line);background:var(--panel);color:var(--text);border-radius:8px;padding:6px 12px;font-size:12px;font-family:inherit;cursor:pointer;transition:color .15s,border-color .15s,background .15s}.btn:hover:not(:disabled){border-color:var(--muted)}.btn:disabled{opacity:.45;cursor:not-allowed}.btn.approve{color:var(--good);border-color:color-mix(in srgb,var(--good) 40%,var(--line))}.btn.reject{color:var(--bad);border-color:color-mix(in srgb,var(--bad) 40%,var(--line))}.rowbtns{display:inline-flex;gap:6px;justify-content:flex-end}.table tr.clickable{cursor:pointer}.table tr.clickable:hover td{background:var(--panel-2)}.th-sort{appearance:none;background:none;border:none;padding:0;margin:0;font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit;cursor:pointer}.th-sort:hover{color:var(--text)}.warnnum{color:var(--warn)}.msg{border:1px solid var(--line);border-radius:10px;padding:10px 12px;background:var(--panel-2)}.msg-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}.msg-body{font-size:13px;white-space:pre-wrap;word-break:break-word}.empty{color:var(--muted);font-size:13px;text-align:center;padding:26px 10px}.err{color:var(--bad);font-size:13px;padding:20px 10px;text-align:center}.skeleton{border-radius:8px;background:linear-gradient(90deg,var(--line-soft),var(--line),var(--line-soft));background-size:200% 100%;animation:shimmer 1.3s ease-in-out infinite;height:14px}@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.stack{display:flex;flex-direction:column;gap:16px}.muted{color:var(--muted)}.right{text-align:right}.chart-svg{width:100%;height:auto;display:block}.foot{margin-top:26px;font-size:11px;color:var(--muted);text-align:center}