openmerit 0.1.9 → 0.1.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openmerit",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Evidence-driven model decisions for coding harnesses.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -61,7 +61,8 @@
61
61
  "access": "public"
62
62
  },
63
63
  "workspaces": [
64
- "packages/*"
64
+ "packages/*",
65
+ "scout/agent"
65
66
  ],
66
67
  "engines": {
67
68
  "node": ">=22.19.0"
@@ -69,22 +70,28 @@
69
70
  "scripts": {
70
71
  "check": "npm run check --workspaces --if-present",
71
72
  "test": "npm run test --workspaces --if-present",
72
- "typecheck": "tsc -p tsconfig.json",
73
+ "typecheck": "tsc -p tsconfig.json && tsc -p tsconfig.scout.json && tsc -p scout/agent/tsconfig.json",
74
+ "check:typescript": "node scripts/check-typescript.ts",
75
+ "types:workers": "node scripts/worker-types.ts",
76
+ "check:worker-types": "node scripts/worker-types.ts --check",
77
+ "deploy": "node scripts/deploy.ts",
78
+ "deploy:status": "node scripts/deploy.ts status",
73
79
  "build": "node scripts/build.mjs",
74
80
  "demo": "node scripts/demo.mjs",
75
81
  "predash": "node scripts/build-terminal.mjs",
76
82
  "dash": "node packages/terminal/src/cli.mjs dash",
77
83
  "build:docs": "node scripts/build-docs.mjs",
78
84
  "check:docs": "npm run build:docs && node --test scripts/docs.test.mjs",
79
- "check:demo": "node --test demo/test/*.test.mjs",
85
+ "memo": "node demo/memo/preview.ts",
86
+ "check:demo": "npm ci --ignore-scripts --prefix demo && npm run build:docs && tsc -p tsconfig.memo.json && node --test demo/test/*.test.mjs demo/test/*.test.ts",
80
87
  "prepare": "npm run build",
81
- "verify": "npm test && npm run check && npm run typecheck && npm run build && npm run check:demo && npm run check:scout && npm run check:docs && npm run build:scout && git diff --check",
88
+ "verify": "npm test && npm run check && npm run typecheck && npm run check:typescript && npm run build && npm run check:demo && npm run check:scout && npm run check:docs && npm run build:scout && git diff --check",
82
89
  "prepublishOnly": "npm run verify",
83
90
  "build:dash-preview": "node scripts/build-terminal-preview.mjs",
84
- "deploy:dash-preview": "npx --yes wrangler@4.136.3 deploy --config wrangler.terminal.jsonc",
91
+ "deploy:dash-preview": "node scripts/deploy.ts terminal-preview",
85
92
  "scout": "node scout/dev.mjs",
86
93
  "scout:refresh": "node scout/refresh.mjs",
87
- "check:scout": "node --test scout/test/*.test.mjs && node --check scout/worker.mjs && node --check site/scout/scout.js",
94
+ "check:scout": "node --test scout/test/*.test.mjs scout/test/*.test.ts && node --check scout/worker.mjs",
88
95
  "build:scout": "node scripts/build-scout.mjs"
89
96
  },
90
97
  "dependencies": {
@@ -107,7 +114,9 @@
107
114
  "devDependencies": {
108
115
  "@clerk/backend": "3.26.1",
109
116
  "@clerk/shared": "4.41.0",
117
+ "@lezer/highlight": "1.2.5",
110
118
  "@resvg/resvg-js": "2.6.2",
119
+ "@types/markdown-it": "14.1.2",
111
120
  "@types/node": "^22.18.6",
112
121
  "@xyflow/react": "12.12.0",
113
122
  "elkjs": "0.12.0",
@@ -115,12 +124,14 @@
115
124
  "fflate": "0.8.2",
116
125
  "liveline": "0.0.7",
117
126
  "markdown-it": "15.0.2",
127
+ "miniflare": "5.20260921.0-alpha",
118
128
  "minisearch": "7.2.0",
119
129
  "morphdom": "2.7.8",
120
130
  "react": "19.3.0",
121
131
  "react-dom": "19.3.0",
122
132
  "torph": "0.1.3",
123
133
  "typescript": "^5.9.3",
124
- "web-vitals": "6.2.3"
134
+ "web-vitals": "6.2.3",
135
+ "wrangler": "4.136.3"
125
136
  }
126
137
  }
package/docs/memo.md DELETED
@@ -1,126 +0,0 @@
1
- # Optimum Inference For All
2
-
3
- *Lazim*
4
-
5
- How can we accelerate the distribution of intelligence?
6
-
7
- Building and deploying more models and improving the compute landscape is where most of the energy being spent right now. I have another, less explored direction in my mind, which I call, the optimum inference problem.
8
-
9
- I see a substantial part of what limits autonomous systems is how the models are selected and assessed throughout their lifecycle. It's a harness-level infrastructure concern.
10
-
11
- #### Does this need to get solved?
12
-
13
- In companies that I had the privilege of working with, I have built or maintained or used a rudimentary version of this. When budget constraints strangled the roadmap, teams scrambled their way out by building something enough to justify why they need to pay y amount of money to solve x task. This was never a maintained system nor it was ever prioritised because it was seen as an optional optimisation issue and overlooked the power it had over the dissemination of intelligence inside the org and the products they ship.
14
-
15
- If it was ever solved, it was always at a task level and if it had room and engineers to pressure, maybe at the agent level but rarely. even rarer at the harness level. As the system develops, its inference choices should develop with it. I don't think every team should have to build and maintain that process and stack themselves. We are building OpenMerit to solve this. In the Mission of optimum inference for all.
16
-
17
- #### What optimum means
18
-
19
- Optimum depends on the work. We need to know what counts as success, how reliably it must be delivered and the customer's constraints on cost, latency and operation.
20
-
21
- A cheaper model that needs repeated attempts may make the completed job more expensive. A stronger model may add cost without improving the result. We need to account for the whole workflow, including anything a person has to fix.
22
-
23
- The range of models matters here. There are frontier models from leading labs, general-purpose open-weight models, fine-tuned and distilled variants on Hugging Face, and specialists for coding, retrieval, vision and speech. Jev, by TypeSafe, is designed for fast structured decisions. Its recent release shows there is demand for a different breed of system-one models. Smaller models can run task-specific programs optimised through tools such as DSPy. An agent may have a place for several of these. We want OpenMerit to assess all of them on the work they can actually do, to allocate as it required.
24
-
25
- The right deployment could use a direct API from the lab, a router, an inference cloud or a customer-operated model. It could combine them. A company using only commercial APIs should get a complete product. So should one operating entirely within its own environment.
26
-
27
- Hardware is equally part of the decision. For customer-operated deployments, we need to account for available compute and memory, concurrent workloads and the cost of loading or swapping models. With managed APIs, we work with measurable outcomes and the constraints the provider exposes.
28
-
29
- Local models, open weights and fine-tunes extend the possibilities. We have no preference for moving customers towards them. If the industry the customer operates in demands sovereignty then it should be able to, without sacrificing the intelligence spread.
30
-
31
- Better allocation also matters beyond the bill. Where a smaller configuration meets the requirements and the freed capacity can be reused, the same resources can support more work. That is part of what I mean by distributing intelligence.
32
-
33
- #### What we are building
34
-
35
- There's no end-to-end product or platform clarity at the moment, but on a broader spectrum, you could place OpenMerit as infrastructure for assessing, benchmarking, selecting, assigning and maintaining all model choices within your harness.
36
-
37
- It operates at task, agent and harness levels. An assignment should suit the individual task while accounting for the agent's overall result. Across a harness, those choices have to work within shared budgets and capacity.
38
-
39
- To get there, OpenMerit first needs to establish which options the customer can use. It should then coordinate comparisons on representative work using their success criteria. Production evidence tells us how the current configuration behaves. It does not establish how an untested alternative would perform.
40
-
41
- After deployment, OpenMerit should check whether the expected improvement happened and decide where further investigation is worthwhile. Keeping the current assignment is a valid decision.
42
-
43
- The interface should be agent-native. A harness should be able to request a comparison and retrieve an assignment with its evidence programmatically. Within the customer's permissions, OpenMerit should coordinate validated changes through the existing infrastructure, then retain or reverse them based on the results.
44
-
45
- We will remain harness-agnostic. The customer's harness owns execution and coordination. Its providers and serving systems run inference. We integrate with its observability and evaluation tools. We will not build those products ourselves as much as we can, and production traffic will not have to pass through us to fulfil the task, but sure can control the traffic based on the evidence.
46
-
47
- #### A continuing research problem
48
-
49
- Most of the components are still very nascent and will increasingly need newer ways of operating as models become increasingly intelligent and the compute becomes increasingly efficient. Hence we see OpenMerit as a research lab as much as a product company.
50
-
51
- To zoom out, we see optimum inference as a long-term research and deployment effort. There is no final configuration we can find, hand over and consider the problem solved.
52
-
53
- We need better methods for deciding how much evidence an assignment requires and when that evidence needs updating. Testing every option is expensive. Testing too little can leave us maintaining a poor decision. OpenMerit should spend its testing budget where additional evidence is likely to be useful.
54
-
55
- We also need to understand how individual choices affect the complete outcome. A model that performs well on one step may leave the next step with harder work. Several assignments that look sensible separately may compete for the same compute.
56
-
57
- These are some of the questions we will have to study in production. Deployment will expose cases our experiments missed and show us which improvements were worth pursuing. That experience should inform the next investigation and the methods we build.
58
-
59
- OpenMerit should support this work throughout a system's creation, iteration and ongoing operation.
60
-
61
- #### Where we start
62
-
63
- Our first customers are engineering and AI teams running repeatable production workflows with measurable outcomes and meaningful inference costs or capacity constraints.
64
-
65
- One way to think about it goes like this. A developer or their coding agent connects one workflow. OpenMerit establishes a baseline, compares eligible alternatives and returns a decision they can act on. They keep using it because maintaining that assignment is useful, then connect more work.
66
-
67
- The first line of product combines L1, organisation-wide understanding, with L2, repeatable workflows. Individual workflows provide the evidence for a wider view of which models are assigned where, why those choices were made and which ones deserve reassessment and swapping.
68
-
69
- L3, adaptive agents, is the longer-term research direction. Agents may revise their plans or create subagents while working. We want to support inference decisions during that execution without taking over the harness's responsibility.
70
-
71
- L2 should support a business on its own. It also gives us production experience for the harder questions ahead.
72
-
73
- #### A separate company, not a feature
74
-
75
- We want OpenMerit to follow the customer's work across whichever models and infrastructure are appropriate.
76
-
77
- A customer should be able to change providers, introduce a fine-tune or replace a harness without rebuilding how they make model decisions. Some evidence will need to be revalidated. The history of what they tried and why they changed should remain useful.
78
-
79
- That continuing responsibility is substantial enough to build a company around. We intend to earn it through the quality of our decisions and the maintenance we remove from the customer's team.
80
-
81
- We are thinking of building an open-core, with hosted and customer-operated options, and charge for continuous assessment and decision management. We will not mark up inference.
82
-
83
- #### We need to prove
84
-
85
- Our evaluations have to reflect the customer's actual work. We should begin with representative examples and usable success criteria, and limit autonomous changes to decisions the evidence supports. Where the criteria are inadequate, we need to identify that before automating the wrong objective.
86
-
87
- Our own costs belong in the calculation. Comparisons consume resources. Switching can introduce failures and maintenance. OpenMerit needs to recognise when an apparent improvement is too small to pursue.
88
-
89
- We also need dependable integrations. We should start with a narrow set and make them work well before extending our coverage. Supporting different infrastructure does not require supporting everything immediately.
90
-
91
- The standard is a measurable improvement after accounting for testing, switching and running OpenMerit. Depending on the workload, that means better outcomes within the same budget, lower total cost at the required quality or more completed work with available capacity.
92
-
93
- #### What is already here in some shape or form
94
-
95
- There are useful tools here, including ones that already make model decisions. OpenRouter's Auto Router selects models for incoming requests. Portkey's gateway supports conditional routing, fallbacks and controlled testing of new models in production. Not Diamond lets teams train routers on their own data and evaluation criteria, with quality, cost and latency preferences.
96
-
97
- Langfuse helps teams compare changes through evaluation scores, cost, latency and individual failures. Braintrust supports experiments and continuous production evaluation, including bringing production examples back into testing. These tools already help teams investigate and improve their systems.
98
-
99
- Many of these capabilities overlap with parts of what we want to explore. They are also components we expect to work with.
100
-
101
- We consider optimum inference far from solved. A system needs to determine when the evidence behind an assignment is no longer enough, which alternatives deserve testing and whether a change will improve the completed work after its costs are included. It needs to maintain that process across changes to its tasks, models and infrastructure.
102
-
103
- OpenMerit exists to take on that continuing responsibility. The tools for an investigation should be available to the harness, along with the means to act on the result. The customer should not inherit a permanent engineering project to keep it all working.
104
-
105
- #### Path ahead
106
-
107
- We want teams to know when the strongest model is worth paying for, when an inexpensive alternative is sufficient and when a different deployment would let them do more.
108
-
109
- We want those decisions to become part of what a system can maintain for itself. Its engineers should be able to define the work and its constraints without inheriting a permanent job of reconsidering every model assignment.
110
-
111
- How much more useful work can we make possible with the intelligence and compute available to us?
112
-
113
- ---
114
-
115
- **Additional Reading**
116
-
117
- 1. [**"The Shift from Models to Compound AI Systems"**](https://bair.berkeley.edu/blog/2024/02/18/compound-ai-systems/) — Matei Zaharia et al., BAIR. (February 18, 2024)
118
- 2. [**"DSPy: Program, Don't Prompt"**](https://dspy.ai/current/) — DSPy / Stanford NLP.
119
- 3. [**"Optimas: Optimizing Compound AI Systems with Globally Aligned Local Rewards"**](https://optimas.stanford.edu/) — Shirley Wu et al., arXiv. (February 9, 2026)
120
- 4. [**"AI Agents That Matter"**](https://arxiv.org/abs/2407.01502) — Sayash Kapoor, Benedikt Stroebl, Zachary S. Siegel, Nitya Nadgir, and Arvind Narayanan, arXiv. (July 1, 2024)
121
- 5. [**"Training a Custom Router"**](https://docs.notdiamond.ai/docs/router-training-quickstart) — Not Diamond.
122
- 6. [**"Auto Router — Intelligent Model Selection"**](https://openrouter.ai/docs/guides/routing/routers/auto-router) — OpenRouter.
123
- 7. [**"AI Gateway"**](https://portkey.ai/docs/product/ai-gateway) — Portkey.
124
- 8. [**"Compare Experiments"**](https://langfuse.com/docs/evaluation/experiments/compare-experiments) — Langfuse.
125
- 9. [**"Evaluate Systematically"**](https://www.braintrust.dev/docs/evaluate) — Braintrust.
126
- 10. [**"Introducing System One Models & Jev"**](https://typesafe.ai/blog/introducing-system-one-models-and-jev) — Diogo Almeida, TypeSafe AI. (September 15, 2026)