openmerit 0.3.5 → 0.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.7 — 2026-11-06 (release preparation)
4
+
5
+ - The installed Scout skill distinguishes no eval setup, insufficient evals and suitable existing evals. Langfuse is the default customer-owned platform suggestion, not a requirement; local/custom evals can report aggregates. The customer's coding agent implements evals, while OpenMerit remains Viewer-only. Instructions require a local Markdown decision record before proposing explicitly approved cleanup of newly created comparison runs; existing records and reusable fixtures/definitions stay intact. This adds guidance, not an eval runner, automatic deletion or another platform connector. Fresh-agent acceptance remains a release gate.
6
+
7
+ ## 0.3.6 — 2026-11-06
8
+
9
+ - Distinguish a connected Langfuse key from incomplete score-import setup. Connection status exposes only score-mapping and model-alias counts, and the web UI explains when either is missing. The CLI preserves those counts when the server provides them. Requires the corresponding Scout deployment and npm patch; does not change credentials, mappings or experiment attribution.
10
+ - Update an existing Langfuse connection's non-secret settings through CLI, MCP or API without retrieving or re-entering its Viewer key. Omit both Viewer credentials; Scout reuses and reverifies the encrypted key internally. New connections still require a protected Viewer pair, and partial pairs are rejected. Settings changes invalidate imported aggregates; sync again afterwards. Requires the matching Scout deployment.
11
+
3
12
  ## 0.3.5 — 2026-11-05
4
13
 
5
14
  - Add optional headless Langfuse setup through the CLI, HTTP API and `scout_connection` MCP tool. A separately approved `scout:connections` key manages the authenticated user's connection and evaluation data; recommendation keys retain their existing permission. Viewer credentials enter through protected CLI input or trusted client configuration, never model-visible tool arguments. The web connection UI remains available, with revised spacing, mobile controls and the official Langfuse logo. Hosted features require a matching Scout deployment; saving Langfuse credentials also requires its dedicated encryption secret. Publishing this package does not deploy or enable the hosted connector.
@@ -121,14 +121,27 @@ application accuracy. Use the project's actual SDK and protocol.
121
121
 
