jev-layer 0.1.0 → 0.3.0
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 +73 -34
- package/CONTRIBUTING.md +146 -146
- package/LICENSE +21 -21
- package/README.md +125 -126
- package/README.ru.md +140 -117
- package/README.zh-CN.md +139 -117
- package/RELEASE.md +53 -53
- package/SECURITY.md +64 -56
- package/bin/jev.mjs +215 -213
- package/config/codex.mcp.toml +8 -8
- package/config/generic-mcp.json +13 -13
- package/config/hermes.mcp.yaml +9 -9
- package/config/jev.example.json +23 -22
- package/config/omp.mcp.json +14 -14
- package/config/providers.env.example +13 -13
- package/docs/AGENT-IMPLEMENTATION.md +306 -0
- package/docs/COMPATIBILITY.md +24 -15
- package/docs/HERMES-LOCAL-AGENT-HANDOFF.ru.md +187 -0
- package/docs/PROVIDERS.md +109 -0
- package/docs/SCHEMA-VERSIONING.md +101 -94
- package/docs/architecture.svg +77 -0
- package/docs/jev-layer-banner.svg +38 -0
- package/examples/capabilities.json +39 -39
- package/examples/route-request.json +28 -28
- package/integrations/codex/.codex-plugin/plugin.json +19 -19
- package/integrations/codex/.mcp.json +11 -11
- package/integrations/codex/AGENTS.md +1 -1
- package/integrations/codex/run-mcp.mjs +9 -9
- package/integrations/codex/skills/jev-route/SKILL.md +17 -17
- package/integrations/hermes/__init__.py +156 -51
- package/integrations/hermes/plugin.yaml +11 -5
- package/integrations/hermes/schemas.py +120 -12
- package/integrations/omp/extension.js +106 -105
- package/integrations/template/README.md +10 -10
- package/integrations/template/adapter.mjs +87 -87
- package/package.json +60 -59
- package/scripts/benchmark.mjs +35 -35
- package/scripts/browser-benchmark.mjs +92 -92
- package/scripts/browser-e2e.mjs +117 -117
- package/scripts/capability-e2e.mjs +31 -31
- package/scripts/clean-install-smoke.mjs +176 -162
- package/scripts/codex-mcp-smoke.mjs +119 -119
- package/scripts/context-filter-e2e.mjs +45 -45
- package/scripts/fail-open-smoke.mjs +120 -120
- package/scripts/feature-flags-smoke.mjs +46 -46
- package/scripts/mcp-receipt-smoke.mjs +115 -98
- package/scripts/model-route-report.mjs +15 -0
- package/scripts/openrouter-choice.mjs +59 -59
- package/scripts/replay-eval.mjs +124 -124
- package/scripts/smoke.mjs +34 -34
- package/scripts/supervision-e2e.mjs +138 -109
- package/src/browser.mjs +583 -569
- package/src/cli.mjs +33 -33
- package/src/computer.mjs +196 -0
- package/src/config.mjs +86 -75
- package/src/context-filter.mjs +56 -56
- package/src/contract.mjs +74 -72
- package/src/discovery.mjs +65 -65
- package/src/hermes-adapter.mjs +134 -0
- package/src/images.mjs +98 -0
- package/src/mcp-server.mjs +313 -210
- package/src/model-route-metrics.mjs +89 -0
- package/src/model-routing.mjs +87 -0
- package/src/providers/demo.mjs +52 -52
- package/src/providers/index.mjs +12 -0
- package/src/providers/typesafe.mjs +206 -126
- package/src/receipts.mjs +228 -226
- package/src/registry.mjs +109 -109
- package/src/relevance-filter.mjs +99 -99
- package/src/route.mjs +228 -221
- package/src/shadow-compaction.mjs +170 -0
- package/src/supervision.mjs +268 -244
- package/test/browser.test.mjs +222 -199
- package/test/capability.test.mjs +54 -54
- package/test/computer.test.mjs +195 -0
- package/test/context-filter.test.mjs +65 -65
- package/test/hermes-adapter.test.mjs +63 -0
- package/test/image-fixture.mjs +2 -0
- package/test/images.test.mjs +85 -0
- package/test/model-route-metrics.test.mjs +61 -0
- package/test/model-routing.test.mjs +59 -0
- package/test/openrouter-provider.test.mjs +55 -55
- package/test/provider-transports.test.mjs +205 -0
- package/test/providers.test.mjs +125 -0
- package/test/receipts.test.mjs +71 -71
- package/test/route.test.mjs +86 -74
- package/test/shadow-compaction.test.mjs +67 -0
- package/test/supervision.test.mjs +117 -99
package/README.md
CHANGED
|
@@ -1,126 +1,125 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
npm
|
|
115
|
-
npm run
|
|
116
|
-
npm
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
- [
|
|
126
|
-
- [CHANGELOG.md](CHANGELOG.md)
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/jev-layer-banner.svg" alt="jev-layer — portable System-1 decisions for agent harnesses" width="960">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">jev-layer</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>Let an agent make a bounded choice without handing it control.</strong><br>
|
|
9
|
+
Jev recommends. Your harness still checks permissions and executes.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">Hermes · OMP · Codex · generic MCP</p>
|
|
13
|
+
|
|
14
|
+
<p align="center">
|
|
15
|
+
<a href="https://github.com/typakon4/jev-layer/actions/workflows/ci.yml?query=branch%3Amain"><img alt="CI status" src="https://github.com/typakon4/jev-layer/actions/workflows/ci.yml/badge.svg?branch=main"></a>
|
|
16
|
+
<a href="https://www.npmjs.com/package/jev-layer"><img alt="npm version" src="https://img.shields.io/npm/v/jev-layer?logo=npm&label=npm"></a>
|
|
17
|
+
<a href="https://github.com/typakon4/jev-layer/releases"><img alt="latest GitHub release" src="https://img.shields.io/github/v/release/typakon4/jev-layer?display_name=tag&sort=semver"></a>
|
|
18
|
+
<a href="https://github.com/typakon4/jev-layer/blob/main/LICENSE"><img alt="MIT license" src="https://img.shields.io/github/license/typakon4/jev-layer"></a>
|
|
19
|
+
</p>
|
|
20
|
+
|
|
21
|
+
[English](README.md) · [Русский](README.ru.md) · [简体中文](README.zh-CN.md)
|
|
22
|
+
|
|
23
|
+
**Install:** `npm install --global jev-layer` · [Integrate a harness](docs/AGENT-IMPLEMENTATION.md) · [Security model](SECURITY.md)
|
|
24
|
+
|
|
25
|
+
## What changes
|
|
26
|
+
|
|
27
|
+
| Without Jev | With Jev |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| Your harness follows its existing path to choose a capability. | The harness can ask `jev_route` to choose from a bounded set it supplies. |
|
|
30
|
+
| Your harness owns permissions, approvals, and execution. | Your harness still owns permissions, approvals, and execution. |
|
|
31
|
+
| Execution results stay in the host's normal workflow. | The host can attach the result to the decision with `jev_record_execution` and replay cases offline. |
|
|
32
|
+
|
|
33
|
+
Jev never executes a selected capability. If it is disabled, unavailable, invalid, or inconclusive, control returns to the host's normal path.
|
|
34
|
+
|
|
35
|
+
## Quick start
|
|
36
|
+
|
|
37
|
+
Requires Node.js 20 or newer. There are no mandatory runtime dependencies.
|
|
38
|
+
|
|
39
|
+
```sh
|
|
40
|
+
npm install --global jev-layer
|
|
41
|
+
jev install --project /path/to/workspace
|
|
42
|
+
jev add generic --project /path/to/workspace
|
|
43
|
+
jev doctor --project /path/to/workspace
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The default `demo` provider is deterministic and works offline. To run the stdio MCP server directly:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
jev mcp
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## How it fits into a harness
|
|
53
|
+
|
|
54
|
+
<p align="center">
|
|
55
|
+
<img src="docs/architecture.svg" alt="Architecture: agent harnesses send bounded requests to jev-layer; the host owns permissions and execution; receipts support replay." width="960">
|
|
56
|
+
</p>
|
|
57
|
+
|
|
58
|
+
1. The host sends Jev a request and the candidate capabilities it already allows.
|
|
59
|
+
2. Jev returns a bounded recommendation. The host checks it against its own registry and permissions.
|
|
60
|
+
3. The host decides whether to execute, then can record what happened against the original `correlation_id`.
|
|
61
|
+
|
|
62
|
+
A provider can be deterministic `demo`, OpenRouter Decisions, or TypeSafe. Provider-backed tests are not required for normal CI; see the [provider guide](docs/PROVIDERS.md).
|
|
63
|
+
|
|
64
|
+
## What else it can do
|
|
65
|
+
|
|
66
|
+
- **Supervision:** `jev_supervise` returns bounded work-state judgments. The host decides whether to continue, verify, retry, finish, or escalate.
|
|
67
|
+
- **Model routing:** `jev_model_route` recommends one host-declared model profile for a future call. It is advisory only; the host measures outcomes before changing provider or model settings. Correlated receipts can be reviewed with `npm run model-route:report -- /path/to/cases.jsonl`.
|
|
68
|
+
- **Shadow compaction:** `jev_shadow_compaction` produces report-only keep/drop candidates for host-supplied context. It does not summarize, mutate, or delete context, and keeps pinned evidence on provider failure.
|
|
69
|
+
- **Context filtering:** optional deterministic `shadow` or `conservative` filtering reduces stale context without LLM summarization.
|
|
70
|
+
- **Experimental browser fast-path:** `jev_browser_step` recommends one bounded action from a host observation. The host supplies approval, native execution, and recovery; Jev does not start a browser worker.
|
|
71
|
+
- **Jev 1.14 vision and computer use:** TypeSafe and OpenRouter accept PNG/JPEG screenshots. Opt-in `jev_computer_step` recommends host-declared desktop actions, with visibility-gated Box grounding and host confirmation. The adapter handles each provider's image format. See the [image/computer contract](docs/AGENT-IMPLEMENTATION.md#vision-and-computer-use).
|
|
72
|
+
- **Fail open:** optional Jev surfaces are disabled by default. Jev never widens permissions or guesses execution.
|
|
73
|
+
|
|
74
|
+
Enable optional surfaces explicitly:
|
|
75
|
+
|
|
76
|
+
```sh
|
|
77
|
+
JEV_BROWSER_FAST_PATH=1 jev mcp
|
|
78
|
+
JEV_LAYER_PROVIDER=openrouter JEV_COMPUTER_USE=1 jev mcp
|
|
79
|
+
JEV_SUPERVISION=1 jev mcp
|
|
80
|
+
JEV_CONTEXT_FILTER=shadow jev cli --input examples/route-request.json
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
For provider credentials, keep keys outside the repository:
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
export JEV_LAYER_PROVIDER=openrouter
|
|
87
|
+
export OPENROUTER_API_KEY='provided-by-your-secret-store'
|
|
88
|
+
jev doctor --project /path/to/workspace
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Pick an integration
|
|
92
|
+
|
|
93
|
+
Examples and adapters live under `integrations/`:
|
|
94
|
+
|
|
95
|
+
- Hermes: `integrations/hermes/` (see the [local-agent handoff guide](docs/HERMES-LOCAL-AGENT-HANDOFF.ru.md))
|
|
96
|
+
- OMP: `integrations/omp/`
|
|
97
|
+
- Codex: `integrations/codex/`
|
|
98
|
+
- Another harness: start from `integrations/template/`
|
|
99
|
+
|
|
100
|
+
Adapters stay thin. The host retains native capability lookup, permissions, approvals, execution, retries, recovery, and final output. For the adapter contract, see [CONTRIBUTING.md](CONTRIBUTING.md). For compatibility rules, see [docs/SCHEMA-VERSIONING.md](docs/SCHEMA-VERSIONING.md).
|
|
101
|
+
|
|
102
|
+
The release baseline records OMP `18.2.6`, Hermes `0.21.3` (`b675e6de`), and Codex CLI `0.155.1` observed in the preparation environment. This is a version/contract baseline, not a claim of full provider/model coverage; see [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md).
|
|
103
|
+
|
|
104
|
+
## Boundaries
|
|
105
|
+
|
|
106
|
+
- jev-layer is not a security boundary. Host permissions and approvals remain authoritative; see [SECURITY.md](SECURITY.md).
|
|
107
|
+
- Schema, MCP tool, receipt, replay, and adapter contracts are currently version 1. Prefer additive changes; do not break v1 silently.
|
|
108
|
+
- Browser fast-path reliability is validated against current real-browser fixtures. Performance optimization remains experimental; no browser speedup claim is made.
|
|
109
|
+
- Do not commit credentials, logs containing secrets, `.env` files, or machine-specific paths.
|
|
110
|
+
|
|
111
|
+
## Verify locally
|
|
112
|
+
|
|
113
|
+
```sh
|
|
114
|
+
npm test
|
|
115
|
+
npm run smoke
|
|
116
|
+
npm run fail-open-smoke
|
|
117
|
+
npm run clean-install-smoke
|
|
118
|
+
npm pack --dry-run
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
GitHub Actions runs these checks on Node.js 20, 22, and 24. Provider-backed tests require a secret-managed environment and are not part of ordinary PR CI.
|
|
122
|
+
|
|
123
|
+
## Project docs
|
|
124
|
+
|
|
125
|
+
[Agent implementation guide](docs/AGENT-IMPLEMENTATION.md) · [Providers](docs/PROVIDERS.md) · [Compatibility](docs/COMPATIBILITY.md) · [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md) · [Release](RELEASE.md) · [Changelog](CHANGELOG.md)
|
package/README.ru.md
CHANGED
|
@@ -1,117 +1,140 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
jev
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
```sh
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
- `
|
|
78
|
-
- `
|
|
79
|
-
- `
|
|
80
|
-
- `
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="docs/jev-layer-banner.svg" alt="jev-layer — портируемый System-1 слой решений для agent harnesses" width="960">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">jev-layer</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
<strong>Портируемый System-1 слой решений для agent harnesses.</strong><br>
|
|
9
|
+
Host владеет routing, receipts, replay и fail-open интеграциями.
|
|
10
|
+
</p>
|
|
11
|
+
|
|
12
|
+
<p align="center">
|
|
13
|
+
Hermes · OMP · Codex · generic MCP
|
|
14
|
+
</p>
|
|
15
|
+
|
|
16
|
+
<p align="center">
|
|
17
|
+
<a href="https://github.com/typakon4/jev-layer/actions/workflows/ci.yml?query=branch%3Amain"><img alt="CI status" src="https://github.com/typakon4/jev-layer/actions/workflows/ci.yml/badge.svg?branch=main"></a>
|
|
18
|
+
<a href="https://www.npmjs.com/package/jev-layer"><img alt="npm version" src="https://img.shields.io/npm/v/jev-layer?logo=npm&label=npm"></a>
|
|
19
|
+
<a href="https://github.com/typakon4/jev-layer/releases"><img alt="latest GitHub release" src="https://img.shields.io/github/v/release/typakon4/jev-layer?display_name=tag&sort=semver"></a>
|
|
20
|
+
<a href="https://github.com/typakon4/jev-layer/blob/main/LICENSE"><img alt="MIT license" src="https://img.shields.io/github/license/typakon4/jev-layer"></a>
|
|
21
|
+
</p>
|
|
22
|
+
|
|
23
|
+
[English](README.md) · [Русский](README.ru.md) · [简体中文](README.zh-CN.md)
|
|
24
|
+
|
|
25
|
+
jev-layer маршрутизирует ограниченные решения и сохраняет доказательства; harness сохраняет владение исполнением, permissions, approvals, retry, восстановлением и итоговым результатом.
|
|
26
|
+
|
|
27
|
+
> Интегрируете jev-layer в harness? Сначала дайте агенту [Agent implementation guide](docs/AGENT-IMPLEMENTATION.md), а не только ссылку на этот README.
|
|
28
|
+
|
|
29
|
+
## Архитектура
|
|
30
|
+
|
|
31
|
+
<p align="center">
|
|
32
|
+
<img src="docs/architecture.svg" alt="Архитектура: harness отправляет ограниченный запрос в jev-layer; host владеет permissions и execution; receipts поддерживают replay." width="960">
|
|
33
|
+
</p>
|
|
34
|
+
|
|
35
|
+
Jev не исполняет выбранную capability. Доступны детерминированный `demo`, OpenRouter Decisions и TypeSafe; тесты с provider credentials не требуются для обычного CI.
|
|
36
|
+
|
|
37
|
+
## Быстрый старт
|
|
38
|
+
|
|
39
|
+
Требуется Node.js 20 или новее. Обязательных runtime-зависимостей нет.
|
|
40
|
+
|
|
41
|
+
Установить опубликованный CLI:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
npm install --global jev-layer
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Или использовать локальный clone:
|
|
48
|
+
|
|
49
|
+
```sh
|
|
50
|
+
npm install
|
|
51
|
+
npm link
|
|
52
|
+
jev install --project /path/to/workspace
|
|
53
|
+
jev add generic --project /path/to/workspace
|
|
54
|
+
jev doctor --project /path/to/workspace
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
`npm link` используется только локально и ничего не публикует. Вместо него можно запускать `node /path/to/jev-layer/bin/jev.mjs ...`. Provider по умолчанию — офлайн-детерминированный `demo`.
|
|
58
|
+
|
|
59
|
+
Для stdio MCP:
|
|
60
|
+
|
|
61
|
+
```sh
|
|
62
|
+
jev mcp
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Секреты должны находиться вне репозитория:
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
export JEV_LAYER_PROVIDER=openrouter
|
|
69
|
+
export OPENROUTER_API_KEY='provided-by-your-secret-store'
|
|
70
|
+
jev doctor --project /path/to/workspace
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Все три режима (`demo`, `openrouter` и прямой `typesafe`), их endpoints и порядок выбора конфигурации описаны в [руководстве по провайдерам](docs/PROVIDERS.md).
|
|
74
|
+
|
|
75
|
+
## Основные поверхности
|
|
76
|
+
|
|
77
|
+
- **Routing:** `jev_route` выбирает одну capability из набора, предоставленного host. Host повторно проверяет id и permissions.
|
|
78
|
+
- **Receipts/replay:** `jev_record_execution` связывает результат host с исходным `correlation_id`. JSONL-файлы находятся в `.jev/replay/cases.jsonl` и проверяются офлайн через `npm run replay:evaluate`.
|
|
79
|
+
- **Supervision:** `jev_supervise` возвращает ограниченные judgments о состоянии работы; детерминированная host policy преобразует их в `continue`, `verify`, `retry`, `finish` или `escalate`. Receipt хранит детерминированный `evidence_state`: `present`, `missing` или `contradictory`. Противоречивые evidence не могут привести к `finish`. Jev эти действия не выполняет.
|
|
80
|
+
- **Model routing:** `jev_model_route` возвращает одну рекомендацию из model profiles, которые объявил host, для следующего model call. Это только shadow: прежде чем менять provider/model setting, host обязан измерить outcome, retry, latency и cost. Решение связывается с последующим `jev_record_execution` по `correlation_id`; host записывает `result.model_route = { actual_model_id, retry_count, outcome }`, затем `npm run model-route:report -- /path/to/cases.jsonl` строит read-only evidence report.
|
|
81
|
+
- **Shadow compaction:** `jev_shadow_compaction` делает пакетный консервативный report с keep/drop-кандидатами для context, который передал host. Он никогда не меняет, не суммаризирует и не удаляет context; path, error, command и requirement pin-ятся до provider review, а provider failure оставляет все остальные items.
|
|
82
|
+
- **Context filtering:** опциональная детерминированная фильтрация `shadow` или `conservative` убирает устаревший context без LLM-суммаризации.
|
|
83
|
+
- **Experimental browser fast-path:** `jev_browser_step` выбирает одно ограниченное действие из observation host. Host предоставляет observation, approval, native execution и recovery.
|
|
84
|
+
- **Jev 1.14, зрение и computer use:** TypeSafe и OpenRouter принимают PNG/JPEG-скриншоты; адаптер преобразует формат изображений для каждого API. Опциональный `jev_computer_step` выбирает desktop-действие из набора host; Box-координаты требуют проверки видимости цели и host approval. См. [контракт](docs/AGENT-IMPLEMENTATION.md#vision-and-computer-use).
|
|
85
|
+
- **Fail-open:** при отключённом, недоступном, ошибочном или неубедительном Jev вызове управление возвращается в обычный host path. Jev не расширяет permissions и не угадывает execution.
|
|
86
|
+
|
|
87
|
+
Опциональные поверхности по умолчанию отключены:
|
|
88
|
+
|
|
89
|
+
```sh
|
|
90
|
+
JEV_BROWSER_FAST_PATH=1 jev mcp
|
|
91
|
+
JEV_LAYER_PROVIDER=openrouter JEV_COMPUTER_USE=1 jev mcp
|
|
92
|
+
JEV_SUPERVISION=1 jev mcp
|
|
93
|
+
JEV_CONTEXT_FILTER=shadow jev cli --input examples/route-request.json
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
## Harness adapters
|
|
97
|
+
|
|
98
|
+
Примеры находятся в `integrations/`:
|
|
99
|
+
|
|
100
|
+
- `integrations/hermes/` — для active plugin topology и safe change workflow см. [handoff локальному агенту (RU)](docs/HERMES-LOCAL-AGENT-HANDOFF.ru.md).
|
|
101
|
+
- `integrations/omp/`
|
|
102
|
+
- `integrations/codex/`
|
|
103
|
+
- `integrations/template/`
|
|
104
|
+
|
|
105
|
+
Для release baseline зафиксированы версии OMP `18.2.6`, Hermes `0.21.3` (`b675e6de`) и Codex CLI `0.155.1`, наблюдавшиеся в среде подготовки. Это базовая проверка версий и контрактов, а не полный набор provider/model tests; подробности — в [docs/COMPATIBILITY.md](docs/COMPATIBILITY.md).
|
|
106
|
+
|
|
107
|
+
### Добавление нового harness
|
|
108
|
+
|
|
109
|
+
1. Скопируйте `integrations/template/adapter.mjs`.
|
|
110
|
+
2. Добавьте `integrations/<harness>/` и secret-free config/example.
|
|
111
|
+
3. Вызовите `jev_route`, сохраните `correlation_id`, исполняйте только через native registry host, затем вызовите `jev_record_execution`.
|
|
112
|
+
4. Добавьте offline smoke fixture для успеха, fail-open, отказа в approval и execution receipt.
|
|
113
|
+
5. Зафиксируйте поддерживаемые версии и пройдите CI.
|
|
114
|
+
|
|
115
|
+
Подробности: [CONTRIBUTING.md](CONTRIBUTING.md), [docs/SCHEMA-VERSIONING.md](docs/SCHEMA-VERSIONING.md).
|
|
116
|
+
|
|
117
|
+
## Статус browser
|
|
118
|
+
|
|
119
|
+
Надёжность browser fast-path **проверена на текущих real-browser fixtures**: sequencing, visible-link navigation, native select, approval denial и recovery. **Оптимизация производительности остаётся экспериментальной**. Заявлений об ускорении браузера нет.
|
|
120
|
+
|
|
121
|
+
## Безопасность и совместимость
|
|
122
|
+
|
|
123
|
+
- Лицензия MIT: [LICENSE](LICENSE).
|
|
124
|
+
- jev-layer не является security boundary. Источник истины для permissions и approvals — host: [SECURITY.md](SECURITY.md).
|
|
125
|
+
- MCP tools, routing decisions, receipts, replay cases и adapter contract сейчас имеют version 1. Изменения должны быть additive и не ломать v1 молча.
|
|
126
|
+
- Не коммитьте credentials, секретные logs, `.env` или machine-specific paths.
|
|
127
|
+
|
|
128
|
+
## Проверка
|
|
129
|
+
|
|
130
|
+
```sh
|
|
131
|
+
npm test
|
|
132
|
+
npm run smoke
|
|
133
|
+
npm run fail-open-smoke
|
|
134
|
+
npm run clean-install-smoke
|
|
135
|
+
npm pack --dry-run
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
GitHub Actions запускает эти проверки на Node.js 20, 22 и 24. Provider-backed тесты требуют отдельного secret-managed окружения и не входят в обычный PR CI.
|
|
139
|
+
|
|
140
|
+
Документы: [CONTRIBUTING.md](CONTRIBUTING.md) · [SECURITY.md](SECURITY.md) · [RELEASE.md](RELEASE.md) · [CHANGELOG.md](CHANGELOG.md) · [Agent implementation guide](docs/AGENT-IMPLEMENTATION.md).
|