openmerit 0.3.11 → 0.4.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/README.md +74 -22
- package/data/eci-estimates.csv +179 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +180 -0
- package/dist/connectors/langfuse/client.d.ts +42 -0
- package/dist/connectors/langfuse/client.js +141 -0
- package/dist/connectors/langfuse/index.d.ts +163 -0
- package/dist/connectors/langfuse/index.js +378 -0
- package/dist/connectors/langfuse/otlp.d.ts +60 -0
- package/dist/connectors/langfuse/otlp.js +40 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +11 -0
- package/dist/pi/extension.d.ts +13 -0
- package/dist/pi/extension.js +148 -0
- package/dist/pi/harness.d.ts +20 -0
- package/dist/pi/harness.js +49 -0
- package/dist/pi/instructions.d.ts +2 -0
- package/dist/pi/instructions.js +12 -0
- package/dist/scout/candidates.d.ts +62 -0
- package/dist/scout/candidates.js +90 -0
- package/dist/scout/eci.d.ts +42 -0
- package/dist/scout/eci.js +84 -0
- package/dist/scout/evaluators/module.d.ts +24 -0
- package/dist/scout/evaluators/module.js +19 -0
- package/dist/scout/evaluators/pi.d.ts +53 -0
- package/dist/scout/evaluators/pi.js +117 -0
- package/dist/scout/pipeline.d.ts +111 -0
- package/dist/scout/pipeline.js +157 -0
- package/dist/scout/report.d.ts +3 -0
- package/dist/scout/report.js +42 -0
- package/dist/scout/search.d.ts +110 -0
- package/dist/scout/search.js +205 -0
- package/dist/scout/service.d.ts +148 -0
- package/dist/scout/service.js +143 -0
- package/examples/health-declaration-codes/dataset.jsonl +14 -0
- package/examples/sahra-enrollment/evaluator.mts +152 -0
- package/package.json +34 -78
- package/CHANGELOG.md +0 -255
- package/dist/pi/scout-extension.mjs +0 -287
- package/dist/pi/src/index.d.ts +0 -6
- package/dist/pi/src/index.js +0 -56
- package/dist/terminal/scout-update.json +0 -1
- package/dist/terminal/src/browser.d.mts +0 -9
- package/dist/terminal/src/browser.mjs +0 -28
- package/dist/terminal/src/cli.mjs +0 -28
- package/dist/terminal/src/connections.js +0 -151
- package/dist/terminal/src/install.d.mts +0 -2
- package/dist/terminal/src/install.mjs +0 -524
- package/dist/terminal/src/scout-claude.js +0 -25
- package/dist/terminal/src/scout-credentials.js +0 -41
- package/dist/terminal/src/scout-instructions.js +0 -213
- package/dist/terminal/src/scout-pi.js +0 -84
- package/dist/terminal/src/scout.js +0 -229
- package/dist/terminal/src/telemetry.d.mts +0 -30
- package/dist/terminal/src/telemetry.mjs +0 -138
- package/dist/terminal/src/updates.js +0 -397
- package/docs/agent-evaluations.md +0 -15
- package/docs/commands.md +0 -9
- package/docs/getting-started.md +0 -37
- package/docs/index.md +0 -25
- package/docs/inference-terminal.md +0 -25
- package/docs/pi-extension.md +0 -58
- package/docs/roadmap.md +0 -16
- package/docs/scout-close-loop.md +0 -371
- package/docs/scout-data-policy.md +0 -87
- package/docs/scout.md +0 -237
- package/docs/security.md +0 -107
- package/docs/testing.md +0 -114
- package/docs/troubleshooting.md +0 -50
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
# Inference Terminal retirement
|
|
2
|
-
|
|
3
|
-
**npm 0.3.0, 4 November 2026.** The local Inference Terminal is retired in full: `openmerit dash` and its `--port`, `--interval`, `--no-discovery`, `--no-open`, `--json`, `--diagnostics` and `--demo` options, the fictional sample workspace, repository indexing, request-log and activity-export import, runtime and hardware discovery, and the browser interface. Older installed packages keep the command until they are upgraded.
|
|
4
|
-
|
|
5
|
-
From 0.3.0, `openmerit dash` reports an unknown command. There is no replacement view of application inventory or request history. Use your application's own logs or observability tools for recorded activity, and [Scout](scout.md) for application-model guidance.
|
|
6
|
-
|
|
7
|
-
## Existing local files
|
|
8
|
-
|
|
9
|
-
Upgrading does not delete `.openmerit/terminal.json`, `.openmerit/inference.jsonl`, hardware exports or application request logs under `logs/`, `runs/` or `results/`. Review and retain or remove them yourself. Stop any running `openmerit dash` process before upgrading.
|
|
10
|
-
|
|
11
|
-
Retirement does not erase previously sent opt-in terminal analytics or change their retention.
|
|
12
|
-
|
|
13
|
-
## Optional CLI product analytics
|
|
14
|
-
|
|
15
|
-
The terminal's browser and collection events (`terminal_visited`, `terminal_page_viewed`, `terminal_interaction`, `terminal_snapshot` and `terminal_error`) and their local `/api/analytics` relay are removed with it. CLI command analytics remain.
|
|
16
|
-
|
|
17
|
-
Scout setup commands (`install`, `status`, `remove`, `login`, `logout`, `project` and `doctor`) default analytics on; see the [setup default contract](scout.md#scout-setup-analytics-default-version-0110). Other commands send analytics only when `OPENMERIT_TELEMETRY=1`. `OPENMERIT_TELEMETRY=0` and `DO_NOT_TRACK=1` always disable them.
|
|
18
|
-
|
|
19
|
-
When enabled, the CLI posts `cli_command_started` and `cli_command_completed` to `https://openmerit.ai/scout/api/analytics`, with a fresh `crypto.randomUUID()` identity for that process only. Properties contain a command category (`help`, a setup command name, or `unknown`), a random command ID, the package version, platform (`darwin`, `linux`, `win32`, `unknown`) and Node major version. Completion adds the outcome (`ok` or `error`) and integer elapsed milliseconds capped at one day. Errors can add a fixed code, a standard error class and at most eight application-basename/line/column frames from `cli.mjs` or `install.mjs`. Paths, arguments, prompts, configuration, model IDs, error text, environment contents, machine names and email are not included.
|
|
20
|
-
|
|
21
|
-
Transport is best-effort and silent, and is bounded to about 750 ms per event. It does not change command output or exit status. Abrupt termination can lose events. Setup installation milestones follow the separate [Scout lifecycle contract](scout.md#coding-agent-lifecycle-instrumentation-npm-019).
|
|
22
|
-
|
|
23
|
-
## Preserved capabilities
|
|
24
|
-
|
|
25
|
-
Scout setup for Claude Code and Pi, `openmerit scout`, `openmerit update`, and the setup `status`, `doctor`, `login`, `logout` and `remove` commands remain. CLI command analytics keep the same opt-in and opt-out rules. See [commands](commands.md), [security](security.md) and [testing](testing.md) for the remaining interfaces.
|
package/docs/pi-extension.md
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
# Pi extension
|
|
2
|
-
|
|
3
|
-
## Supported version
|
|
4
|
-
|
|
5
|
-
OpenMerit **0.1.12** adds a Scout adapter for Pi **1.5.0**. It replaces, rather than upgrades in place, the Pi 0.87 evaluation adapter. The `@latest` commands below require OpenMerit 0.1.12 or newer. Package publication and website deployment remain independent releases.
|
|
6
|
-
|
|
7
|
-
## Installation
|
|
8
|
-
|
|
9
|
-
With Node.js 22.19 or newer, npm, and Pi 1.5.0 installed:
|
|
10
|
-
|
|
11
|
-
```sh
|
|
12
|
-
npx -y openmerit@latest install --client pi --scope user
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
Approve the matching browser device code and start a new Pi session. Scope defaults to `user`; use `--scope project` from the project's root for project-local setup. Each client and scope gets an independent key and approval; project keys are also separated by project. The npm package alone does not configure Pi.
|
|
16
|
-
|
|
17
|
-
The website's **Add to Pi** action is copy-only and sits below the Claude action, with the Pi logo before the label. It copies the installer command; it does not open a Pi deep link or prove installation. The button requires the corresponding Scout website deployment.
|
|
18
|
-
|
|
19
|
-
## Installed files and credentials
|
|
20
|
-
|
|
21
|
-
| File | User scope | Project scope |
|
|
22
|
-
| --- | --- | --- |
|
|
23
|
-
| Native extension bundle | `~/.pi/agent/extensions/openmerit-scout.ts` | `.pi/extensions/openmerit-scout.ts` |
|
|
24
|
-
| Credential-path reference | `~/.pi/agent/extensions/openmerit-scout.json` | `.pi/extensions/openmerit-scout.json` |
|
|
25
|
-
| Shared Scout skill | `~/.pi/agent/skills/openmerit-scout/SKILL.md` | `.pi/skills/openmerit-scout/SKILL.md` |
|
|
26
|
-
| Installer ownership record | `~/.pi/agent/openmerit-install.json` | `.pi/openmerit-install.json` |
|
|
27
|
-
|
|
28
|
-
`PI_CODING_AGENT_DIR` overrides the user agent directory. The connection JSON contains a `credentialsPath`, not the key. The default private key paths are `~/.config/openmerit/pi/user/credentials.json` for user scope and `~/.config/openmerit/pi/<project-id>/credentials.json` for project scope. The project ID derives from the resolved project root; run targeted commands from that root. `OPENMERIT_CONFIG_DIR` or `XDG_CONFIG_HOME` can override the private configuration base. Do not copy credentials into the project or model instructions.
|
|
29
|
-
|
|
30
|
-
The extension reads credentials at session startup and registers the `openmerit` HTTP MCP server with direct tool exposure. Authorization is an HTTP header, not prompt content. Missing or invalid configuration produces a sanitized setup diagnostic, not an automatic login. The adapter performs no per-turn HTTP connection checks or credential reads.
|
|
31
|
-
|
|
32
|
-
## Native ownership and shared guidance
|
|
33
|
-
|
|
34
|
-
Pi supplies the MCP connection, tool discovery and execution, permissions, and session management. The thin adapter adds the same Scout rule and skill used by the shared installer as structured system-prompt sections. It leaves the host's model, tool allow/exclude lists, and other prompt sections intact. This is guidance to consult Scout before application-model choices, not enforcement of tool invocation or permission to download, spend, deploy, or change models. Scout's [data-handling policy](scout.md#refresh-and-data-handling) applies to submitted tasks.
|
|
35
|
-
|
|
36
|
-
## Updates and targeted lifecycle commands
|
|
37
|
-
|
|
38
|
-
```sh
|
|
39
|
-
npx -y openmerit@latest status --client pi --scope user --check
|
|
40
|
-
npx -y openmerit@latest doctor --client pi --scope user
|
|
41
|
-
npx -y openmerit@latest login --client pi --scope user
|
|
42
|
-
npx -y openmerit@latest logout --client pi --scope user
|
|
43
|
-
npx -y openmerit@latest remove --client pi --scope user
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
Replace `user` with `project` for a project installation. Removal and logout target that client's scope/key, not a Claude Code installation or another project. Edited or unowned files are not silently overwritten or deleted. Resolve duplicate user/project adapters or existing `openmerit` MCP entries before installing.
|
|
47
|
-
|
|
48
|
-
Updates are **explicit reinstall only**: rerun `install --client pi` with the same scope and start a new session. There are no Pi auto-update hooks; Claude Code update-hook settings do not apply to Pi.
|
|
49
|
-
|
|
50
|
-
## SDK embedding
|
|
51
|
-
|
|
52
|
-
`openmerit/pi` exports `createScoutPiExtension({ credentialsPath })` and a default extension created by that factory. SDK hosts must explicitly load Pi's own **`createMcpExtension()`** alongside the Scout extension; the Scout factory does not create an MCP runtime. The Pi CLI already supplies native MCP. The explicit credential path takes precedence over the installed adjacent connection JSON, with the shared Pi user credential path as the fallback when that JSON is absent. The host supplies its own model, tools, session and permission configuration.
|
|
53
|
-
|
|
54
|
-
## Migration from Pi 0.87
|
|
55
|
-
|
|
56
|
-
Remove or disable the old `npm:openmerit` Pi package registration before loading this adapter, and explicitly remove any previously authorized background job through its existing management path. New setup does not promise to uninstall a legacy LaunchAgent. Preserve `.openmerit/` evaluation state and evidence if needed; do not delete them as a setup repair.
|
|
57
|
-
|
|
58
|
-
The replacement has no `/openmerit` commands, `openmerit_complete_intent` or `openmerit_report_signal` tools, source preflight, evaluation lifecycle, intent recovery, scheduling, automatic swaps, or LaunchAgent. The [standalone evaluation CLI](agent-evaluations.md) is unchanged.
|
package/docs/roadmap.md
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# Current limitations and roadmap
|
|
2
|
-
|
|
3
|
-
## Current status
|
|
4
|
-
|
|
5
|
-
The Pi **1.5.0** adapter in OpenMerit **0.1.12** provides only native Scout MCP and shared guidance, not evaluation coordination. OpenMerit **0.3.0** retires the Inference Terminal and the standalone evaluation CLI; the Scout serving deploy of 5 November 2026 retired the legacy recommendation API. Passing implementation tests do not establish that an application has better models, trustworthy evaluations, or reliable unattended automation.
|
|
6
|
-
|
|
7
|
-
## Known limitations
|
|
8
|
-
|
|
9
|
-
- The terminal does not instrument the application, call inference providers, route traffic, run evaluations, or apply model changes. It needs supported logs or exports for actual request history. Code/configuration declarations alone cannot supply past requests or spend.
|
|
10
|
-
- History and inventory can be incomplete because of source availability and read/parser limits. “All time” means retained supported evidence, not a complete lifetime archive. Cloud account usage is not fetched.
|
|
11
|
-
- Machine and runtime readings describe shared resources; they are not per-request resource measurements. Static endpoints do not prove deployment, availability, or physical location.
|
|
12
|
-
- The local sample workspace is fictional. Its measurements and prices illustrate the interface, not application quality or latency.
|
|
13
|
-
- The Pi 0.87 evaluation adapter is removed in source. Pi 1.5.0 setup needs explicit browser approval, a new session and an explicit installer rerun for updates. It has no lifecycle commands, scheduler, LaunchAgent or auto-update hooks. The host owns tools, model, permissions and sessions; SDK hosts must load Pi's native MCP extension explicitly.
|
|
14
|
-
- Scout rule/skill availability does not guarantee invocation or measured application quality. Missing project policy requires asking; unavailable or insufficient Scout evidence requires pausing the model choice.
|
|
15
|
-
- Existing legacy Pi 0.87 background jobs require separate cleanup during migration.
|
|
16
|
-
- Scout guidance is not execution or evaluation. Use representative application checks and provider spending controls independently.
|
package/docs/scout-close-loop.md
DELETED
|
@@ -1,371 +0,0 @@
|
|
|
1
|
-
# Close the model-selection loop
|
|
2
|
-
|
|
3
|
-
Scout recommends candidates; your own evals decide whether they work. Never put
|
|
4
|
-
inputs, outputs, patient records, source code or secrets in recommendation prompts
|
|
5
|
-
or tool arguments. Connector credentials use the protected paths described below.
|
|
6
|
-
|
|
7
|
-
**Version requirements:** the Langfuse setup commands below require npm 0.3.5 or
|
|
8
|
-
newer and a matching Scout serving deployment. Saving Langfuse credentials also
|
|
9
|
-
requires connection encryption to be enabled on the server. Publishing the npm
|
|
10
|
-
package alone does not deploy or enable the hosted connector. npm 0.3.4 supports
|
|
11
|
-
reporting aggregates per conversation, not this connector.
|
|
12
|
-
|
|
13
|
-
## Install and consult
|
|
14
|
-
|
|
15
|
-
Install the published package, approve the device code in your browser and start a
|
|
16
|
-
new coding-agent session. See [setup](getting-started.md) for Pi and unattended
|
|
17
|
-
reuse of an already-approved device key. Do not copy another user's key.
|
|
18
|
-
|
|
19
|
-
```sh
|
|
20
|
-
npx -y openmerit@latest install --client claude-code --scope project
|
|
21
|
-
npx -y openmerit@latest scout "Extract invoice line items as structured JSON" --all-endpoints
|
|
22
|
-
```
|
|
23
|
-
|
|
24
|
-
Use your saved project inventory instead of `--all-endpoints` when policy limits
|
|
25
|
-
access. Existing-only policy cannot be broadened by that flag. Answer Scout's
|
|
26
|
-
questions in the same conversation with `--brief`, or explicitly choose `--skip`.
|
|
27
|
-
Each recommended model names an exact endpoint and provider model ID.
|
|
28
|
-
|
|
29
|
-
## Measure with your own evals
|
|
30
|
-
|
|
31
|
-
**Eval-readiness and evidence guidance — npm 0.3.7:** this
|
|
32
|
-
package adds the readiness and cleanup workflow below to the installed Scout
|
|
33
|
-
skill. Existing npm 0.3.6 instructions cover measuring and aggregate reporting,
|
|
34
|
-
but do not yet prescribe all three readiness paths or an evidence-first cleanup
|
|
35
|
-
record. This is guidance for the customer's coding agent, not an automated eval
|
|
36
|
-
runner, platform provisioner or deletion service.
|
|
37
|
-
|
|
38
|
-
### Choose the readiness path
|
|
39
|
-
|
|
40
|
-
- **No eval setup.** Scout can still suggest candidates from public evidence;
|
|
41
|
-
that is not measured application quality. Propose a minimal customer-owned
|
|
42
|
-
eval setup and obtain approval before creating it. Langfuse is the default
|
|
43
|
-
suggestion because Scout has its aggregate connector. A hosted platform is
|
|
44
|
-
optional: customer-owned scripts and fixtures can report aggregates directly.
|
|
45
|
-
Phoenix/Arize and Braintrust are alternatives, not supported Scout connectors.
|
|
46
|
-
- **A setup exists, but the evals are missing or too weak for model selection.**
|
|
47
|
-
Keep the existing system. Have the user or their coding agent write a local
|
|
48
|
-
task-specific Markdown eval plan with exact candidates/endpoints, quality floor,
|
|
49
|
-
task/agent/outcome checks, labelled boundary cases and controls, sample size,
|
|
50
|
-
early stopping, spend cap, aggregate mappings and temporary-run retention.
|
|
51
|
-
Review it before implementing it with the customer's tools. OpenMerit's access
|
|
52
|
-
remains Viewer-only; it does not install or maintain those evals.
|
|
53
|
-
- **Suitable evals already exist.** Reuse their fixtures and definitions. Add
|
|
54
|
-
approved candidate runs rather than creating another dataset or platform.
|
|
55
|
-
|
|
56
|
-
Add the shortlist as runs of your existing evals, not a second platform. Obtain
|
|
57
|
-
approval before model spend or platform writes. For agents, change **one agent at
|
|
58
|
-
a time** while holding the other models, prompts, tools, fixtures and controls
|
|
59
|
-
fixed. Use that agent's own checks, not just end-to-end success, to attribute
|
|
60
|
-
failures. Include cost and latency per call or agent run.
|
|
61
|
-
|
|
62
|
-
If every candidate scores 100%, the eval does not distinguish their quality.
|
|
63
|
-
Add harder labelled boundary cases, rare failures and adversarial examples;
|
|
64
|
-
cheaper on this test is not proof of equal quality in production.
|
|
65
|
-
|
|
66
|
-
### Preserve evidence, then request cleanup
|
|
67
|
-
|
|
68
|
-
Save a local Markdown decision record before removing temporary comparison data.
|
|
69
|
-
Include the date, package and service versions, task and policy, exact candidates,
|
|
70
|
-
unchanged controls, metric definitions and direction, sample counts, aggregate
|
|
71
|
-
quality/cost/time, failures and exclusions, decision, limitations and next review.
|
|
72
|
-
Exclude keys, private record identifiers, prompts, outputs and trace bodies.
|
|
73
|
-
|
|
74
|
-
State cost regret in a consistent unit (for example USD per agent run): the
|
|
75
|
-
chosen model's measured cost minus the cheapest measured candidate meeting the
|
|
76
|
-
same quality floor on comparable evals. If there is no measured comparison,
|
|
77
|
-
write **not measurable**, not zero. One success or all candidates scoring 100%
|
|
78
|
-
on a tiny eval is not proof of equal production quality.
|
|
79
|
-
|
|
80
|
-
Comparison records are temporary, but deletion is **not automatic**. After
|
|
81
|
-
checking the saved evidence, propose the exact newly created comparison runs and
|
|
82
|
-
any cascading deletions, then obtain explicit scoped approval. The customer or
|
|
83
|
-
their coding agent performs cleanup using customer-controlled write access;
|
|
84
|
-
Scout's Viewer key cannot delete Langfuse data. Never delete pre-existing customer
|
|
85
|
-
records, reusable fixtures, dataset definitions or eval definitions. Verify that
|
|
86
|
-
only the approved records disappeared and retained controls still exist. Record
|
|
87
|
-
cleanup as pending when permission or verification is missing.
|
|
88
|
-
|
|
89
|
-
Deleting platform runs, disconnecting Scout and deleting Scout's stored aggregates
|
|
90
|
-
are separate operations. Disconnect does not erase past conversations or customer
|
|
91
|
-
platform records. Keep enough permitted aggregate evidence locally to explain a
|
|
92
|
-
later decision, without promising Scout can refresh a deleted source experiment.
|
|
93
|
-
|
|
94
|
-
## Report aggregates
|
|
95
|
-
|
|
96
|
-
Report up to 50 aggregates per call, one per model, metric and scope. Use public
|
|
97
|
-
catalogue model or endpoint IDs. `scope` and `source` must be aggregate labels,
|
|
98
|
-
not record IDs, emails or URLs containing private identifiers.
|
|
99
|
-
|
|
100
|
-
```json
|
|
101
|
-
[
|
|
102
|
-
{
|
|
103
|
-
"level": "agent", "kind": "quality", "task": "Invoice extraction",
|
|
104
|
-
"scope": "Invoice extraction", "model": "<catalogue-model-id>",
|
|
105
|
-
"metric": "fields-correct", "value": 0.96, "higherIsBetter": true,
|
|
106
|
-
"samples": 100, "source": "Held-out invoice eval"
|
|
107
|
-
}
|
|
108
|
-
]
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
```sh
|
|
112
|
-
openmerit scout --conversation <id> --results results.json
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
Use `kind: "usd"` or `"seconds"` for measured money or time; they are not quality
|
|
116
|
-
scores. On the enabled hosted connector, aggregates apply across your
|
|
117
|
-
conversations. Re-reporting the same level/kind/task/scope/model/metric/source
|
|
118
|
-
updates that aggregate rather than duplicating it.
|
|
119
|
-
|
|
120
|
-
## Connect Langfuse
|
|
121
|
-
|
|
122
|
-
`openmerit connect langfuse` opens the optional signed-in
|
|
123
|
-
[connection page](https://openmerit.ai/connect/?integration=langfuse). Create a
|
|
124
|
-
**separate Viewer key pair** in Langfuse Project Settings → API Keys. Enter it
|
|
125
|
-
in the password fields there, or use the protected headless paths below. Never
|
|
126
|
-
paste it in chat, command arguments, issues or tracked files. Keep the
|
|
127
|
-
application's tracing keys unchanged. US, EU and HIPAA Cloud hosts
|
|
128
|
-
are supported; self-hosted instances are not. Selecting a Langfuse region does
|
|
129
|
-
not promise that Scout stores or processes your data in that region.
|
|
130
|
-
|
|
131
|
-
You can connect the key first with empty mappings. To import results, expand
|
|
132
|
-
**Score and model mappings** and supply a start date, experiment-tag prefix,
|
|
133
|
-
score mappings and model aliases. In npm 0.3.6 with the matching Scout deployment,
|
|
134
|
-
the headless paths below can update settings without re-entering the saved Viewer
|
|
135
|
-
key. Changing settings invalidates old imports; sync again afterwards. Reported
|
|
136
|
-
results remain. Older deployments require disconnecting and reconnecting.
|
|
137
|
-
|
|
138
|
-
### Headless CLI setup
|
|
139
|
-
|
|
140
|
-
First authorize a **separate connection-management key**. This is not an upgrade
|
|
141
|
-
to your existing recommendation key and does not change Claude Code or Pi setup.
|
|
142
|
-
The first account authorization still requires a signed-in person to approve the
|
|
143
|
-
displayed device code; `--no-open` lets them do that on another device. After
|
|
144
|
-
approval, all connector operations can run without the web UI.
|
|
145
|
-
|
|
146
|
-
```sh
|
|
147
|
-
openmerit connect langfuse --authorize --no-open
|
|
148
|
-
```
|
|
149
|
-
|
|
150
|
-
If it returns exit 10 (approval pending), approve the matching code and rerun the
|
|
151
|
-
same command. The resumable login stores the management key with mode 0600 in
|
|
152
|
-
`connector/user/credentials.json` under the OpenMerit config directory (normally
|
|
153
|
-
`~/.config/openmerit`). Never display or share that file. The key grants
|
|
154
|
-
`scout:connections`, not `scout:recommend`; it can manage **all evaluation data
|
|
155
|
-
for your account**, not only one project. It cannot approve devices, list other
|
|
156
|
-
device keys, run recommendations or spend on models. Like recommendation keys,
|
|
157
|
-
it expires after 90 days without use and can be revoked from the connection page
|
|
158
|
-
or with `openmerit logout --client connector`. Disconnecting Langfuse does not
|
|
159
|
-
revoke this management credential; revoke it separately when retiring a runner.
|
|
160
|
-
|
|
161
|
-
Save only non-secret settings in `mappings.json`:
|
|
162
|
-
|
|
163
|
-
```json
|
|
164
|
-
{
|
|
165
|
-
"region": "us",
|
|
166
|
-
"from": "2026-11-01",
|
|
167
|
-
"tagPrefix": "experiment:",
|
|
168
|
-
"mappings": [],
|
|
169
|
-
"models": {}
|
|
170
|
-
}
|
|
171
|
-
```
|
|
172
|
-
|
|
173
|
-
Have your secret manager inject `LANGFUSE_PUBLIC_KEY` and `LANGFUSE_SECRET_KEY`
|
|
174
|
-
into the CLI process environment, then run:
|
|
175
|
-
|
|
176
|
-
```sh
|
|
177
|
-
openmerit connect langfuse --config mappings.json
|
|
178
|
-
openmerit connect langfuse --status
|
|
179
|
-
openmerit connect langfuse --sync
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
**Updating an existing connection (npm 0.3.6 and matching deployment):** edit the
|
|
183
|
-
non-secret settings file and run the same `--config` command with both
|
|
184
|
-
`LANGFUSE_PUBLIC_KEY` and `LANGFUSE_SECRET_KEY` absent. Scout reuses and reverifies
|
|
185
|
-
the encrypted Viewer key internally; neither CLI nor model receives it. One key
|
|
186
|
-
without the other is rejected. Without a connected key, first connect through a
|
|
187
|
-
protected credential path. Settings changes remove prior imports, not reported
|
|
188
|
-
results, and require a new sync.
|
|
189
|
-
|
|
190
|
-
Alternatively, `openmerit connect langfuse --stdin` reads a full JSON object with
|
|
191
|
-
the same settings plus `publicKey` and `secretKey` from a protected pipe, up to
|
|
192
|
-
18 KB. It does not echo or save the Viewer credentials locally. Do not use inline
|
|
193
|
-
JSON, `echo` with literal secrets, command substitutions that print secrets into
|
|
194
|
-
an agent transcript, or an interactive shell history entry. Authorize before
|
|
195
|
-
piping a secret. Environment variables and pipes are not a vault: trust the
|
|
196
|
-
runner and restrict process/debug access, and disable shell tracing and request
|
|
197
|
-
logging. Unattended jobs may instead inject an already-approved
|
|
198
|
-
`OPENMERIT_CONNECTION_KEY` through a secret manager; keep recommendation and
|
|
199
|
-
management credentials separate.
|
|
200
|
-
|
|
201
|
-
### MCP management
|
|
202
|
-
|
|
203
|
-
The canonical `/scout/mcp` endpoint exposes `scout_connection` when authenticated
|
|
204
|
-
with the separate management key (or a current browser session). Register a
|
|
205
|
-
separate trusted MCP client connection using `Authorization: Bearer <management
|
|
206
|
-
key>` without putting the actual key in chat or tool arguments. A recommendation
|
|
207
|
-
key still discovers only `scout_models`; a management key discovers only
|
|
208
|
-
`scout_connection`. This separation is enforced on calls, not just discovery.
|
|
209
|
-
|
|
210
|
-
`scout_connection` supports `status`, `configure`, `sync`, `disconnect` and
|
|
211
|
-
`clear`. `configure` takes the non-secret settings above as `config`. Supply the
|
|
212
|
-
Viewer key pair through **client-controlled HTTP headers**
|
|
213
|
-
`X-Langfuse-Public-Key` and `X-Langfuse-Secret-Key`, sourced from your secret manager,
|
|
214
|
-
not from the model. These headers are consumed only for configuration and are
|
|
215
|
-
never returned in tool results or sent to the recommendation model. Remove them
|
|
216
|
-
from client configuration after connecting. Do not configure a client/proxy that
|
|
217
|
-
records these headers. If your MCP client cannot securely inject headers outside
|
|
218
|
-
model context, have the agent invoke the CLI with protected input instead, or
|
|
219
|
-
use the web UI; do not fall back to putting credentials in tool arguments.
|
|
220
|
-
|
|
221
|
-
On the matching 0.3.6 deployment, omit both Viewer headers to update an existing
|
|
222
|
-
connection using its saved encrypted key. A new connection still needs both.
|
|
223
|
-
The authenticated HTTP POST similarly accepts non-secret settings without either
|
|
224
|
-
key field for an existing connection. The saved key is never exported. Settings
|
|
225
|
-
changes reverify Viewer access and invalidate imported results before a new sync.
|
|
226
|
-
|
|
227
|
-
```json
|
|
228
|
-
{"action": "configure", "config": {"region": "us", "from": "2026-11-01", "tagPrefix": "experiment:", "mappings": [], "models": {}}}
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
This checks and saves the connection, not a sync. Send `{"action":"sync"}` to
|
|
232
|
-
import mapped aggregates without starting inference. For deletion, obtain the
|
|
233
|
-
user's consent and pass `confirm: true` with `disconnect` or `clear`. Tool
|
|
234
|
-
confirmation is not a substitute for consent in your application.
|
|
235
|
-
|
|
236
|
-
### HTTP API
|
|
237
|
-
|
|
238
|
-
The same authenticated account store is available without MCP:
|
|
239
|
-
|
|
240
|
-
| Method | Path | Operation |
|
|
241
|
-
| --- | --- | --- |
|
|
242
|
-
| GET | `/connect/api/langfuse` | Connection status and aggregate counts, never credentials |
|
|
243
|
-
| POST | `/connect/api/langfuse` | Configure/replace using full JSON settings including `publicKey` and `secretKey` |
|
|
244
|
-
| POST | `/connect/api/langfuse/sync` | Import mapped aggregates without inference |
|
|
245
|
-
| DELETE | `/connect/api/langfuse` | Delete the Viewer key pair and imported aggregates |
|
|
246
|
-
| DELETE | `/connect/api/evaluations` | Also delete manually reported aggregates |
|
|
247
|
-
|
|
248
|
-
Send the management key in the `Authorization: Bearer` header and
|
|
249
|
-
`Content-Type: application/json` for configuration. Browser session tokens still
|
|
250
|
-
work. Recommendation keys, anonymous requests and cross-origin browser requests
|
|
251
|
-
are rejected. No request accepts a target user ID: ownership comes from the
|
|
252
|
-
authenticated identity. Inject credentials into the HTTP client, not command-line
|
|
253
|
-
arguments; keep request bodies/headers out of logs. Check status after an ambiguous
|
|
254
|
-
network failure before retrying a change. None of these paths bypasses the Viewer
|
|
255
|
-
check, explicit mappings, encryption, retention limits or per-user isolation.
|
|
256
|
-
|
|
257
|
-
### Attribute imported scores
|
|
258
|
-
|
|
259
|
-
Every scored trace must carry a tag formed from the prefix plus its experiment
|
|
260
|
-
ID, for example `experiment:<id>`. The experiment's metadata must identify the
|
|
261
|
-
model for that agent. Scout does not infer model attribution from timestamps,
|
|
262
|
-
trace contents or the currently selected model. Untagged historical runs are
|
|
263
|
-
not imported: report their aggregates instead. Each mapping specifies an exact
|
|
264
|
-
trace name so other agents in the same experiment cannot contaminate its score.
|
|
265
|
-
|
|
266
|
-
Example score mapping (replace the task title with the exact Scout task):
|
|
267
|
-
|
|
268
|
-
```json
|
|
269
|
-
[
|
|
270
|
-
{
|
|
271
|
-
"metric": "coding-finding-found", "modelKey": "model_coding",
|
|
272
|
-
"task": "Coding review", "traceName": "review-coding",
|
|
273
|
-
"level": "agent", "kind": "quality", "higherIsBetter": true
|
|
274
|
-
}
|
|
275
|
-
]
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
Model aliases explicitly map metadata values to Scout model or endpoint IDs:
|
|
279
|
-
|
|
280
|
-
```json
|
|
281
|
-
{"<experiment metadata model value>": "<Scout catalogue model or endpoint ID>"}
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
The first import supports numeric/boolean score averages and counts, not strings,
|
|
285
|
-
raw scores, percentile distributions or automatic cost/latency extraction from
|
|
286
|
-
generation bodies. At most eight mappings, 100 aliases and 100 experiments are
|
|
287
|
-
read per sync. Narrow the date if a response or import exceeds its limit. Only
|
|
288
|
-
experiment headers/metadata and aggregate Metrics v2 reads are requested. A
|
|
289
|
-
deliberately invalid dataset-create request checks read-only permission without
|
|
290
|
-
ever sending a valid write payload. Only an authenticated read followed by HTTP
|
|
291
|
-
403 on that probe is accepted; other responses fail closed. A connected key or
|
|
292
|
-
nonzero import proves neither application quality nor a completed customer loop.
|
|
293
|
-
|
|
294
|
-
**npm 0.3.8 and later:** when your project records a confirmed
|
|
295
|
-
Langfuse connection and mappings, the coding agent should request aggregate sync
|
|
296
|
-
on its first consultation and before a final model decision. This refresh reads
|
|
297
|
-
Langfuse aggregates and updates Scout's cache; it does not execute candidates or
|
|
298
|
-
create customer-platform records, so it does not require new model-spend or
|
|
299
|
-
platform-write approval. Do not retype old measurements from project notes in
|
|
300
|
-
place of refreshing the connection. If sync fails, disclose the failure and
|
|
301
|
-
distinguish retained cached evidence from a fresh import. A tracing key in the
|
|
302
|
-
application does not establish that Scout is connected: check connection status
|
|
303
|
-
before proposing another setup. This guidance does not make the server sync
|
|
304
|
-
implicitly; the agent still requests it through the existing command or tool.
|
|
305
|
-
|
|
306
|
-
Click **Sync aggregates**, or request a fresh recommendation with:
|
|
307
|
-
|
|
308
|
-
```sh
|
|
309
|
-
openmerit scout --conversation <id> --sync langfuse
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
MCP uses `sync: "langfuse"`. Successful reads are cached for ten minutes; a
|
|
313
|
-
failed read cannot be retried for one minute. A failed import leaves the previous
|
|
314
|
-
complete set intact. `conversationId` alone reads a saved answer, not a rerank;
|
|
315
|
-
send a follow-up or `sync` to recompute with the current results.
|
|
316
|
-
|
|
317
|
-
**Deployed 6 November 2026:** aggregate queries group mapped score names
|
|
318
|
-
within each experiment and trace role, rather than requesting every metric
|
|
319
|
-
separately. Experiment tags and explicit model aliases still isolate attribution.
|
|
320
|
-
A rate-limited sync honors Langfuse's `Retry-After`
|
|
321
|
-
duration, persists the cooldown and continues to report failure during it; a
|
|
322
|
-
failed refresh is not a successful cache hit. Without a valid duration the
|
|
323
|
-
fallback is one minute. Langfuse's Metrics quota can be hourly or daily and is
|
|
324
|
-
shared across the organization's projects and keys, so repeatedly retrying or
|
|
325
|
-
changing keys does not solve exhaustion. See [Langfuse API limits](https://langfuse.com/faq/all/api-limits).
|
|
326
|
-
This server update does not grant access to trace or observation bodies and
|
|
327
|
-
does not execute models or change Langfuse records.
|
|
328
|
-
|
|
329
|
-
### When a sync imports zero aggregates
|
|
330
|
-
|
|
331
|
-
A connected Viewer key and a successful experiment read do not establish that
|
|
332
|
-
score import is configured. Empty mappings are allowed when first connecting.
|
|
333
|
-
Before repeating sync, check the score mappings and model aliases, then check
|
|
334
|
-
that scored traces carry the exact experiment tag, trace name and metric name
|
|
335
|
-
in those mappings. Merely linking a trace through Langfuse's native experiment
|
|
336
|
-
attributes does not add the explicit experiment tag required by this connector.
|
|
337
|
-
Do not remove the tag filter to make an import nonempty: that can combine scores
|
|
338
|
-
from different models or runs. Untagged historical results need attributable
|
|
339
|
-
aggregate reporting or a separately approved, verified tagging backfill.
|
|
340
|
-
|
|
341
|
-
**Diagnostic version requirement:** a matching Scout serving deployment adds
|
|
342
|
-
`mappingCount` and `modelAliasCount` to connection status, without returning the
|
|
343
|
-
saved keys or mapping values. The web page distinguishes a connected key from
|
|
344
|
-
incomplete setup and warns when a sync imports no matching scores. npm 0.3.5
|
|
345
|
-
does not display these new counts; use authenticated API/MCP status until a
|
|
346
|
-
matching CLI patch is published. These counts diagnose missing configuration,
|
|
347
|
-
not whether matching scores exist or whether a model improves quality.
|
|
348
|
-
|
|
349
|
-
## Choose and delete
|
|
350
|
-
|
|
351
|
-
Check measured quality, the quality floor, price calibration and limitations
|
|
352
|
-
before adopting a model. Benchmark estimates are not application acceptance.
|
|
353
|
-
Test endpoint connectivity and application behavior separately.
|
|
354
|
-
|
|
355
|
-
Results belong only to your Scout user account, not other customers. Up to 5,000
|
|
356
|
-
aggregates or 1 MB are retained for 90 days from report/import; expired rows are
|
|
357
|
-
excluded immediately and pruned daily (allow scheduling delay). An evaluation
|
|
358
|
-
account inactive for 90 days is erased by the same cleanup. See the
|
|
359
|
-
[data policy](scout-data-policy.md) for processors and backup limitations.
|
|
360
|
-
|
|
361
|
-
`openmerit disconnect langfuse` opens the optional browser confirmation;
|
|
362
|
-
`openmerit disconnect langfuse --yes` deletes headlessly, and adding
|
|
363
|
-
`--delete-all` also deletes reported results. **Disconnect &
|
|
364
|
-
delete imports** removes the encrypted key pair and imported aggregates, including
|
|
365
|
-
an in-flight sync. **Delete all evaluation data** also removes manually reported
|
|
366
|
-
aggregates. Neither erases past conversation text or previously generated
|
|
367
|
-
recommendations; do not keep treating those answers as current measurements.
|
|
368
|
-
Contact the address in the policy for broader deletion.
|
|
369
|
-
|
|
370
|
-
This release changes the installed instruction-data contract. Existing automatic
|
|
371
|
-
updaters stop at that boundary; explicitly reinstall to adopt the new instructions.
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
# Scout data policy
|
|
2
|
-
|
|
3
|
-
Updated 6 November 2026.
|
|
4
|
-
|
|
5
|
-
OpenMerit operates Scout. This policy covers its hosted website and connected clients.
|
|
6
|
-
|
|
7
|
-
**Don't submit confidential or sensitive information.** Automated redaction is not guaranteed to remove it.
|
|
8
|
-
|
|
9
|
-
## Data we use
|
|
10
|
-
|
|
11
|
-
- **Service data:** Your submitted task and related information are processed by an AI service provider, even with analytics off. We also retain account, authorization and device details needed to provide access.
|
|
12
|
-
- **Measured results:** On enabled deployments, reported and imported evaluation aggregates are stored with your Scout account and used only for your recommendations across conversations, as detailed under Evaluation connections below. Send aggregates only, never the inputs, outputs or records they were measured on.
|
|
13
|
-
- **Optional analytics:** When enabled, we collect usage, recommendations, feedback, setup activity, device/browser categories, performance and error information to improve Scout and fix problems. Account analytics may include your name, verified email and sign-in provider, and may link activity before and after sign-in.
|
|
14
|
-
- **Shared content:** When prompt sharing is enabled, analytics also includes task text and analysis. We use this for product improvement, not foundation model training. There is no session recording.
|
|
15
|
-
|
|
16
|
-
Service providers handle hosting, AI processing, sign-in and analytics on our behalf. They have their own retention and security policies; processing is not guaranteed to stay in one region or have zero retention. External coding agents and linked services have separate policies.
|
|
17
|
-
|
|
18
|
-
## Your choices
|
|
19
|
-
|
|
20
|
-
Manage sharing in [Privacy & analytics](/scout/privacy/). Browser usage analytics and prompt sharing default on unless you previously opted out. Saved opt-outs, Do Not Track and Global Privacy Control are respected.
|
|
21
|
-
|
|
22
|
-
You can disable usage analytics, disable prompt sharing, or stop linking this browser's activity to your account. Unlinking does not remove earlier links or stop separate account-profile analytics; task text can still identify you.
|
|
23
|
-
|
|
24
|
-
Setup analytics defaults on. Set `OPENMERIT_TELEMETRY=0` or `DO_NOT_TRACK=1` to disable it. Installed coding-agent connections do not share prompt content for analytics. Terminal and evaluation analytics remain opt-in. Rerun setup to apply changed preferences to existing installations.
|
|
25
|
-
|
|
26
|
-
Turning sharing off stops future optional collection. It does not stop required processing or delete stored data.
|
|
27
|
-
|
|
28
|
-
## Evaluation connections
|
|
29
|
-
|
|
30
|
-
These features require a matching Scout serving deployment; saving Langfuse
|
|
31
|
-
credentials also requires a dedicated server encryption secret. The npm package
|
|
32
|
-
does not deploy or enable the hosted connector. On enabled deployments, reported
|
|
33
|
-
and imported aggregates are held per authenticated user
|
|
34
|
-
in Cloudflare Durable Objects and inform only that user's recommendations across
|
|
35
|
-
conversations. No cross-customer sharing is enabled. Each aggregate records level,
|
|
36
|
-
kind (quality, USD or seconds), task/scope, catalogue model/endpoint ID, metric,
|
|
37
|
-
average/value, sample count, direction, source label and report/import time.
|
|
38
|
-
Do not put record IDs, emails or sensitive information in labels; identifier-like
|
|
39
|
-
source/scope labels trigger warnings, not guaranteed redaction.
|
|
40
|
-
|
|
41
|
-
Connecting Langfuse sends a separate Viewer key pair and mappings from the
|
|
42
|
-
signed-in browser, headless CLI, authenticated API or trusted MCP client to Scout,
|
|
43
|
-
encrypted at rest with a dedicated Worker secret. Headless management uses a
|
|
44
|
-
separately approved connection-management key; existing recommendation keys do
|
|
45
|
-
not gain that permission. The CLI reads Viewer credentials from a protected stdin
|
|
46
|
-
pipe or secret-manager-injected environment, not command arguments, and does not
|
|
47
|
-
save those Viewer credentials locally. MCP accepts them through client-controlled
|
|
48
|
-
HTTP headers, not model-visible tool arguments. Keep client, proxy and shell logs
|
|
49
|
-
from recording credentials. The management key is stored separately on your
|
|
50
|
-
device until revoked/deleted and can delete all evaluation data for your account;
|
|
51
|
-
disconnecting Langfuse does not revoke it. First-time device authorization still
|
|
52
|
-
requires account sign-in and approval. The web connection UI remains optional.
|
|
53
|
-
Scout requests only experiment headers/metadata and aggregate metric averages
|
|
54
|
-
and counts. It does not request inputs, outputs, trace/observation bodies,
|
|
55
|
-
experiment items, raw scores or score comments. Arbitrary metadata is discarded;
|
|
56
|
-
experiment source labels are hashed. A deliberately invalid write-permission
|
|
57
|
-
probe does not send a valid dataset or create traces. Your Langfuse region does
|
|
58
|
-
not constrain Scout's storage or AI-provider region.
|
|
59
|
-
|
|
60
|
-
At most 5,000 aggregates or 1 MB are retained per user. Rows expire 90 days after
|
|
61
|
-
report/import, are excluded from recommendations at expiry and pruned daily;
|
|
62
|
-
cleanup may be delayed by platform scheduling. The evaluation account, including
|
|
63
|
-
its encrypted connection, is erased after 90 days without a report, connection
|
|
64
|
-
or successful sync. Backups and infrastructure logs follow provider policies;
|
|
65
|
-
immediate backup erasure has not been independently verified.
|
|
66
|
-
|
|
67
|
-
On the signed-in [connection page](/connect/?integration=langfuse), disconnecting
|
|
68
|
-
deletes the key and imported aggregates, including imports from an in-flight
|
|
69
|
-
sync. **Delete all evaluation data** also deletes reported aggregates. Past
|
|
70
|
-
conversation text and recommendations remain and may mention prior results;
|
|
71
|
-
request broader deletion through the contact below. Legacy per-conversation
|
|
72
|
-
aggregates migrate when that conversation next receives a turn. Old conversations
|
|
73
|
-
not reopened require the broader deletion request.
|
|
74
|
-
|
|
75
|
-
## Storage and retention
|
|
76
|
-
|
|
77
|
-
- Your browser stores sign-in information, sharing preferences and temporary task drafts.
|
|
78
|
-
- Task data and results may be stored temporarily even with analytics off: short-lived results for 30 seconds and completed-search processing data for seven days. Expiry is not a guarantee of immediate erasure.
|
|
79
|
-
- Newly shared task content has a 30-day analytics retention window. Other analytics and account records may remain longer under provider settings. Backup erasure has not been independently verified.
|
|
80
|
-
- Older task records may fall outside that 30-day policy. A discontinued archive follows a three-month retention period and is not automatically covered by account deletion.
|
|
81
|
-
- We retain access and privacy-preference records as needed to operate the service and honor opt-outs and deletion requests.
|
|
82
|
-
|
|
83
|
-
## Contact and deletion
|
|
84
|
-
|
|
85
|
-
For data access, correction or deletion, contact [lazim@openmerit.ai](mailto:lazim@openmerit.ai). We may verify account ownership. Do not send passwords or sensitive task content.
|
|
86
|
-
|
|
87
|
-
Account deletion requests deletion of linked analytics. Erasure is asynchronous; unlinked activity and historical records may require separate review. Turning off sharing does not delete past data. Your rights depend on applicable law.
|