reflexes 0.2.0__tar.gz → 0.3.0__tar.gz
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.
- {reflexes-0.2.0 → reflexes-0.3.0}/.github/workflows/release.yml +10 -3
- {reflexes-0.2.0 → reflexes-0.3.0}/CHANGELOG.md +28 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/PKG-INFO +13 -14
- {reflexes-0.2.0 → reflexes-0.3.0}/README.md +12 -13
- {reflexes-0.2.0 → reflexes-0.3.0}/integrations-ts/openclaw/README.md +8 -6
- {reflexes-0.2.0 → reflexes-0.3.0}/integrations-ts/openclaw/openclaw.plugin.json +1 -1
- {reflexes-0.2.0 → reflexes-0.3.0}/integrations-ts/openclaw/package.json +1 -1
- {reflexes-0.2.0 → reflexes-0.3.0}/integrations-ts/openclaw/src/index.ts +12 -10
- {reflexes-0.2.0 → reflexes-0.3.0}/integrations-ts/openclaw/test/evaluators.test.js +13 -3
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/INSTALL.md +21 -18
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/SKILL.md +15 -16
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/_version.py +1 -1
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/config.py +5 -5
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/core.py +11 -11
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/doctor.py +7 -7
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/evaluators/systemone.py +14 -15
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_config.py +4 -4
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_core_fail_open.py +3 -4
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_doctor.py +4 -4
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_systemone_evaluator.py +7 -7
- {reflexes-0.2.0 → reflexes-0.3.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/.github/workflows/ci.yml +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/.github/workflows/pages.yml +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/.gitignore +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/CODE_OF_CONDUCT.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/CONTRIBUTING.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/FRAMEWORKS.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/LICENSE +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/NOTICE +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/SECURITY.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/SPEC.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/integrations-ts/openclaw/package-lock.json +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/integrations-ts/openclaw/src/policy.ts +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/integrations-ts/openclaw/test/plugin.test.js +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/integrations-ts/openclaw/test/policy.test.js +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/integrations-ts/openclaw/test/readme.test.js +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/integrations-ts/openclaw/tsconfig.json +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/pyproject.toml +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/scripts/build_wheel.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/scripts/make_release_assets.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/site/CNAME +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/site/index.html +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/references/add-framework-integration.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/references/troubleshooting.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/references/writing-policies.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/README.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/__init__.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/__main__.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/_context.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/_starter_policies/autonomy/Early-Stopping.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/_starter_policies/autonomy/Laziness-Detection.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/_starter_policies/autonomy/Unsourced-Claims.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/_starter_policies/integrity/Constraint-Violation.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/_starter_policies/integrity/Sycophancy.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/_starter_policies/integrity/Unconfirmed-Destructive-Action.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/api.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/document.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/evaluators/__init__.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/evaluators/_retry.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/evaluators/anthropic.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/evaluators/gemini.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/evaluators/openai_compatible.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/evaluators/zentropi.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/__init__.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/_claude_code_context.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/autogen.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/claude_agent_sdk.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/claude_code.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/crewai.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/google_adk.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/langgraph.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/nemo_guardrails.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/nous_hermes.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/nous_hermes_shell.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/openai_agents.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/openai_codex.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/pydantic_ai.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/integrations/smolagents.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/observability.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/policy_cache.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/policy_ref.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/policy_sources.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/reflexes/update.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/scripts/reflexes-doctor +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/skill/scripts/reflexes-hook +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/E2E_PLAN.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/__init__.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/fixtures/no-timeline-commitments.md +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_autogen_e2e.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_beta_evaluator_matrix_e2e.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_claude_agent_sdk_e2e.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_claude_code_e2e.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_claude_code_storage.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_codex_delegation.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_codex_e2e.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_concurrency.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_content_labeling_parity.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_context_assembler.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_core.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_core_sync_check.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_doc_code_blocks.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_document.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_google_adk_e2e.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_harness_install_fixes.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_hosted_policy_github_live.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_hosted_policy_live.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_langgraph_e2e.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_nemo_guardrails.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_nemo_guardrails_e2e.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_nous_hermes.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_nous_hermes_shell.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_observability.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_openai_agents.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_openai_agents_e2e.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_openai_compatible.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_policy_cache.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_policy_ref.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_policy_sources.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_pydantic_ai_e2e.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_readme_claims.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_readme_install_funnel.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_registration_wiring.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_sdk_protocol.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_session_start_update.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_skill_md.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_skill_sync.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_smolagents_e2e.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_spec_skill_parity.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_tier_consistency.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_update.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_upgrade_notice_hosts.py +0 -0
- {reflexes-0.2.0 → reflexes-0.3.0}/tests/test_zentropi_evaluator.py +0 -0
|
@@ -55,6 +55,9 @@ jobs:
|
|
|
55
55
|
# The package sets publishConfig.access=public for the scoped package.
|
|
56
56
|
npm:
|
|
57
57
|
runs-on: ubuntu-latest
|
|
58
|
+
permissions:
|
|
59
|
+
id-token: write # mint the OIDC token npm's trusted publishing verifies
|
|
60
|
+
contents: read
|
|
58
61
|
defaults:
|
|
59
62
|
run:
|
|
60
63
|
working-directory: integrations-ts/openclaw
|
|
@@ -64,12 +67,16 @@ jobs:
|
|
|
64
67
|
with:
|
|
65
68
|
node-version: "22"
|
|
66
69
|
registry-url: "https://registry.npmjs.org"
|
|
70
|
+
# OIDC trusted publishing needs npm >= 11.5.1; Node 22 ships npm 10.x.
|
|
71
|
+
- name: Upgrade npm for OIDC
|
|
72
|
+
run: npm install -g npm@latest
|
|
67
73
|
- name: Install + build + test
|
|
68
74
|
run: |
|
|
69
75
|
npm ci
|
|
70
76
|
npm test
|
|
71
|
-
|
|
77
|
+
# No NODE_AUTH_TOKEN: npm uses OIDC (trusted publisher configured on
|
|
78
|
+
# npmjs for @zentropi/reflexes-openclaw). An empty token line is exactly
|
|
79
|
+
# what causes ENEEDAUTH, so it must not be set here.
|
|
80
|
+
- name: Publish to npm (OIDC trusted publishing)
|
|
72
81
|
run: npm publish
|
|
73
|
-
env:
|
|
74
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
75
82
|
|
|
@@ -5,6 +5,33 @@ All notable changes to this project are documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.3.0] - 2026-11-17
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **Default evaluator is now Zentropi's hosted System One endpoint.** The
|
|
12
|
+
zero-config default (and the `type: systemone` fallback) is `cope-b-s1` over
|
|
13
|
+
`https://api.zentropi.ai/v1/systemone`, authenticated with `ZENTROPI_API_KEY`.
|
|
14
|
+
This replaces the 0.2.0 interim default, which served the same `cope-b-s1`
|
|
15
|
+
model via Parasail; Zentropi now hosts `/v1/systemone` directly, so Parasail
|
|
16
|
+
is no longer part of the default path. Applies to the Python package and the
|
|
17
|
+
OpenClaw plugin (whose default evaluator moves from the single-label
|
|
18
|
+
`type: zentropi` to batched `type: systemone`).
|
|
19
|
+
|
|
20
|
+
### Upgrading from 0.2.0
|
|
21
|
+
- **Set `ZENTROPI_API_KEY`** (from https://zentropi.ai) instead of
|
|
22
|
+
`PARASAIL_API_KEY`; the default no longer uses Parasail.
|
|
23
|
+
- To keep pointing at Parasail (or any other System One backend), set it
|
|
24
|
+
explicitly in `reflexes.yaml`:
|
|
25
|
+
```yaml
|
|
26
|
+
evaluators:
|
|
27
|
+
default:
|
|
28
|
+
type: systemone
|
|
29
|
+
model: parasail-cope-b-s1
|
|
30
|
+
endpoint: https://api.parasail.io/v1/systemone
|
|
31
|
+
api_key_env: PARASAIL_API_KEY
|
|
32
|
+
```
|
|
33
|
+
- No policy, binding, or trigger changes are required.
|
|
34
|
+
|
|
8
35
|
## [0.2.0] - 2026-11-07
|
|
9
36
|
|
|
10
37
|
### Added
|
|
@@ -141,6 +168,7 @@ Initial public release.
|
|
|
141
168
|
- **`reflexes doctor`** command to verify an installation (config
|
|
142
169
|
parses, evaluator reachable, hooks present, logging posture).
|
|
143
170
|
|
|
171
|
+
[0.3.0]: https://github.com/zentropi-ai/reflexes/releases/tag/v0.3.0
|
|
144
172
|
[0.2.0]: https://github.com/zentropi-ai/reflexes/releases/tag/v0.2.0
|
|
145
173
|
[0.1.1]: https://github.com/zentropi-ai/reflexes/releases/tag/v0.1.1
|
|
146
174
|
[0.1.0]: https://github.com/zentropi-ai/reflexes/releases/tag/v0.1.0
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: reflexes
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Reflexes — an open safety harness for AI agents.
|
|
5
5
|
License-Expression: Apache-2.0
|
|
6
6
|
License-File: LICENSE
|
|
@@ -93,8 +93,8 @@ existing config — then verifies with `reflexes doctor`. It's idempotent, so yo
|
|
|
93
93
|
can re-run it any time.
|
|
94
94
|
|
|
95
95
|
Prerequisites: Python 3.10+, [`uv`](https://docs.astral.sh/uv/), and — for the
|
|
96
|
-
default CoPE evaluator (
|
|
97
|
-
`
|
|
96
|
+
default CoPE evaluator (Zentropi's hosted System One endpoint) — a
|
|
97
|
+
`ZENTROPI_API_KEY` from [zentropi.ai](https://zentropi.ai). (You can swap in any
|
|
98
98
|
other evaluator — see [Evaluators](#evaluators).)
|
|
99
99
|
|
|
100
100
|
**Building an agent in code** with a Python framework (OpenAI Agents SDK,
|
|
@@ -186,9 +186,9 @@ reflexes:
|
|
|
186
186
|
evaluators:
|
|
187
187
|
default:
|
|
188
188
|
type: systemone # evaluates ALL policies at a decision point in ONE call
|
|
189
|
-
model:
|
|
190
|
-
endpoint: https://api.
|
|
191
|
-
api_key_env:
|
|
189
|
+
model: cope-b-s1 # Zentropi CoPE
|
|
190
|
+
endpoint: https://api.zentropi.ai/v1/systemone
|
|
191
|
+
api_key_env: ZENTROPI_API_KEY
|
|
192
192
|
|
|
193
193
|
# --- Operational settings (optional; safe defaults) ---
|
|
194
194
|
enabled: true # global on/off; false disables ALL enforcement. Absent = enabled.
|
|
@@ -309,21 +309,20 @@ limits.
|
|
|
309
309
|
|
|
310
310
|
The default evaluator model is **[Zentropi CoPE](https://huggingface.co/zentropi-ai/cope-b-a4b)** (`cope-b-s1`, sub-second latency) —
|
|
311
311
|
[purpose-built for policy-steerable classification](https://arxiv.org/abs/2512.18027). Out of the box it's served
|
|
312
|
-
over **
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
no further config.
|
|
312
|
+
over **Zentropi's hosted System One endpoint**, so a single call evaluates every
|
|
313
|
+
policy at a decision point in one forward pass. Set a `ZENTROPI_API_KEY` from
|
|
314
|
+
[zentropi.ai](https://zentropi.ai) in the environment your agent runs in and
|
|
315
|
+
policies fire with no further config.
|
|
316
316
|
|
|
317
317
|
**Privacy:** send only what your policies need to evaluate; review your
|
|
318
318
|
evaluator provider's retention terms for the endpoint you point at.
|
|
319
319
|
|
|
320
|
-
Prefer a different backend? Point Reflexes at any of the evaluators below
|
|
321
|
-
Parasail key required.
|
|
320
|
+
Prefer a different backend? Point Reflexes at any of the evaluators below.
|
|
322
321
|
|
|
323
322
|
Other evaluators are supported out of the box:
|
|
324
323
|
|
|
325
|
-
- `type: systemone` — a **System One decision model** (Zentropi `cope-b-s1`
|
|
326
|
-
|
|
324
|
+
- `type: systemone` — a **System One decision model** (Zentropi `cope-b-s1` on
|
|
325
|
+
Zentropi, TypeSafe `jev-latest` on OpenRouter, or a local one). This is the
|
|
327
326
|
default. Evaluates **every policy at a decision point in one call** — one
|
|
328
327
|
forward pass, not one request per policy. Swap backends with `model` +
|
|
329
328
|
`endpoint`; the spec is identical.
|
|
@@ -73,8 +73,8 @@ existing config — then verifies with `reflexes doctor`. It's idempotent, so yo
|
|
|
73
73
|
can re-run it any time.
|
|
74
74
|
|
|
75
75
|
Prerequisites: Python 3.10+, [`uv`](https://docs.astral.sh/uv/), and — for the
|
|
76
|
-
default CoPE evaluator (
|
|
77
|
-
`
|
|
76
|
+
default CoPE evaluator (Zentropi's hosted System One endpoint) — a
|
|
77
|
+
`ZENTROPI_API_KEY` from [zentropi.ai](https://zentropi.ai). (You can swap in any
|
|
78
78
|
other evaluator — see [Evaluators](#evaluators).)
|
|
79
79
|
|
|
80
80
|
**Building an agent in code** with a Python framework (OpenAI Agents SDK,
|
|
@@ -166,9 +166,9 @@ reflexes:
|
|
|
166
166
|
evaluators:
|
|
167
167
|
default:
|
|
168
168
|
type: systemone # evaluates ALL policies at a decision point in ONE call
|
|
169
|
-
model:
|
|
170
|
-
endpoint: https://api.
|
|
171
|
-
api_key_env:
|
|
169
|
+
model: cope-b-s1 # Zentropi CoPE
|
|
170
|
+
endpoint: https://api.zentropi.ai/v1/systemone
|
|
171
|
+
api_key_env: ZENTROPI_API_KEY
|
|
172
172
|
|
|
173
173
|
# --- Operational settings (optional; safe defaults) ---
|
|
174
174
|
enabled: true # global on/off; false disables ALL enforcement. Absent = enabled.
|
|
@@ -289,21 +289,20 @@ limits.
|
|
|
289
289
|
|
|
290
290
|
The default evaluator model is **[Zentropi CoPE](https://huggingface.co/zentropi-ai/cope-b-a4b)** (`cope-b-s1`, sub-second latency) —
|
|
291
291
|
[purpose-built for policy-steerable classification](https://arxiv.org/abs/2512.18027). Out of the box it's served
|
|
292
|
-
over **
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
no further config.
|
|
292
|
+
over **Zentropi's hosted System One endpoint**, so a single call evaluates every
|
|
293
|
+
policy at a decision point in one forward pass. Set a `ZENTROPI_API_KEY` from
|
|
294
|
+
[zentropi.ai](https://zentropi.ai) in the environment your agent runs in and
|
|
295
|
+
policies fire with no further config.
|
|
296
296
|
|
|
297
297
|
**Privacy:** send only what your policies need to evaluate; review your
|
|
298
298
|
evaluator provider's retention terms for the endpoint you point at.
|
|
299
299
|
|
|
300
|
-
Prefer a different backend? Point Reflexes at any of the evaluators below
|
|
301
|
-
Parasail key required.
|
|
300
|
+
Prefer a different backend? Point Reflexes at any of the evaluators below.
|
|
302
301
|
|
|
303
302
|
Other evaluators are supported out of the box:
|
|
304
303
|
|
|
305
|
-
- `type: systemone` — a **System One decision model** (Zentropi `cope-b-s1`
|
|
306
|
-
|
|
304
|
+
- `type: systemone` — a **System One decision model** (Zentropi `cope-b-s1` on
|
|
305
|
+
Zentropi, TypeSafe `jev-latest` on OpenRouter, or a local one). This is the
|
|
307
306
|
default. Evaluates **every policy at a decision point in one call** — one
|
|
308
307
|
forward pass, not one request per policy. Swap backends with `model` +
|
|
309
308
|
`endpoint`; the spec is identical.
|
|
@@ -44,8 +44,9 @@ reflexes:
|
|
|
44
44
|
action: deny
|
|
45
45
|
evaluators:
|
|
46
46
|
default:
|
|
47
|
-
type:
|
|
48
|
-
model: cope-
|
|
47
|
+
type: systemone
|
|
48
|
+
model: cope-b-s1
|
|
49
|
+
endpoint: https://api.zentropi.ai/v1/systemone
|
|
49
50
|
api_key_env: ZENTROPI_API_KEY
|
|
50
51
|
|
|
51
52
|
# --- Operational settings (optional; safe defaults) ---
|
|
@@ -71,10 +72,11 @@ labeler (`zentropi:<labeler_id>[@<version>]`), or a GitHub-hosted file
|
|
|
71
72
|
(`github:<owner>/<repo>/<path>@<tag-or-sha>`). Hosted policies are fetched and
|
|
72
73
|
cached on first use.
|
|
73
74
|
|
|
74
|
-
**Evaluator backends.** `type` can be `
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
**Evaluator backends.** `type` can be `systemone` (the default — a System One
|
|
76
|
+
decision model, Zentropi `cope-b-s1` served over `/v1/systemone`, which
|
|
77
|
+
evaluates **all policies at a decision point in one call**; also TypeSafe
|
|
78
|
+
`jev-latest` or a local one), `zentropi` (CoPE single-label `/v1/label`),
|
|
79
|
+
`openai`, `anthropic`, or `gemini`. The LLM backends are general
|
|
78
80
|
chat models prompted to classify, so they are looser and less calibrated than
|
|
79
81
|
CoPE; for them, set `model`, `api_key_env`, and (if needed) `endpoint`.
|
|
80
82
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"id": "reflexes",
|
|
3
3
|
"name": "Reflexes",
|
|
4
4
|
"description": "An open safety harness for AI agents — plain-English policy checks on tool calls and replies, evaluated by a policy-steerable classifier.",
|
|
5
|
-
"version": "0.
|
|
5
|
+
"version": "0.3.0",
|
|
6
6
|
"configSchema": {
|
|
7
7
|
"type": "object",
|
|
8
8
|
"additionalProperties": false,
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Registers a `before_tool_call` hook that evaluates each tool call
|
|
5
5
|
* against plain-English Reflexes policies via a policy-steerable
|
|
6
|
-
* evaluator. Supports the Python reference's backends — `
|
|
7
|
-
* default
|
|
8
|
-
*
|
|
6
|
+
* evaluator. Supports the Python reference's backends — `systemone` (the
|
|
7
|
+
* default: a System One decision model, Zentropi `cope-b-s1`, that evaluates
|
|
8
|
+
* all of a decision point's policies in one call), `zentropi` (CoPE single-
|
|
9
|
+
* label `/v1/label`), `openai`,
|
|
9
10
|
* `anthropic`, and `gemini` — selected by `evaluators.default.type`.
|
|
10
11
|
*
|
|
11
12
|
* Deny semantics (verified against openclaw 2026.6.11 source,
|
|
@@ -231,7 +232,7 @@ export function loadConfig(configPath?: string): ReflexesConfig | null {
|
|
|
231
232
|
}
|
|
232
233
|
}
|
|
233
234
|
const evalCfg = (doc?.evaluators as Record<string, Record<string, string>>)?.default ?? {};
|
|
234
|
-
const evalType = (evalCfg.type ?? "
|
|
235
|
+
const evalType = (evalCfg.type ?? "systemone").toLowerCase();
|
|
235
236
|
// Per-type defaults mirror the Python evaluator classes. `apiBase` is the
|
|
236
237
|
// base URL for zentropi (evaluate() appends /v1/label) and the models base
|
|
237
238
|
// for gemini; for openai/anthropic it is the full endpoint URL. `endpoint`
|
|
@@ -242,9 +243,10 @@ export function loadConfig(configPath?: string): ReflexesConfig | null {
|
|
|
242
243
|
openai: { apiBase: "https://api.openai.com/v1/chat/completions", keyEnv: "OPENAI_API_KEY" },
|
|
243
244
|
anthropic: { apiBase: "https://api.anthropic.com/v1/messages", keyEnv: "ANTHROPIC_API_KEY" },
|
|
244
245
|
gemini: { apiBase: "https://generativelanguage.googleapis.com/v1beta/models", keyEnv: "GEMINI_API_KEY" },
|
|
245
|
-
// System One decision models (multi-label, one call)
|
|
246
|
-
// full /v1/systemone endpoint; default is
|
|
247
|
-
|
|
246
|
+
// System One decision models (multi-label, one call) — the default.
|
|
247
|
+
// apiBase is the full /v1/systemone endpoint; default is cope-b-s1 on
|
|
248
|
+
// Zentropi (swap model + endpoint for jev-latest on OpenRouter, etc.).
|
|
249
|
+
systemone: { apiBase: "https://api.zentropi.ai/v1/systemone", keyEnv: "ZENTROPI_API_KEY" },
|
|
248
250
|
};
|
|
249
251
|
const d = EVAL_DEFAULTS[evalType] ?? EVAL_DEFAULTS.zentropi;
|
|
250
252
|
return {
|
|
@@ -903,7 +905,7 @@ export async function evaluate(
|
|
|
903
905
|
content: string,
|
|
904
906
|
opts: EvaluateOptions = {},
|
|
905
907
|
): Promise<Verdict> {
|
|
906
|
-
const type = (config.evaluator.type ?? "
|
|
908
|
+
const type = (config.evaluator.type ?? "systemone").toLowerCase();
|
|
907
909
|
if (type === "openai") return evaluateOpenAICompatible(config, criteria, content, opts);
|
|
908
910
|
if (type === "anthropic") return evaluateAnthropic(config, criteria, content, opts);
|
|
909
911
|
if (type === "gemini") return evaluateGemini(config, criteria, content, opts);
|
|
@@ -1005,7 +1007,7 @@ export async function evaluateManySystemOne(
|
|
|
1005
1007
|
};
|
|
1006
1008
|
});
|
|
1007
1009
|
const body = JSON.stringify({
|
|
1008
|
-
model: config.evaluator.model ?? "
|
|
1010
|
+
model: config.evaluator.model ?? "cope-b-s1",
|
|
1009
1011
|
questions,
|
|
1010
1012
|
state: { content },
|
|
1011
1013
|
});
|
|
@@ -1095,7 +1097,7 @@ async function evaluateBindings(
|
|
|
1095
1097
|
}),
|
|
1096
1098
|
);
|
|
1097
1099
|
|
|
1098
|
-
if ((config.evaluator.type ?? "
|
|
1100
|
+
if ((config.evaluator.type ?? "systemone").toLowerCase() === "systemone") {
|
|
1099
1101
|
const out: (Verdict | null)[] = bindings.map(() => null);
|
|
1100
1102
|
const live = criteria.map((c, i) => (c !== null ? i : -1)).filter((i) => i >= 0);
|
|
1101
1103
|
if (live.length === 0) return out;
|
|
@@ -214,11 +214,21 @@ test("systemone via evaluate(): single policy → one-question request", async (
|
|
|
214
214
|
assert.equal(v.label, "1");
|
|
215
215
|
});
|
|
216
216
|
|
|
217
|
-
test("loadConfig fills systemone defaults (
|
|
217
|
+
test("loadConfig fills systemone defaults (Zentropi + ZENTROPI_API_KEY)", () => {
|
|
218
218
|
const dir = mkdtempSync(join(tmpdir(), "rx-s1-"));
|
|
219
219
|
const p = join(dir, "reflexes.yaml");
|
|
220
220
|
writeFileSync(p, "reflexes:\n default: []\nevaluators:\n default:\n type: systemone\n");
|
|
221
221
|
const c = loadConfig(p);
|
|
222
|
-
assert.equal(c.evaluator.apiBase, "https://
|
|
223
|
-
assert.equal(c.evaluator.apiKeyEnv, "
|
|
222
|
+
assert.equal(c.evaluator.apiBase, "https://api.zentropi.ai/v1/systemone");
|
|
223
|
+
assert.equal(c.evaluator.apiKeyEnv, "ZENTROPI_API_KEY");
|
|
224
|
+
});
|
|
225
|
+
|
|
226
|
+
test("loadConfig default evaluator type is systemone (cope-b-s1 on Zentropi)", () => {
|
|
227
|
+
const dir = mkdtempSync(join(tmpdir(), "rx-s1def-"));
|
|
228
|
+
const p = join(dir, "reflexes.yaml");
|
|
229
|
+
writeFileSync(p, "reflexes:\n default: []\nevaluators:\n default: {}\n");
|
|
230
|
+
const c = loadConfig(p);
|
|
231
|
+
assert.equal(c.evaluator.type, "systemone");
|
|
232
|
+
assert.equal(c.evaluator.apiBase, "https://api.zentropi.ai/v1/systemone");
|
|
233
|
+
assert.equal(c.evaluator.apiKeyEnv, "ZENTROPI_API_KEY");
|
|
224
234
|
});
|
|
@@ -31,19 +31,19 @@ hold (verified by commands, not assumed):
|
|
|
31
31
|
2. The host's hook config contains Reflexes entries (Step 6).
|
|
32
32
|
3. `uv run <SKILL_DIR>/scripts/reflexes-doctor --config ~/.reflexes/reflexes.yaml` exits 0 (green) or 1 (warnings only). Exit 2 is a fail-open risk to fix.
|
|
33
33
|
|
|
34
|
-
If the doctor exits 1 with `no
|
|
34
|
+
If the doctor exits 1 with `no ZENTROPI_API_KEY set` (the default evaluator's
|
|
35
35
|
key), the install is wired but **not enforcing** — tell the user to add a key
|
|
36
36
|
(or swap the evaluator) and re-run; don't claim protection is live.
|
|
37
37
|
|
|
38
38
|
## Step 1: Prerequisites
|
|
39
39
|
|
|
40
|
-
Need Python 3.10+, `uv`, and (for the default CoPE
|
|
41
|
-
API key in `
|
|
40
|
+
Need Python 3.10+, `uv`, and (for the default CoPE evaluator on Zentropi) an
|
|
41
|
+
API key in `ZENTROPI_API_KEY`.
|
|
42
42
|
|
|
43
43
|
```bash
|
|
44
44
|
python3 --version # 3.10+
|
|
45
45
|
uv --version # if missing: pip install uv
|
|
46
|
-
test -n "$
|
|
46
|
+
test -n "$ZENTROPI_API_KEY" && echo "key: set" || echo "key: MISSING"
|
|
47
47
|
```
|
|
48
48
|
|
|
49
49
|
If the key is **MISSING**: tell the user to create a free account at
|
|
@@ -158,9 +158,9 @@ reflexes:
|
|
|
158
158
|
evaluators:
|
|
159
159
|
default:
|
|
160
160
|
type: systemone # evaluates ALL policies at a decision point in ONE call
|
|
161
|
-
model:
|
|
162
|
-
endpoint: https://api.
|
|
163
|
-
api_key_env:
|
|
161
|
+
model: cope-b-s1 # Zentropi CoPE
|
|
162
|
+
endpoint: https://api.zentropi.ai/v1/systemone
|
|
163
|
+
api_key_env: ZENTROPI_API_KEY
|
|
164
164
|
|
|
165
165
|
# --- Operational settings (optional; safe defaults) ---
|
|
166
166
|
enabled: true # global on/off — set false to disable ALL enforcement (policies kept). Absent = enabled.
|
|
@@ -229,8 +229,9 @@ Add the `[features]` header if it's absent; if the user has `hooks` set to
|
|
|
229
229
|
|
|
230
230
|
**(b) Trust the hooks.** Codex won't run command hooks until the user has
|
|
231
231
|
reviewed and **trusted** them — an untrusted hook looks wired but never fires
|
|
232
|
-
(fail open). Tell the user to
|
|
233
|
-
|
|
232
|
+
(fail open). Tell the user to review the Reflexes definitions and trust them:
|
|
233
|
+
in the **Codex CLI**, run `/hooks`; in the **Codex app** (Codex in ChatGPT), open
|
|
234
|
+
**Settings → Hooks**. Then restart Codex. (Editing a hook's command later
|
|
234
235
|
changes its hash and requires trusting it again.)
|
|
235
236
|
|
|
236
237
|
`reflexes-doctor` confirms (a) but **cannot see Codex's trust state**, so it
|
|
@@ -304,7 +305,7 @@ Then:
|
|
|
304
305
|
all** (`before_agent_finalize` is blocked, so `Sycophancy` and the autonomy
|
|
305
306
|
bundle silently don't run). Verified on openclaw 2026.6.11.
|
|
306
307
|
2. Ensure `~/.reflexes/reflexes.yaml` + policies exist (Steps 4–5); put
|
|
307
|
-
`
|
|
308
|
+
`ZENTROPI_API_KEY` (the default evaluator's key) in the gateway env; restart
|
|
308
309
|
the gateway.
|
|
309
310
|
|
|
310
311
|
**Full trigger parity.** All three default integrity policies run:
|
|
@@ -335,11 +336,12 @@ enforcing; `1` = warnings (commonly no API key — wired but not enforcing);
|
|
|
335
336
|
- **Doctor exit 0:** Reflexes is installed and enforcing on `<HOST>`.
|
|
336
337
|
Restart `<HOST>` to load the hook. The 3 integrity policies are active.
|
|
337
338
|
- **Doctor exit 1 (no key):** Reflexes is wired but not enforcing yet.
|
|
338
|
-
The user must add `
|
|
339
|
-
https://
|
|
339
|
+
The user must add `ZENTROPI_API_KEY` (the default evaluator's key, from
|
|
340
|
+
https://zentropi.ai) or swap the evaluator, then re-run the doctor.
|
|
340
341
|
- **Codex, trust not yet granted:** the doctor can't see Codex's hook-trust
|
|
341
342
|
state, so even a fully-wired Codex install is **not enforcing** until the user
|
|
342
|
-
|
|
343
|
+
trusts the Reflexes definitions — in the Codex CLI via `/hooks`, or in the
|
|
344
|
+
Codex app (Codex in ChatGPT) via **Settings → Hooks** — and restarts. Tell
|
|
343
345
|
the user this explicitly — it's a distinct "wired but not enforcing" case from
|
|
344
346
|
the no-key one, and it needs a human (it can't be done headlessly).
|
|
345
347
|
|
|
@@ -419,11 +421,12 @@ options = ClaudeAgentOptions(
|
|
|
419
421
|
- **Codex does nothing:** usually one of two host-side gates — (1) hooks not
|
|
420
422
|
enabled: add `hooks = true` under the `[features]` table in
|
|
421
423
|
`~/.codex/config.toml` (a bare top-level key is ignored); `reflexes-doctor`
|
|
422
|
-
flags this. Or (2) hooks not **trusted**:
|
|
423
|
-
`/hooks
|
|
424
|
-
silently skips untrusted hooks (same symptom as an unreachable
|
|
425
|
-
fail-open), and editing a hook re-requires trust. The doctor can't
|
|
426
|
-
state, so it warns you to verify (2) yourself by triggering a known
|
|
424
|
+
flags this. Or (2) hooks not **trusted**: trust the Reflexes definitions
|
|
425
|
+
(Codex CLI: run `/hooks`; Codex app in ChatGPT: **Settings → Hooks**) and
|
|
426
|
+
restart — Codex silently skips untrusted hooks (same symptom as an unreachable
|
|
427
|
+
evaluator: fail-open), and editing a hook re-requires trust. The doctor can't
|
|
428
|
+
see trust state, so it warns you to verify (2) yourself by triggering a known
|
|
429
|
+
policy.
|
|
427
430
|
|
|
428
431
|
## Re-running
|
|
429
432
|
|
|
@@ -8,7 +8,7 @@ description: >
|
|
|
8
8
|
stop and ask the user.
|
|
9
9
|
metadata:
|
|
10
10
|
author: zentropi
|
|
11
|
-
version: "0.
|
|
11
|
+
version: "0.3.0"
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
# Reflexes
|
|
@@ -18,8 +18,8 @@ Reflexes is an open safety harness for AI agents: at inference time it checks ea
|
|
|
18
18
|
Reflexes is stewarded by **Zentropi** (https://zentropi.ai) and is open source with an open specification.
|
|
19
19
|
|
|
20
20
|
**Before you start.** A host-CLI install needs Python 3.10+,
|
|
21
|
-
[`uv`](https://docs.astral.sh/uv/), and — for the default CoPE
|
|
22
|
-
|
|
21
|
+
[`uv`](https://docs.astral.sh/uv/), and — for the default CoPE evaluator on
|
|
22
|
+
Zentropi — a `ZENTROPI_API_KEY` (https://zentropi.ai); full steps are in
|
|
23
23
|
`INSTALL.md`.
|
|
24
24
|
Throughout, **`SKILL_DIR`** = this skill's own directory (it holds `SKILL.md`,
|
|
25
25
|
`INSTALL.md`, `scripts/`, and `reflexes/`).
|
|
@@ -35,7 +35,7 @@ file*). The pieces it wires together:
|
|
|
35
35
|
- **Trigger** — *when* a policy is checked: `on_input`, `before_tool_call`, `after_tool_call`, or `before_response`.
|
|
36
36
|
- **Action** — *what happens* on a match: `deny` (block and feed the policy back so the agent self-corrects), `flag`, or `log`.
|
|
37
37
|
- **Binding** — a line in `reflexes.yaml` tying a policy to a trigger and an action.
|
|
38
|
-
- **Evaluator** — the model that scores content against a policy to decide whether it matches. The default is **CoPE**, Zentropi's small open model purpose-built to classify content against a plain-English policy — served out of the box over
|
|
38
|
+
- **Evaluator** — the model that scores content against a policy to decide whether it matches. The default is **CoPE**, Zentropi's small open model purpose-built to classify content against a plain-English policy — served out of the box over Zentropi's hosted System One endpoint (set `ZENTROPI_API_KEY`). You can also use any System One backend, OpenAI, Anthropic, or Gemini.
|
|
39
39
|
|
|
40
40
|
At runtime, Reflexes checks the agent at each trigger, asks the evaluator whether
|
|
41
41
|
the bound policies match, and on a match takes the action — such as `deny`,
|
|
@@ -53,7 +53,7 @@ A host-CLI install bundles six **starter policies** into `~/.reflexes/policies/`
|
|
|
53
53
|
As Reflexes is a **safety harness**, treat these as hard rules:
|
|
54
54
|
|
|
55
55
|
- **Follow the steps in order; don't improvise.** If a check fails, **stop and ask the user** — don't invent a workaround.
|
|
56
|
-
- **The doctor is your proof.** `reflexes-doctor` verifies enforcement is actually live — the config parses, policies load, and the evaluator answers a live probe. Reflexes fails *open* (a config typo or an unreachable evaluator silently degrades to "every check passes"), so **run it after any config change**: `uv run <SKILL_DIR>/scripts/reflexes-doctor --config ~/.reflexes/reflexes.yaml`. Read the exit code — **0** = enforcing (green); **1** = wired but not fully enforcing (warnings to fix, e.g. a missing `
|
|
56
|
+
- **The doctor is your proof.** `reflexes-doctor` verifies enforcement is actually live — the config parses, policies load, and the evaluator answers a live probe. Reflexes fails *open* (a config typo or an unreachable evaluator silently degrades to "every check passes"), so **run it after any config change**: `uv run <SKILL_DIR>/scripts/reflexes-doctor --config ~/.reflexes/reflexes.yaml`. Read the exit code — **0** = enforcing (green); **1** = wired but not fully enforcing (warnings to fix, e.g. a missing `ZENTROPI_API_KEY`); **2** = fail-open risk (stop and fix before relying on it).
|
|
57
57
|
- **Don't edit the user's `~/.reflexes/reflexes.yaml` or policies without their explicit OK.**
|
|
58
58
|
- **Keep Reflexes current.** An automatic check runs on some hosts, but it doesn't cover all of them, so **also run `--check-update` yourself at least daily** (cheap and cached). When an update is available, tell the user and apply on their go-ahead — never auto-apply (see [Updating](#updating)).
|
|
59
59
|
|
|
@@ -95,9 +95,9 @@ reflexes: # WHAT is enforced — named groups of bindings
|
|
|
95
95
|
evaluators: # WHO scores content against the policies
|
|
96
96
|
default:
|
|
97
97
|
type: systemone # evaluates ALL policies at a decision point in ONE call
|
|
98
|
-
model:
|
|
99
|
-
endpoint: https://api.
|
|
100
|
-
api_key_env:
|
|
98
|
+
model: cope-b-s1 # Zentropi CoPE
|
|
99
|
+
endpoint: https://api.zentropi.ai/v1/systemone
|
|
100
|
+
api_key_env: ZENTROPI_API_KEY
|
|
101
101
|
|
|
102
102
|
# --- Operational settings (optional; safe defaults) ---
|
|
103
103
|
enabled: true # global on/off; false disables ALL enforcement. Absent = enabled.
|
|
@@ -271,19 +271,18 @@ version / default branch.
|
|
|
271
271
|
|
|
272
272
|
The evaluator scores content against a policy. The zero-config default — what
|
|
273
273
|
runs when `reflexes.yaml` has no `evaluators:` block — is **Zentropi's CoPE
|
|
274
|
-
model `cope-b-s1`, served over
|
|
275
|
-
model purpose-built for content-policy evaluation
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
`evaluators.default` block to `~/.reflexes/reflexes.yaml`:
|
|
274
|
+
model `cope-b-s1`, served over Zentropi's hosted System One endpoint**. CoPE is a
|
|
275
|
+
small model purpose-built for content-policy evaluation. Set `ZENTROPI_API_KEY`
|
|
276
|
+
and policies fire with no further config. You can customize the evaluator by
|
|
277
|
+
adding an `evaluators.default` block to `~/.reflexes/reflexes.yaml`:
|
|
279
278
|
|
|
280
279
|
```yaml
|
|
281
280
|
evaluators:
|
|
282
281
|
default:
|
|
283
282
|
type: systemone # evaluates ALL policies at a decision point in ONE call
|
|
284
|
-
model:
|
|
285
|
-
endpoint: https://api.
|
|
286
|
-
api_key_env:
|
|
283
|
+
model: cope-b-s1 # the zero-config default (set ZENTROPI_API_KEY)
|
|
284
|
+
endpoint: https://api.zentropi.ai/v1/systemone
|
|
285
|
+
api_key_env: ZENTROPI_API_KEY
|
|
287
286
|
# Or point at another System One backend — the spec is identical:
|
|
288
287
|
# model: jev-latest / endpoint: https://openrouter.ai/api/v1/systemone / api_key_env: OPENROUTER_API_KEY
|
|
289
288
|
# model: cope-b-s1 / endpoint: http://localhost:8000/v1/systemone (local self-deployment, omit api_key_env)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
# Canonical Reflexes version. Single source of truth for both the bundled
|
|
2
2
|
# runtime (no package metadata on disk) and the pip package. Must stay in
|
|
3
3
|
# sync with the `version:` field in SKILL.md frontmatter (enforced by a test).
|
|
4
|
-
__version__ = "0.
|
|
4
|
+
__version__ = "0.3.0"
|
|
@@ -154,16 +154,16 @@ def configure_from_file(config_file: str | Path = "reflexes.yaml"):
|
|
|
154
154
|
default evaluator (the first one listed).
|
|
155
155
|
|
|
156
156
|
With no `evaluators:` block, the zero-config default is used: Zentropi CoPE
|
|
157
|
-
(cope-b-s1) over
|
|
157
|
+
(cope-b-s1) over Zentropi's hosted System One endpoint (see
|
|
158
158
|
`reflexes.core._configure_default`).
|
|
159
159
|
|
|
160
160
|
Example:
|
|
161
161
|
evaluators:
|
|
162
162
|
cope:
|
|
163
163
|
type: systemone
|
|
164
|
-
model:
|
|
165
|
-
endpoint: https://api.
|
|
166
|
-
api_key_env:
|
|
164
|
+
model: cope-b-s1
|
|
165
|
+
endpoint: https://api.zentropi.ai/v1/systemone
|
|
166
|
+
api_key_env: ZENTROPI_API_KEY
|
|
167
167
|
|
|
168
168
|
gpt-oss:
|
|
169
169
|
type: openai
|
|
@@ -195,7 +195,7 @@ def configure_from_file(config_file: str | Path = "reflexes.yaml"):
|
|
|
195
195
|
evaluators = raw.get("evaluators")
|
|
196
196
|
if not evaluators:
|
|
197
197
|
# No `evaluators:` block → the zero-config default: CoPE (cope-b-s1) via
|
|
198
|
-
#
|
|
198
|
+
# Zentropi's hosted System One endpoint. Configure it explicitly so `_evaluator`
|
|
199
199
|
# is set, exactly as if the user had written the equivalent `evaluators:`
|
|
200
200
|
# block. Returning here instead (the old behavior) left `_evaluator` None,
|
|
201
201
|
# which a host's startup gate reads as a fail-open — a FALSE alarm, since
|
|
@@ -46,15 +46,14 @@ _evaluator_error: str | None = None
|
|
|
46
46
|
|
|
47
47
|
# Zero-config default evaluator. When a reflexes.yaml has no `evaluators:` block
|
|
48
48
|
# (or configure() was never called), this is what runs: Zentropi's CoPE model
|
|
49
|
-
# cope-b-s1, served over
|
|
50
|
-
#
|
|
51
|
-
# set PARASAIL_API_KEY and policies fire with no further config. Absent the key,
|
|
49
|
+
# cope-b-s1, served over Zentropi's hosted System One endpoint. Set
|
|
50
|
+
# ZENTROPI_API_KEY and policies fire with no further config. Absent the key,
|
|
52
51
|
# configure() fails open like any missing-key default (policies simply don't
|
|
53
52
|
# fire yet; the host keeps running). Swap to any evaluator via reflexes.yaml.
|
|
54
53
|
DEFAULT_EVALUATOR = "systemone"
|
|
55
|
-
DEFAULT_MODEL = "
|
|
56
|
-
DEFAULT_ENDPOINT = "https://api.
|
|
57
|
-
DEFAULT_API_KEY_ENV = "
|
|
54
|
+
DEFAULT_MODEL = "cope-b-s1"
|
|
55
|
+
DEFAULT_ENDPOINT = "https://api.zentropi.ai/v1/systemone"
|
|
56
|
+
DEFAULT_API_KEY_ENV = "ZENTROPI_API_KEY"
|
|
58
57
|
|
|
59
58
|
# True when the currently-configured evaluator is the zero-config default above
|
|
60
59
|
# (not an explicit user choice). The doctor reads this to decide WARN vs FAIL on
|
|
@@ -320,9 +319,10 @@ def configure(
|
|
|
320
319
|
|
|
321
320
|
def _configure_default() -> None:
|
|
322
321
|
"""Configure the zero-config default evaluator — Zentropi CoPE (cope-b-s1)
|
|
323
|
-
over
|
|
324
|
-
if it's unset, ``configure()`` fails open
|
|
325
|
-
keeps running) exactly as any other
|
|
322
|
+
over Zentropi's hosted System One endpoint. Pulls the key from
|
|
323
|
+
``ZENTROPI_API_KEY``; if it's unset, ``configure()`` fails open
|
|
324
|
+
(``_evaluator`` left None, host keeps running) exactly as any other
|
|
325
|
+
missing-key default would.
|
|
326
326
|
|
|
327
327
|
Marks ``_default_evaluator_active`` so the doctor can tell this apart from an
|
|
328
328
|
explicitly chosen evaluator when deciding WARN vs FAIL on a missing key.
|
|
@@ -343,8 +343,8 @@ def _get_evaluator() -> Evaluator | None:
|
|
|
343
343
|
unavailable (return EvaluatorError, fail open per SPEC §4.3).
|
|
344
344
|
|
|
345
345
|
On first call without prior ``configure()``, attempts the zero-config
|
|
346
|
-
default (CoPE
|
|
347
|
-
(e.g. missing ``
|
|
346
|
+
default (CoPE on Zentropi — see ``_configure_default``); if that fails
|
|
347
|
+
(e.g. missing ``ZENTROPI_API_KEY``) the function returns None rather than
|
|
348
348
|
raising.
|
|
349
349
|
"""
|
|
350
350
|
if _evaluator is None:
|
|
@@ -79,7 +79,7 @@ def _check_evaluator(config_path: Path | None) -> tuple[str, str]:
|
|
|
79
79
|
# Surface the specific cause (e.g. "Anthropic API key required. Set
|
|
80
80
|
# ANTHROPIC_API_KEY…") that configure() stashed, not just a generic line.
|
|
81
81
|
reason = core._evaluator_error or "check evaluators: section + API key env"
|
|
82
|
-
# A missing key for the ZERO-CONFIG DEFAULT (CoPE
|
|
82
|
+
# A missing key for the ZERO-CONFIG DEFAULT (CoPE on Zentropi, used when
|
|
83
83
|
# reflexes.yaml has no `evaluators:` block) is a clean WARN — the install
|
|
84
84
|
# isn't broken, it just isn't enforcing yet: get a key or point at your
|
|
85
85
|
# own evaluator. An explicitly chosen evaluator missing its key is a
|
|
@@ -88,8 +88,8 @@ def _check_evaluator(config_path: Path | None) -> tuple[str, str]:
|
|
|
88
88
|
return (
|
|
89
89
|
_WARN,
|
|
90
90
|
f"no {core.DEFAULT_API_KEY_ENV} set — the default CoPE evaluator "
|
|
91
|
-
"(cope-b-s1
|
|
92
|
-
"Get a key at https://
|
|
91
|
+
"(cope-b-s1 on Zentropi) needs one, so policies will NOT fire yet. "
|
|
92
|
+
"Get a key at https://zentropi.ai and put it where this host picks "
|
|
93
93
|
"up environment variables so it's visible here (e.g. Codex reads "
|
|
94
94
|
"`~/.codex/.env`) — not in a shared config file — or swap to an "
|
|
95
95
|
"evaluator you already have a key for (see 'Swap the Evaluator'). "
|
|
@@ -184,10 +184,10 @@ def _check_hosts() -> list[tuple[str, str, str]]:
|
|
|
184
184
|
results.append(("OpenAI Codex", _WARN,
|
|
185
185
|
f"hooks wired in {cx} and `[features] hooks` enabled — but Codex "
|
|
186
186
|
"also requires you to TRUST command hooks, which can't be verified "
|
|
187
|
-
"from here.
|
|
188
|
-
"
|
|
189
|
-
"
|
|
190
|
-
"re-requires trust.)"))
|
|
187
|
+
"from here. Trust the Reflexes definitions (Codex CLI: run `/hooks`; "
|
|
188
|
+
"Codex app in ChatGPT: Settings → Hooks), restart, then confirm a "
|
|
189
|
+
"known policy actually fires. (Until then, untrusted hooks are "
|
|
190
|
+
"silently skipped — fail-open. Editing a hook re-requires trust.)"))
|
|
191
191
|
hm = home / ".hermes" / "config.yaml"
|
|
192
192
|
if (home / ".hermes").exists():
|
|
193
193
|
wired = hm.exists() and _wired(hm)
|