This release is a pre-release and may not be stable for production use.
@dreameros/hooks
DreamerOS governance primitives shipped as Claude Code hooks, skills, and an in-process SDK MCP server.
Models generate. DreamerOS governs. Human decides.
What you get
- DAIM PreToolUse hook - input rewriting, em-dash strip, injection check, depth proportionality
- IFP three-axis PostToolUse hook - Fidelity, Consequence, Endgame verification
- EDE UserPromptSubmit hook - intent archaeology and prompt restructuring
- Mind's Eye additionalContext injector - depth-calibrated response composition
- DRM SubagentStop hook - automatic cross-engine memory sync via DRM:: tag protocol
- Skill pack:
/ifp-verify,/daim,/ede,/mind-eye,/constellation-route - In-process SDK MCP server exposing all of the above as Agent SDK tools
Install
TypeScript / Node
npm install @dreameros/hooks
npx @dreameros/hooks init
Python
pip install dreameros-hooks
python -m dreameros_hooks init
Both init commands drop a .claude/hooks.json and .claude/skills/ tree in the current repo, wired to the public DreamerOS gateway by default. Set DREAMEROS_GATEWAY_URL and DREAMEROS_API_KEY to point at a self-hosted gateway.
Tiers
- Free - 100 invocations/day, phone-home telemetry on
- Pro - $20/mo, unlimited, cloud SCS
- Elite - SOC2, IFP audit log, Trust Wall, per-org SCS
See https://dreameros.app/pricing.
License
MIT. The wedge is permissive on purpose. The gateway core (where the verifiers actually run) is BSL 1.1.
Status
Phase 1 scaffold. Not yet production. See governance/proposed/CLAUDE_PLATFORM_DISRUPTION_MAP_2026_05_12.md for the full execution plan.
Subagent dispatch hygiene
Hosts using @dreameros/hooks to dispatch subagents inherit the gateway's bounded-execution canon. Spec at governance/00_CORE/BOUNDED_EXECUTION_DISCIPLINE_v1_0_0.md (LIVING_INDEX entry, sha256 8c52dab59f3b592b8dcfb0f2f645930b9a8a05005088bbea467cf4c8a3773233).
The strongest rule: every long-running call carries an exit bound. When this SDK fans out work to a subagent or schedules a long-running tool call, the dispatcher must include the bound in the prompt or call:
- Subagent prompt: "if 5 min no progress, report PARTIAL and STOP, no loop, no retry past 2 attempts."
- Tool call: explicit
timeoutplus an innercurl --max-timeor equivalent. - Watch loop: prefer a
Monitor-style until-loop over a polling background process. - Engine fan-out: prefer single-engine routing over multi-engine consensus unless the claim demands cross-check.
The DRM SubagentStop hook persists the subagent result, but the bound is what guarantees the hook ever runs. Without the bound the subagent can wait indefinitely and the Stop event never fires.
Operator vocabulary that invokes this contract: "bound this", "add a 5-min self-terminate", "sub-agent it" (the bound contract auto-applies per the agent definition). Full primer at substrate memory 9398acdc-6bb7-4709-abad-a7bcb44ff265 (OPERATOR_VOCABULARY_PRIMER_v1_0_0).
Modality-Routed Governance + Connector-as-Turn + SAIP
Hosts using @dreameros/hooks inherit three additional canon contracts ratified 2026-06-26. Specs:
governance/00_CORE/MODALITY_ROUTED_GOVERNANCE_v1_0_0.md(sha25685192d98fa10e46015256dc4f9d7f791ca1e80592d39f0658ae62b15fb2317d3).governance/00_CORE/CONNECTOR_AS_TURN_v1_0_0.md(sha25693b912a70117d7e853c69a51350564263fa74676fd81477871a3a19c4918072d).governance/00_CORE/SENSE_AGNOSTIC_INTEGRITY_PROTOCOL_v1_0_0.md(sha2568f2a9a983f4b70c6816c55792cd19597dde160392806e955eff8c074c31324b9).
What the SDK consumer must respect:
- MRG. When the host dispatches a multi-engine fan-out (consensus, compare, constellation), the routing decision is itself a governed event. Each contributor call carries the modality tag, the EDE detected intent, and an inner bound per BOUNDED_EXECUTION_DISCIPLINE.
- CaT. When the host wires a connector (OAuth pull, paste-token, MCP read, scheduled sync), the ingest path must fire the 9-step pattern (source-attest, EDE, DAIM, IFP fence, modality-route, write, CTCI receipt, governance event, observable failure) before any byte lands in substrate or the system-prompt block. The
connector_ifp_gate._evaluateextension point is the integration seam. - SAIP. Every input modality (text, voice, image, file, snapshot, connector) inherits the IFP Five Pillars per the modality coverage matrix in the SAIP spec. The host must not silently absorb non-text content; voice goes through ASR plus the text-side gates, image goes through DAIM plus IFP fence on prompt and pixel content, file goes through EDE plus DAIM plus IFP fence plus CTCI receipt.
Operator vocabulary that invokes the trinity: "route this by strength" (MRG), "make this connector a turn" (CaT), "make this sense-agnostic" (SAIP). Full primer at substrate memory 9398acdc-6bb7-4709-abad-a7bcb44ff265 (OPERATOR_VOCABULARY_PRIMER_v1_0_0).
CI/CD Operator Primer
Hosts using @dreameros/hooks to drive a ship from PR-open to runtime-live inherit the CI/CD Operator Primer canon. Spec at governance/00_CORE/CI_CD_OPERATOR_PRIMER_v1_0_0.md (sha256 3e46ecd15e1a86aa92b5ab4fff5f56501682e9ca9a408876f99b69859f0d046c). HOW-layer companion at governance/04_OPERATIONS/crown_jewels_ci_cd_operator_primer_v1_0_0.md (sha256 4d5d6cf51e686ecab2c46ce017bc600a0eb417b58fb407c90ddf6685398fccb4).
The single magic phrase: "Ship it and verify customer-usable end-to-end." That invokes the full seven-stage pipeline plus the P37 six-row walk plus the substrate write at the end.
The seven stages (each is a separate referent; skipping one is a P37-row-6 violation):
- Code wired - imports resolve, lint clean.
- PR opened - branch pushed, body cites intent and touch surface.
- CI checks - every gate has a verdict on the head SHA.
- Merged - auto-merge fired on green; the merge SHA is the new head.
- Deploy fires - the host's deploy mechanism ran for the merge SHA.
- Runtime live - a runtime signal on the deploy SHA exists (boot log, 200 on the affected route, fresh log line emitted by the change).
- P37 customer-usable - the six-row walk returns PASS on every row.
Key verification commands an SDK consumer runs (full recipe in the HOW companion):
- CI verdict on a SHA:
mcp__github__pull_request_readthenmcp__github__get_check_runfor each gate. - Gateway deploy:
mcp__DreamerOS_Live__dreameros_railway action=deployments- newest SUCCESS,meta.commitHashis the live SHA. - Frontend deploy:
mcp__Vercel__list_deploymentsthenmcp__Vercel__get_deploymentforstate=READYon the merge SHA. - Runtime log signal:
mcp__DreamerOS_Live__dreameros_railway action=logs deployment_id=<id>then grep for the new behavior's log line. - Substrate write at the end of every ship:
mcp__DreamerOS_Live__dreameros_rememberwithmemory_type=proceduraland tags includingcold-start-anchor,next-session-read-first, andanti-rediscoverywhen the ship produced new operational knowledge.
Operator vocabulary that invokes the contract: "ship it and verify customer-usable end-to-end" (full canon stack), "ship it" (stages 1 through 4 only, report PARTIAL), "is this live?" (stages 5 and 6 against a SHA, cite runtime signal), "walk the P37 on X" (six-row walk against X). Full primer at substrate memory 9398acdc-6bb7-4709-abad-a7bcb44ff265 (OPERATOR_VOCABULARY_PRIMER_v1_0_0).
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dreameros_hooks-0.1.0a2.tar.gz.
File metadata
- Download URL: dreameros_hooks-0.1.0a2.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a8279e902b6e0e82b00e40850927bfb3cc9db299f32ca3a6dcbc5de02271e07f
|
|
| MD5 |
f71105b9a3466f56031d353a69d6f7e2
|
|
| BLAKE2b-256 |
f834a13b741d2826f48dd8c1366a806716e5be11ee54d8c50759ee9b47be8107
|
Provenance
The following attestation bundles were made for dreameros_hooks-0.1.0a2.tar.gz:
Publisher:
release-hooks.yml on gbude-sudo/dreameros-scs-gateway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dreameros_hooks-0.1.0a2.tar.gz -
Subject digest:
a8279e902b6e0e82b00e40850927bfb3cc9db299f32ca3a6dcbc5de02271e07f - Sigstore transparency entry: 2533700407
- Sigstore integration time:
-
Permalink:
gbude-sudo/dreameros-scs-gateway@006fd4d544ce895459087c082aaea3c9ef2bffff -
Branch / Tag:
refs/tags/hooks-v0.1.0-alpha.4 - Owner: https://github.com/gbude-sudo
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-hooks.yml@006fd4d544ce895459087c082aaea3c9ef2bffff -
Trigger Event:
push
-
Statement type:
File details
Details for the file dreameros_hooks-0.1.0a2-py3-none-any.whl.
File metadata
- Download URL: dreameros_hooks-0.1.0a2-py3-none-any.whl
- Upload date:
- Size: 16.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca32f48d90a0119bb639428af098c91bf610a45c62be71d403e2d8f12c86d51f
|
|
| MD5 |
edd48f14411fa241d2c87989b9cb40d0
|
|
| BLAKE2b-256 |
b2c559a57ad472817149db14f1099f46fc5a7ff456b3364e58dc4ef5505d23f6
|
Provenance
The following attestation bundles were made for dreameros_hooks-0.1.0a2-py3-none-any.whl:
Publisher:
release-hooks.yml on gbude-sudo/dreameros-scs-gateway
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dreameros_hooks-0.1.0a2-py3-none-any.whl -
Subject digest:
ca32f48d90a0119bb639428af098c91bf610a45c62be71d403e2d8f12c86d51f - Sigstore transparency entry: 2533700653
- Sigstore integration time:
-
Permalink:
gbude-sudo/dreameros-scs-gateway@006fd4d544ce895459087c082aaea3c9ef2bffff -
Branch / Tag:
refs/tags/hooks-v0.1.0-alpha.4 - Owner: https://github.com/gbude-sudo
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-hooks.yml@006fd4d544ce895459087c082aaea3c9ef2bffff -
Trigger Event:
push
-
Statement type: