@uptimizr/agent-core 1.1.0 → 1.1.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.
- package/AGENTS.md +26 -0
- package/llms.txt +21 -0
- package/package.json +1 -1
package/AGENTS.md
CHANGED
|
@@ -44,6 +44,32 @@ The core ships **no model and no key**. It only ever reads a consumer's **own**
|
|
|
44
44
|
Each name is a metric in the collector's semantic metric registry (ADR 0051) and maps one-to-one to
|
|
45
45
|
a documented query endpoint. Most accept `since`/`until` (epoch ms) plus endpoint-specific filters.
|
|
46
46
|
|
|
47
|
+
## Result formats (`format`)
|
|
48
|
+
|
|
49
|
+
Every **aggregate** tool in the catalog declares a `format` argument — `full | table | summary`.
|
|
50
|
+
It picks the envelope the rows arrive in and filters nothing (ADR 0051 §2). The collector's
|
|
51
|
+
`preSerialization` hook does the shaping, so the tool definitions stay pure `buildRequest` functions.
|
|
52
|
+
|
|
53
|
+
| `format` | Returns | Use it when |
|
|
54
|
+
| --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
|
|
55
|
+
| `summary` | A bounded digest — `ranked` top rows, a `series` trend, merged spatial `clusters` or a single `record` — with shares, a sample size, the metric's `caveats` and a templated `reading` sentence. | **The default choice when a model will read the result.** |
|
|
56
|
+
| `table` | `{ meta, rows }`: the rows plus metric, range, applied filters, sample size, row count, a truncation flag and the registry's limits. | You need every row _and_ the context to judge how far to trust it. |
|
|
57
|
+
| `full` | The bare rows, unchanged. | You are post-processing the rows yourself. Today's default. |
|
|
58
|
+
|
|
59
|
+
- `summary` is capped at the metric's `limits.maxSummaryRows`, which is what makes a heatmap, voxel
|
|
60
|
+
cloud or long leaderboard safe to hand a model at all. This matters most for the **local** backend:
|
|
61
|
+
a 4-bit 7–8B model's whole context can be filled by one `full` heatmap.
|
|
62
|
+
- `reading` and `caveats` are templated from the registry's column semantics by pure code — no model
|
|
63
|
+
— so identical rows always produce identical words. Quote them rather than re-deriving them.
|
|
64
|
+
- Shares appear only where the measure can honestly be summed; an FPS or ratio metric reports
|
|
65
|
+
`total: null` and no shares. Cluster coordinates are grid indices — multiply by the effective
|
|
66
|
+
`cellSize` for world space.
|
|
67
|
+
- `session_meta` and `scene_representation` are single stored records, not aggregations, and declare
|
|
68
|
+
no `format`.
|
|
69
|
+
- `full` remains the generated catalog's default so that existing consumers (the dashboard) are
|
|
70
|
+
unaffected. Pass `format: "summary"` explicitly from an agent path; the default flip is a separate,
|
|
71
|
+
documented change.
|
|
72
|
+
|
|
47
73
|
## Rules for agents
|
|
48
74
|
|
|
49
75
|
- **Read-only and privacy-preserving.** Never add ingestion, mutation, or raw per-session event
|
package/llms.txt
CHANGED
|
@@ -33,6 +33,27 @@
|
|
|
33
33
|
|
|
34
34
|
<!-- generated:registry-tool-names:end -->
|
|
35
35
|
|
|
36
|
+
## Result formats (`format`)
|
|
37
|
+
|
|
38
|
+
Every aggregate tool declares a `format` argument — the envelope its rows arrive in, not a filter
|
|
39
|
+
(ADR 0051 §2).
|
|
40
|
+
|
|
41
|
+
- `summary` — **prefer this whenever a model reads the result.** A bounded digest: `ranked` top
|
|
42
|
+
rows, a `series` trend, merged spatial `clusters`, or a single `record`, with shares, a sample
|
|
43
|
+
size, the metric's `caveats` and a templated `reading` sentence. Capped at the metric's
|
|
44
|
+
`limits.maxSummaryRows`, so a 500-bin heatmap costs the same as a 5-bin one — which is what keeps
|
|
45
|
+
one heatmap from filling a small local model's whole context.
|
|
46
|
+
- `table` — `{ meta, rows }`: every row plus the metric, range, applied filters, sample size, row
|
|
47
|
+
count, a truncation flag and the registry limits.
|
|
48
|
+
- `full` — the bare rows. Today's default, so existing consumers such as the dashboard are
|
|
49
|
+
unaffected; pass `format` explicitly from an agent path.
|
|
50
|
+
|
|
51
|
+
`reading` and `caveats` are templated by pure code, never a model, so identical rows always produce
|
|
52
|
+
identical words. Shares appear only where the measure can honestly be summed (an FPS or ratio metric
|
|
53
|
+
reports `total: null` and no shares). Cluster coordinates are grid indices — multiply by the
|
|
54
|
+
effective `cellSize` for world space. `session_meta` and `scene_representation` are stored records,
|
|
55
|
+
not aggregations, and declare no `format`.
|
|
56
|
+
|
|
36
57
|
## Key exports
|
|
37
58
|
|
|
38
59
|
- `readTools` — the read-only tool catalog (one entry per query endpoint), generated from the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uptimizr/agent-core",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Framework-agnostic, browser-safe core for Uptimizr analytics agents — the single read-only tool catalog over the collector query API, a headless LLM provider-adapter interface, and the tool-calling loop.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"uptimizr",
|