@adonis-agora/agent 0.19.1 → 0.21.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.
Files changed (46) hide show
  1. package/CHANGELOG.md +42 -0
  2. package/README.md +39 -1
  3. package/dist/assets/spa/assets/index-BYLm0nq8.css +1 -0
  4. package/dist/assets/spa/assets/index-CkOAJYbh.js +9 -0
  5. package/dist/assets/spa/index.html +13 -0
  6. package/dist/configure.d.ts +11 -6
  7. package/dist/configure.d.ts.map +1 -1
  8. package/dist/configure.js +12 -6
  9. package/dist/configure.js.map +1 -1
  10. package/dist/providers/agent_provider.d.ts.map +1 -1
  11. package/dist/providers/agent_provider.js +60 -2
  12. package/dist/providers/agent_provider.js.map +1 -1
  13. package/dist/providers/dashboard_provider.d.ts +55 -0
  14. package/dist/providers/dashboard_provider.d.ts.map +1 -0
  15. package/dist/providers/dashboard_provider.js +152 -0
  16. package/dist/providers/dashboard_provider.js.map +1 -0
  17. package/dist/src/dashboard/define_config.d.ts +75 -0
  18. package/dist/src/dashboard/define_config.d.ts.map +1 -0
  19. package/dist/src/dashboard/define_config.js +56 -0
  20. package/dist/src/dashboard/define_config.js.map +1 -0
  21. package/dist/src/dashboard/gate.d.ts +33 -0
  22. package/dist/src/dashboard/gate.d.ts.map +1 -0
  23. package/dist/src/dashboard/gate.js +52 -0
  24. package/dist/src/dashboard/gate.js.map +1 -0
  25. package/dist/src/dashboard/index.d.ts +20 -0
  26. package/dist/src/dashboard/index.d.ts.map +1 -0
  27. package/dist/src/dashboard/index.js +20 -0
  28. package/dist/src/dashboard/index.js.map +1 -0
  29. package/dist/src/dashboard/paths.d.ts +40 -0
  30. package/dist/src/dashboard/paths.d.ts.map +1 -0
  31. package/dist/src/dashboard/paths.js +99 -0
  32. package/dist/src/dashboard/paths.js.map +1 -0
  33. package/dist/src/index.d.ts +1 -1
  34. package/dist/src/index.js +1 -1
  35. package/dist/src/spi/governance-queries.d.ts +49 -0
  36. package/dist/src/spi/governance-queries.d.ts.map +1 -1
  37. package/dist/src/stores/lucid-governance-queries.d.ts +10 -2
  38. package/dist/src/stores/lucid-governance-queries.d.ts.map +1 -1
  39. package/dist/src/stores/lucid-governance-queries.js +92 -1
  40. package/dist/src/stores/lucid-governance-queries.js.map +1 -1
  41. package/dist/src/testing/in-memory-governance-queries.d.ts +8 -1
  42. package/dist/src/testing/in-memory-governance-queries.d.ts.map +1 -1
  43. package/dist/src/testing/in-memory-governance-queries.js +74 -0
  44. package/dist/src/testing/in-memory-governance-queries.js.map +1 -1
  45. package/dist/stubs/config/agent.stub +7 -0
  46. package/package.json +34 -24
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define_config.d.ts","sourceRoot":"","sources":["../../../src/dashboard/define_config.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACtE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,CACpC,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,WAAW,KACb,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEhC;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,gEAAgE;IAChE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;;OAKG;IACH,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,uBAAuB,CAAC;CACrC;AAED,6DAA6D;AAC7D,wBAAgB,sBAAsB,CACpC,MAAM,EAAE,oBAAoB,GAAG,SAAS,GACvC,4BAA4B,CAK9B;AAED,uGAAuG;AACvG,MAAM,MAAM,sBAAsB,GAC9B;IAAE,KAAK,EAAE,IAAI,CAAA;CAAE,GACf;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,UAAU,CAAA;CAAE,GACpC;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,oBAAoB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC/D;IAAE,KAAK,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,uBAAuB,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAoBvE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,OAAO,EAChB,mBAAmB,EAAE,wBAAwB,GAAG,SAAS,EACzD,iBAAiB,CAAC,EAAE,OAAO,GAC1B,sBAAsB,CAgBxB"}
@@ -0,0 +1,56 @@
1
+ /** Fill defaults for the optional dashboard config block. */
2
+ export function resolveDashboardConfig(config) {
3
+ const resolved = { enabled: config?.enabled ?? true };
4
+ if (config?.path !== undefined)
5
+ resolved.path = config.path;
6
+ if (config?.authorize !== undefined)
7
+ resolved.authorize = config.authorize;
8
+ return resolved;
9
+ }
10
+ /**
11
+ * The exact wording the provider logs when it declines to mount. Mirrors the agent provider's own
12
+ * governance boot warning — same three facts, same vocabulary — so a reader who sees one recognises
13
+ * the other.
14
+ */
15
+ const NO_GOVERNANCE_GATE_WARNING = '[@adonis-agora/agent-dashboard] the governance console was NOT mounted: every panel but Quota reads the cross-actor `/agent/governance/*` routes, and those are themselves not mounted because no `governanceAuthorize` gate is configured — so the console would load and then fail on every panel. Set `governanceAuthorize` in config/agent.ts (e.g. an ADMIN check) to mount the routes and this console gated, or `governanceAuthorize: () => true` to deliberately restore the old behaviour of letting ANY authenticated actor read them. `GET /agent/approvals/mine` is unaffected — it stays mounted and scoped to the calling actor. To keep the console off on purpose and silence this, set `dashboard: { enabled: false }`.';
16
+ /**
17
+ * The wording logged when the read-model itself was turned off. Deliberately distinct from
18
+ * {@link NO_GOVERNANCE_GATE_WARNING}: both produce the same dead console, and an operator staring at
19
+ * a 404 must be able to tell from the log ALONE which of the two knobs is responsible. A shared
20
+ * "governance is not configured" message would recreate exactly the diagnosability problem this
21
+ * check exists to remove.
22
+ */
23
+ const NO_GOVERNANCE_QUERIES_WARNING = '[@adonis-agora/agent-dashboard] the governance console was NOT mounted: `governanceQueries` is set to `false` in config/agent.ts, so the cross-actor read-model was never built and the `/agent/governance/*` routes it serves do not exist — the console would load and then fail on every panel but Quota. A `governanceAuthorize` gate is NOT the missing piece here; it is already configured. Remove `governanceQueries: false` (omit it to get the Lucid read-model when the main store is Lucid, or pass a store/factory explicitly) to mount the read-model and this console. To keep the console off on purpose and silence this, set `dashboard: { enabled: false }`.';
24
+ /**
25
+ * Decide whether to register the console's routes at all — the router-free core of the provider's
26
+ * mount check, extracted so it can be unit tested without booting an app.
27
+ *
28
+ * The console is a pure consumer of the agent's cross-actor `/agent/governance/*` read routes, and
29
+ * those routes are not mounted unless the agent config carries a `governanceAuthorize` gate. Serving
30
+ * a shell that can only 404 its own data is worse than not serving it: the failure shows up as seven
31
+ * dead panels at click time with nothing anywhere explaining why. So the console follows the same
32
+ * fail-closed-by-omission rule one layer down — no gate, no routes — and says so at boot.
33
+ *
34
+ * This costs nothing that still works: every app affected is an app whose console is ALREADY dead in
35
+ * every view but Quota. `dashboard.authorize` is deliberately NOT the trigger; it gates the shell,
36
+ * not the data, and an app can set it and still have a console with nothing to render.
37
+ */
38
+ export function decideDashboardMount(enabled, governanceAuthorize, governanceQueries) {
39
+ if (!enabled)
40
+ return { mount: false, reason: 'disabled' };
41
+ if (governanceAuthorize === undefined) {
42
+ return { mount: false, reason: 'no-governance-gate', warning: NO_GOVERNANCE_GATE_WARNING };
43
+ }
44
+ // ONLY an explicit `false` is decidable here. `undefined` does NOT mean "no read-model": the agent
45
+ // provider's `#resolveGovernance` defaults it to the Lucid read-model whenever the main store is
46
+ // Lucid, and reproducing that resolution would duplicate provider logic in the dashboard.
47
+ if (governanceQueries === false) {
48
+ return {
49
+ mount: false,
50
+ reason: 'no-governance-queries',
51
+ warning: NO_GOVERNANCE_QUERIES_WARNING,
52
+ };
53
+ }
54
+ return { mount: true };
55
+ }
56
+ //# sourceMappingURL=define_config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"define_config.js","sourceRoot":"","sources":["../../../src/dashboard/define_config.ts"],"names":[],"mappings":"AAiDA,6DAA6D;AAC7D,MAAM,UAAU,sBAAsB,CACpC,MAAwC;IAExC,MAAM,QAAQ,GAAiC,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,IAAI,IAAI,EAAE,CAAC;IACpF,IAAI,MAAM,EAAE,IAAI,KAAK,SAAS;QAAE,QAAQ,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;IAC5D,IAAI,MAAM,EAAE,SAAS,KAAK,SAAS;QAAE,QAAQ,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IAC3E,OAAO,QAAQ,CAAC;AAClB,CAAC;AASD;;;;GAIG;AACH,MAAM,0BAA0B,GAC9B,0sBAA0sB,CAAC;AAE7sB;;;;;;GAMG;AACH,MAAM,6BAA6B,GACjC,ipBAAipB,CAAC;AAEppB;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAAgB,EAChB,mBAAyD,EACzD,iBAA2B;IAE3B,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,CAAC;IAC1D,IAAI,mBAAmB,KAAK,SAAS,EAAE,CAAC;QACtC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,oBAAoB,EAAE,OAAO,EAAE,0BAA0B,EAAE,CAAC;IAC7F,CAAC;IACD,mGAAmG;IACnG,iGAAiG;IACjG,0FAA0F;IAC1F,IAAI,iBAAiB,KAAK,KAAK,EAAE,CAAC;QAChC,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,uBAAuB;YAC/B,OAAO,EAAE,6BAA6B;SACvC,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACzB,CAAC"}
@@ -0,0 +1,33 @@
1
+ import type { HttpContext } from '@adonisjs/core/http';
2
+ import type { ActorResolver } from '../spi/actor-resolver.js';
3
+ import type { AgentDashboardAuthorize } from './define_config.js';
4
+ /** The outcome of the dashboard access gate: proceed, or deny with an HTTP status + message. */
5
+ export type DashboardGateVerdict = {
6
+ ok: true;
7
+ } | {
8
+ ok: false;
9
+ status: 401 | 403;
10
+ error: string;
11
+ };
12
+ /**
13
+ * Decide whether a request may reach the dashboard, WITHOUT touching the response — so it is unit
14
+ * testable free of the AdonisJS router/app: resolve the actor through the agent config's resolver
15
+ * (missing/failed → `401`), then run the optional `authorize` gate over the resolved actor
16
+ * (denied/threw → `403`).
17
+ *
18
+ * This gates the SPA **shell**, and only the shell. It is NOT what decides whether the console's data
19
+ * is readable, and it is no longer the last line of defence it once had to be:
20
+ *
21
+ * - Whether the console mounts at all is decided earlier, by {@link decideDashboardMount} — the
22
+ * routes are not registered unless the agent config carries a `governanceAuthorize` gate AND its
23
+ * `governanceQueries` read-model exists. So this function never runs for a console that could only
24
+ * 404 its own panels.
25
+ * - Whether the DATA is readable is decided by the agent's own `governanceAuthorize` on the
26
+ * `/agent/governance/*` routes, not here. Omitting `authorize` while a gate is configured leaves
27
+ * the shell open to any resolved actor but exposes no cross-actor data.
28
+ *
29
+ * Omitting BOTH the resolver and `authorize` would expose the shell to any request; the provider is
30
+ * expected to short-circuit on a missing resolver via the `401` here.
31
+ */
32
+ export declare function evaluateDashboardGate(ctx: HttpContext, actorResolver: ActorResolver | undefined, authorize?: AgentDashboardAuthorize): Promise<DashboardGateVerdict>;
33
+ //# sourceMappingURL=gate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate.d.ts","sourceRoot":"","sources":["../../../src/dashboard/gate.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oBAAoB,CAAC;AAElE,gGAAgG;AAChG,MAAM,MAAM,oBAAoB,GAAG;IAAE,EAAE,EAAE,IAAI,CAAA;CAAE,GAAG;IAAE,EAAE,EAAE,KAAK,CAAC;IAAC,MAAM,EAAE,GAAG,GAAG,GAAG,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAElG;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,WAAW,EAChB,aAAa,EAAE,aAAa,GAAG,SAAS,EACxC,SAAS,CAAC,EAAE,uBAAuB,GAClC,OAAO,CAAC,oBAAoB,CAAC,CA4B/B"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Decide whether a request may reach the dashboard, WITHOUT touching the response — so it is unit
3
+ * testable free of the AdonisJS router/app: resolve the actor through the agent config's resolver
4
+ * (missing/failed → `401`), then run the optional `authorize` gate over the resolved actor
5
+ * (denied/threw → `403`).
6
+ *
7
+ * This gates the SPA **shell**, and only the shell. It is NOT what decides whether the console's data
8
+ * is readable, and it is no longer the last line of defence it once had to be:
9
+ *
10
+ * - Whether the console mounts at all is decided earlier, by {@link decideDashboardMount} — the
11
+ * routes are not registered unless the agent config carries a `governanceAuthorize` gate AND its
12
+ * `governanceQueries` read-model exists. So this function never runs for a console that could only
13
+ * 404 its own panels.
14
+ * - Whether the DATA is readable is decided by the agent's own `governanceAuthorize` on the
15
+ * `/agent/governance/*` routes, not here. Omitting `authorize` while a gate is configured leaves
16
+ * the shell open to any resolved actor but exposes no cross-actor data.
17
+ *
18
+ * Omitting BOTH the resolver and `authorize` would expose the shell to any request; the provider is
19
+ * expected to short-circuit on a missing resolver via the `401` here.
20
+ */
21
+ export async function evaluateDashboardGate(ctx, actorResolver, authorize) {
22
+ if (actorResolver === undefined) {
23
+ return { ok: false, status: 401, error: 'no actor resolver configured' };
24
+ }
25
+ let actor;
26
+ try {
27
+ actor = await actorResolver.resolve(ctx);
28
+ }
29
+ catch (error) {
30
+ return {
31
+ ok: false,
32
+ status: 401,
33
+ error: error instanceof Error ? error.message : 'unauthorized',
34
+ };
35
+ }
36
+ if (authorize !== undefined) {
37
+ try {
38
+ if (!(await authorize(actor, ctx))) {
39
+ return { ok: false, status: 403, error: 'forbidden' };
40
+ }
41
+ }
42
+ catch (error) {
43
+ return {
44
+ ok: false,
45
+ status: 403,
46
+ error: error instanceof Error ? error.message : 'forbidden',
47
+ };
48
+ }
49
+ }
50
+ return { ok: true };
51
+ }
52
+ //# sourceMappingURL=gate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gate.js","sourceRoot":"","sources":["../../../src/dashboard/gate.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,GAAgB,EAChB,aAAwC,EACxC,SAAmC;IAEnC,IAAI,aAAa,KAAK,SAAS,EAAE,CAAC;QAChC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,8BAA8B,EAAE,CAAC;IAC3E,CAAC;IACD,IAAI,KAAoD,CAAC;IACzD,IAAI,CAAC;QACH,KAAK,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC3C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,EAAE,EAAE,KAAK;YACT,MAAM,EAAE,GAAG;YACX,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc;SAC/D,CAAC;IACJ,CAAC;IACD,IAAI,SAAS,KAAK,SAAS,EAAE,CAAC;QAC5B,IAAI,CAAC;YACH,IAAI,CAAC,CAAC,MAAM,SAAS,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC,EAAE,CAAC;gBACnC,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC;YACxD,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,MAAM,EAAE,GAAG;gBACX,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW;aAC5D,CAAC;QACJ,CAAC;IACH,CAAC;IACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AACtB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Serving helpers for the `@adonis-agora/agent-dashboard` governance SPA — the config shape, the
3
+ * mount/gate decisions, and the pure path/asset helpers. Framework-light (no AdonisJS router/app
4
+ * dependency), so they're unit-testable in isolation and reusable by BOTH dashboard providers:
5
+ *
6
+ * - `@adonis-agora/agent/dashboard_provider` (this package, `providers/dashboard_provider.ts`) —
7
+ * embedded: registered automatically by `node ace configure @adonis-agora/agent`, serves the SPA
8
+ * bundle copied into THIS package's own `dist/assets/spa` at build time.
9
+ * - `@adonis-agora/agent-dashboard`'s own provider (`agent_dashboard_provider.ts`) — standalone: an
10
+ * independently installable/registrable package some apps already depend on directly.
11
+ *
12
+ * Living here (rather than in `@adonis-agora/agent-dashboard`) keeps the dependency direction
13
+ * one-way: the dashboard package already depends on this one for `AgentConfig`/`ActorResolver`/etc.,
14
+ * so a package.json edge back from here to there would be circular. See
15
+ * `providers/dashboard_provider.ts`'s module doc for the full story.
16
+ */
17
+ export { type AgentDashboardAuthorize, type AgentDashboardConfig, type DashboardMountDecision, type ResolvedAgentDashboardConfig, decideDashboardMount, resolveDashboardConfig, } from './define_config.js';
18
+ export { type DashboardGateVerdict, evaluateDashboardGate } from './gate.js';
19
+ export { apiBaseFor, contentTypeFor, injectApiBase, injectBaseHref, mountPathFor, safeAssetSegments, trimSlashes, } from './paths.js';
20
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dashboard/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EACjC,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,KAAK,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,EACL,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,WAAW,GACZ,MAAM,YAAY,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Serving helpers for the `@adonis-agora/agent-dashboard` governance SPA — the config shape, the
3
+ * mount/gate decisions, and the pure path/asset helpers. Framework-light (no AdonisJS router/app
4
+ * dependency), so they're unit-testable in isolation and reusable by BOTH dashboard providers:
5
+ *
6
+ * - `@adonis-agora/agent/dashboard_provider` (this package, `providers/dashboard_provider.ts`) —
7
+ * embedded: registered automatically by `node ace configure @adonis-agora/agent`, serves the SPA
8
+ * bundle copied into THIS package's own `dist/assets/spa` at build time.
9
+ * - `@adonis-agora/agent-dashboard`'s own provider (`agent_dashboard_provider.ts`) — standalone: an
10
+ * independently installable/registrable package some apps already depend on directly.
11
+ *
12
+ * Living here (rather than in `@adonis-agora/agent-dashboard`) keeps the dependency direction
13
+ * one-way: the dashboard package already depends on this one for `AgentConfig`/`ActorResolver`/etc.,
14
+ * so a package.json edge back from here to there would be circular. See
15
+ * `providers/dashboard_provider.ts`'s module doc for the full story.
16
+ */
17
+ export { decideDashboardMount, resolveDashboardConfig, } from './define_config.js';
18
+ export { evaluateDashboardGate } from './gate.js';
19
+ export { apiBaseFor, contentTypeFor, injectApiBase, injectBaseHref, mountPathFor, safeAssetSegments, trimSlashes, } from './paths.js';
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/dashboard/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAKL,oBAAoB,EACpB,sBAAsB,GACvB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAA6B,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAC7E,OAAO,EACL,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,YAAY,EACZ,iBAAiB,EACjB,WAAW,GACZ,MAAM,YAAY,CAAC"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Pure path/asset helpers for serving the `@adonis-agora/agent-dashboard` governance SPA — extracted
3
+ * so they can be unit-tested without booting an AdonisJS app. Both dashboard providers compose these;
4
+ * each holds only the router wiring + I/O. Owned here (rather than in `@adonis-agora/agent-dashboard`)
5
+ * so `packages/adonis`'s OWN embedded dashboard provider (`providers/dashboard_provider.ts`) can reuse
6
+ * them without depending on the dashboard package at runtime — the dashboard package already depends
7
+ * on THIS one (for `AgentConfig`/`ActorResolver`/...), and a package.json edge the other way would be
8
+ * circular. See `providers/dashboard_provider.ts`'s module doc for the full story.
9
+ */
10
+ /** Collapse duplicate slashes and strip leading/trailing ones: `/agent//` → `agent`. */
11
+ export declare function trimSlashes(path: string): string;
12
+ /** The agent API base as an absolute path with a single leading slash: `agent` → `/agent`. */
13
+ export declare function apiBaseFor(agentPath: string): string;
14
+ /**
15
+ * The canonical dashboard mount path (no trailing slash), default `<agentPath>/dashboard`. A caller
16
+ * may override with an explicit `dashboardPath`; both are normalized to a single leading slash.
17
+ */
18
+ export declare function mountPathFor(agentPath: string, dashboardPath?: string): string;
19
+ /** MIME type for a filename by extension; `application/octet-stream` for anything unknown. */
20
+ export declare function contentTypeFor(filename: string): string;
21
+ /**
22
+ * Reject a wildcard asset request that tries to escape the SPA root via `..` or an absolute path.
23
+ * Returns the safe, normalized relative segments (never starting with `..`), or `null` to deny.
24
+ */
25
+ export declare function safeAssetSegments(wildcard: string | string[] | undefined): string[] | null;
26
+ /**
27
+ * Inject the resolved agent API base into the served `index.html` as a global the SPA reads before
28
+ * boot, so the client calls the exact base the provider mounted (no build-time coupling). Idempotent
29
+ * per response — inserted right before `</head>`.
30
+ */
31
+ export declare function injectApiBase(html: string, apiBase: string): string;
32
+ /**
33
+ * Inject a `<base href="${mount}/">` as the FIRST thing inside `<head>`, so the SPA's relative
34
+ * `./assets/*` URLs (Vite `base: './'`) resolve against the mount directory no matter whether the
35
+ * browser's URL carries a trailing slash. This replaces the old trailing-slash redirect, which the
36
+ * AdonisJS router (it normalizes trailing slashes) turned into a duplicate-route crash. `mount` is a
37
+ * leading-slash, no-trailing-slash path (e.g. `/agent/dashboard`).
38
+ */
39
+ export declare function injectBaseHref(html: string, mount: string): string;
40
+ //# sourceMappingURL=paths.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../src/dashboard/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wFAAwF;AACxF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAED,8FAA8F;AAC9F,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,aAAa,CAAC,EAAE,MAAM,GAAG,MAAM,CAM9E;AAsBD,8FAA8F;AAC9F,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIvD;AAED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,GAAG,IAAI,CAU1F;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAInE;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAQlE"}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Pure path/asset helpers for serving the `@adonis-agora/agent-dashboard` governance SPA — extracted
3
+ * so they can be unit-tested without booting an AdonisJS app. Both dashboard providers compose these;
4
+ * each holds only the router wiring + I/O. Owned here (rather than in `@adonis-agora/agent-dashboard`)
5
+ * so `packages/adonis`'s OWN embedded dashboard provider (`providers/dashboard_provider.ts`) can reuse
6
+ * them without depending on the dashboard package at runtime — the dashboard package already depends
7
+ * on THIS one (for `AgentConfig`/`ActorResolver`/...), and a package.json edge the other way would be
8
+ * circular. See `providers/dashboard_provider.ts`'s module doc for the full story.
9
+ */
10
+ /** Collapse duplicate slashes and strip leading/trailing ones: `/agent//` → `agent`. */
11
+ export function trimSlashes(path) {
12
+ return path.replace(/\/+/g, '/').replace(/^\/+|\/+$/g, '');
13
+ }
14
+ /** The agent API base as an absolute path with a single leading slash: `agent` → `/agent`. */
15
+ export function apiBaseFor(agentPath) {
16
+ const trimmed = trimSlashes(agentPath);
17
+ return trimmed === '' ? '/' : `/${trimmed}`;
18
+ }
19
+ /**
20
+ * The canonical dashboard mount path (no trailing slash), default `<agentPath>/dashboard`. A caller
21
+ * may override with an explicit `dashboardPath`; both are normalized to a single leading slash.
22
+ */
23
+ export function mountPathFor(agentPath, dashboardPath) {
24
+ if (dashboardPath !== undefined && trimSlashes(dashboardPath) !== '') {
25
+ return `/${trimSlashes(dashboardPath)}`;
26
+ }
27
+ const trimmed = trimSlashes(agentPath);
28
+ return trimmed === '' ? '/dashboard' : `/${trimmed}/dashboard`;
29
+ }
30
+ const CONTENT_TYPES = {
31
+ html: 'text/html; charset=utf-8',
32
+ js: 'text/javascript; charset=utf-8',
33
+ mjs: 'text/javascript; charset=utf-8',
34
+ css: 'text/css; charset=utf-8',
35
+ json: 'application/json; charset=utf-8',
36
+ svg: 'image/svg+xml',
37
+ png: 'image/png',
38
+ jpg: 'image/jpeg',
39
+ jpeg: 'image/jpeg',
40
+ gif: 'image/gif',
41
+ webp: 'image/webp',
42
+ ico: 'image/x-icon',
43
+ woff: 'font/woff',
44
+ woff2: 'font/woff2',
45
+ ttf: 'font/ttf',
46
+ map: 'application/json; charset=utf-8',
47
+ txt: 'text/plain; charset=utf-8',
48
+ };
49
+ /** MIME type for a filename by extension; `application/octet-stream` for anything unknown. */
50
+ export function contentTypeFor(filename) {
51
+ const dot = filename.lastIndexOf('.');
52
+ const ext = dot === -1 ? '' : filename.slice(dot + 1).toLowerCase();
53
+ return CONTENT_TYPES[ext] ?? 'application/octet-stream';
54
+ }
55
+ /**
56
+ * Reject a wildcard asset request that tries to escape the SPA root via `..` or an absolute path.
57
+ * Returns the safe, normalized relative segments (never starting with `..`), or `null` to deny.
58
+ */
59
+ export function safeAssetSegments(wildcard) {
60
+ const parts = Array.isArray(wildcard) ? wildcard : (wildcard ?? '').split('/');
61
+ const segments = [];
62
+ for (const raw of parts) {
63
+ const part = raw.trim();
64
+ if (part === '' || part === '.')
65
+ continue;
66
+ if (part === '..' || part.includes('\0') || part.includes('\\'))
67
+ return null;
68
+ segments.push(part);
69
+ }
70
+ return segments;
71
+ }
72
+ /**
73
+ * Inject the resolved agent API base into the served `index.html` as a global the SPA reads before
74
+ * boot, so the client calls the exact base the provider mounted (no build-time coupling). Idempotent
75
+ * per response — inserted right before `</head>`.
76
+ */
77
+ export function injectApiBase(html, apiBase) {
78
+ const tag = `<script>window.__AGENT_DASHBOARD_BASE__=${JSON.stringify(apiBase)}</script>`;
79
+ if (html.includes('</head>'))
80
+ return html.replace('</head>', `${tag}</head>`);
81
+ return `${tag}${html}`;
82
+ }
83
+ /**
84
+ * Inject a `<base href="${mount}/">` as the FIRST thing inside `<head>`, so the SPA's relative
85
+ * `./assets/*` URLs (Vite `base: './'`) resolve against the mount directory no matter whether the
86
+ * browser's URL carries a trailing slash. This replaces the old trailing-slash redirect, which the
87
+ * AdonisJS router (it normalizes trailing slashes) turned into a duplicate-route crash. `mount` is a
88
+ * leading-slash, no-trailing-slash path (e.g. `/agent/dashboard`).
89
+ */
90
+ export function injectBaseHref(html, mount) {
91
+ const tag = `<base href="${mount}/">`;
92
+ const headOpen = html.match(/<head[^>]*>/i);
93
+ if (headOpen?.index !== undefined) {
94
+ const at = headOpen.index + headOpen[0].length;
95
+ return html.slice(0, at) + tag + html.slice(at);
96
+ }
97
+ return `${tag}${html}`;
98
+ }
99
+ //# sourceMappingURL=paths.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"paths.js","sourceRoot":"","sources":["../../../src/dashboard/paths.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,wFAAwF;AACxF,MAAM,UAAU,WAAW,CAAC,IAAY;IACtC,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AAC7D,CAAC;AAED,8FAA8F;AAC9F,MAAM,UAAU,UAAU,CAAC,SAAiB;IAC1C,MAAM,OAAO,GAAG,WAAW,CAAC,SAAS,CAAC,CAAC;IACvC,OAAO,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,OAAO,EAAE,CAAC;AAC9C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,SAAiB,EAAE,aAAsB;IACpE,IAAI,aAAa,KAAK,SAAS,IAAI,WAAW,CAAC,aAAa,CAAC,KAAK,EAAE,EAAE,CAAC;QACrE,OAAO,IAAI,WAAW,CAAC,aAAa,CAAC,EAAE,CAAC;IAC1C,CAA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,GAAG,GAAG,IAAI,EAAE,CAAC;AACzB,CAAC"}
@@ -1,4 +1,4 @@
1
- export declare const VERSION = "0.19.1";
1
+ export declare const VERSION = "0.21.0";
2
2
  export * from './types.js';
