Skip to main content

Thin JSON-RPC wire client for the Credence skin. Talks the protocol; ships no engine code and cannot host a brain.

Project description

credence-skin-client

The thin JSON-RPC wire client for the Credence skin — the one library external apps depend on to talk to the engine.

It ships no engine code (no juliacall, no Julia) and holds no Measures: state stays server-side as opaque IDs. A consumer of this client physically cannot do probability arithmetic, so it cannot host a brain. This is the boundary that makes the constitutional single-reasoner invariant hold by construction for any app on the other side of the wire.

Usage

Launch the engine as a pinned image and talk JSON-RPC over its stdio:

from credence_skin_client import SkinClient

skin = SkinClient(command=[
    "docker", "run", "--rm", "-i", "ghcr.io/gfrmin/credence-skin:<tag>",
])
skin.initialize(dsl_sources={"agent": "(defun choose ...)"})  # inline BDSL, no host paths
sid = skin.create_state(type="beta", alpha=1.0, beta=1.0)
skin.condition(sid, kernel={"type": "bernoulli"}, observation=1.0)
print(skin.weights(sid))
skin.shutdown()

The client pins a wire protocol major and the handshake rejects an incompatible engine with error -32010. See apps/skin/protocol.md for the full method set and the protocol changelog.

Apps declare their domain as datadsl_sources are inline BDSL source strings; the engine never reads the host filesystem.

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

credence_skin_client-0.1.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

credence_skin_client-0.1.0-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file credence_skin_client-0.1.0.tar.gz.

File metadata

  • Download URL: credence_skin_client-0.1.0.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for credence_skin_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 8179b6ca0b051eb66262b6dddd9b236b18ea89da4c01744a5f81385fedb60cd4
MD5 37bd7b65bdadfcb7551242fcfd583fc5
BLAKE2b-256 41abfbbd7922a43079e4210cb752c5436917c29bdf451701dbaadf8224c5d4d7

See more details on using hashes here.

File details

Details for the file credence_skin_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for credence_skin_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e85870a2d579109fe37d2d0393318e4627dff2db243f4c7830bbd20f1b37149a
MD5 887e212dcbee0eae6221e155642a022b
BLAKE2b-256 d3faffb71a56c15b3e089b94a7903c971ba7812fb7103494407784faf8f4fdea

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page