Skip to main content

Client SDK for the CCCC daemon (IPC v1)

Project description

CCCC Python SDK

This package is the Python client SDK for CCCC daemon (Daemon IPC v1).

Relationship to CCCC core

  • CCCC core repository: https://github.com/ChesterRa/cccc
  • cccc core owns daemon/web/CLI and runtime state under CCCC_HOME.
  • cccc-sdk provides client APIs only and must connect to a running daemon.

It requires a running CCCC daemon. The SDK does not ship a daemon.

Versioning

Compatibility is determined by Daemon IPC v1 contracts and operation probing, not by strict string matching of package versions. Different language packages may publish on different cadences.

Daemon endpoint discovery

The SDK connects to the daemon endpoint described by:

  • ${CCCC_HOME}/daemon/ccccd.addr.json (preferred, cross-platform), or
  • ${CCCC_HOME}/daemon/ccccd.sock (POSIX AF_UNIX fallback)

Install

Stable (PyPI)

pip install -U cccc-sdk

RC preview (optional, TestPyPI first)

pip install -U --pre --index-url https://pypi.org/simple \
  --extra-index-url https://test.pypi.org/simple \
  cccc-sdk

From source (development)

pip install -e .

Usage

python - <<'PY'
from cccc_sdk import CCCCClient

c = CCCCClient()
c.assert_compatible(require_ipc_v=1, require_capabilities={"events_stream": True})

groups = c.groups()
print(groups)
PY

Examples (repo)

This repository includes runnable examples under python/examples/:

python examples/compat_check.py

Stream events for a group:

python examples/stream.py --group g_xxx

Send a message:

python examples/send.py --group g_xxx --text "hello"

Auto-ACK attention messages (as a recipient):

python examples/auto_ack_attention.py --group g_xxx --actor user

Add a coordination note to shared context:

python examples/context_add_note.py --group g_xxx --kind decision --content "Promote this path"

Cross-group send:

python examples/send_cross_group.py --src g_src --dst g_dst --text "hello from src"

Actor Profiles (global reusable runtime presets)

cccc supports global Actor Profiles so you can reuse runtime/runner/command/env across groups.

from cccc_sdk import CCCCClient

c = CCCCClient()

# list profiles
profiles = c.actor_profile_list()

# create or update a profile
profile = c.actor_profile_upsert(
    profile={
        "name": "Codex PTY",
        "runtime": "codex",
        "runner": "pty",
        "command": ["codex", "exec"],
        "submit": "enter",
        "env": {"CODEX_MODEL": "gpt-5"},
        "capability_defaults": {
            "autoload_capabilities": ["pack:space"],
            "default_scope": "actor",
        },
    }
)
profile_id = str((profile.get("profile") or {}).get("id") or "")

# create actor from profile
c.actor_add(group_id="g_xxx", actor_id="reviewer", profile_id=profile_id)

# profile secrets (write-only values)
c.actor_profile_secret_update(profile_id=profile_id, set={"OPENAI_API_KEY": "..."})

Current high-value surfaces

from cccc_sdk import CCCCClient

c = CCCCClient()

# Capability exposure for one caller scope
caps = c.capability_state(group_id="g_xxx", actor_id="foreman")

# Capability policy / allowlist overlay
policy = c.capability_allowlist_get()
preview = c.capability_allowlist_validate(
    mode="patch",
    patch={"defaults": {"source_level": {"skillsmp_remote": "indexed"}}},
)

# Group Space / Notebook status
space = c.group_space_status(group_id="g_xxx")

# Context v3: add a compact shared decision or handoff
c.context_sync(
    group_id="g_xxx",
    by="user",
    ops=[{"op": "coordination.note.add", "kind": "decision", "summary": "Use the simpler path"}],
)

If you need an op that does not have a dedicated helper yet, use call() / call_raw().

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

cccc_sdk-0.4.3.tar.gz (18.1 kB view details)

Uploaded Source

Built Distribution

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

cccc_sdk-0.4.3-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file cccc_sdk-0.4.3.tar.gz.

File metadata

  • Download URL: cccc_sdk-0.4.3.tar.gz
  • Upload date:
  • Size: 18.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cccc_sdk-0.4.3.tar.gz
Algorithm Hash digest
SHA256 5cfaaff75736329142f3b0261fcd07a05ee216ccaf4ab7dd245df56312a9c1f1
MD5 6f2de494a31696760eb38f2c42d986d9
BLAKE2b-256 27d99c36b98954e2f4b8001adaf8c1337123f3594351ab4ab70a1f5f73beb9ec

See more details on using hashes here.

File details

Details for the file cccc_sdk-0.4.3-py3-none-any.whl.

File metadata

  • Download URL: cccc_sdk-0.4.3-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for cccc_sdk-0.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 3a463f4d9dab98ca756729694833942ead39de3ad730d28d584e27fc03c9386e
MD5 a8406cfbbf11d98f2ed73cadf367514d
BLAKE2b-256 9b8ebdc768e4b74876f964d5bda1073f726d0482ce377bd284fc921b790e8674

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