3
3
  export * from './spi/tool.js';
4
4
  export * from './base-tool.js';
package/dist/src/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export const VERSION = '0.19.1';
1
+ export const VERSION = '0.21.0';
2
2
  export * from './types.js';
3
3
  export * from './spi/tool.js';
4
4
  export * from './base-tool.js';
@@ -174,6 +174,21 @@ export interface PerToolStatRow {
174
174
  /** Mean `executionMs` across calls that recorded one; `null` when none did. */
175
175
  avgDurationMs: number | null;
176
176
  }
177
+ /** Run count + failure count for one agent, part of {@link RunReliability.byAgent}. */
178
+ export interface RunAgentBreakdownRow {
179
+ /** `"—"`-free; a run recorded before agent tracking (or with no agent set) is grouped as `null`. */
180
+ agentName: string | null;
181
+ runs: number;
182
+ failed: number;
183
+ /** completed / runs for this agent, 0 when runs = 0. */
184
+ successRate: number;
185
+ }
186
+ /** One day's run volume + failure count, part of {@link RunReliability.trend}. */
187
+ export interface RunTrendPoint {
188
+ day: string;
189
+ runs: number;
190
+ failed: number;
191
+ }
177
192
  /** Aggregated run reliability over a range — success / failure / cancel rates. */
178
193
  export interface RunReliability {
179
194
  runs: number;
@@ -189,6 +204,34 @@ export interface RunReliability {
189
204
  cancelRate: number;
190
205
  /** Mean duration of settled (completed/failed/cancelled) runs in ms; `null` when none settled. */
191
206
  avgDurationMs: number | null;
207
+ /**
208
+ * Run/failure counts grouped by `agentName`, highest call count first. Optional: an adapter that
209
+ * predates this breakdown may omit it; the dashboard renders an empty section when absent.
210
+ */
211
+ byAgent?: RunAgentBreakdownRow[];
212
+ /** Daily run/failure counts over the same range, oldest first. Optional, same reason as {@link byAgent}. */
213
+ trend?: RunTrendPoint[];
214
+ }
215
+ /** Thread metadata + LIFETIME usage rollup (not range-scoped) for the thread governance drill-down. */
216
+ export interface GovernanceThreadDetail {
217
+ threadId: string;
218
+ title: string;
219
+ actorRef: string;
220
+ createdAt: string;
221
+ updatedAt: string;
222
+ /** `true` when the thread has been soft-deleted (the record is still readable here). */
223
+ deleted: boolean;
224
+ usage: {
225
+ totalTokens: number;
226
+ /** `null` when the thread has no priced usage at all (not the same as a $0 total). */
227
+ costUsd: number | null;
228
+ runCount: number;
229
+ messageCount: number;
230
+ };
231
+ /** Newest-first, capped by the adapter (mirrors {@link ListRunsResult} page sizing). */
232
+ runs: RunSummaryRow[];
233
+ /** Newest-first, capped by the adapter. */
234
+ messages: RunMessageRow[];
192
235
  }
193
236
  /**
194
237
  * The governance read-model. Cost is `inputTokens/1e6 * inputPricePer1m + outputTokens/1e6 *
@@ -211,5 +254,11 @@ export interface AgentGovernanceQueries {
211
254
  perToolStats(range?: ToolStatsRange): Promise<PerToolStatRow[]>;
212
255
  /** Success/failure/cancel rates + mean settled duration over the range. */
213
256
  runReliability(range?: ToolStatsRange): Promise<RunReliability>;
257
+ /**
258
+ * The thread governance drill-down: metadata + lifetime usage rollup + recent runs/messages, or
259
+ * `null` when unknown. Optional — an adapter that predates this method leaves the route unmounted
260
+ * with a `501` rather than the dashboard breaking on a missing function.
261
+ */
262
+ threadDetail?(threadId: string): Promise<GovernanceThreadDetail | null>;
214
263
  }
