Metadata-Version: 2.4
Name: cordis-bridge
Version: 0.1.1
Summary: CLI and optional MCP bridge for the Cordis cognitive runtime.
Author: Cordis Contributors
License: MIT
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: cordis-core<0.2,>=0.1.1
Requires-Dist: cordis-memory<0.2,>=0.1.1
Requires-Dist: cordis-runtime<0.2,>=0.1.1
Provides-Extra: mcp
Requires-Dist: mcp<2,>=1.26; extra == "mcp"
Dynamic: license-file

# Cordis Bridge v0.1

`cordis-bridge` exposes the existing CORDIS cognitive loop to a real host.
It has no model, planner, HTTP server, or execution permission of its own.

The bridge provides one shared Service behind two transports:

- a JSON-only CLI for local hosts and scripts;
- an optional stdio MCP server for agent hosts.

```text
host -> begin -> compact context + control signal
host -> observe / check-action -> workflow evidence
host -> finish -> Core feedback + Memory episode
later host -> begin -> changed cognition
```

By default, durable state lives in `.cordis/` below the current directory:

```text
.cordis/state.json      Core learning state
.cordis/cognition.db    Memory and relationship graph
.cordis/focus.json      Active host-task focus for CLI/MCP process recovery
```

## CLI

Every command reads one JSON object from a file or standard input and emits
one JSON object. The input file defaults to `-` (standard input).

```bat
cordis begin task.json
cordis query query.json
cordis observe event.json
cordis check-action action.json
cordis finish feedback.json
cordis status
```

Use `--data-dir PATH` before the command to keep a project-specific state
directory elsewhere.

## MCP

Install the optional transport dependency and run:

```bat
pip install "cordis-bridge[mcp]"
cordis-mcp --data-dir .cordis
```

The server exposes `cordis_begin`, `cordis_query`, `cordis_observe`,
`cordis_check_action`, `cordis_finish`, and `cordis_status`. Each tool takes
the same JSON contract as the matching CLI command.

## Concurrency boundary

CORDIS v0.1 assumes one mutating host per state directory. Run one MCP server
per `.cordis` directory and keep CLI mutations for that directory sequential.
The Core JSON state and Bridge focus snapshot are deliberately small local
stores; multi-writer coordination is not part of this release.
