sf-smartfabric 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sf_smartfabric-0.5.0/AUTHORS.md +6 -0
- sf_smartfabric-0.5.0/LICENSE +8 -0
- sf_smartfabric-0.5.0/NOTICE +16 -0
- sf_smartfabric-0.5.0/PKG-INFO +196 -0
- sf_smartfabric-0.5.0/README.md +155 -0
- sf_smartfabric-0.5.0/pyproject.toml +62 -0
- sf_smartfabric-0.5.0/setup.cfg +4 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/__init__.py +56 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/__main__.py +4 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/_version.py +1 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/cli.py +209 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/conformance.py +325 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/demo.py +85 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/fingerprint.py +108 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/live.py +141 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/models.py +104 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/mtls.py +62 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/node.py +245 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/pressure.py +224 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/py.typed +0 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/registry.py +239 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/vectors.py +173 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric/wire.py +181 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric.egg-info/PKG-INFO +196 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric.egg-info/SOURCES.txt +34 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric.egg-info/dependency_links.txt +1 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric.egg-info/entry_points.txt +2 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric.egg-info/requires.txt +7 -0
- sf_smartfabric-0.5.0/src/sf_smartfabric.egg-info/top_level.txt +1 -0
- sf_smartfabric-0.5.0/tests/test_conformance.py +90 -0
- sf_smartfabric-0.5.0/tests/test_fingerprint.py +62 -0
- sf_smartfabric-0.5.0/tests/test_mtls.py +49 -0
- sf_smartfabric-0.5.0/tests/test_node_live.py +71 -0
- sf_smartfabric-0.5.0/tests/test_pressure.py +115 -0
- sf_smartfabric-0.5.0/tests/test_registry.py +110 -0
- sf_smartfabric-0.5.0/tests/test_wire_vectors.py +133 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
SmartFabric — IAIso Fabric Protocol (IFP) reference implementation.
|
|
2
|
+
|
|
3
|
+
Licensed under the Community Forking License v2.0, aligned with the IAIso
|
|
4
|
+
framework (https://github.com/SmartTasksOrg/IAISO). See the IAIso repository
|
|
5
|
+
LICENSE for the authoritative text of the family license.
|
|
6
|
+
|
|
7
|
+
Copyright (c) 2026 SmartTasks. All rights reserved where not granted by the
|
|
8
|
+
license above.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
SmartFabric
|
|
2
|
+
Copyright 2026 SmartTasks
|
|
3
|
+
|
|
4
|
+
Licensed under the terms in LICENSE (see that file).
|
|
5
|
+
|
|
6
|
+
Names and affiliation
|
|
7
|
+
---------------------
|
|
8
|
+
|
|
9
|
+
SmartFabric is published by SmartTasksOrg. The only package names it is
|
|
10
|
+
published under are those marked "registered": true in names.json.
|
|
11
|
+
|
|
12
|
+
LangChain is a trademark of its owner.
|
|
13
|
+
AWS is a trademark of its owner.
|
|
14
|
+
All other names are the property of their respective owners. Their use here
|
|
15
|
+
only says what the software reads, evaluates or connects to; it does not
|
|
16
|
+
imply affiliation, sponsorship or endorsement.
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: sf-smartfabric
|
|
3
|
+
Version: 0.5.0
|
|
4
|
+
Summary: IAIso Fabric Protocol (IFP) — carry & enforce IAIso containment across a fleet of governed AI nodes.
|
|
5
|
+
Author-email: SmartTasks <enterprise@smarttasks.cloud>
|
|
6
|
+
License: SmartFabric — IAIso Fabric Protocol (IFP) reference implementation.
|
|
7
|
+
|
|
8
|
+
Licensed under the Community Forking License v2.0, aligned with the IAIso
|
|
9
|
+
framework (https://github.com/SmartTasksOrg/IAISO). See the IAIso repository
|
|
10
|
+
LICENSE for the authoritative text of the family license.
|
|
11
|
+
|
|
12
|
+
Copyright (c) 2026 SmartTasks. All rights reserved where not granted by the
|
|
13
|
+
license above.
|
|
14
|
+
|
|
15
|
+
Project-URL: Homepage, https://iaiso.org
|
|
16
|
+
Project-URL: Source, https://github.com/SmartTasksOrg/sf-smartfabric
|
|
17
|
+
Project-URL: Issues, https://github.com/SmartTasksOrg/sf-smartfabric/issues
|
|
18
|
+
Project-URL: Security, https://github.com/SmartTasksOrg/sf-smartfabric/security/policy
|
|
19
|
+
Project-URL: Changelog, https://github.com/SmartTasksOrg/sf-smartfabric/blob/master/CHANGELOG.md
|
|
20
|
+
Project-URL: Standard, https://github.com/SmartTasksOrg/IAISO
|
|
21
|
+
Project-URL: Cloud, https://smarttasks.cloud
|
|
22
|
+
Keywords: iaiso,ai-safety,governance,fabric,protocol,containment,provenance
|
|
23
|
+
Classifier: Development Status :: 3 - Alpha
|
|
24
|
+
Classifier: Intended Audience :: Developers
|
|
25
|
+
Classifier: Operating System :: OS Independent
|
|
26
|
+
Classifier: Programming Language :: Python :: 3
|
|
27
|
+
Classifier: Topic :: Security
|
|
28
|
+
Classifier: Topic :: System :: Networking
|
|
29
|
+
Requires-Python: >=3.10
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
License-File: LICENSE
|
|
32
|
+
License-File: NOTICE
|
|
33
|
+
License-File: AUTHORS.md
|
|
34
|
+
Requires-Dist: jsonschema>=4.0
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: pytest>=7; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest-cov; extra == "dev"
|
|
38
|
+
Requires-Dist: ruff; extra == "dev"
|
|
39
|
+
Requires-Dist: mypy; extra == "dev"
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
<!-- mcp-name: io.github.smarttasksorg/sf-smartfabric -->
|
|
43
|
+
<h1 align="center">🦔 SmartFabric</h1>
|
|
44
|
+
<p align="center"><b>Carry IAIso containment across the whole fleet. One wire protocol, one node fingerprint — so many governed AI agents behave as one governed data fabric, not a pile of independently-wrapped agents.</b></p>
|
|
45
|
+
<p align="center">
|
|
46
|
+
<a href="https://iaiso.org">IAIso §0 · Fabric</a> ·
|
|
47
|
+
<a href="https://github.com/SmartTasksOrg/IAISO/tree/main/IAIso-v5.0/core">binds to IAIso v5.0 core</a> ·
|
|
48
|
+
<a href="https://smarttasks.cloud">SmartTasks.cloud</a> ·
|
|
49
|
+
<a href="#part-of-the-smart-family">the Smart* family</a>
|
|
50
|
+
</p>
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## The problem: AI is spreading through your systems, and you can't see the layer it lives on
|
|
55
|
+
|
|
56
|
+
AI/LLM calls now sit inside your CRM, your CI, your data pipelines, your agents.
|
|
57
|
+
Each one influences and controls real systems — and each is wired in its own
|
|
58
|
+
bespoke way. There is no common layer where you can **measure, monitor, audit,
|
|
59
|
+
and trace** what the AI is doing across all of it. You can't govern a black box,
|
|
60
|
+
and you certainly can't govern a hundred differently-shaped black boxes.
|
|
61
|
+
|
|
62
|
+
**SmartFabric** is the hardened layer that separates AI/LLM traffic and
|
|
63
|
+
functionality out into its own governed plane. It is the reference
|
|
64
|
+
implementation of the **IAIso Fabric Protocol (IFP)**: a wire protocol + a node
|
|
65
|
+
**fingerprint** that every AI node publishes, so a heterogeneous fleet becomes
|
|
66
|
+
measurable and enforceable as one organism.
|
|
67
|
+
|
|
68
|
+
Where the [IAIso engine](https://github.com/SmartTasksOrg/IAISO) answers *"is
|
|
69
|
+
**this** agent over pressure?"*, IFP answers *"what is the pressure of the
|
|
70
|
+
**whole system**, is any node about to breach, and can a global halt be honoured
|
|
71
|
+
everywhere at once?"* — the questions IAIso's Layer 3 (ecosystem coupling),
|
|
72
|
+
Layer 4 (escalation) and Layer 6 (existential guards) can only answer if nodes
|
|
73
|
+
speak a common protocol.
|
|
74
|
+
|
|
75
|
+
## Install
|
|
76
|
+
|
|
77
|
+
SmartFabric is not published on PyPI or any other package registry yet. Until
|
|
78
|
+
this section says otherwise, a package called `sf-smartfabric` on any registry
|
|
79
|
+
is not ours, and neither is `smartfabric`.
|
|
80
|
+
|
|
81
|
+
Install from a clone (Python 3.10 or later):
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
git clone https://github.com/SmartTasksOrg/sf-smartfabric
|
|
85
|
+
cd sf-smartfabric
|
|
86
|
+
python -m venv .venv
|
|
87
|
+
. .venv/bin/activate # Windows PowerShell: .\.venv\Scripts\Activate.ps1
|
|
88
|
+
python -m pip install .
|
|
89
|
+
sf-smartfabric --demo
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Status
|
|
93
|
+
|
|
94
|
+
- **Version 0.5.0, experimental.** The reference implementation of the IAIso Fabric Protocol (IFP), version 0.5.0, with a frozen wire format and ports in nine other languages that reproduce the same behavioural vectors.
|
|
95
|
+
- **Published:** nowhere yet; install from a clone (above).
|
|
96
|
+
- **Tested:** on Python 3.10, 3.11 and 3.12 (Linux): the 59 tests, the demo, the behavioural vectors, the live `FAB-L-*` harness against an in-process node, and `ports/conformance/run.sh` across every port whose toolchain the runner has, on every push to master and every pull request (`.github/workflows/ci.yml`).
|
|
97
|
+
- **Not tested:** Windows and macOS; Protobuf binary interop (field numbers are frozen, not exercised without `protoc`); ed25519 report signing (not implemented yet: a content digest stands in for the signature).
|
|
98
|
+
- **Ports:** Node, Java, C, C++, Go, PHP, Rust, Ruby and C# ports in `ports/` reproduce the Python reference's vectors (`ports/conformance/run.sh`, run in CI); none is published on a registry.
|
|
99
|
+
- **Protocol:** a frozen wire format (canonical-JSON encoding + LEB128 framing and a field-number-frozen `proto/fabric.proto`, see [`docs/08_WIRE_FORMAT.md`](docs/08_WIRE_FORMAT.md)) and behavioural conformance ([`spec/vectors/`](spec/vectors/) pins inputs to outputs; `sf-smartfabric vectors` runs them). Static `FAB-*` checks remain for what a node *declares*.
|
|
100
|
+
- **Container image:** the deploy configs reference `ghcr.io/smarttasksorg/sf-smartfabric:0.5.0`, which is not published yet; build it locally from `Dockerfile` until it is.
|
|
101
|
+
- **Security review:** none independent. Report vulnerabilities as described in [SECURITY.md](SECURITY.md).
|
|
102
|
+
|
|
103
|
+
## What it does, in one screen
|
|
104
|
+
|
|
105
|
+
`sf-smartfabric --demo` runs three things against bundled synthetic data, no network:
|
|
106
|
+
|
|
107
|
+
1. **Single-node pressure** — drives a token/tool workload up the `dp/dt` curve
|
|
108
|
+
until it hits the release threshold and atomically resets (invariant 2:
|
|
109
|
+
lossy, no learning across resets).
|
|
110
|
+
2. **Fleet pressure** — aggregates five nodes into one topology-weighted
|
|
111
|
+
`P_fleet` (Layer-3), so a high-centrality hub moves the number more than a leaf.
|
|
112
|
+
3. **Conformance** — runs the `FAB-*` suite over an example fingerprint and
|
|
113
|
+
prints a pass/fail report a node can carry in its own contract.
|
|
114
|
+
|
|
115
|
+
## Run it in your stack
|
|
116
|
+
|
|
117
|
+
| Where you work | How you run it |
|
|
118
|
+
|---|---|
|
|
119
|
+
| **Python** | from a clone: `python -m pip install .` (not on PyPI yet) |
|
|
120
|
+
| **CLI (validate)** | `sf-smartfabric validate <fp.json>` · `conformance <fp.json>` · `fleet <fleet.json>` |
|
|
121
|
+
| **CLI (run a node)** | `sf-smartfabric serve` runs a node · `sf-smartfabric registry` runs the fleet registry · `sf-smartfabric live` runs the `FAB-L-*` harness |
|
|
122
|
+
| **Behavioural proof** | `sf-smartfabric vectors` runs the pinned interop vectors; `ports/conformance/run.sh` runs them across Python + Node + Java |
|
|
123
|
+
| **Other languages** | independent ports in [`ports/`](ports/) (Node, Java runnable; Go, PHP, Rust shipped). The protocol is defined by `spec/vectors/*.json` — reproduce them and you're conformant |
|
|
124
|
+
|
|
125
|
+
## What's in this repo
|
|
126
|
+
|
|
127
|
+
- **The spec** — [`docs/`](docs/), reading order below. `docs/07` is the binding
|
|
128
|
+
to the real IAIso v5.0 core (pressure fields, layers 0–6, the 5 invariants);
|
|
129
|
+
`docs/08` is the frozen wire format.
|
|
130
|
+
- **The contract** — [`schema/fingerprint.schema.json`](schema/fingerprint.schema.json):
|
|
131
|
+
the machine-readable descriptor every node publishes, plus a passing
|
|
132
|
+
[`example.fingerprint.json`](schema/example.fingerprint.json).
|
|
133
|
+
- **A runnable reference** — [`src/sf_smartfabric/`](src/sf_smartfabric/): the pressure
|
|
134
|
+
engine, fleet aggregation, CIR envelope + wire codec, the `FAB-*` conformance
|
|
135
|
+
suite, a live HTTP/CIR **node** (`node.py`) with optional **mTLS** (`mtls.py`),
|
|
136
|
+
an over-the-wire harness (`live.py`), and a **registry** (`registry.py`) for
|
|
137
|
+
fleet discovery + `P_fleet` aggregation. Deterministic, offline, dependency-light.
|
|
138
|
+
- **Independent ports** — [`ports/`](ports/): Node + Java (runnable, in CI) and Go,
|
|
139
|
+
PHP, Rust (shipped, vector-checked). Interop harness in `ports/conformance/`.
|
|
140
|
+
- **Toolchain integrations** — [`integrations/`](integrations/): LangChain, n8n,
|
|
141
|
+
Flowise, and a GitHub Action that gate/meter agents through a fabric node.
|
|
142
|
+
- **Deployments** — [`deploy/`](deploy/): Dockerfile, a two-node compose fabric,
|
|
143
|
+
and GCP/AWS/Azure recipes for the node service.
|
|
144
|
+
- **Conformance vectors** — [`spec/vectors/`](spec/vectors/): pinned input→output
|
|
145
|
+
cases (pressure, fleet, envelope) that define the protocol independently of code.
|
|
146
|
+
- **Family metadata** — [`spec/iaiso-map.json`](spec/iaiso-map.json), `.smart.json`.
|
|
147
|
+
- **Tests** — [`tests/`](tests/): the public suite (59 green), including the live
|
|
148
|
+
node harness.
|
|
149
|
+
|
|
150
|
+
## Reading order
|
|
151
|
+
|
|
152
|
+
| Doc | What it covers |
|
|
153
|
+
| --- | --- |
|
|
154
|
+
| [`docs/00_OVERVIEW.md`](docs/00_OVERVIEW.md) | Fabric model, the three planes, how it wraps the core |
|
|
155
|
+
| [`docs/07_IAISO_CORE_BINDING.md`](docs/07_IAISO_CORE_BINDING.md) | **The binding: pressure model, layers 0–6, the 5 invariants, and the trust boundary** |
|
|
156
|
+
| [`docs/01_PROTOCOL_CHARACTERISTICS.md`](docs/01_PROTOCOL_CHARACTERISTICS.md) | The full conformance surface (26 characteristics) |
|
|
157
|
+
| [`docs/02_FINGERPRINT.md`](docs/02_FINGERPRINT.md) | Ports, standards, command-translation (CIR) + containment posture |
|
|
158
|
+
| [`docs/03_SUBSTRATE_AND_LAYERS.md`](docs/03_SUBSTRATE_AND_LAYERS.md) | Two axes: containment layers 0–6 × physical substrate S0–S10 |
|
|
159
|
+
| [`docs/04_MAPPING.md`](docs/04_MAPPING.md) | Fabric services: pressure aggregator, escalation broker, consent issuer |
|
|
160
|
+
| [`docs/05_DYNAMICS_AND_GOVERNANCE.md`](docs/05_DYNAMICS_AND_GOVERNANCE.md) | Pressure dynamics + influence governance, with the honest boundary |
|
|
161
|
+
| [`docs/06_CONFORMANCE_CHECKLIST.md`](docs/06_CONFORMANCE_CHECKLIST.md) | The executable `FAB-*` static suite + the behavioural-vector / two-implementation bar |
|
|
162
|
+
| [`docs/08_WIRE_FORMAT.md`](docs/08_WIRE_FORMAT.md) | **The frozen wire format: canonical JSON, framing, Protobuf, versioning** |
|
|
163
|
+
| [`docs/09_TRANSPORT_AND_OPERATIONS.md`](docs/09_TRANSPORT_AND_OPERATIONS.md) | **Running the system: the node service, mTLS, live `FAB-L` conformance, the registry** |
|
|
164
|
+
| [`docs/10_DEPLOYMENT.md`](docs/10_DEPLOYMENT.md) | **Deploying it: one image, the full platform matrix incl. k8s/Helm and GPU providers** |
|
|
165
|
+
|
|
166
|
+
## How it works (the honest version)
|
|
167
|
+
|
|
168
|
+
The IAIso trust boundary is inherited, not hidden: IFP **bounds cooperating
|
|
169
|
+
nodes** and makes them *measurable and attestable*. Pressure is computed at the
|
|
170
|
+
infrastructure level, outside the model (invariant 5), so a node can't game its
|
|
171
|
+
own valve, and the fabric trusts *attested infra telemetry, not model
|
|
172
|
+
self-report*. For **adversarial** containment you still bind thresholds to an
|
|
173
|
+
out-of-process anchor (seccomp / container / VM / hypervisor FLOP cap) at
|
|
174
|
+
substrate S0–S4 — and `layer0_caps.hardware_attested` is the wire-level claim
|
|
175
|
+
that you did. `FAB-I-006` fails any node that claims Layer 0 without it. Safety
|
|
176
|
+
through structure, not hope.
|
|
177
|
+
|
|
178
|
+
Rule/check IDs are namespaced `FAB-*` so output looks kin to the rest of the
|
|
179
|
+
family (SmartPangolin's `SEC-*`, SmartSeal's `SEAL-*`).
|
|
180
|
+
|
|
181
|
+
## Part of the Smart* family
|
|
182
|
+
|
|
183
|
+
SmartFabric is the **fabric layer** of IAIso — the plane the other tools ride on.
|
|
184
|
+
It stacks naturally with [SmartSeal](https://github.com/SmartTasksOrg/sf-smartseal) (provenance
|
|
185
|
+
records on the observability plane), [SmartRoute](https://github.com/SmartTasksOrg/sf-smartroute)
|
|
186
|
+
(trust-gated routing), and [SmartLLMCost](https://github.com/SmartTasksOrg/sf-smartllmcost) (the
|
|
187
|
+
resource-accounting record — characteristic #23). Everything conforms to the open
|
|
188
|
+
**[IAIso standard](https://github.com/SmartTasksOrg/IAISO)** and bundles in
|
|
189
|
+
**[SmartTasks.cloud](https://smarttasks.cloud)**.
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
## Contact
|
|
193
|
+
|
|
194
|
+
Companies wanting hands-on integration of the fabric into their architecture,
|
|
195
|
+
audit-ready: **[enterprise@smarttasks.cloud](mailto:enterprise@smarttasks.cloud)**.
|
|
196
|
+
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
<!-- mcp-name: io.github.smarttasksorg/sf-smartfabric -->
|
|
2
|
+
<h1 align="center">🦔 SmartFabric</h1>
|
|
3
|
+
<p align="center"><b>Carry IAIso containment across the whole fleet. One wire protocol, one node fingerprint — so many governed AI agents behave as one governed data fabric, not a pile of independently-wrapped agents.</b></p>
|
|
4
|
+
<p align="center">
|
|
5
|
+
<a href="https://iaiso.org">IAIso §0 · Fabric</a> ·
|
|
6
|
+
<a href="https://github.com/SmartTasksOrg/IAISO/tree/main/IAIso-v5.0/core">binds to IAIso v5.0 core</a> ·
|
|
7
|
+
<a href="https://smarttasks.cloud">SmartTasks.cloud</a> ·
|
|
8
|
+
<a href="#part-of-the-smart-family">the Smart* family</a>
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## The problem: AI is spreading through your systems, and you can't see the layer it lives on
|
|
14
|
+
|
|
15
|
+
AI/LLM calls now sit inside your CRM, your CI, your data pipelines, your agents.
|
|
16
|
+
Each one influences and controls real systems — and each is wired in its own
|
|
17
|
+
bespoke way. There is no common layer where you can **measure, monitor, audit,
|
|
18
|
+
and trace** what the AI is doing across all of it. You can't govern a black box,
|
|
19
|
+
and you certainly can't govern a hundred differently-shaped black boxes.
|
|
20
|
+
|
|
21
|
+
**SmartFabric** is the hardened layer that separates AI/LLM traffic and
|
|
22
|
+
functionality out into its own governed plane. It is the reference
|
|
23
|
+
implementation of the **IAIso Fabric Protocol (IFP)**: a wire protocol + a node
|
|
24
|
+
**fingerprint** that every AI node publishes, so a heterogeneous fleet becomes
|
|
25
|
+
measurable and enforceable as one organism.
|
|
26
|
+
|
|
27
|
+
Where the [IAIso engine](https://github.com/SmartTasksOrg/IAISO) answers *"is
|
|
28
|
+
**this** agent over pressure?"*, IFP answers *"what is the pressure of the
|
|
29
|
+
**whole system**, is any node about to breach, and can a global halt be honoured
|
|
30
|
+
everywhere at once?"* — the questions IAIso's Layer 3 (ecosystem coupling),
|
|
31
|
+
Layer 4 (escalation) and Layer 6 (existential guards) can only answer if nodes
|
|
32
|
+
speak a common protocol.
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
SmartFabric is not published on PyPI or any other package registry yet. Until
|
|
37
|
+
this section says otherwise, a package called `sf-smartfabric` on any registry
|
|
38
|
+
is not ours, and neither is `smartfabric`.
|
|
39
|
+
|
|
40
|
+
Install from a clone (Python 3.10 or later):
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
git clone https://github.com/SmartTasksOrg/sf-smartfabric
|
|
44
|
+
cd sf-smartfabric
|
|
45
|
+
python -m venv .venv
|
|
46
|
+
. .venv/bin/activate # Windows PowerShell: .\.venv\Scripts\Activate.ps1
|
|
47
|
+
python -m pip install .
|
|
48
|
+
sf-smartfabric --demo
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Status
|
|
52
|
+
|
|
53
|
+
- **Version 0.5.0, experimental.** The reference implementation of the IAIso Fabric Protocol (IFP), version 0.5.0, with a frozen wire format and ports in nine other languages that reproduce the same behavioural vectors.
|
|
54
|
+
- **Published:** nowhere yet; install from a clone (above).
|
|
55
|
+
- **Tested:** on Python 3.10, 3.11 and 3.12 (Linux): the 59 tests, the demo, the behavioural vectors, the live `FAB-L-*` harness against an in-process node, and `ports/conformance/run.sh` across every port whose toolchain the runner has, on every push to master and every pull request (`.github/workflows/ci.yml`).
|
|
56
|
+
- **Not tested:** Windows and macOS; Protobuf binary interop (field numbers are frozen, not exercised without `protoc`); ed25519 report signing (not implemented yet: a content digest stands in for the signature).
|
|
57
|
+
- **Ports:** Node, Java, C, C++, Go, PHP, Rust, Ruby and C# ports in `ports/` reproduce the Python reference's vectors (`ports/conformance/run.sh`, run in CI); none is published on a registry.
|
|
58
|
+
- **Protocol:** a frozen wire format (canonical-JSON encoding + LEB128 framing and a field-number-frozen `proto/fabric.proto`, see [`docs/08_WIRE_FORMAT.md`](docs/08_WIRE_FORMAT.md)) and behavioural conformance ([`spec/vectors/`](spec/vectors/) pins inputs to outputs; `sf-smartfabric vectors` runs them). Static `FAB-*` checks remain for what a node *declares*.
|
|
59
|
+
- **Container image:** the deploy configs reference `ghcr.io/smarttasksorg/sf-smartfabric:0.5.0`, which is not published yet; build it locally from `Dockerfile` until it is.
|
|
60
|
+
- **Security review:** none independent. Report vulnerabilities as described in [SECURITY.md](SECURITY.md).
|
|
61
|
+
|
|
62
|
+
## What it does, in one screen
|
|
63
|
+
|
|
64
|
+
`sf-smartfabric --demo` runs three things against bundled synthetic data, no network:
|
|
65
|
+
|
|
66
|
+
1. **Single-node pressure** — drives a token/tool workload up the `dp/dt` curve
|
|
67
|
+
until it hits the release threshold and atomically resets (invariant 2:
|
|
68
|
+
lossy, no learning across resets).
|
|
69
|
+
2. **Fleet pressure** — aggregates five nodes into one topology-weighted
|
|
70
|
+
`P_fleet` (Layer-3), so a high-centrality hub moves the number more than a leaf.
|
|
71
|
+
3. **Conformance** — runs the `FAB-*` suite over an example fingerprint and
|
|
72
|
+
prints a pass/fail report a node can carry in its own contract.
|
|
73
|
+
|
|
74
|
+
## Run it in your stack
|
|
75
|
+
|
|
76
|
+
| Where you work | How you run it |
|
|
77
|
+
|---|---|
|
|
78
|
+
| **Python** | from a clone: `python -m pip install .` (not on PyPI yet) |
|
|
79
|
+
| **CLI (validate)** | `sf-smartfabric validate <fp.json>` · `conformance <fp.json>` · `fleet <fleet.json>` |
|
|
80
|
+
| **CLI (run a node)** | `sf-smartfabric serve` runs a node · `sf-smartfabric registry` runs the fleet registry · `sf-smartfabric live` runs the `FAB-L-*` harness |
|
|
81
|
+
| **Behavioural proof** | `sf-smartfabric vectors` runs the pinned interop vectors; `ports/conformance/run.sh` runs them across Python + Node + Java |
|
|
82
|
+
| **Other languages** | independent ports in [`ports/`](ports/) (Node, Java runnable; Go, PHP, Rust shipped). The protocol is defined by `spec/vectors/*.json` — reproduce them and you're conformant |
|
|
83
|
+
|
|
84
|
+
## What's in this repo
|
|
85
|
+
|
|
86
|
+
- **The spec** — [`docs/`](docs/), reading order below. `docs/07` is the binding
|
|
87
|
+
to the real IAIso v5.0 core (pressure fields, layers 0–6, the 5 invariants);
|
|
88
|
+
`docs/08` is the frozen wire format.
|
|
89
|
+
- **The contract** — [`schema/fingerprint.schema.json`](schema/fingerprint.schema.json):
|
|
90
|
+
the machine-readable descriptor every node publishes, plus a passing
|
|
91
|
+
[`example.fingerprint.json`](schema/example.fingerprint.json).
|
|
92
|
+
- **A runnable reference** — [`src/sf_smartfabric/`](src/sf_smartfabric/): the pressure
|
|
93
|
+
engine, fleet aggregation, CIR envelope + wire codec, the `FAB-*` conformance
|
|
94
|
+
suite, a live HTTP/CIR **node** (`node.py`) with optional **mTLS** (`mtls.py`),
|
|
95
|
+
an over-the-wire harness (`live.py`), and a **registry** (`registry.py`) for
|
|
96
|
+
fleet discovery + `P_fleet` aggregation. Deterministic, offline, dependency-light.
|
|
97
|
+
- **Independent ports** — [`ports/`](ports/): Node + Java (runnable, in CI) and Go,
|
|
98
|
+
PHP, Rust (shipped, vector-checked). Interop harness in `ports/conformance/`.
|
|
99
|
+
- **Toolchain integrations** — [`integrations/`](integrations/): LangChain, n8n,
|
|
100
|
+
Flowise, and a GitHub Action that gate/meter agents through a fabric node.
|
|
101
|
+
- **Deployments** — [`deploy/`](deploy/): Dockerfile, a two-node compose fabric,
|
|
102
|
+
and GCP/AWS/Azure recipes for the node service.
|
|
103
|
+
- **Conformance vectors** — [`spec/vectors/`](spec/vectors/): pinned input→output
|
|
104
|
+
cases (pressure, fleet, envelope) that define the protocol independently of code.
|
|
105
|
+
- **Family metadata** — [`spec/iaiso-map.json`](spec/iaiso-map.json), `.smart.json`.
|
|
106
|
+
- **Tests** — [`tests/`](tests/): the public suite (59 green), including the live
|
|
107
|
+
node harness.
|
|
108
|
+
|
|
109
|
+
## Reading order
|
|
110
|
+
|
|
111
|
+
| Doc | What it covers |
|
|
112
|
+
| --- | --- |
|
|
113
|
+
| [`docs/00_OVERVIEW.md`](docs/00_OVERVIEW.md) | Fabric model, the three planes, how it wraps the core |
|
|
114
|
+
| [`docs/07_IAISO_CORE_BINDING.md`](docs/07_IAISO_CORE_BINDING.md) | **The binding: pressure model, layers 0–6, the 5 invariants, and the trust boundary** |
|
|
115
|
+
| [`docs/01_PROTOCOL_CHARACTERISTICS.md`](docs/01_PROTOCOL_CHARACTERISTICS.md) | The full conformance surface (26 characteristics) |
|
|
116
|
+
| [`docs/02_FINGERPRINT.md`](docs/02_FINGERPRINT.md) | Ports, standards, command-translation (CIR) + containment posture |
|
|
117
|
+
| [`docs/03_SUBSTRATE_AND_LAYERS.md`](docs/03_SUBSTRATE_AND_LAYERS.md) | Two axes: containment layers 0–6 × physical substrate S0–S10 |
|
|
118
|
+
| [`docs/04_MAPPING.md`](docs/04_MAPPING.md) | Fabric services: pressure aggregator, escalation broker, consent issuer |
|
|
119
|
+
| [`docs/05_DYNAMICS_AND_GOVERNANCE.md`](docs/05_DYNAMICS_AND_GOVERNANCE.md) | Pressure dynamics + influence governance, with the honest boundary |
|
|
120
|
+
| [`docs/06_CONFORMANCE_CHECKLIST.md`](docs/06_CONFORMANCE_CHECKLIST.md) | The executable `FAB-*` static suite + the behavioural-vector / two-implementation bar |
|
|
121
|
+
| [`docs/08_WIRE_FORMAT.md`](docs/08_WIRE_FORMAT.md) | **The frozen wire format: canonical JSON, framing, Protobuf, versioning** |
|
|
122
|
+
| [`docs/09_TRANSPORT_AND_OPERATIONS.md`](docs/09_TRANSPORT_AND_OPERATIONS.md) | **Running the system: the node service, mTLS, live `FAB-L` conformance, the registry** |
|
|
123
|
+
| [`docs/10_DEPLOYMENT.md`](docs/10_DEPLOYMENT.md) | **Deploying it: one image, the full platform matrix incl. k8s/Helm and GPU providers** |
|
|
124
|
+
|
|
125
|
+
## How it works (the honest version)
|
|
126
|
+
|
|
127
|
+
The IAIso trust boundary is inherited, not hidden: IFP **bounds cooperating
|
|
128
|
+
nodes** and makes them *measurable and attestable*. Pressure is computed at the
|
|
129
|
+
infrastructure level, outside the model (invariant 5), so a node can't game its
|
|
130
|
+
own valve, and the fabric trusts *attested infra telemetry, not model
|
|
131
|
+
self-report*. For **adversarial** containment you still bind thresholds to an
|
|
132
|
+
out-of-process anchor (seccomp / container / VM / hypervisor FLOP cap) at
|
|
133
|
+
substrate S0–S4 — and `layer0_caps.hardware_attested` is the wire-level claim
|
|
134
|
+
that you did. `FAB-I-006` fails any node that claims Layer 0 without it. Safety
|
|
135
|
+
through structure, not hope.
|
|
136
|
+
|
|
137
|
+
Rule/check IDs are namespaced `FAB-*` so output looks kin to the rest of the
|
|
138
|
+
family (SmartPangolin's `SEC-*`, SmartSeal's `SEAL-*`).
|
|
139
|
+
|
|
140
|
+
## Part of the Smart* family
|
|
141
|
+
|
|
142
|
+
SmartFabric is the **fabric layer** of IAIso — the plane the other tools ride on.
|
|
143
|
+
It stacks naturally with [SmartSeal](https://github.com/SmartTasksOrg/sf-smartseal) (provenance
|
|
144
|
+
records on the observability plane), [SmartRoute](https://github.com/SmartTasksOrg/sf-smartroute)
|
|
145
|
+
(trust-gated routing), and [SmartLLMCost](https://github.com/SmartTasksOrg/sf-smartllmcost) (the
|
|
146
|
+
resource-accounting record — characteristic #23). Everything conforms to the open
|
|
147
|
+
**[IAIso standard](https://github.com/SmartTasksOrg/IAISO)** and bundles in
|
|
148
|
+
**[SmartTasks.cloud](https://smarttasks.cloud)**.
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
## Contact
|
|
152
|
+
|
|
153
|
+
Companies wanting hands-on integration of the fabric into their architecture,
|
|
154
|
+
audit-ready: **[enterprise@smarttasks.cloud](mailto:enterprise@smarttasks.cloud)**.
|
|
155
|
+
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=77", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "sf-smartfabric"
|
|
7
|
+
version = "0.5.0"
|
|
8
|
+
description = "IAIso Fabric Protocol (IFP) — carry & enforce IAIso containment across a fleet of governed AI nodes."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.10"
|
|
11
|
+
license = { file = "LICENSE" }
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "SmartTasks", email = "enterprise@smarttasks.cloud" },
|
|
14
|
+
]
|
|
15
|
+
keywords = ["iaiso", "ai-safety", "governance", "fabric", "protocol", "containment", "provenance"]
|
|
16
|
+
classifiers = [
|
|
17
|
+
"Development Status :: 3 - Alpha",
|
|
18
|
+
"Intended Audience :: Developers",
|
|
19
|
+
"Operating System :: OS Independent",
|
|
20
|
+
"Programming Language :: Python :: 3",
|
|
21
|
+
"Topic :: Security",
|
|
22
|
+
"Topic :: System :: Networking",
|
|
23
|
+
]
|
|
24
|
+
dependencies = [
|
|
25
|
+
"jsonschema>=4.0",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
[project.optional-dependencies]
|
|
29
|
+
dev = ["pytest>=7", "pytest-cov", "ruff", "mypy"]
|
|
30
|
+
|
|
31
|
+
[project.urls]
|
|
32
|
+
Homepage = "https://iaiso.org"
|
|
33
|
+
Source = "https://github.com/SmartTasksOrg/sf-smartfabric"
|
|
34
|
+
Issues = "https://github.com/SmartTasksOrg/sf-smartfabric/issues"
|
|
35
|
+
Security = "https://github.com/SmartTasksOrg/sf-smartfabric/security/policy"
|
|
36
|
+
Changelog = "https://github.com/SmartTasksOrg/sf-smartfabric/blob/master/CHANGELOG.md"
|
|
37
|
+
Standard = "https://github.com/SmartTasksOrg/IAISO"
|
|
38
|
+
Cloud = "https://smarttasks.cloud"
|
|
39
|
+
|
|
40
|
+
[project.scripts]
|
|
41
|
+
sf-smartfabric = "sf_smartfabric.cli:main"
|
|
42
|
+
|
|
43
|
+
[tool.setuptools]
|
|
44
|
+
package-dir = { "" = "src" }
|
|
45
|
+
|
|
46
|
+
[tool.setuptools.packages.find]
|
|
47
|
+
where = ["src"]
|
|
48
|
+
|
|
49
|
+
[tool.setuptools.package-data]
|
|
50
|
+
sf_smartfabric = ["py.typed"]
|
|
51
|
+
# The normative schema/ and examples/ live at the repo root (spec-first layout,
|
|
52
|
+
# like the rest of the Smart* family). The library resolves them from the source
|
|
53
|
+
# tree; a packaging step that vendors them into the wheel is tracked in
|
|
54
|
+
# private/roadmap/ENHANCEMENTS.md.
|
|
55
|
+
|
|
56
|
+
[tool.pytest.ini_options]
|
|
57
|
+
testpaths = ["tests"]
|
|
58
|
+
addopts = "-q"
|
|
59
|
+
|
|
60
|
+
[tool.ruff]
|
|
61
|
+
line-length = 100
|
|
62
|
+
target-version = "py310"
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"""SmartFabric — the reference implementation of the IAIso Fabric Protocol (IFP).
|
|
2
|
+
|
|
3
|
+
IFP is the wire protocol + node fingerprint that carries IAIso v5.0 containment
|
|
4
|
+
(pressure, the 7 layers, the 5 invariants, ConsentScope, atomic reset) across a
|
|
5
|
+
*fleet* of governed AI nodes — so heterogeneous agents/tools/models behave as
|
|
6
|
+
one governed data fabric, not a pile of independently-wrapped agents.
|
|
7
|
+
|
|
8
|
+
Public API:
|
|
9
|
+
PressureEngine, PressureConfig, Zone, StepOutcome — the core pressure model
|
|
10
|
+
NodeSample, FleetPressure, fleet_pressure — Layer-3 fleet aggregation
|
|
11
|
+
CIRMessage, CIRHeader, CIRPolicy, InfluenceClass — the CIR envelope
|
|
12
|
+
fingerprint (module) — load/validate/parse
|
|
13
|
+
conformance (module) — run FAB-* checks
|
|
14
|
+
"""
|
|
15
|
+
from ._version import __version__
|
|
16
|
+
from .models import (
|
|
17
|
+
CIR_VERBS,
|
|
18
|
+
CIRHeader,
|
|
19
|
+
CIRMessage,
|
|
20
|
+
CIRPolicy,
|
|
21
|
+
EXPANDING_VERBS,
|
|
22
|
+
InfluenceClass,
|
|
23
|
+
is_known_verb,
|
|
24
|
+
)
|
|
25
|
+
from .pressure import (
|
|
26
|
+
FleetPressure,
|
|
27
|
+
NodeSample,
|
|
28
|
+
PressureConfig,
|
|
29
|
+
PressureEngine,
|
|
30
|
+
StepOutcome,
|
|
31
|
+
Zone,
|
|
32
|
+
fleet_pressure,
|
|
33
|
+
)
|
|
34
|
+
from . import conformance, fingerprint, vectors, wire
|
|
35
|
+
|
|
36
|
+
__all__ = [
|
|
37
|
+
"__version__",
|
|
38
|
+
"PressureEngine",
|
|
39
|
+
"PressureConfig",
|
|
40
|
+
"Zone",
|
|
41
|
+
"StepOutcome",
|
|
42
|
+
"NodeSample",
|
|
43
|
+
"FleetPressure",
|
|
44
|
+
"fleet_pressure",
|
|
45
|
+
"CIRMessage",
|
|
46
|
+
"CIRHeader",
|
|
47
|
+
"CIRPolicy",
|
|
48
|
+
"InfluenceClass",
|
|
49
|
+
"CIR_VERBS",
|
|
50
|
+
"EXPANDING_VERBS",
|
|
51
|
+
"is_known_verb",
|
|
52
|
+
"fingerprint",
|
|
53
|
+
"conformance",
|
|
54
|
+
"vectors",
|
|
55
|
+
"wire",
|
|
56
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.5.0"
|