215
264
  //# sourceMappingURL=governance-queries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"governance-queries.d.ts","sourceRoot":"","sources":["../../../src/spi/governance-queries.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,kDAAkD;AAClD,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,uDAAuD;AACvD,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM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MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC/D,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC;IAI3D,2DAA2D;IAC3D,QAAQ,CAAC,MAAM,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAC3D,yGAAyG;IACzG,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IACpD,2FAA2F;IAC3F,gBAAgB,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACjF,+FAA+F;IAC/F,YAAY,CAAC,KAAK,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,EAAE,CAAC,CAAC;IAChE,2EAA2E;IAC3E,cAAc,CAAC,KAAK,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAChE;;;;OAIG;IACH,YAAY,CAAC,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;CACzE"}
@@ -1,4 +1,4 @@
1
- import type { ActorSpendRow, AgentGovernanceQueries, GovernanceRange, ListRunsFilter, ListRunsResult, ModelSpendRow, PendingApprovalRow, PendingApprovalsFilter, PerToolStatRow, RunDetail, RunReliability, ThreadActivityRow, ToolCallActivityRow, ToolStatsRange, UsageTrendPoint } from '../spi/governance-queries.js';
1
+ import type { ActorSpendRow, AgentGovernanceQueries, GovernanceRange, GovernanceThreadDetail, ListRunsFilter, ListRunsResult, ModelSpendRow, PendingApprovalRow, PendingApprovalsFilter, PerToolStatRow, RunDetail, RunReliability, ThreadActivityRow, ToolCallActivityRow, ToolStatsRange, UsageTrendPoint } from '../spi/governance-queries.js';
2
2
  import type { AgentPricingStore } from '../spi/pricing-store.js';
