app-foundation
Host-neutral foundations shared by applications in an ecosystem.
Current Status
2026.09.22.2029 is the first implementation candidate. It contains two
host-neutral foundations: MCP client construction and strict native
credential-value storage.
python -m pip install 'app-foundation[mcp]'
python -m pip install 'app-foundation[native-secrets]'
python -m pip install 'app-foundation[data-bus]'
The package API is under app_foundation.mcp:
open_mcp_client(...)opens stdio, SSE, or Streamable HTTP transports;mcp_tool_schema(...)andnormalize_mcp_tool_result(...)provide stable Python values at the protocol boundary;connect_remote_tools(...)andprobe_remote_tools(...)provide a Streamable HTTP convenience surface for callers that already possess an endpoint and bearer.
Remote connection failures use stable, secret-safe codes. An HTTP 401 or
403, including one wrapped by the MCP transport's exception group, becomes
mcp_authorization_rejected; response bodies do not cross the boundary.
Timeouts and other connection failures retain their separate codes so a host
can retry connectivity without treating an outage as a credential verdict.
The caller remains responsible for credential custody, authority decisions, and product-specific error language. Supplying a bearer to the transport does not grant or evaluate authority.
The native value-store API is under app_foundation.secrets:
NativeSecretValueStore(...)selects one reviewed operating-system backend;replace(...),get(...), andremove(...)manage bounded text values;verify_ready()proves a disposable write, read, and removal;NativeSecretErrorexposes fixed, secret-safe error codes and messages.
The accepted backends are macOS Keychain
(keyring.backends.macOS.Keyring), Windows Credential Manager
(keyring.backends.Windows.WinVaultKeyring), and Linux Secret Service
(keyring.backends.SecretService.Keyring). Null, fail, chainer, file, and
wrong-platform backends are rejected. Windows values use a versioned,
integrity-checked chunk manifest so replacement either selects one complete
new generation or leaves the previous generation readable. The shared bound
is 288 KiB of UTF-8 text, which covers the largest OAuth record accepted by
the Connection Hub CLI after JSON escaping.
The shared store knows only service names, account keys, and text values. A consuming product owns serialization, logical namespaces, access policy, recovery, and the meaning of each secret.
The Data Bus client API is under app_foundation.data_bus:
DataBusClaim.from_mapping(...)validates a short-lived, bundle-scoped claim without rendering its token;FederatedDataBusClient.connect()opens the authenticated Socket.IO lane;close()stops either a connected socket or an in-progress reconnect loop and waits until the transport task has ended;request(...)distinguishes ingress acceptance from the handler's correlated terminal result;wait_for_event(...)receives application push events that are not replies to an in-flight request.
The client constructs transport envelopes and correlates replies. The
application owns subjects, operation names, domain authorization, and the
meaning of pushed events. It refuses an expired claim before connection and
bounds event waits by claim expiry. A Data Bus receipt broadcast by the
session for another peer is ignored by this client; it cannot wake an
application event loop. An ingress acknowledgement timeout leaves
acceptance unknown; a terminal result received before that timeout is returned.
An accepted request without a terminal result is also outcome unknown. In
either unknown case, the product preserves the original message and operation
identity for a retry. Client errors include the logical connection generation,
Socket.IO connection ID, and connection state captured when the request began.
The client logs successful connections, disconnects, reconnects, and refused
connection attempts with the same generation and connection ID. A refused
attempt explicitly records whether it replaced the last successful generation,
so a product can correlate one request without treating reconnect activity as
proof that its connection changed. A product that replaces client objects may
provide non-secret lifecycle_labels; those labels appear on every lifecycle
record and let the product carry its stable channel identity and replacement
epoch across object-local generation resets.
Boundary
Applications serving real users repeatedly need the same host capabilities:
- principal and service-identity contracts;
- secret-reference resolution and vault adapters;
- Postgres and Redis clients, cache, compare-and-set, and distributed locks;
- HTTP, CSRF, and external-URL utilities;
- events and observability primitives;
- protocol clients and neutral result conversion.
app-foundation owns reusable application-facing mechanisms. Product
authority, application-domain behavior, standalone process lifecycle, and
deployment orchestration remain outside this package.
app-foundation does not import service-foundation. The two distributions
can be composed by a product without creating a dependency cycle.
Extraction Contract
The production implementations being separated live in KDCube. Each extraction moves one verified contract into this package, then leaves the former KDCube path as a thin compatibility import. KDCube's MCP agent adapter and distributed server defaults remain platform-owned; they are not part of this client extraction.
License: MIT. Source: https://github.com/elenaviter/app-ecosystem
Release files for app-foundation 2026.9.22.2029
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| app_foundation-2026.9.22.2029.tar.gz | 47.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| app_foundation-2026.9.22.2029-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 90.0 kB
Release files / app_foundation-2026.9.22.2029.tar.gz
| Download URL | app_foundation-2026.9.22.2029.tar.gz |
|---|---|
| Size | 47.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
505a7339b70468db46b8795b16b5f93194746c036dd75bc3e35f39b6a72e9fd9
|
|
BLAKE2b-256 checksum How to use checksums |
0578c16a5494ef5a8fb1fddedbbc24fa5bbff1e9279ad9676b4935624959c80c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency logRelease files / app_foundation-2026.9.22.2029-py3-none-any.whl
| Download URL | app_foundation-2026.9.22.2029-py3-none-any.whl |
|---|---|
| Size | 42.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
25960f33302ba63c7d25da60714608acd5356d914c6bc7f0c723950f57b3be72
|
|
BLAKE2b-256 checksum How to use checksums |
5796a4e9e30fd9b337594b77f9e32a62efc4ec4cfdcbb8b9accb13caa64106b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 22, 2026.
Transparency log