jev-dev-harness 0.2.8 → 0.2.10
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 +22 -0
- package/README.md +24 -14
- package/dashboard/index.html +57 -37
- package/dist/cli/compare.d.ts.map +1 -1
- package/dist/cli/compare.js +6 -7
- package/dist/cli/compare.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +5 -4
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +61 -3
- package/dist/cli/index.js.map +1 -1
- package/dist/context-ranker/stage-c-jev.d.ts.map +1 -1
- package/dist/context-ranker/stage-c-jev.js +3 -0
- package/dist/context-ranker/stage-c-jev.js.map +1 -1
- package/dist/mcp/server.d.ts.map +1 -1
- package/dist/mcp/server.js +227 -213
- package/dist/mcp/server.js.map +1 -1
- package/dist/proxy/server.d.ts.map +1 -1
- package/dist/proxy/server.js +0 -1
- package/dist/proxy/server.js.map +1 -1
- package/dist/shared/efficiency.d.ts +38 -0
- package/dist/shared/efficiency.d.ts.map +1 -0
- package/dist/shared/efficiency.js +43 -0
- package/dist/shared/efficiency.js.map +1 -0
- package/dist/shared/index.d.ts +3 -0
- package/dist/shared/index.d.ts.map +1 -1
- package/dist/shared/index.js +3 -0
- package/dist/shared/index.js.map +1 -1
- package/dist/shared/measurement-ledger.d.ts +11 -0
- package/dist/shared/measurement-ledger.d.ts.map +1 -0
- package/dist/shared/measurement-ledger.js +60 -0
- package/dist/shared/measurement-ledger.js.map +1 -0
- package/dist/shared/telemetry.d.ts +38 -8
- package/dist/shared/telemetry.d.ts.map +1 -1
- package/dist/shared/telemetry.js +36 -8
- package/dist/shared/telemetry.js.map +1 -1
- package/dist/shared/typesafe-client.d.ts.map +1 -1
- package/dist/shared/typesafe-client.js +6 -0
- package/dist/shared/typesafe-client.js.map +1 -1
- package/dist/shared/usage-comparison.d.ts +159 -0
- package/dist/shared/usage-comparison.d.ts.map +1 -0
- package/dist/shared/usage-comparison.js +350 -0
- package/dist/shared/usage-comparison.js.map +1 -0
- package/dist/shared/version.js +1 -1
- package/dist/shared/version.js.map +1 -1
- package/dist/tool-ranker/ranker.d.ts.map +1 -1
- package/dist/tool-ranker/ranker.js +3 -4
- package/dist/tool-ranker/ranker.js.map +1 -1
- package/dist/tool-ranker/types.d.ts +2 -1
- package/dist/tool-ranker/types.d.ts.map +1 -1
- package/dist/tool-ranker/types.js.map +1 -1
- package/docs/RELEASING.md +68 -10
- package/docs/jev/MEASURED-USAGE.md +153 -0
- package/package.json +3 -2
|
@@ -70,7 +70,7 @@ export async function rankTools(options) {
|
|
|
70
70
|
initialTools: 0,
|
|
71
71
|
selectedTools: 0,
|
|
72
72
|
prunedTools: 0,
|
|
73
|
-
tokensSaved:
|
|
73
|
+
tokensSaved: null,
|
|
74
74
|
reductionPct: 0,
|
|
75
75
|
latencyMs: Date.now() - startTime,
|
|
76
76
|
shardsCount: 0,
|
|
@@ -183,8 +183,8 @@ export async function rankTools(options) {
|
|
|
183
183
|
pruned.push(cand.name);
|
|
184
184
|
}
|
|
185
185
|
}
|
|
186
|
-
//
|
|
187
|
-
const tokensSaved =
|
|
186
|
+
// No tokenized baseline is available for this selection.
|
|
187
|
+
const tokensSaved = null;
|
|
188
188
|
const reductionPct = initialCount > 0 ? Math.round(((initialCount - selected.length) / initialCount) * 100) : 0;
|
|
189
189
|
const latencyMs = Date.now() - startTime;
|
|
190
190
|
// 8. Record telemetry
|
|
@@ -193,7 +193,6 @@ export async function rankTools(options) {
|
|
|
193
193
|
task,
|
|
194
194
|
initialTools: initialCount,
|
|
195
195
|
selectedTools: selected.length,
|
|
196
|
-
tokensSaved,
|
|
197
196
|
reductionPct,
|
|
198
197
|
latencyMs,
|
|
199
198
|
harness: "Tool Ranker",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ranker.js","sourceRoot":"","sources":["../../src/tool-ranker/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,EAAE,MAAM,CAAC,QAAQ;SAC1B;QACD,YAAY;QACZ,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE;KACpC,CAAC;AACJ,CAAC"}
|
|
@@ -58,7 +58,8 @@ export interface ToolRankMetrics {
|
|
|
58
58
|
initialTools: number;
|
|
59
59
|
selectedTools: number;
|
|
60
60
|
prunedTools: number;
|
|
61
|
-
|
|
61
|
+
/** No tokenized baseline is available. */
|
|
62
|
+
tokensSaved: null;
|
|
62
63
|
reductionPct: number;
|
|
63
64
|
latencyMs: number;
|
|
64
65
|
shardsCount: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tool-ranker/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,mBAAmB;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;IACb,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACjC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;IACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE;QACX,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;QACjD,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;QACpB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KACpB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACxB,CA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../src/tool-ranker/types.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/tool-ranker/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAoFH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,6BAA6B,CAAC"}
|
package/docs/RELEASING.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Publishing a stable release
|
|
2
2
|
|
|
3
3
|
The harness version is independent of the Jev model version. This release is
|
|
4
|
-
`jev-dev-harness@0.2.
|
|
4
|
+
`jev-dev-harness@0.2.10`, with Git tag `v0.2.10` and npm dist-tag `latest`.
|
|
5
5
|
`latest` is an npm distribution pointer, not a Git tag.
|
|
6
6
|
|
|
7
7
|
## Prepare and validate
|
|
@@ -20,29 +20,32 @@ The publish dry run executes version checks, type checking, build and tests via
|
|
|
20
20
|
list and ensure it contains the compiled entry points, binaries and no secrets.
|
|
21
21
|
The dry run does not upload a package or move the npm `latest` pointer.
|
|
22
22
|
|
|
23
|
-
## Publish 0.2.
|
|
23
|
+
## Publish 0.2.10
|
|
24
24
|
|
|
25
25
|
Use your npm maintainer account; complete login/2FA locally. Do not commit tokens.
|
|
26
|
-
Check that 0.2.
|
|
26
|
+
Check that 0.2.10 has not already been published before uploading:
|
|
27
27
|
|
|
28
28
|
```sh
|
|
29
29
|
npm whoami
|
|
30
30
|
npm view jev-dev-harness versions --json
|
|
31
|
-
git
|
|
31
|
+
git checkout main
|
|
32
|
+
git pull --ff-only origin main
|
|
33
|
+
git describe --exact-match --tags HEAD
|
|
32
34
|
npm run release:publish
|
|
33
|
-
|
|
34
|
-
npm view jev-dev-harness@0.2.8 version
|
|
35
|
+
npm view jev-dev-harness@0.2.10 version
|
|
35
36
|
npm dist-tag ls jev-dev-harness
|
|
36
37
|
```
|
|
37
38
|
|
|
38
39
|
Run these commands separately and stop on any error. Publish only the clean,
|
|
39
40
|
validated commit tagged above. `release:publish` runs `npm publish --tag latest`;
|
|
40
41
|
`publishConfig` also pins the public npm registry and `latest` for plain
|
|
41
|
-
`npm publish`. A successful publication should show `latest: 0.2.
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
`npm publish`. A successful publication should show `latest: 0.2.10`.
|
|
43
|
+
Before publishing, confirm that HEAD is the clean validated `v0.2.10` commit.
|
|
44
|
+
If publication fails, resolve the authentication or registry error and retry
|
|
45
|
+
the same artifact. Do not move an existing tag or reuse a published version.
|
|
44
46
|
|
|
45
|
-
|
|
47
|
+
For this release, the merge, `v0.2.10` tag and GitHub Latest release are prepared
|
|
48
|
+
before the manual npm publication. Do not recreate the tag or release.
|
|
46
49
|
There is no automatic npm publication workflow; merging code or pushing a tag
|
|
47
50
|
alone does not publish the package.
|
|
48
51
|
|
|
@@ -60,6 +63,10 @@ version/tag. Prereleases should use a separate process and npm tag such as `next
|
|
|
60
63
|
|
|
61
64
|
## Update local installations
|
|
62
65
|
|
|
66
|
+
The 0.2.10 GitHub release is prepared for manual npm publication. Until that
|
|
67
|
+
publication succeeds, npm `latest` still points to the previously published
|
|
68
|
+
version. 0.2.9 is already published and must not be overwritten.
|
|
69
|
+
|
|
63
70
|
```sh
|
|
64
71
|
npm install -g jev-dev-harness@latest
|
|
65
72
|
jev-dev --version
|
|
@@ -68,3 +75,54 @@ jev-dev --version
|
|
|
68
75
|
For an installation linked to a Git checkout, pull the release commit and run
|
|
69
76
|
`npm ci` and `npm run build` instead. Restart the Codex MCP session so the process
|
|
70
77
|
loads the updated build. An already-running server keeps its old code in memory.
|
|
78
|
+
|
|
79
|
+
## Efficiency contract migration (0.2.9)
|
|
80
|
+
|
|
81
|
+
The context MCP `efficiencyReport` uses `schemaVersion: 2`. Removed fields:
|
|
82
|
+
`initialFilesScanned`, `selectedSurgicalFiles`, `fileReductionPct`,
|
|
83
|
+
`estimatedTokensSaved`. Use `entriesFound`, `candidatesAfterFilters`,
|
|
84
|
+
`candidatesEvaluated`, `selectedFiles`, `cachedDecisions`, `newModelCalls`,
|
|
85
|
+
`newTokens`, `reportedCostUsd`, `costCoverage`, `latencyMs`, `fallbackUsed`.
|
|
86
|
+
Entry counts describe discovery/selection, not tokenized context avoided.
|
|
87
|
+
|
|
88
|
+
`newModelCalls` counts logical Stage C `systemOne` invocations, including failures,
|
|
89
|
+
not individual HTTP retry attempts. `validatedResponses` counts validated response
|
|
90
|
+
usage; tokens/cost cover those responses only. Usage from failed, timed-out,
|
|
91
|
+
invalid responses and unreported retries is unavailable. `costedRequests` gives
|
|
92
|
+
the coverage of the reported sum; partial cost is not a complete bill. Absent
|
|
93
|
+
cost is null in the efficiency report ("não informado"), including full cache.
|
|
94
|
+
An explicit provider cost of zero remains zero. `evaluatedByJev` and
|
|
95
|
+
`evaluatedByLlm` retain their decision counts, including cache; they are not new
|
|
96
|
+
API calls. `evaluatedCandidates` counts Stage C candidates (including heuristic
|
|
97
|
+
fallback); heuristic candidates do not imply model inference.
|
|
98
|
+
|
|
99
|
+
`tokenSavings` and `moneySavings` are null, `savingsStatus` is `not_measured`.
|
|
100
|
+
Tool-rank `metrics.tokensSaved` is now null. Telemetry event `tokensSaved` is
|
|
101
|
+
optional and deprecated; new emitters omit it. Historical JSONL records are
|
|
102
|
+
retained/read unchanged but their estimates are ignored by aggregation/UI.
|
|
103
|
+
Summary `totalTokensSaved` and `estimatedDollarsSaved` remain as deprecated null
|
|
104
|
+
fields. Consumers must stop numeric arithmetic on them. Summary `usage` covers
|
|
105
|
+
only context-rank events with the new call counters, within the most recent
|
|
106
|
+
1,000 events; `eventsWithUsage`/`eventsWithoutUsage` expose historical coverage.
|
|
107
|
+
The dashboard simulation is explicitly hypothetical, separate from telemetry.
|
|
108
|
+
|
|
109
|
+
Updating the package does not update rule files already copied into projects.
|
|
110
|
+
Review and replace only the Jev efficiency section in CODEX.md, CLAUDE.md,
|
|
111
|
+
GEMINI.md, .cursorrules, .clinerules, .windsurfrules and
|
|
112
|
+
.github/copilot-instructions.md (plus custom AGENTS.md/Codex instructions).
|
|
113
|
+
The new template is returned by `getAgentRuleContent()`. `jev-dev doctor
|
|
114
|
+
--init-rules` overwrites the standard rule files: use it only when they contain
|
|
115
|
+
no project-specific instructions or after backing up and merging those rules.
|
|
116
|
+
|
|
117
|
+
In Codex, confirm the MCP command points to the updated installation/build.
|
|
118
|
+
For a pinned npx command, update its package version to 0.2.9 after publication.
|
|
119
|
+
Fully quit and reopen Codex to start a new MCP process; verify its version and
|
|
120
|
+
`jev_rank_context` output has `schemaVersion: 2`. Avoid reusing an old report as
|
|
121
|
+
evidence. These instructions do not change any other project automatically.
|
|
122
|
+
|
|
123
|
+
## Measured usage (0.2.10)
|
|
124
|
+
|
|
125
|
+
The new `efficiency` CLI and `jev_compare_usage` MCP tool require the build
|
|
126
|
+
containing 0.2.10. See [the workflow](jev/MEASURED-USAGE.md) for paired runs,
|
|
127
|
+
scoped ledgers, declared coverage and validation/billing receipts. Do not claim
|
|
128
|
+
measured savings from ranking alone or republish 0.2.9 with the new source.
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
# Measured Codex task comparisons
|
|
2
|
+
|
|
3
|
+
This workflow compares observed usage, not file-count estimates. It runs locally,
|
|
4
|
+
does not upload rollout content and does not make new model requests. Codex
|
|
5
|
+
rollout JSONL is an observed local format, not a guaranteed public API. Unknown,
|
|
6
|
+
incomplete, reset or ambiguous counters are rejected rather than guessed.
|
|
7
|
+
|
|
8
|
+
## Developer workflow
|
|
9
|
+
|
|
10
|
+
1. Choose a small task with an objective validation (the same tests/checks on
|
|
11
|
+
both results). Start both runs from the same commit, with the same agent model,
|
|
12
|
+
reasoning effort, instructions and tool configuration, except the Jev change
|
|
13
|
+
being evaluated. Keep cache conditions comparable and document them.
|
|
14
|
+
2. Run the baseline with Jev disabled. Use separate chats; reused history is a
|
|
15
|
+
confounder. If a task uses several turns/subagents/reviewers, include every
|
|
16
|
+
related interval in the manifest. The importer does not discover completeness
|
|
17
|
+
or prove equivalence automatically.
|
|
18
|
+
3. Before the Jev run, start a unique ledger:
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
jev-dev efficiency begin --run-id auth-jev-001
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Include `measurementRunId: "auth-jev-001"` on **every** Jev MCP call during
|
|
25
|
+
that run. For CLI calls, set `JEV_MEASUREMENT_RUN_ID=auth-jev-001` in that
|
|
26
|
+
process. All model-based harnesses use the same scoped collector. Concurrent
|
|
27
|
+
MCP calls with different IDs stay isolated. Cache/heuristic calls do not
|
|
28
|
+
create model-request records. No state, prompts, answers or keys enter the
|
|
29
|
+
ledger. Missing/in-progress calls are not treated as zero usage.
|
|
30
|
+
4. Wait for all calls to complete, validate the task result, then close the ledger:
|
|
31
|
+
|
|
32
|
+
```sh
|
|
33
|
+
jev-dev efficiency finish --run-id auth-jev-001
|
|
34
|
+
jev-dev efficiency list --repo . --json
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
`list` finds local logs by repository and gives session/turn IDs, timestamps,
|
|
38
|
+
model, initial revision, counters and absolute rollout paths. It does not
|
|
39
|
+
print messages or infer a baseline. It scans at most 200 recent files; use
|
|
40
|
+
`--sessions-path` for a particular date or archived logs.
|
|
41
|
+
Internal `codex-auto-review` intervals are excluded from this list by default;
|
|
42
|
+
use `--include-internal` to locate them when reconciling task overhead.
|
|
43
|
+
5. Create the comparison manifest and validation receipts below. Your assistant
|
|
44
|
+
can assemble them after you identify the two runs; you need not find JSONL
|
|
45
|
+
files by hand. Run:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
jev-dev efficiency compare --manifest comparison.json --json
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Codex can also call `jev_compare_usage` with `manifestPath`. The comparison is
|
|
52
|
+
recorded in local telemetry and shown as the latest paired task comparison in
|
|
53
|
+
the dashboard. `--no-record` prevents telemetry writes. Reimporting a pair
|
|
54
|
+
does not add its differences to a cumulative savings figure.
|
|
55
|
+
|
|
56
|
+
## Manifest and receipts
|
|
57
|
+
|
|
58
|
+
Illustrative manifest; replace the paths/IDs with actual records. Relative paths
|
|
59
|
+
are resolved against this manifest, not the caller's working directory.
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
{
|
|
63
|
+
"schemaVersion": 1,
|
|
64
|
+
"taskId": "auth-validation",
|
|
65
|
+
"initialRevision": "exact-starting-commit-hash",
|
|
66
|
+
"environmentId": "same-model-tools-prompt-and-cache-conditions",
|
|
67
|
+
"allRelatedSessionsIncluded": true,
|
|
68
|
+
"baseline": {
|
|
69
|
+
"rollouts": [{ "path": "baseline.jsonl", "turnId": "baseline-turn-id" }],
|
|
70
|
+
"jevDisabled": true,
|
|
71
|
+
"validationReceipt": "baseline-validation.json"
|
|
72
|
+
},
|
|
73
|
+
"withJev": {
|
|
74
|
+
"rollouts": [{ "path": "with-jev.jsonl", "turnId": "jev-turn-id" }],
|
|
75
|
+
"validationReceipt": "jev-validation.json",
|
|
76
|
+
"measurementRunId": "auth-jev-001",
|
|
77
|
+
"ledgerPath": "path-to-auth-jev-001.jsonl",
|
|
78
|
+
"allJevCallsRecorded": true
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Each validation receipt is tied to its exact session/turn IDs:
|
|
84
|
+
|
|
85
|
+
```json
|
|
86
|
+
{
|
|
87
|
+
"taskId": "auth-validation",
|
|
88
|
+
"criterionId": "same-test-suite-and-functional-check",
|
|
89
|
+
"passed": true,
|
|
90
|
+
"runIds": ["actual-session-id:actual-turn-id"],
|
|
91
|
+
"evidenceReference": "actual-test-report-artifact"
|
|
92
|
+
}
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
These are explicit user/evaluator attestations. The importer verifies matching
|
|
96
|
+
IDs and fields, hashes the source files and checks the counters, but does not
|
|
97
|
+
execute the validation command or independently verify the task quality, disabled
|
|
98
|
+
Jev, declared environment equivalence or completeness of related sessions. Do
|
|
99
|
+
not declare them true before those conditions are verified.
|
|
100
|
+
|
|
101
|
+
## What the report means
|
|
102
|
+
|
|
103
|
+
- `agentTokenDelta`: baseline agent total minus Jev-run agent total, within the
|
|
104
|
+
imported intervals. Positive means lower observed consumption; negative means
|
|
105
|
+
higher. Repeated cumulative snapshots count once; earlier session usage is
|
|
106
|
+
subtracted. Forks without a prior baseline snapshot, counter resets, incomplete
|
|
107
|
+
turns, duplicate intervals, model/effort/revision mismatches and failed quality
|
|
108
|
+
receipts are rejected.
|
|
109
|
+
- Cached input is already included in input; reasoning is already included in
|
|
110
|
+
output. They are reported as breakdowns, not added again. Missing cache-write
|
|
111
|
+
details stay unknown. See [OpenAI usage definitions](https://developers.openai.com/api/docs/guides/agents-api/observability)
|
|
112
|
+
and [prompt caching](https://developers.openai.com/api/docs/guides/prompt-caching).
|
|
113
|
+
- `pipelineTokenDelta`: agent delta minus **reported** Jev tokens. Available only
|
|
114
|
+
with a finished ledger, no request with unknown usage, and declared full Jev
|
|
115
|
+
coverage. Different tokenizers produce reported token units, not identical text
|
|
116
|
+
lengths. Provider-unreported retries/failures remain outside this figure.
|
|
117
|
+
- `moneyDeltaUsd`: unknown by default. Codex local token counters are not a bill
|
|
118
|
+
and do not establish how ChatGPT subscription limits are calculated. Full cost
|
|
119
|
+
for both runs must come from billing receipts, not fixed tokens-per-file or an
|
|
120
|
+
assumed rate. Jev's reported response cost remains separately visible with
|
|
121
|
+
coverage; it is not automatically a complete task cost.
|
|
122
|
+
|
|
123
|
+
Optional billing receipts, referenced by `billingReceipt` on each run, use:
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"runFingerprint": "fingerprint-returned-for-this-run-by-compare",
|
|
128
|
+
"currency": "USD",
|
|
129
|
+
"amount": 0.0123,
|
|
130
|
+
"coverage": "all_agent_and_jev_costs",
|
|
131
|
+
"sourceReference": "actual-provider-billing-export"
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
The amount above is an example only. Both receipts must include all agent,
|
|
136
|
+
subagent/reviewer, Jev and retry charges. Matching fingerprints prevent mixing
|
|
137
|
+
receipts with different logs/ledgers. Receipts are imported and explicitly marked
|
|
138
|
+
as not independently verified. Unknown cost is never zero; negative differences
|
|
139
|
+
are retained. A single pair describes that experiment, not causal proof or a
|
|
140
|
+
general savings claim. Repeat controlled pairs to evaluate consistency.
|
|
141
|
+
|
|
142
|
+
## Installation
|
|
143
|
+
|
|
144
|
+
The new importer is prepared for 0.2.10. Installing 0.2.9 fixes reporting but
|
|
145
|
+
does not add these commands. After installing the build containing this feature,
|
|
146
|
+
restart Codex's MCP process and confirm `jev_compare_usage` is listed. Do not
|
|
147
|
+
publish a changed artifact under the already published 0.2.9 version.
|
|
148
|
+
|
|
149
|
+
`JEV_MEASUREMENT_DIR` can redirect local ledgers; otherwise they live in
|
|
150
|
+
`~/.jev-dev/measurements`. Use a new run ID for each experiment. Collection is
|
|
151
|
+
opt-in and errors on invalid IDs, missing begun runs or closed ledgers. Check
|
|
152
|
+
local logs before sharing them: the original Codex rollout may contain private
|
|
153
|
+
prompts even though comparison results contain only selected metadata/usage.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jev-dev-harness",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "Developer Harness with TypeSafe AI / Jev for AI Coding Agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -61,7 +61,8 @@
|
|
|
61
61
|
"LICENSE",
|
|
62
62
|
"CHANGELOG.md",
|
|
63
63
|
"docs/RELEASING.md",
|
|
64
|
-
"docs/jev/OPENROUTER-NATIVE.md"
|
|
64
|
+
"docs/jev/OPENROUTER-NATIVE.md",
|
|
65
|
+
"docs/jev/MEASURED-USAGE.md"
|
|
65
66
|
],
|
|
66
67
|
"publishConfig": {
|
|
67
68
|
"registry": "https://registry.npmjs.org/",
|