ABDUCTIO MVP core engine
Project description
abductio-core
ABDUCTIO MVP core engine: deterministic scheduling, ledger updates, and a strict application boundary. You supply evaluator/decomposer/audit ports; the engine handles orchestration and invariant enforcement.
Project status: library-only (no CLI/API layer yet). See architecture.md and
docs/white_paper.org for the spec.
Install
Requires Python 3.11+.
From PyPI:
pip install abductio-core
Optional OpenAI adapter dependency (used by abductio_core.adapters.openai_llm):
pip install abductio-core[e2e]
Local path install (for use inside another codebase):
pip install /path/to/abductio-core
Editable install for local development:
pip install -e /path/to/abductio-core
If you host this repo, you can also install directly from VCS:
pip install git+ssh://<your-host>/<org>/abductio-core.git
Quickstart
from dataclasses import dataclass, field
from typing import Any, Dict, List
from abductio_core import RootSpec, SessionConfig, SessionRequest, run_session
from abductio_core.application.ports import RunSessionDeps
from abductio_core.domain.audit import AuditEvent
@dataclass
class MemAudit:
events: List[AuditEvent] = field(default_factory=list)
def append(self, event: AuditEvent) -> None:
self.events.append(event)
@dataclass
class NoChildrenDecomposer:
def decompose(self, target_id: str) -> Dict[str, Any]:
if ":" in target_id:
return {"ok": True, "type": "AND", "coupling": 0.80, "children": []}
return {"ok": True, "feasibility_statement": f"{target_id} feasible"}
@dataclass
class SimpleEvaluator:
def evaluate(self, node_key: str) -> Dict[str, Any]:
return {"p": 0.8, "A": 1, "B": 1, "C": 1, "D": 1, "evidence_refs": "ref1"}
request = SessionRequest(
scope="Example scope",
roots=[RootSpec("H1", "Mechanism A", "x")],
config=SessionConfig(tau=0.70, epsilon=0.05, gamma=0.20, alpha=0.40),
credits=5,
required_slots=[{"slot_key": "feasibility", "role": "NEC"}],
)
result = run_session(
request,
RunSessionDeps(
evaluator=SimpleEvaluator(),
decomposer=NoChildrenDecomposer(),
audit_sink=MemAudit(),
),
)
print(result)
API surface
Public imports from abductio_core:
RootSpec,SessionConfig,SessionRequestSessionResult,StopReasonrun_session,replay_session
Ports (implement in your app):
EvaluatorPort,DecomposerPort,AuditSinkPortRunSessionDeps
Development
pytest
Release (PyPI)
Recommended: automated publish on tags via GitHub Actions + PyPI trusted publishing.
One-time setup (PyPI):
- Go to https://pypi.org/manage/account/publishing/
- Add a trusted publisher for
Promise-Foundation/abductio-core - Select workflow:
.github/workflows/publish.yml
Release flow:
- Update
versioninpyproject.toml - Ensure tests pass:
pytest - Commit changes
- Tag + push:
git tag vX.Y.Z && git push --tags
The GitHub Action publishes the build to PyPI on tag push.
Helper script:
scripts/release.sh X.Y.Z
git push
git push --tags
Manual fallback:
python -m pip install --upgrade build twine
python -m build
twine upload dist/*
Token-based auth:
export TWINE_USERNAME=__token__
export TWINE_PASSWORD=pypi-<your-token>
License
MIT. See LICENSE.
Project details
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 abductio_core-0.1.3.tar.gz.
File metadata
- Download URL: abductio_core-0.1.3.tar.gz
- Upload date:
- Size: 24.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cea0ab7fa20471d9447c912602cc6c43e26d3f0d0dfd87258d5c660cf014b01f
|
|
| MD5 |
0669b29561423f03b5a762e28f13c152
|
|
| BLAKE2b-256 |
8048d792f1b44735cdfe7497bb8a0c6c59b8dcdc9f063a59f04208c0dcfdf101
|
Provenance
The following attestation bundles were made for abductio_core-0.1.3.tar.gz:
Publisher:
publish.yml on Promise-Foundation/abductio-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
abductio_core-0.1.3.tar.gz -
Subject digest:
cea0ab7fa20471d9447c912602cc6c43e26d3f0d0dfd87258d5c660cf014b01f - Sigstore transparency entry: 774601929
- Sigstore integration time:
-
Permalink:
Promise-Foundation/abductio-core@d1d97147ee81582ffcfba4697e4ff5bdde63514b -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/Promise-Foundation
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d1d97147ee81582ffcfba4697e4ff5bdde63514b -
Trigger Event:
push
-
Statement type:
File details
Details for the file abductio_core-0.1.3-py3-none-any.whl.
File metadata
- Download URL: abductio_core-0.1.3-py3-none-any.whl
- Upload date:
- Size: 22.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6f1ecfe9944236544ebf73eed1f79801830bbcfd424f60e45a553ec4afa530f
|
|
| MD5 |
5a4bbf95060bb89d800df3e56e0f3de1
|
|
| BLAKE2b-256 |
64685ce9cd12fd1302b1f9cc23e21117b1939f04729ea0f9e5aa4a3d35ea06c6
|
Provenance
The following attestation bundles were made for abductio_core-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on Promise-Foundation/abductio-core
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
abductio_core-0.1.3-py3-none-any.whl -
Subject digest:
b6f1ecfe9944236544ebf73eed1f79801830bbcfd424f60e45a553ec4afa530f - Sigstore transparency entry: 774601930
- Sigstore integration time:
-
Permalink:
Promise-Foundation/abductio-core@d1d97147ee81582ffcfba4697e4ff5bdde63514b -
Branch / Tag:
refs/tags/v0.1.3 - Owner: https://github.com/Promise-Foundation
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d1d97147ee81582ffcfba4697e4ff5bdde63514b -
Trigger Event:
push
-
Statement type: