Skip to main content

gamAI plugins

Where this fits. One stack, one order. gama-mandate is the product: it signs a business commitment, executes it once and proves it offline. Everything else is a layer you add only when you need what it does:

layer install what it adds
gamai-tripwire pip install gamai-tripwire inbound detection from access logs: canaries, bursts, credential reuse; a deny needs identity evidence
gamai-guard pip install gamai-guard prompt-injection filter: lexical + multilingual embeddings, block / advise bands
sigil-profile pip install sigil-profile proof-carrying execution profile over MCP/A2A: gate, verify, anchor
proofgate-runtime pip install proofgate-runtime small claim-verification and signed-receipt core
gama-l pip install gama-l a small language with types, effects and proofs
gamai-trust pip install gamai-trust trust marketplace and managed policy evaluation
gamai-plugins pip install gamai-plugins MCP plugins: policy, sandbox, team

None of these is a compliance certificate, a tamper-proof guarantee or an independent audit; each README says what it does not claim.

Portable, dependency-light plugins for AI agents: policy evaluation, sandbox execution and team coordination. The same code is exposed as an MCP server, a CLI and a plain Python function, so it can run in Claude Code, opencode, Codex, Cursor, LangChain or a custom agent loop.

Status: 0.2.12

0.2.6 must not be used. It predates the RT5 fixes (a shell-metacharacter deny bypass, and a package reported verified while node_modules/.git were never hashed). pip install already resolves to the newest release; if you pinned ==0.2.6, move to >=0.2.12. Yanking the old release is a PyPI web action and has not been done yet — it is listed here as outstanding rather than as done.

protean is a namespace sandbox, not a VM and not a hardened multi-tenant boundary.

Start here if you are new: gama-mandate — sign a business commitment, execute it once, prove it offline.

Plugins

Plugin What it does Default
trust Evaluates allow/deny policy with audit; verifies package integrity (never executes a manifest). missing/invalid policy ⇒ deny
protean Runs a command in a sandbox with a lease receipt, risk-routed substrates and JSONL evidence. low = bubblewrap
team Deterministic goal split, isolated clone, persistent state, at most one optional LLM call per task. deterministic fallback

Install

pip install gamai-plugins
gamai-plugins list            # 3 plugins, tool names and input schemas

Optional Ed25519 verification for the trust plugin: pip install 'gamai-plugins[crypto]'.

Quickstart (30 seconds): a deny that wins

cat > policy.json <<'JSON'
{"version": 1, "default": "deny",
 "allow": {"tools": ["shell"]},
 "deny":  {"commands": ["rm -rf*", "re:^\\s*sudo\\b"]}}
JSON
export GAMAI_POLICY=$PWD/policy.json

gamai-plugins call trust managed_policy '{"action":"check","tool":"shell","command":"ls -la"}'
# {"decision": "allow", "matched": ["tools:shell"], ...}

gamai-plugins call trust managed_policy '{"action":"check","tool":"shell","command":"rm -rf /"}'
# {"decision": "deny", "matched": ["commands:rm -rf*"], ...}

Patterns are globs (rm -rf*) unless prefixed with re: (re:^\\s*sudo\\b). Deny always wins over allow, and a missing or invalid policy is a deny — that is the point of the plugin, not a limitation.

Exit code is usable in CI: 0 = allow, 1 = deny (including fail-closed).

0.2.6: the trust entry point was renamed from gamai-trust to gamai-plugins-trust — it used to shadow the gamai-trust package CLI when both were installed. The library API and MCP tool names are unchanged.

MCP

{
  "mcpServers": {
    "gamai-plugins": {
      "command": "gamai-plugins-mcp"
    }
  }
}

The server exposes six namespaced tools:

trust_managed_policy
trust_marketplace_verify
protean_run
team_create
team_dispatch
team_status

CLI

gamai-plugins list
gamai-plugins call trust managed_policy '{"action":"load"}'
gamai-plugins call protean run '{"cmd":"echo hi","risk":"low","timeout_s":5}'
gamai-plugins call team team_create '{"goal":"review this change","agents":2}'
gamai-plugins mcp

Or the per-plugin entry points:

gamai-plugins-trust managed_policy '{"action":"check","tool":"shell"}'
gamai-protean run '{"cmd":"uname -a","risk":"low"}'
gamai-team team_status '{"team_id":"team-..."}'

CLI exit code is non-zero when a tool returns ok:false or a trust decision is deny, so shell/CI gates can use it.

Python

from gamai_plugins.cli import call

print(call("protean", "run", {"cmd": "echo hi", "risk": "low", "timeout_s": 5}))

Policy and integrity semantics

trust_managed_policy is an evaluator, not an enforcement point. The caller must enforce the returned decision. A valid policy without default is deny; deny rules win. Paths are normalized and shell segments are evaluated separately.

trust_marketplace_verify returns:

  • integrity_ok — every expected file matches and there is no unexpected, truncated or symlinked content;
  • trusted — integrity is complete and the signature verifies with a pinned key (public_key argument or GAMAI_TRUST_PUBKEY);
  • status — verified, self_signed, unsigned, failed or unverified.

A self-signed manifest is not trusted. Without a manifest the result is unverified, not a silent pass. See docs/MANIFEST.md for the canonical signing form and scripts/sign_manifest.py.

Team semantics

team_create creates a shared clone (not a source worktree) with core.hooksPath pointing at an empty directory, so an untrusted repository cannot execute hooks later. State is written before isolation, so a slow clone does not leave a registered workspace without state.

team prompts and role hints are currently Bosnian. That is intentional, not a translation layer; make it configurable if you need another language. Dispatch is serialized per team: the LLM call happens while the team lock is held, so concurrent dispatches wait rather than racing state.

Configuration

Variable Used by Meaning
GAMAI_POLICY trust policy JSON; default ~/.config/gamai/trust/policy.json
GAMAI_AUDIT trust audit JSONL; default ~/.local/state/gamai/trust/audit.jsonl
GAMAI_AUDIT_DISABLE trust 1 disables audit only when the policy does not require audit
GAMAI_TRUST_PUBKEY trust pinned Ed25519 key (PEM, 64 hex, or base64 raw 32 bytes)
GAMAI_HOME trust base config dir; default ~/.config/gamai
GAMAI_STATE trust base state dir; default ~/.local/state/gamai
PROTEAN_HOME protean data dir; default ~/.config/gamai/protean
PROTEAN_IMAGE protean Docker image for medium/high; default python:3.12-alpine
PROTEAN_HIGH_REMOTE protean 1 allows high risk to use the configured remote gVisor
PROTEAN_REMOTE_HOST protean optional remote host for critical + gVisor
PROTEAN_REMOTE_PORT, PROTEAN_REMOTE_KEY, PROTEAN_REMOTE_USER protean SSH details for the remote substrate
PROTEAN_KNOWN_HOSTS protean SSH known_hosts; default ~/.ssh/known_hosts
PROTEAN_SSH_STRICT protean yes, accept-new (default) or no
GAMAI_TEAM_STATE_DIR team state dir; default ~/.local/state/gamai/teams
GAMAI_TEAM_WORKTREES team workspace dir; default ~/.cache/gamai/teams
GAMAI_TEAM_REPO team default repo for isolation when repo is omitted
GAMAI_TEAM_LLM_BUDGET team max LLM calls per team; default 50
GAMAI_TEAM_LLM_TIMEOUT team per-call timeout; default 40 s
GAMAI_LLM_URL team optional HTTPS endpoint for one LLM call per task; HTTP only for loopback
GAMAI_LLM_TOKEN team optional X-Token sent to that endpoint
GAMAI_TEAM_AGENT team default backend name; default agent

No secret is stored in this repository. protean creates a per-install lease.key at runtime with mode 600.

Safety model

  • Trust is fail-closed: missing/invalid policy, invalid manifest or a required audit failure yields deny/failure.
  • Manifest is data: trust hashes and verifies packages; it never executes a manifest.
  • Lease is a receipt, not authorization: protean mints and verifies the lease in the same process. It binds command/genome/TTL for evidence, but it is not an external policy decision.
  • Substrate routing: low uses bubblewrap; medium/high use Docker with no network, dropped capabilities, read-only root and resource limits; critical is denied unless a remote gVisor host is explicitly configured.
  • Bounded output: protean captures at most 64 KiB per stream and returns at most 8,000 characters; evidence runs are pruned to the newest 200.
  • Audit cannot be disabled when required: GAMAI_AUDIT_DISABLE=1 is ignored when the policy says audit: true; audit failure becomes deny/audit_failed.
  • Team is not an authorization boundary. It coordinates work; the backend decides what it executes. LLM redirects are not followed and public plain HTTP is refused; the configured HTTPS origin still receives the token by design.
  • Docker socket is root-equivalent. Do not expose protean medium/high to untrusted users.
  • Trust score is heuristic: trust_score is a documented 0–100 heuristic, not a cryptographic proof.

Read SECURITY.md and THREAT_MODEL.md before using this in production.

Development

python -m unittest discover -s tests -v
python -m gamai_plugins.mcp --selftest
python scripts/smoke_mcp.py

The tests do not need network access, Docker, or an LLM. protean low-risk tests use bubblewrap when available; Windows runs the same suite without it.

License

MIT.

Metadata

Release files for gamai-plugins 0.2.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gamai-plugins 0.2.15
File Size Uploaded Provenance Actions
gamai_plugins-0.2.15.tar.gz 45.4 kB With provenance Details for gamai_plugins-0.2.15.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gamai-plugins 0.2.15
File Interpreter ABI Platform Actions
gamai_plugins-0.2.15-py3-none-any.whl Python 3 none any Details for gamai_plugins-0.2.15-py3-none-any.whl

Total release size: 85.3 kB

Release files / gamai_plugins-0.2.15.tar.gz

Download URL gamai_plugins-0.2.15.tar.gz
Size 45.4 kB
Tags Source
SHA-256 checksum
How to use checksums
fe665b6c79c94c91d34aa3fba48c602d2f42d7c42c435cfa159606eb32192393
BLAKE2b-256 checksum
How to use checksums
d063866365cbdd0d329effa3e66f2611823b91d75fea612290d11701330ae7cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 29, 2026.

Transparency log

Release files / gamai_plugins-0.2.15-py3-none-any.whl

Download URL gamai_plugins-0.2.15-py3-none-any.whl
Size 39.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b89c6ae44d2dd932de6d881eb4865eaf269623bab0ac8e1a046a6b9387cba65
BLAKE2b-256 checksum
How to use checksums
ec6e67ef9bb519d92f2f9e65bd83939799babe1463a1d3cd01a268f07c5d9140
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 29, 2026.

Transparency log

Security for gamai-plugins 0.2.15

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gamai_plugins-0.2.15.tar.gz

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 Nov 29, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page