122
122
  Each task also has an \`evaluation\`: the checks (per model call, agent run or
123
123
  end-to-end outcome), labelled examples per candidate and when to stop a losing
124
- candidate. Offer to run it before the user commits to a model. Use the evals the
125
- project already has, such as datasets and experiments in its eval or tracing
126
- platform, or its own eval scripts and fixtures: add the shortlisted candidates as
127
- extra runs of those evals. Do not build a second eval or copy their datasets.
128
- If the project has no eval for the task, propose a minimal one built from its
129
- existing traces and the decisions people already make, and create it only where
130
- and how the user agrees. Ask before spending on model calls or writing to an
131
- eval platform.
124
+ candidate. Offer to run it before the user commits to a model. First assess the
125
+ project's readiness for this task:
126
+
127
+ - **No eval setup:** propose a customer-owned setup. Langfuse is the default
128
+ suggestion for its supported aggregate connector, not a requirement: existing
129
+ local/custom eval scripts can report aggregates without a hosted platform.
130
+ Phoenix/Arize and Braintrust are alternatives, not supported Scout connectors.
131
+ Ask which system the user wants before creating accounts or resources.
132
+ - **Setup exists but evidence is insufficient:** keep that system. Write a
133
+ task-specific eval plan in the project's local Markdown decision record for
134
+ the user or their coding agent to implement. Name exact candidates/endpoints,
135
+ quality floor and task/agent/outcome checks, labelled boundary cases and
136
+ controls, sample size, early-stop rule, spend cap, aggregate mappings and
137
+ temporary run retention. Explain what the current evidence cannot decide.
138
+ - **Suitable evals exist:** reuse their fixtures and definitions; add only the
139
+ approved candidate runs. Do not build a second eval or copy their datasets.
140
+
141
+ OpenMerit does not host or run these evals. The customer or their coding agent
142
+ implements and maintains them with the customer's tools; Scout keeps Viewer-only
143
+ access. Ask before model spend or any platform write. Without measured evidence,
144
+ Scout may suggest candidates, but do not claim validated model quality.
132
145
 
133
146
  Report what you measured with \`scout_models\`: the same \`conversationId\` and
134
147
  \`results\`, one aggregate per model and metric (\`level\`, \`task\` title, \`scope\`,
@@ -146,6 +159,25 @@ fixed. Use each agent's own checks to attribute failures. If all candidates scor
146
159
  100%, the eval cannot separate their quality: add harder labelled cases before
147
160
  claiming equivalent quality. Cost may break the observed tie, not prove equality.
148
161
 
162
+ ## Preserve evidence before cleanup
163
+
164
+ Before removing temporary comparison runs, save a local Markdown decision record
165
+ with the package/service versions, date, task and policy, exact candidates,
166
+ unchanged controls, metric definitions/directions, sample counts, aggregate
167
+ quality/cost/time, failures and exclusions, chosen model, limitations and next
168
+ review. Record regret against the cheapest measured candidate meeting the same
169
+ quality floor; write "not measurable" when comparable evidence is missing.
170
+ Exclude secrets, private record IDs, prompts, outputs and trace bodies.
171
+
172
+ Temporary comparison traces/records are not permanent: after the record is saved
173
+ and checked, propose the exact newly created comparison runs to remove. Obtain
174
+ explicit scoped approval, including any cascading deletion, before the customer
175
+ or their coding agent deletes them with customer-controlled write access. Scout's
176
+ Viewer key cannot do this. Never delete pre-existing customer records, reusable
177
+ fixtures, dataset definitions or eval definitions. Verify the approved cleanup
178
+ and retained controls, then record the outcome locally. If not approved, leave
179
+ records unchanged and state cleanup is pending; do not imply it happened.
180
+
149
181
  If the user has Langfuse, use \`openmerit connect langfuse --help\`: the web UI is
150
182
  optional. Headless setup requires a separate connection-manager approval with
151
183
  \`openmerit connect langfuse --authorize --no-open\`. Relay its approval link and
@@ -1 +1 @@
1
- {"format":1,"contract":"scout-recommend-v2","version":"0.3.5","skill":"---\nname: openmerit-scout\ndescription: Consults OpenMerit Scout before choosing, adding, downloading, replacing or configuring any application inference model, including implicit choices while building features, pretrained browser/local models, SDK defaults, embeddings, OCR, speech, classification, detection, segmentation, LLMs and agents. Not for unrelated edits, ordinary inference calls or this coding agent's own model.\n---\n\n# OpenMerit · Scout\n\nBefore introducing, recommending, replacing or configuring an application\ninference model, call the `scout_models` tool on the `openmerit` MCP server.\nThis applies even when the user never mentions models or Scout. Downloading local\nweights, using a pretrained browser model or accepting an SDK default is a model\ndecision: consult Scout before model-specific code, installs or downloads.\nPreserve the user's explicit model choice; assess it rather than silently replacing\nit. Leave unchanged, approved application selections in place.\n\n## Project policy\n\nRead `.openmerit/scout.json` before searching. If it is absent, ask once whether this\nproject uses **existing-only** (only endpoints it can already reach) or\n**existing-first** (prefer them, ask before searching the whole catalogue), and\nwhich public catalogue endpoint IDs it can access. Save the answer:\n\n```sh\nnpx -y openmerit@latest project --policy existing-only --endpoint-id <id> ...\n```\n\nNever infer access from a model name, SDK or environment-variable name. Never\nrecord credentials, private URLs, prompts or customer data. An empty inventory\nis not permission to search all models.\n\n## Searching\n\nCall `scout_models` with a non-confidential task description as `prompt` and\n`endpointIds` set to the saved inventory, including `[]` when empty. Send\nonly task requirements, never source files, secrets or real customer records.\nIf the MCP tool is unavailable, run\n`npx -y openmerit@latest scout \"<task>\" --json`; it applies the saved inventory.\n\nScout is a conversation with the agent behind openmerit.ai/scout. When\n`status` is `needs_answers`, fill in what the user or project already states,\nshow the user Scout's brief and remaining questions, and wait for their answers.\nThen call again with the returned `conversationId` and `brief` set to the\nrewritten components, or `skip: true` if the user wants Scout to assume. Never\nanswer Scout's questions with guesses. Send later refinements to the same\n`conversationId`. A call with only a `conversationId` reads an interrupted turn.\n\nWhen `status` is `recommended`, Scout has split the work into `tasks`, one\nper model, each with up to five ranked `models`; cover every task. Each\nmodel's `cost` names the `endpointId` and `providerModelId` to call.\nExisting-only never broadens. For existing-first, if no existing candidate fits a\ntask, explain the gap and ask before a new conversation without `endpointIds`.\nCompare quality evidence, reference cost/time and watch-outs. Prefer the cheapest\nusable option the evidence supports, without claiming benchmarks prove\napplication accuracy. Use the project's actual SDK and protocol.\n\n## Measuring candidates\n\nEach task also has an `evaluation`: the checks (per model call, agent run or\nend-to-end outcome), labelled examples per candidate and when to stop a losing\ncandidate. Offer to run it before the user commits to a model. Use the evals the\nproject already has, such as datasets and experiments in its eval or tracing\nplatform, or its own eval scripts and fixtures: add the shortlisted candidates as\nextra runs of those evals. Do not build a second eval or copy their datasets.\nIf the project has no eval for the task, propose a minimal one built from its\nexisting traces and the decisions people already make, and create it only where\nand how the user agrees. Ask before spending on model calls or writing to an\neval platform.\n\nReport what you measured with `scout_models`: the same `conversationId` and\n`results`, one aggregate per model and metric (`level`, `task` title, `scope`,\n`model` endpoint or model ID, `metric`, `value`, `higherIsBetter`,\n`samples`, `source`). Set `kind` to `usd` or `seconds` for measured cost\nor time (per call at the task level, per run at the agent level), so Scout uses\nyour cost instead of its estimate. Report each agent's own checks at the agent\nlevel: an end-to-end result also measures the agents you did not swap. Send\naggregates only, never inputs, outputs or records.\nScout ranks them above public benchmarks for this user only; models whose\n`quality.measured` is true rest on them.\n\nSwap one agent at a time, holding the other agents, prompts, fixtures and controls\nfixed. Use each agent's own checks to attribute failures. If all candidates score\n100%, the eval cannot separate their quality: add harder labelled cases before\nclaiming equivalent quality. Cost may break the observed tie, not prove equality.\n\nIf the user has Langfuse, use `openmerit connect langfuse --help`: the web UI is\noptional. Headless setup requires a separate connection-manager approval with\n`openmerit connect langfuse --authorize --no-open`. Relay its approval link and\nexpiry; after approval, rerun that command. Existing recommendation keys cannot\nmanage connections. The user creates a separate Viewer key; receive it through\nprotected stdin or a secret-manager-injected environment, never chat, tool\narguments, shell literals, traced commands or tracked files. The CLI accepts\nnon-secret settings via `--config mappings.json` and reads LANGFUSE_PUBLIC_KEY\nand LANGFUSE_SECRET_KEY from its environment, or reads full settings via --stdin.\nA separate trusted MCP connection with the management key exposes\n`scout_connection` (status/configure/sync/disconnect/clear). For configure, keys\nmust come from client-controlled HTTP headers outside model context; if the\nclient cannot do this securely, use protected CLI input or the web UI instead.\nAfter they confirm connection and score/model mappings, call `scout_models` with\n`sync: \"langfuse\"` to refresh aggregate measurements before recommending. The CLI\nequivalent is `openmerit scout --conversation <id> --sync langfuse`. Never read\ntrace bodies to work around missing mappings or untagged runs; use the aggregate\nreport path instead. Results are stored per user, used in new conversations and\nexpire after 90 days. Disconnect deletes the Viewer key and imported aggregates;\nDelete all evaluation data also deletes manually reported aggregates. Obtain\nconsent before deleting: headless CLI requires --yes, MCP requires confirm: true.\nDeleting the connection does not revoke the separate management device key.\nPast conversation text is not erased. Never put record IDs, emails or secrets in\n`scope` or `source`; use labels such as \"coding agent\" and \"held-out eval\".\n\n## Boundaries\n\nAsk before adding providers or credentials, spending, deploying or external\nwrites. Report recommendation, endpoint connectivity and application checks as\nseparate results, each only after it succeeds. Do not switch this coding agent's\nown model.\n\nIf Scout fails or has no suitable candidate/evidence for the required deployment,\nsay so and pause the model decision; do not substitute a remembered recommendation\nor SDK default. Continue only model-independent work. Local/browser models are not\nexempt when the catalogue lacks coverage. When an install or login waits for approval (exit code\n10), show the user the approval link and its UTC expiry in your reply, not only in\ncommand output, then rerun the same command once they approve. If it reports that the device key is missing,\nexpired or revoked, run `npx -y openmerit@latest login` and then\n`npx -y openmerit@latest install` again. Never ask the user to paste a key.\n","rule":"# Application model decisions · OpenMerit Scout\n\nBefore choosing, recommending, adding, downloading, replacing or configuring\nANY application inference model, load the `openmerit-scout` skill and consult\n`scout_models` on the `openmerit` MCP server before committing to a model.\nThis applies even when the user only asks you to build a feature, never mentions\nmodels or Scout, or names a model themselves (assess it; do not silently replace it).\n\nA pretrained model, local weights, browser inference, an SDK's default model,\nembeddings, OCR, speech, image classification, detection and segmentation all\ncount as model choices, not implementation details. Identify this decision before\nwriting model-specific code, installing a model package or downloading weights.\n\nFollow the skill's project access policy. If it is missing, ask and save it first.\nScout may answer with clarifying questions: relay them to the user and continue\nthe same Scout conversation with their answers before choosing.\nIf Scout is unavailable, fails or has no suitable evidence/candidate, disclose the\ngap and pause the model decision; do not fall back to a remembered or SDK-default\nmodel. You may continue work that does not commit to a model.\n\nDo not consult Scout for unrelated edits, normal inference calls using an unchanged\napproved model, or this coding agent's own model. Do not reselect approved models\nunless the task introduces or changes a model decision.\n\nWhen the user says \"update openmerit\", run\n`npx -y openmerit@latest update --scope user` (use `--scope project` if this\nrule is in the project's .claude/rules directory). Report the result, including\nany conflict or manual-upgrade requirement. Do not delete edited files, bypass\npermissions or rerun login automatically. A new session loads updated instructions.\n"}
1
+ {"format":1,"contract":"scout-recommend-v2","version":"0.3.7","skill":"---\nname: openmerit-scout\ndescription: Consults OpenMerit Scout before choosing, adding, downloading, replacing or configuring any application inference model, including implicit choices while building features, pretrained browser/local models, SDK defaults, embeddings, OCR, speech, classification, detection, segmentation, LLMs and agents. Not for unrelated edits, ordinary inference calls or this coding agent's own model.\n---\n\n# OpenMerit · Scout\n\nBefore introducing, recommending, replacing or configuring an application\ninference model, call the `scout_models` tool on the `openmerit` MCP server.\nThis applies even when the user never mentions models or Scout. Downloading local\nweights, using a pretrained browser model or accepting an SDK default is a model\ndecision: consult Scout before model-specific code, installs or downloads.\nPreserve the user's explicit model choice; assess it rather than silently replacing\nit. Leave unchanged, approved application selections in place.\n\n## Project policy\n\nRead `.openmerit/scout.json` before searching. If it is absent, ask once whether this\nproject uses **existing-only** (only endpoints it can already reach) or\n**existing-first** (prefer them, ask before searching the whole catalogue), and\nwhich public catalogue endpoint IDs it can access. Save the answer:\n\n```sh\nnpx -y openmerit@latest project --policy existing-only --endpoint-id <id> ...\n```\n\nNever infer access from a model name, SDK or environment-variable name. Never\nrecord credentials, private URLs, prompts or customer data. An empty inventory\nis not permission to search all models.\n\n## Searching\n\nCall `scout_models` with a non-confidential task description as `prompt` and\n`endpointIds` set to the saved inventory, including `[]` when empty. Send\nonly task requirements, never source files, secrets or real customer records.\nIf the MCP tool is unavailable, run\n`npx -y openmerit@latest scout \"<task>\" --json`; it applies the saved inventory.\n\nScout is a conversation with the agent behind openmerit.ai/scout. When\n`status` is `needs_answers`, fill in what the user or project already states,\nshow the user Scout's brief and remaining questions, and wait for their answers.\nThen call again with the returned `conversationId` and `brief` set to the\nrewritten components, or `skip: true` if the user wants Scout to assume. Never\nanswer Scout's questions with guesses. Send later refinements to the same\n`conversationId`. A call with only a `conversationId` reads an interrupted turn.\n\nWhen `status` is `recommended`, Scout has split the work into `tasks`, one\nper model, each with up to five ranked `models`; cover every task. Each\nmodel's `cost` names the `endpointId` and `providerModelId` to call.\nExisting-only never broadens. For existing-first, if no existing candidate fits a\ntask, explain the gap and ask before a new conversation without `endpointIds`.\nCompare quality evidence, reference cost/time and watch-outs. Prefer the cheapest\nusable option the evidence supports, without claiming benchmarks prove\napplication accuracy. Use the project's actual SDK and protocol.\n\n## Measuring candidates\n\nEach task also has an `evaluation`: the checks (per model call, agent run or\nend-to-end outcome), labelled examples per candidate and when to stop a losing\ncandidate. Offer to run it before the user commits to a model. First assess the\nproject's readiness for this task:\n\n- **No eval setup:** propose a customer-owned setup. Langfuse is the default\n suggestion for its supported aggregate connector, not a requirement: existing\n local/custom eval scripts can report aggregates without a hosted platform.\n Phoenix/Arize and Braintrust are alternatives, not supported Scout connectors.\n Ask which system the user wants before creating accounts or resources.\n- **Setup exists but evidence is insufficient:** keep that system. Write a\n task-specific eval plan in the project's local Markdown decision record for\n the user or their coding agent to implement. Name exact candidates/endpoints,\n quality floor and task/agent/outcome checks, labelled boundary cases and\n controls, sample size, early-stop rule, spend cap, aggregate mappings and\n temporary run retention. Explain what the current evidence cannot decide.\n- **Suitable evals exist:** reuse their fixtures and definitions; add only the\n approved candidate runs. Do not build a second eval or copy their datasets.\n\nOpenMerit does not host or run these evals. The customer or their coding agent\nimplements and maintains them with the customer's tools; Scout keeps Viewer-only\naccess. Ask before model spend or any platform write. Without measured evidence,\nScout may suggest candidates, but do not claim validated model quality.\n\nReport what you measured with `scout_models`: the same `conversationId` and\n`results`, one aggregate per model and metric (`level`, `task` title, `scope`,\n`model` endpoint or model ID, `metric`, `value`, `higherIsBetter`,\n`samples`, `source`). Set `kind` to `usd` or `seconds` for measured cost\nor time (per call at the task level, per run at the agent level), so Scout uses\nyour cost instead of its estimate. Report each agent's own checks at the agent\nlevel: an end-to-end result also measures the agents you did not swap. Send\naggregates only, never inputs, outputs or records.\nScout ranks them above public benchmarks for this user only; models whose\n`quality.measured` is true rest on them.\n\nSwap one agent at a time, holding the other agents, prompts, fixtures and controls\nfixed. Use each agent's own checks to attribute failures. If all candidates score\n100%, the eval cannot separate their quality: add harder labelled cases before\nclaiming equivalent quality. Cost may break the observed tie, not prove equality.\n\n## Preserve evidence before cleanup\n\nBefore removing temporary comparison runs, save a local Markdown decision record\nwith the package/service versions, date, task and policy, exact candidates,\nunchanged controls, metric definitions/directions, sample counts, aggregate\nquality/cost/time, failures and exclusions, chosen model, limitations and next\nreview. Record regret against the cheapest measured candidate meeting the same\nquality floor; write \"not measurable\" when comparable evidence is missing.\nExclude secrets, private record IDs, prompts, outputs and trace bodies.\n\nTemporary comparison traces/records are not permanent: after the record is saved\nand checked, propose the exact newly created comparison runs to remove. Obtain\nexplicit scoped approval, including any cascading deletion, before the customer\nor their coding agent deletes them with customer-controlled write access. Scout's\nViewer key cannot do this. Never delete pre-existing customer records, reusable\nfixtures, dataset definitions or eval definitions. Verify the approved cleanup\nand retained controls, then record the outcome locally. If not approved, leave\nrecords unchanged and state cleanup is pending; do not imply it happened.\n\nIf the user has Langfuse, use `openmerit connect langfuse --help`: the web UI is\noptional. Headless setup requires a separate connection-manager approval with\n`openmerit connect langfuse --authorize --no-open`. Relay its approval link and\nexpiry; after approval, rerun that command. Existing recommendation keys cannot\nmanage connections. The user creates a separate Viewer key; receive it through\nprotected stdin or a secret-manager-injected environment, never chat, tool\narguments, shell literals, traced commands or tracked files. The CLI accepts\nnon-secret settings via `--config mappings.json` and reads LANGFUSE_PUBLIC_KEY\nand LANGFUSE_SECRET_KEY from its environment, or reads full settings via --stdin.\nA separate trusted MCP connection with the management key exposes\n`scout_connection` (status/configure/sync/disconnect/clear). For configure, keys\nmust come from client-controlled HTTP headers outside model context; if the\nclient cannot do this securely, use protected CLI input or the web UI instead.\nAfter they confirm connection and score/model mappings, call `scout_models` with\n`sync: \"langfuse\"` to refresh aggregate measurements before recommending. The CLI\nequivalent is `openmerit scout --conversation <id> --sync langfuse`. Never read\ntrace bodies to work around missing mappings or untagged runs; use the aggregate\nreport path instead. Results are stored per user, used in new conversations and\nexpire after 90 days. Disconnect deletes the Viewer key and imported aggregates;\nDelete all evaluation data also deletes manually reported aggregates. Obtain\nconsent before deleting: headless CLI requires --yes, MCP requires confirm: true.\nDeleting the connection does not revoke the separate management device key.\nPast conversation text is not erased. Never put record IDs, emails or secrets in\n`scope` or `source`; use labels such as \"coding agent\" and \"held-out eval\".\n\n## Boundaries\n\nAsk before adding providers or credentials, spending, deploying or external\nwrites. Report recommendation, endpoint connectivity and application checks as\nseparate results, each only after it succeeds. Do not switch this coding agent's\nown model.\n\nIf Scout fails or has no suitable candidate/evidence for the required deployment,\nsay so and pause the model decision; do not substitute a remembered recommendation\nor SDK default. Continue only model-independent work. Local/browser models are not\nexempt when the catalogue lacks coverage. When an install or login waits for approval (exit code\n10), show the user the approval link and its UTC expiry in your reply, not only in\ncommand output, then rerun the same command once they approve. If it reports that the device key is missing,\nexpired or revoked, run `npx -y openmerit@latest login` and then\n`npx -y openmerit@latest install` again. Never ask the user to paste a key.\n","rule":"# Application model decisions · OpenMerit Scout\n\nBefore choosing, recommending, adding, downloading, replacing or configuring\nANY application inference model, load the `openmerit-scout` skill and consult\n`scout_models` on the `openmerit` MCP server before committing to a model.\nThis applies even when the user only asks you to build a feature, never mentions\nmodels or Scout, or names a model themselves (assess it; do not silently replace it).\n\nA pretrained model, local weights, browser inference, an SDK's default model,\nembeddings, OCR, speech, image classification, detection and segmentation all\ncount as model choices, not implementation details. Identify this decision before\nwriting model-specific code, installing a model package or downloading weights.\n\nFollow the skill's project access policy. If it is missing, ask and save it first.\nScout may answer with clarifying questions: relay them to the user and continue\nthe same Scout conversation with their answers before choosing.\nIf Scout is unavailable, fails or has no suitable evidence/candidate, disclose the\ngap and pause the model decision; do not fall back to a remembered or SDK-default\nmodel. You may continue work that does not commit to a model.\n\nDo not consult Scout for unrelated edits, normal inference calls using an unchanged\napproved model, or this coding agent's own model. Do not reselect approved models\nunless the task introduces or changes a model decision.\n\nWhen the user says \"update openmerit\", run\n`npx -y openmerit@latest update --scope user` (use `--scope project` if this\nrule is in the project's .claude/rules directory). Report the result, including\nany conflict or manual-upgrade requirement. Do not delete edited files, bypass\npermissions or rerun login automatically. A new session loads updated instructions.\n"}
@@ -19,7 +19,8 @@ Rerun --authorize if pending (exit 10). This never replaces recommendation keys.
19
19
  The management key is saved separately with owner-only file permissions.