3
3
  import type { LucidDatabaseLike } from './lucid.js';
4
4
  /** Options for {@link LucidGovernanceQueries}. */
@@ -78,8 +78,16 @@ export declare class LucidGovernanceQueries implements AgentGovernanceQueries {
78
78
  perToolStats(range?: ToolStatsRange): Promise<PerToolStatRow[]>;
79
79
  /**
80
80
  * Success / failure / cancel rates + mean settled-run duration over the (optional) range, bucketed
81
- * on `started_at`. A store without recorded runs yields all zeros / `null` duration.
81
+ * on `started_at`, plus a per-agent breakdown and a daily runs/failed trend over the same rows. A
82
+ * store without recorded runs yields all zeros / `null` duration / empty breakdown+trend.
82
83
  */
83
84
  runReliability(range?: ToolStatsRange): Promise<RunReliability>;
85
+ /**
86
+ * The thread governance drill-down: metadata + a LIFETIME usage rollup (every usage row ever
87
+ * recorded for the thread, not range-scoped) + its most recent runs/messages. `null` when the
88
+ * thread is unknown. Soft-deleted threads still resolve (with `deleted: true`), mirroring
89
+ * `runDetail`'s "the record exists, render it" posture.
90
+ */
91
+ threadDetail(threadId: string): Promise<GovernanceThreadDetail | null>;
84
92
  }
