tenuo-agent-authorization
Skill101 starsChanged 5 months agoApache-2.0View on GitHub
Add or retrofit Tenuo authorization for AI-agent tools and effects. Use when implementing Tenuo, protecting an MCP or framework tool, choosing a gateway, sidecar, or embedded enforcement boundary, or testing that an agent cannot exceed delegated authority. Do not use for a review-only audit of an existing warrant.
In this repository4 other files it gives its agents.
- docs/llms.txtllms.txt
- tenuo-auditSkill
- tenuo-denial-triageSkill
- tenuo-warrantSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 11 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈11
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 19
If an original unguarded application route remains, close it or report the integration as incomplete.
- Very specific: line 27
Read manifests and lockfiles to determine the resolved Tenuo version.
- Distinctive: line 29
If those artifacts are insufficient, inspect an immutable repository release tag whose package manifest matches the resolved version.
- Distinctive: line 30
Use main only for an unreleased checkout or as an explicit fallback.
- Distinctive: line 33
Read exactly the applicable language reference:
- Distinctive: line 43
Read Framework-neutral integration only when no official adapter or verified recipe covers the framework.
- Distinctive: line 50
Verify immediately before the effect and execute with the returned or identically normalized verified arguments.
- Distinctive: line 60
Read Common footguns before finalizing.
- Distinctive: line 62
Do not finish until:
- Distinctive: line 77
Run the narrow tests, then the relevant package suite and type checker.
- Distinctive: line 83
Prefer a bounded statement:
- Very specific: line 87
Do not claim that Tenuo proves human intent, covers every application action, or proves that an authorized downstream effect completed.
- Distinctive: line 89
Before reporting any integration, read Integration trust levels and name its evidenced label: incomplete integration, observation only, …
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Tenuo Agent Authorization
Implement the smallest end-to-end integration that enforces approved authority at the component performing the effect. Prompts and instructions coordinate an agent; they are not authorization.
Locate the boundary
Identify the action-selecting process, the effecting component, every direct or fallback route to the effect, and who issues, holds, and verifies authority.
- An in-process guardrail limits calls reaching a wrapper. It is not an independent boundary when the agent process can bypass it or reach the resource directly.
- Effect-boundary enforcement verifies in a server, gateway, sidecar, worker, or tool host outside the agent's authority before performing the effect.
Tier 1 rejects out-of-policy calls in trusted code, including calls a manipulated prompt induces. Tier 2 keeps those checks and adds signed, holder-bound authority and delegation that can only narrow, which an independent verifier can check. Describe a requested local-policy integration by those checks, as enforcement. Read Integration trust levels. When the agent can skip the guard, identify the effecting component outside the agent's control where enforcement must run. Do not invent a warrant-issuance requirement for a local-policy request.
If an original unguarded application route remains, close it or report the integration as incomplete; a residual-risk disclaimer does not make that route protected. Read Architectural patterns only when the enforcement location is undecided or the task changes deployment topology.
For an MCP integration, run scripts/inspect_mcp_project.py --root ., confirm its findings in source, then read End-to-end MCP integration. Do not add a verifier in isolation: identify how legitimate callers receive holder-bound warrants and send proof with each protected call. If issuance is missing, observation and policy discovery may still be useful, but report that enforcement is incomplete.
For native function, shell, computer-use, or framework tools, run scripts/inspect_native_tools.py --root ., confirm its findings in source, then read Native agent tool integration. Determine whether the framework hook actually runs for every selected tool type; when it does not, enforce in the handler or downstream service that owns the effect.
Resolve the actual API
- Read manifests and lockfiles to determine the resolved Tenuo version.
- Inspect that installed package's README, declarations, importable source, and packaged examples. Not every package ships examples.
- If those artifacts are insufficient, inspect an immutable repository release tag whose package manifest matches the resolved version.
- Use
mainonly for an unreleased checkout or as an explicit fallback. Never silently mixmainexamples with a released dependency. - Find existing wrappers, authority transport, trust-root configuration, identity, secrets, logs, and effect handlers before editing.
Read exactly the applicable language reference:
- Python integration for
tenuoand its framework adapters. - TypeScript integration for
@tenuo/coreor@tenuo/mcp. - Rust integration for the
tenuocrate or a Rust enforcement service.
For MCP, also read End-to-end MCP integration. It defines the issuer-to-effect completion gate and reporting levels shared across languages.
For native tools, also read Native agent tool integration. Ordinary application functions count as native tools even without a framework. It covers function-tool dispatch, built-in execution tools, handoffs, and framework hook bypasses.
Read Framework-neutral integration only when no official adapter or verified recipe covers the framework. The linked examples are pinned to the release represented by this skill; use another version's installed API or matching tag rather than adapting them by guesswork.
Implement one vertical slice
- Name a capability for the effect and constrain every argument that materially changes it.
- Issue short-lived authority to the holder's public key. The holder creates proof; the verifier-facing API accepts a presentation or public transport data, never a private signing key.
- Configure trusted roots, verification time, and local policy ceilings independently of request data. A test clock belongs in private test code or trusted verifier construction, not a caller-selectable execution argument.
- Verify immediately before the effect and execute with the returned or identically normalized verified arguments. Reject values that cannot be represented losslessly in both authorization and effect types; unchecked numeric casts can authorize a different value than the one executed.
- Fail closed for missing, malformed, expired, untrusted, wrong-holder, wrong-capability, or constraint-violating authority.
- Make the effect client private to or owned by the enforcement component, or guard every effecting method.
Delegate only when required. Bind the child to its recipient, use the shortest useful TTL, narrow authority when the work is narrower, and make leaf authority terminal. Equal delegation can be valid when it remains within the parent envelope.
API examples belong in normal SDK example directories where CI exercises them. Do not copy Python, TypeScript, or Rust API snippets into this skill.
Pass the completion gate
Read Common footguns before finalizing. Read Security model and limits when claiming replay resistance, exactly-once effects, revocation, execution evidence, or complete mediation.
Do not finish until:
- a test attempts the original direct route at its original module/import and method, not just a top-level re-export, and proves it is inaccessible or produces zero effects; removing an export or adding an underscore is not sufficient if the callable still works;
- the verifier does not receive or use a holder or issuer private key to manufacture caller proof;
- verification covers the final material arguments and the effect uses the verified values;
- missing and invalid authority fail before the effect;
- development, observation, shadow, optional-warrant, and unknown-argument modes are disabled or reported as weaker modes;
- replay, idempotency, revocation, approvals, receipts, and execution evidence are not conflated with authorization.
Prove behavior
Instrument a fake effect with an invocation counter or durable test record. Prove one allowed invocation and zero invocations for missing authority, untrusted issuer, wrong holder or PoP, expiry, wrong capability, each important argument boundary, wider child delegation, and the original bypass route. Test replay only when one-use behavior is claimed.
Exercise denials at the receiving boundary, not only in the caller's presentation helper. Check the denial reason: setup errors, missing signer keys, and malformed test fixtures do not prove policy enforcement. For delegation, first prove a valid narrower child works with the correct holder key, then change only the envelope to prove widening is rejected. For compiled APIs, a bypass test must actually attempt the forbidden access and expect compilation failure; a successful test importing only the new API proves nothing about the old route.
Run the narrow tests, then the relevant package suite and type checker. A thrown error is insufficient evidence if the effect may already have happened.
Report the guarantee
State where verification occurs, what effect it mediates, trusted roots, holder transport, capability and argument envelope, TTL/delegation/replay behavior, tests run, and remaining bypasses or operational dependencies.
Prefer a bounded statement:
Calls reaching this effect boundary execute only after the configured Tenuo verifier accepts the warrant, holder proof, capability, and constrained arguments.
Do not claim that Tenuo proves human intent, covers every application action, or proves that an authorized downstream effect completed.
Before reporting any integration, read Integration trust levels and name its evidenced label: incomplete integration, observation only, development loop, or production boundary. Test-only minting does not establish an application issuance path. Report an in-process guardrail separately when it can be bypassed by the agent process.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