20
20
 
21
21
  --config reads non-secret region, from (YYYY-MM-DD), tagPrefix, mappings and models.
22
- Supply LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY through a secret manager.
22
+ For a new connection, supply LANGFUSE_PUBLIC_KEY and LANGFUSE_SECRET_KEY through
23
+ a secret manager. Omit both to update settings using the saved Viewer key.
23
24
  --stdin reads the full JSON settings including the Viewer key pair from a protected
24
25
  pipe (maximum 18 KB), never echoes them, and does not save them locally.
25
26
  Never put keys in arguments, chat, shell history or a tracked file. Use a separate
@@ -67,6 +68,11 @@ async function settings(file, stdin, root) {
67
68
  throw new Error('Use non-secret settings in --config; credentials must come from a secret manager or --stdin.');
68
69
  if (!stdin)
69
70
  config = { ...config, publicKey: process.env.LANGFUSE_PUBLIC_KEY, secretKey: process.env.LANGFUSE_SECRET_KEY };
71
+ if (object(config) && !stdin && config.publicKey === undefined && config.secretKey === undefined) {
72
+ delete config.publicKey;
73
+ delete config.secretKey;
74
+ return config;
75
+ }
70
76
  if (!object(config) || typeof config.publicKey !== 'string' || typeof config.secretKey !== 'string' || !config.publicKey || !config.secretKey)
71
77
  throw new Error('Supply a separate Viewer key pair through a secret manager or --stdin.');
72
78
  return config;
@@ -139,7 +145,7 @@ export async function connection(args, { root = process.cwd(), print = console.l
139
145
  const value = await response.json();
140
146
  if (!object(value))
141
147
  throw new Error('OpenMerit returned an invalid connection response.');
142
- const state = Object.fromEntries(Object.entries(value).filter(([name]) => ['connected', 'connectedAt', 'syncedAt', 'experiments', 'unmapped', 'results', 'busy', 'cached', 'deleted'].includes(name)));
148
+ const state = Object.fromEntries(Object.entries(value).filter(([name]) => ['connected', 'connectedAt', 'syncedAt', 'mappingCount', 'modelAliasCount', 'experiments', 'unmapped', 'results', 'busy', 'cached', 'deleted'].includes(name)));
143
149
  print(JSON.stringify(state, null, 2));
144
150
  return 0;
145
151
  }
@@ -87,14 +87,27 @@ application accuracy. Use the project's actual SDK and protocol.
87
87
 
88
88
  Each task also has an \`evaluation\`: the checks (per model call, agent run or
89
89
  end-to-end outcome), labelled examples per candidate and when to stop a losing
90
- candidate. Offer to run it before the user commits to a model. Use the evals the
91
- project already has, such as datasets and experiments in its eval or tracing
92
- platform, or its own eval scripts and fixtures: add the shortlisted candidates as
93
- extra runs of those evals. Do not build a second eval or copy their datasets.
94
- If the project has no eval for the task, propose a minimal one built from its
95
- existing traces and the decisions people already make, and create it only where
96
- and how the user agrees. Ask before spending on model calls or writing to an
97
- eval platform.
90
+ candidate. Offer to run it before the user commits to a model. First assess the
91
+ project's readiness for this task:
92
+
93
+ - **No eval setup:** propose a customer-owned setup. Langfuse is the default
94
+ suggestion for its supported aggregate connector, not a requirement: existing
95
+ local/custom eval scripts can report aggregates without a hosted platform.
96
+ Phoenix/Arize and Braintrust are alternatives, not supported Scout connectors.
97
+ Ask which system the user wants before creating accounts or resources.
98
+ - **Setup exists but evidence is insufficient:** keep that system. Write a
99
+ task-specific eval plan in the project's local Markdown decision record for
100
+ the user or their coding agent to implement. Name exact candidates/endpoints,
101
+ quality floor and task/agent/outcome checks, labelled boundary cases and
102
+ controls, sample size, early-stop rule, spend cap, aggregate mappings and
103
+ temporary run retention. Explain what the current evidence cannot decide.
104
+ - **Suitable evals exist:** reuse their fixtures and definitions; add only the
105
+ approved candidate runs. Do not build a second eval or copy their datasets.
106
+
107
+ OpenMerit does not host or run these evals. The customer or their coding agent
108
+ implements and maintains them with the customer's tools; Scout keeps Viewer-only
109
+ access. Ask before model spend or any platform write. Without measured evidence,
110
+ Scout may suggest candidates, but do not claim validated model quality.
98
111
 
99
112
  Report what you measured with \`scout_models\`: the same \`conversationId\` and
100
113
  \`results\`, one aggregate per model and metric (\`level\`, \`task\` title, \`scope\`,
@@ -112,6 +125,25 @@ fixed. Use each agent's own checks to attribute failures. If all candidates scor
112
125
  100%, the eval cannot separate their quality: add harder labelled cases before
113
126
  claiming equivalent quality. Cost may break the observed tie, not prove equality.
114
127
 
128
+ ## Preserve evidence before cleanup
129
+
130
+ Before removing temporary comparison runs, save a local Markdown decision record
131
+ with the package/service versions, date, task and policy, exact candidates,
132
+ unchanged controls, metric definitions/directions, sample counts, aggregate
133
+ quality/cost/time, failures and exclusions, chosen model, limitations and next
134
+ review. Record regret against the cheapest measured candidate meeting the same
135
+ quality floor; write "not measurable" when comparable evidence is missing.
136
+ Exclude secrets, private record IDs, prompts, outputs and trace bodies.
137
+
138
+ Temporary comparison traces/records are not permanent: after the record is saved
139
+ and checked, propose the exact newly created comparison runs to remove. Obtain
140
+ explicit scoped approval, including any cascading deletion, before the customer
141
+ or their coding agent deletes them with customer-controlled write access. Scout's
142
+ Viewer key cannot do this. Never delete pre-existing customer records, reusable
143
+ fixtures, dataset definitions or eval definitions. Verify the approved cleanup
144
+ and retained controls, then record the outcome locally. If not approved, leave
145
+ records unchanged and state cleanup is pending; do not imply it happened.
146
+
115
147
  If the user has Langfuse, use \`openmerit connect langfuse --help\`: the web UI is
116
148
  optional. Headless setup requires a separate connection-manager approval with
117
149
  \`openmerit connect langfuse --authorize --no-open\`. Relay its approval link and
@@ -28,6 +28,32 @@ Each recommended model names an exact endpoint and provider model ID.
28
28
 
29
29
  ## Measure with your own evals
30
30
 
31
+ **Eval-readiness and evidence guidance — npm 0.3.7 release preparation:** 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. Registry publication is separate from these source changes. This is
36
+ guidance for the customer's coding agent, not an automated eval runner, platform
37
+ provisioner or deletion service.
38
+
39
+ ### Choose the readiness path
40
+
41
+ - **No eval setup.** Scout can still suggest candidates from public evidence;
42
+ that is not measured application quality. Propose a minimal customer-owned
43
+ eval setup and obtain approval before creating it. Langfuse is the default
44
+ suggestion because Scout has its aggregate connector. A hosted platform is
45
+ optional: customer-owned scripts and fixtures can report aggregates directly.
46
+ Phoenix/Arize and Braintrust are alternatives, not supported Scout connectors.
47
+ - **A setup exists, but the evals are missing or too weak for model selection.**
48
+ Keep the existing system. Have the user or their coding agent write a local
49
+ task-specific Markdown eval plan with exact candidates/endpoints, quality floor,
50
+ task/agent/outcome checks, labelled boundary cases and controls, sample size,
51
+ early stopping, spend cap, aggregate mappings and temporary-run retention.
52
+ Review it before implementing it with the customer's tools. OpenMerit's access
53
+ remains Viewer-only; it does not install or maintain those evals.
54
+ - **Suitable evals already exist.** Reuse their fixtures and definitions. Add
55
+ approved candidate runs rather than creating another dataset or platform.
56
+
31
57
  Add the shortlist as runs of your existing evals, not a second platform. Obtain
32
58
  approval before model spend or platform writes. For agents, change **one agent at
33
59
  a time** while holding the other models, prompts, tools, fixtures and controls
@@ -38,6 +64,34 @@ If every candidate scores 100%, the eval does not distinguish their quality.
38
64
  Add harder labelled boundary cases, rare failures and adversarial examples;
39
65
  cheaper on this test is not proof of equal quality in production.
40
66
 
67
+ ### Preserve evidence, then request cleanup
68
+
69
+ Save a local Markdown decision record before removing temporary comparison data.
70
+ Include the date, package and service versions, task and policy, exact candidates,
71
+ unchanged controls, metric definitions and direction, sample counts, aggregate
72
+ quality/cost/time, failures and exclusions, decision, limitations and next review.
73
+ Exclude keys, private record identifiers, prompts, outputs and trace bodies.
74
+
75
+ State cost regret in a consistent unit (for example USD per agent run): the
76
+ chosen model's measured cost minus the cheapest measured candidate meeting the
77
+ same quality floor on comparable evals. If there is no measured comparison,
78
+ write **not measurable**, not zero. One success or all candidates scoring 100%
79
+ on a tiny eval is not proof of equal production quality.
80
+
81
+ Comparison records are temporary, but deletion is **not automatic**. After
82
+ checking the saved evidence, propose the exact newly created comparison runs and
83
+ any cascading deletions, then obtain explicit scoped approval. The customer or
84
+ their coding agent performs cleanup using customer-controlled write access;
85
+ Scout's Viewer key cannot delete Langfuse data. Never delete pre-existing customer
86
+ records, reusable fixtures, dataset definitions or eval definitions. Verify that
87
+ only the approved records disappeared and retained controls still exist. Record
88
+ cleanup as pending when permission or verification is missing.
89
+
90
+ Deleting platform runs, disconnecting Scout and deleting Scout's stored aggregates
91
+ are separate operations. Disconnect does not erase past conversations or customer
92
+ platform records. Keep enough permitted aggregate evidence locally to explain a
93
+ later decision, without promising Scout can refresh a deleted source experiment.
94
+
41
95
  ## Report aggregates
42
96
 
43
97
  Report up to 50 aggregates per call, one per model, metric and scope. Use public
@@ -77,8 +131,10 @@ not promise that Scout stores or processes your data in that region.
77
131
 
78
132
  You can connect the key first with empty mappings. To import results, expand
79
133
  **Score and model mappings** and supply a start date, experiment-tag prefix,
80
- score mappings and model aliases. To change saved settings, disconnect and
81
- reconnect; this deletes the old imports, not reported results.
134
+ score mappings and model aliases. In npm 0.3.6 with the matching Scout deployment,
135
+ the headless paths below can update settings without re-entering the saved Viewer
136
+ key. Changing settings invalidates old imports; sync again afterwards. Reported
137
+ results remain. Older deployments require disconnecting and reconnecting.
82
138
 
83
139
  ### Headless CLI setup
84
140
 
@@ -124,6 +180,14 @@ openmerit connect langfuse --status
124
180
  openmerit connect langfuse --sync
125
181
  ```
126
182
 
183
+ **Updating an existing connection (npm 0.3.6 and matching deployment):** edit the
184
+ non-secret settings file and run the same `--config` command with both
185
+ `LANGFUSE_PUBLIC_KEY` and `LANGFUSE_SECRET_KEY` absent. Scout reuses and reverifies
186
+ the encrypted Viewer key internally; neither CLI nor model receives it. One key
187
+ without the other is rejected. Without a connected key, first connect through a
188
+ protected credential path. Settings changes remove prior imports, not reported
189
+ results, and require a new sync.
190
+
127
191
  Alternatively, `openmerit connect langfuse --stdin` reads a full JSON object with
128
192
  the same settings plus `publicKey` and `secretKey` from a protected pipe, up to
129
193
  18 KB. It does not echo or save the Viewer credentials locally. Do not use inline
@@ -155,6 +219,12 @@ records these headers. If your MCP client cannot securely inject headers outside
155
219
  model context, have the agent invoke the CLI with protected input instead, or
156
220
  use the web UI; do not fall back to putting credentials in tool arguments.
157
221
 
222
+ On the matching 0.3.6 deployment, omit both Viewer headers to update an existing
223
+ connection using its saved encrypted key. A new connection still needs both.
224
+ The authenticated HTTP POST similarly accepts non-secret settings without either
225
+ key field for an existing connection. The saved key is never exported. Settings
226
+ changes reverify Viewer access and invalidate imported results before a new sync.
227
+
158
228
  ```json
159
229
  {"action": "configure", "config": {"region": "us", "from": "2026-11-01", "tagPrefix": "experiment:", "mappings": [], "models": {}}}
160
230
  ```
@@ -219,8 +289,16 @@ read per sync. Narrow the date if a response or import exceeds its limit. Only
219
289
  experiment headers/metadata and aggregate Metrics v2 reads are requested. A
220
290
  deliberately invalid dataset-create request checks read-only permission without
221
291
  ever sending a valid write payload. Only an authenticated read followed by HTTP
222
- 403 on that probe is accepted; other responses fail closed. Actual Viewer-key
223
- acceptance remains pending the release check.
292
+ 403 on that probe is accepted; other responses fail closed. Live Viewer-key
293
+ connection acceptance, one fresh mapped aggregate import and measured reranking
294
+ were verified on 6 November 2026 with npm 0.3.6 and the matching deployments.
295
+ This one-sample plumbing check is not comparative quality acceptance. Two new
296
+ conversations received the aggregate but returned prose before the 6 November
297
+ structured-completion deploy. After it, three fresh published-CLI conversations
298
+ returned five structured tasks each, reused the measured coding result without
299
+ resending it and retained the one-sample caveat. This focused check does not
300
+ establish fresh-coding-agent usability; full fresh-agent and two-release
301
+ acceptance remain open.
224
302
 
225
303
  Click **Sync aggregates**, or request a fresh recommendation with:
226
304
 
@@ -233,6 +311,26 @@ failed read cannot be retried for one minute. A failed import leaves the previou
233
311
  complete set intact. `conversationId` alone reads a saved answer, not a rerank;
234
312
  send a follow-up or `sync` to recompute with the current results.
235
313
 
314
+ ### When a sync imports zero aggregates
315
+
316
+ A connected Viewer key and a successful experiment read do not establish that
317
+ score import is configured. Empty mappings are allowed when first connecting.
318
+ Before repeating sync, check the score mappings and model aliases, then check
319
+ that scored traces carry the exact experiment tag, trace name and metric name
320
+ in those mappings. Merely linking a trace through Langfuse's native experiment
321
+ attributes does not add the explicit experiment tag required by this connector.
322
+ Do not remove the tag filter to make an import nonempty: that can combine scores
323
+ from different models or runs. Untagged historical results need attributable
324
+ aggregate reporting or a separately approved, verified tagging backfill.
325
+
326
+ **Diagnostic version requirement:** a matching Scout serving deployment adds
327
+ `mappingCount` and `modelAliasCount` to connection status, without returning the
328
+ saved keys or mapping values. The web page distinguishes a connected key from
329
+ incomplete setup and warns when a sync imports no matching scores. npm 0.3.5
330
+ does not display these new counts; use authenticated API/MCP status until a
331
+ matching CLI patch is published. These counts diagnose missing configuration,
332
+ not whether matching scores exist or whether a model improves quality.
333
+
236
334
  ## Choose and delete
237
335
 
238
336
  Check measured quality, the quality floor, price calibration and limitations
package/docs/scout.md CHANGED
@@ -20,6 +20,32 @@ Scout is a separate hosted beta product. Npm 0.1.7 introduced optional Claude Co
20
20
 
21
21
  ## Evaluation plans and measured results — deployed 5 November 2026, npm 0.3.1
22
22
 
23
+ **Rank-aligned summaries — deployed 6 November 2026:** after filtering and ranking,
24
+ Scout builds each nonempty task summary from the first model's name, rationale
25
+ and caveat. A summary written before sorting could previously name a different
26
+ leader, particularly after measured evidence or measured cost changed the order.
27
+ Ranking and quality scores are unchanged. One measured success still does not
28
+ establish superiority over untested candidates. Scout serving version
29
+ `86d43d6c-e60f-4989-be50-9461d48f37cf` passed a live published-CLI check: all five
30
+ task summaries matched their final first model, including measured coding review.
31
+ Past saved answers do not change until the conversation is recomputed. Fresh
32
+ conversations returned prose rather than validated shortlists in two acceptance
33
+ runs before the structured-completion deployment below. A prose fallback is not
34
+ a successful structured recommendation.
35
+
36
+ **Structured completion recovery — deployed 6 November 2026:** when the model ends a
37
+ turn with prose before an answer tool accepts a clarification or all planned
38
+ shortlists, Scout continues the same durable run at most twice. Recovery keeps
39
+ accepted task shortlists and names the remaining tasks; it does not bypass
40
+ catalogue, evidence, scope or quality validation. The attempt budget survives
41
+ object eviction and resets only for a new user turn. An already accepted answer
42
+ adds no model call. If recovery is exhausted, the existing prose/error fallback
43
+ remains explicitly unstructured; provider failures do not start completion
44
+ recovery. PR #83 passed all PR/main CI checks and deployed Scout serving version
45
+ `fe34446b-528c-4b90-b0a0-60946caa0d78` at 09:38 UTC. Landing, Scout, connection,
46
+ status and version endpoints returned HTTP 200. Fresh-conversation acceptance is
47
+ separate from deployment health and is required before this release gate closes.
48
+
23
49
  The Scout serving deploy of 5 November 2026 (version `ea371c78-6ccf-4931-a0b8-aa28a6599aaa`) serves this behavior to every client. A live MCP check returned an evaluation plan and agent grouping, and reported results moved a measured model below the quality bar. npm 0.3.1 adds `openmerit scout --results` and the installed instructions for measuring; older installations reach the new `scout_models` fields through MCP but their instructions do not mention measuring until the installer is rerun.
24
50
 
25
51
  OpenMerit does not run evaluations or host an eval platform. Scout tells you what to measure, your own eval system measures it, and Scout uses the aggregate results:
package/docs/security.md CHANGED
@@ -12,14 +12,15 @@ OpenMerit accepts no model-provider or Jev credential. Credentials belong to the
12
12
 
13
13
  Never place secrets in evaluation configuration, task fixtures, Scout project policy, traces, or committed environment files.
14
14
 
15
- ### Langfuse connector (unreleased)
15
+ ### Langfuse connector
16
16
 
17
- The [connection guide](scout-close-loop.md#connect-langfuse) describes the source
18
- implementation, not npm 0.3.4 or a deployed acceptance result. Only a separate
17
+ The [connection guide](scout-close-loop.md#connect-langfuse) requires npm 0.3.5
18
+ and the matching hosted deployment. Only a separate
19
19
  Viewer key pair is accepted. A successful read plus a deliberately invalid
20
20
  dataset-create permission probe (HTTP 403 required) fails closed for Full keys;
21
- no valid write payload is sent. Positive Viewer-key acceptance still needs a real
22
- Viewer key. Fixed US/EU/HIPAA hosts, manual redirects, timeouts and bounded reads
21
+ no valid write payload is sent. Live Viewer connection acceptance was verified
22
+ on 6 November 2026; fresh mapped import/reranking remain separate release gates.
23
+ Fixed US/EU/HIPAA hosts, manual redirects, timeouts and bounded reads
23
24
  prevent credential forwarding and unbounded response bodies. The connector reads
24
25
  only experiment headers/metadata and aggregate Metrics v2 values, never trace,
25
26
  observation, experiment-item or raw-score bodies. Extra metadata fields are
@@ -29,6 +30,10 @@ Credentials and mappings are AES-GCM encrypted in one Cloudflare Durable Object
29
30
  per authenticated user, bound to that object's ID with a dedicated Worker secret.
30
31
  Keys never enter browser storage, URLs or analytics. Keep that encryption secret
31
32
  stable: replacing it invalidates stored connections and requires reconnecting.
33
+ With npm 0.3.6 and the matching deployment, authenticated settings-only updates
34
+ reuse and reverify the saved encrypted key without exporting it. Supplying a
35
+ partial key pair fails; first connection still requires a protected Viewer pair.
36
+ Changing settings invalidates imported aggregates and requires syncing again.
32
37
  Disconnect deletes the key and imported aggregates; deleting all evaluation data
33
38
  also deletes reported aggregates. Neither erases conversation text. Retention,
34
39
  limits and processor caveats are in the [data policy](scout-data-policy.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmerit",
3
- "version": "0.3.5",
3
+ "version": "0.3.7",
4
4
  "description": "Evidence-driven model decisions for coding harnesses.",
5
5
  "type": "module",
6
6
  "bin": {