85
93
  //# sourceMappingURL=lucid-governance-queries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"lucid-governance-queries.d.ts","sourceRoot":"","sources":["../../../src/stores/lucid-governance-queries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,sBAAsB,EACtB,eAAe,EACf,cAAc,EACd,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EACd,SAAS,EAET,cAAc,EAId,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,eAAe,EAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAqB,MAAM,yBAAyB,CAAC;AAGpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AA8DpD,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AA0DD;;;;;;;;;;;;;G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C;CAuC1E"}
1
+ {"version":3,"file":"lucid-governance-queries.d.ts","sourceRoot":"","sources":["../../../src/stores/lucid-governance-queries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,sBAAsB,EACtB,eAAe,EACf,sBAAsB,EACtB,cAAc,EACd,cAAc,EACd,aAAa,EACb,kBAAkB,EAClB,sBAAsB,EACtB,cAAc,EAEd,SAAS,EAET,cAAc,EAKd,iBAAiB,EACjB,mBAAmB,EACnB,cAAc,EACd,eAAe,EAChB,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,iBAAiB,EAAqB,MAAM,yBAAyB,CAAC;AAGpF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AA8DpD,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AA0DD;;;;;;;;;;;;;GAaG;AACH,qBAAa,sBAAuB,YAAW,sBAAsB;IAIjE,OAAO,CAAC,QAAQ,CAAC,EAAE;IACnB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC;IAJhC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAU;gBAGxB,EAAE,EAAE,iBAAiB,EACrB,YAAY,CAAC,EAAE,iBAAiB,YAAA,EACjD,OAAO,GAAE,6BAAkC;IAK7C,kGAAkG;IAClG,OAAO,CAAC,KAAK;YAIC,WAAW;IASzB,uGAAuG;IACvG,OAAO,CAAC,OAAO;IAef,yFAAyF;YAC3E,YAAY;IAWpB,YAAY,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IA8B9D,YAAY,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC;IAqB9D,UAAU,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAkBpE;;;;OAIG;IACG,eAAe,CAAC,KAAK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