Agent Mesh
Go a2aa2a-protocolagent-meshagentic-aiinferencemcpmeshmesh-networknetwork-securitynetworking-aip2p-network
docs: document the app's attenuation tab
Tomas Tormo376db4fe22a7
diff --git a/mobile/sam-node-app/README.md b/mobile/sam-node-app/README.mdindex 94175c2f..c66a3921 100644--- a/mobile/sam-node-app/README.md+++ b/mobile/sam-node-app/README.md@@ -98,6 +98,7 @@ Exposes capabilities directly to the OS registry, allowing native assistants (li1. **Dashboard Tab**: Displays current status, Node ID, connected peers, and DHT size.2. **Services Tab**: Allows enabling/disabling embedded sensors (Battery/Location) and bridging external local MCP servers.+3. **Attenuation Tab**: Datalog rules, policies and checks that limit who may call this node, one statement per line (e.g. `check if label("region", "eu-west-1");`). They are read when the node starts, and a syntax error fails the start. Same syntax and same errors as the `attenuation` block of `sam-node.yaml`; see [Node configuration §3](../../site/content/docs/user/node-configuration.md#3-defining-local-security-target-attenuation).---diff --git a/site/content/docs/development/mobile.md b/site/content/docs/development/mobile.mdindex 91c53dbb..ecb9839a 100644--- a/site/content/docs/development/mobile.md+++ b/site/content/docs/development/mobile.md@@ -41,7 +41,7 @@ To run `sam-node` on mobile with near-zero codebase maintenance, we avoid rewrit1. **Go FFI Binding Package (`mobile/sam-node-ffi/`)**: Contains CGO-exported functions (`StartNode`, `StopNode`, `EnrollNode`, `GetNodeID`, `FreeString`) which compile into a C-shared library (`.so`) or static archive (`.a`).2. **Flutter App (`mobile/sam-node-app/`)**: A cross-platform app containing:- `lib/sam_ffi.dart`: The Dart FFI wrapper loading the Go library and exposing Dart methods.- - `lib/main.dart`: Simple control UI to enroll and start/stop the background node. The enrollment screen accepts optional labels (comma-separated `key=value`, same syntax as the CLI `--labels` flag). The control plane mints them into the node's Biscuit at enrollment; the app keeps a copy in its data directory and sends it again on every start and Biscuit renewal, so changing labels means re-enrolling. Unlike the CLI, where `sam-node run --labels` has to be passed on every run, the app remembers them.+ - `lib/main.dart`: Simple control UI to enroll and start/stop the background node. The enrollment screen accepts optional labels (comma-separated `key=value`, same syntax as the CLI `--labels` flag). The control plane mints them into the node's Biscuit at enrollment; the app keeps a copy in its data directory and sends it again on every start and Biscuit renewal, so changing labels means re-enrolling. Unlike the CLI, where `sam-node run --labels` has to be passed on every run, the app remembers them. The Attenuation tab accepts local Datalog rules, policies and checks (one statement per line) in place of the CLI's `sam-node.yaml` `attenuation` block; the app stores them as `attenuation.json` in the same data directory and sends them on every start, and the FFI parses them with the same code path the config file uses.3. **Local Loopback Communication**:- The Flutter Dart environment controls the node lifecycle (construction, starting, stopping) via FFI.- Any actual tool registration, discovery, or mesh API queries are performed using standard HTTP JSON-RPC calls over local loopback (`127.0.0.1`) to the `sam-node` sidecar API.diff --git a/site/content/docs/user/node-configuration.md b/site/content/docs/user/node-configuration.mdindex 1addb5a2..05e8da68 100644--- a/site/content/docs/user/node-configuration.md+++ b/site/content/docs/user/node-configuration.md@@ -103,6 +103,7 @@ You can further restrict access using the `attenuation` block. Local policies de1. **`rules`**: Inject custom Datalog facts asserting local node state (e.g., `time($time)`).2. **`policies`**: Add local restrictions (e.g., `deny if user("banned_user");`).+3. **`checks`**: Require a condition for any connection to succeed (e.g., `check if label("region", "eu-west-1");`).---