Skip to content

Commit 46ddb2c

Browse files
committed
Enhance documentation for managing capabilities and permissions; add CLI setup guide; include related images and links updates
1 parent f2d68b0 commit 46ddb2c

File tree

10 files changed

+1047
-31
lines changed

10 files changed

+1047
-31
lines changed

astro.config.mjs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,14 @@ export default defineConfig({
8787
label: "Builders",
8888
collapsed: false,
8989
items: [
90-
{ label: "Setup CLI", slug: "how-to-guides/builders/setup-cli" },
9190
{ label: "Register an Agent", slug: "how-to-guides/builders/register-an-agent" },
9291
{ label: "Setup Agent Server", slug: "how-to-guides/builders/setup-agent-server" },
9392
{ label: "Setup Agent Client", slug: "how-to-guides/builders/setup-agent-client" },
9493
{ label: "Edit your Agent", slug: "how-to-guides/builders/edit-your-agent" },
9594
{ label: "Create a Signal", slug: "how-to-guides/builders/create-signal" },
95+
{ label: "Manage Capabilities", slug: "how-to-guides/builders/manage-capabilities" },
96+
// { label: "Manage Permissions", slug: "how-to-guides/builders/manage-permissions" },
97+
// { label: "Delegate Emission Streams", slug: "how-to-guides/builders/delegate-emission-streams" },
9698
],
9799
},
98100
{
@@ -104,15 +106,6 @@ export default defineConfig({
104106
},
105107
],
106108
},
107-
// {
108-
// label: "Web Apps",
109-
// items: [
110-
// { label: "Torus Portal", slug: "web-apps/torus-portal" },
111-
// { label: "Torus Allocator", slug: "web-apps/torus-allocator" },
112-
// { label: "Torus Wallet", slug: "web-apps/torus-wallet" },
113-
// { label: "Torus DAO", slug: "web-apps/torus-dao" },
114-
// ],
115-
// },
116109
{
117110
label: "Development",
118111
items: [
@@ -135,6 +128,7 @@ export default defineConfig({
135128
label: "CLI Reference",
136129
collapsed: false,
137130
items: [
131+
{ label: "Setup CLI", slug: "development/cli/setup-cli" },
138132
{ label: "Key Management", slug: "development/cli/key-management" },
139133
{ label: "Balance Operations", slug: "development/cli/balance-operations" },
140134
],
146 KB
Loading

src/content/docs/how-to-guides/builders/setup-cli.mdx renamed to src/content/docs/development/cli/setup-cli.mdx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ The CLI enables developers and power users to manage Torus operations from the c
110110

111111
</Steps>
112112

113-
{/*
114-
115113
## Basic CLI Usage
116114

117115
Now that you have the CLI installed, here are the main command categories:
@@ -139,10 +137,10 @@ torus misc circulating-supply # Total supply info
139137

140138
Now that you have the CLI set up, you can:
141139

142-
- **Register an agent**: Use [agent registration](https://docs.torus.network/how-to-guides/builders/register-an-agent/) to create your first agent
143-
- **Manage keys**: Learn about [key management](https://docs.torus.network/development/cli/key-management/) for secure operations
144-
- **Check balances**: Use [balance operations](https://docs.torus.network/development/cli/balance-operations/) to monitor your tokens
145-
- **Build integrations**: Set up [agent servers](https://docs.torus.network/how-to-guides/builders/setup-agent-server/) for programmatic interactions
140+
- **Register an agent**: Use [agent registration](/how-to-guides/builders/register-an-agent/) to create your first agent
141+
- **Manage keys**: Learn about [key management](/development/cli/key-management/) for secure operations
142+
- **Check balances**: Use [balance operations](/development/cli/balance-operations/) to monitor your tokens
143+
- **Build integrations**: Set up [agent servers](/how-to-guides/builders/setup-agent-server/) for programmatic interactions
146144

147145
Connect with the community:
148146
- [Discord](https://discord.gg/torus) — Technical discussions, support, and announcements
@@ -155,9 +153,9 @@ Now that you have the CLI set up, you can:
155153

156154
<CardGrid>
157155
<Card title="Key Management" icon="seti:key">
158-
<a href="/cli/key-management">Learn to create and manage your keys</a>
156+
<a href="/development/cli/key-management">Learn to create and manage your keys</a>
159157
</Card>
160158
<Card title="Balance Operations" icon="seti:shell">
161-
<a href="/cli/balance-operations">Transfer tokens and manage staking</a>
159+
<a href="/development/cli/balance-operations">Transfer tokens and manage staking</a>
162160
</Card>
163-
</CardGrid> */}
161+
</CardGrid>

src/content/docs/explanations/builders/agent-registration.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Agent metadata is stored off-chain via IPFS but referenced on-chain through cont
4545
### Related Concepts
4646

4747
- **[Root Agents](https://docs.torus.network/explanations/root-agents/root-agents/)** - Agents that receive emissions directly
48-
- **[Permission System](https://docs.torus.network/v05/permissions/)** - How agents interact and delegate authority
48+
- **[Permission System](https://docs.torus.network/explanations/v05/permissions/)** - How agents interact and delegate authority
4949
- **[Governance & DAO](https://docs.torus.network/explanations/v05/governance-dao/)** - Understanding DAO decision-making processes
5050

5151
<Aside type="tip" title="Ready to Register?">
Lines changed: 276 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,276 @@
1+
---
2+
title: Manage Permissions
3+
description: Step-by-step guide to creating, editing, and managing permissions in Torus's recursive delegation system.
4+
---
5+
6+
import {
7+
Steps,
8+
Aside,
9+
CardGrid,
10+
Card,
11+
Tabs,
12+
TabItem
13+
} from "@astrojs/starlight/components";
14+
15+
In this guide, we'll walk through **creating permissions** in Torus's recursive delegation system.
16+
Permissions enable fine-grained control over emission distribution and capability access between agents.
17+
18+
#### What we will accomplish
19+
20+
- Create capability and emission permissions
21+
- Configure delegation terms and constraints
22+
- Understand revocation and enforcement mechanisms
23+
24+
<Aside>
25+
⏱️ **Estimated time to complete this guide: 15 minutes**
26+
</Aside>
27+
28+
## Prerequisites
29+
30+
<CardGrid>
31+
<Card title="Registered Agent" icon="seti:license">
32+
You must have a registered agent that can delegate permissions.
33+
</Card>
34+
<Card title="Target Recipients" icon="seti:users">
35+
Know the agent addresses you want to delegate permissions to.
36+
</Card>
37+
<Card title="Torus Balance" icon="seti:shell">
38+
Ensure sufficient TORUS for transaction fees.
39+
</Card>
40+
</CardGrid>
41+
42+
## Permission Types
43+
44+
<Tabs>
45+
<TabItem label="Capability Permissions">
46+
47+
**Purpose**: Grant access to specific agent endpoints or namespaces
48+
**Use Cases**: API access, service delegation, resource sharing
49+
50+
**Example**: Allow Agent B to access Agent A's memory storage API
51+
52+
</TabItem>
53+
<TabItem label="Emission Permissions">
54+
55+
**Purpose**: Delegate portions of emission streams (token flows)
56+
**Use Cases**: Hiring agents, revenue sharing, economic coordination
57+
58+
**Example**: Agent A delegates 20% of staking rewards to Agent B
59+
60+
</TabItem>
61+
</Tabs>
62+
63+
## Create a Permission
64+
65+
<Steps>
66+
67+
1. **Visit the [Torus Portal](https://portal.torus.network/)**
68+
Navigate to **Permissions Management****Create Permission**.
69+
70+
2. **Connect your wallet**
71+
Ensure you're connected as the delegating agent.
72+
73+
3. **Choose permission type**
74+
Select either **Capability** or **Emission** permission from the dropdown.
75+
76+
4. **Configure permission details based on type**
77+
78+
5. **Set revocation terms**
79+
80+
6. **Configure enforcement** (Optional)
81+
82+
7. **Review permission contract**
83+
84+
8. **Submit permission**
85+
86+
9. **Verify creation**
87+
88+
</Steps>
89+
90+
### Configuring Capability Permissions
91+
92+
For capability permissions, configure these details:
93+
94+
**Namespace Path**: Enter the specific capability path
95+
- Format: `agent.<agent_name>.<endpoint>.<method>`
96+
- Example: `agent.alice.memory.twitter.post`
97+
98+
**Recipient**: Agent address that will receive access
99+
100+
**Duration**: Set permission lifespan
101+
- **Indefinite**: Permission lasts until manually revoked
102+
- **Fixed Term**: Specify end date/block number
103+
- **Conditional**: Based on specific triggers
104+
105+
**Constraints**: Optional usage limitations
106+
- Rate limits (calls per hour/day)
107+
- Access windows (specific times)
108+
- Usage quotas
109+
110+
### Configuring Emission Permissions
111+
112+
For emission permissions, configure these details:
113+
114+
**Stream Selection**: Choose which emission streams to delegate
115+
- Staking rewards
116+
- Delegation fees
117+
- Specific revenue streams
118+
119+
**Allocation Type**:
120+
- **Percentage**: Delegate X% of selected streams
121+
- **Fixed Amount**: Delegate specific TORUS amount per period
122+
123+
**Recipient**: Agent address that will receive emissions
124+
125+
**Duration**: Set delegation period
126+
- Ongoing until revoked
127+
- Fixed term (blocks/time)
128+
- Performance-based triggers
129+
130+
### Setting Revocation Terms
131+
132+
Configure how the permission can be terminated:
133+
134+
- **Revocable**: You can cancel anytime
135+
- **Irrevocable**: Cannot be cancelled (use carefully)
136+
- **Conditional**: Auto-revoke based on conditions
137+
138+
### Configuring Enforcement
139+
140+
Set third-party governance authority (Optional):
141+
- DAO enforcement for disputes
142+
- Multi-sig requirements
143+
- Community arbitration
144+
145+
### Review and Submit
146+
147+
Before submission, verify all details:
148+
- Delegator and recipient addresses
149+
- Scope and limitations
150+
- Duration and revocation terms
151+
- Associated costs
152+
153+
## Managing Permissions
154+
155+
### View Active Permissions
156+
157+
Track your delegated permissions in the Torus Portal:
158+
- **Outgoing**: Permissions you've granted to others
159+
- **Incoming**: Permissions others have granted to you
160+
- **Status**: Active, expired, revoked permissions
161+
162+
### Edit Permissions
163+
164+
For permissions you've created:
165+
166+
<Steps>
167+
168+
1. Navigate to **Permissions Management****Edit Permission**
169+
2. Select the permission to modify
170+
3. Update allowed parameters (within original constraints)
171+
4. Submit changes on-chain
172+
173+
</Steps>
174+
175+
### Revoke Permissions
176+
177+
To cancel a revocable permission:
178+
179+
<Steps>
180+
181+
1. Find the permission in your management dashboard
182+
2. Select **Revoke Permission**
183+
3. Confirm revocation (immediate effect)
184+
4. Sign transaction to execute on-chain
185+
186+
</Steps>
187+
188+
## Advanced Configuration
189+
190+
### Recursive Permissions
191+
192+
Create permission chains where recipients can further delegate:
193+
194+
- **Enable sub-delegation**: Allow recipients to delegate portions
195+
- **Set depth limits**: Maximum delegation chain length
196+
- **Inheritance rules**: How constraints pass down the chain
197+
198+
### Conditional Permissions
199+
200+
Set up smart permissions that trigger based on conditions:
201+
202+
- **Performance metrics**: Delegate based on agent performance
203+
- **Time-based**: Activate during specific periods
204+
- **Event-driven**: Trigger on blockchain events
205+
206+
## Best Practices
207+
208+
### Security Considerations
209+
210+
- **Principle of least privilege**: Grant minimum necessary permissions
211+
- **Regular audits**: Review and clean up unused permissions
212+
- **Test with small amounts**: Start with small emission delegations
213+
214+
### Economic Efficiency
215+
216+
- **Batch operations**: Group related permissions to save gas
217+
- **Monitor performance**: Track ROI on emission delegations
218+
- **Set reasonable terms**: Balance flexibility with security
219+
220+
### Delegation Strategy
221+
222+
- **Clear documentation**: Maintain records of permission purposes
223+
- **Communication**: Coordinate with recipients about expectations
224+
- **Gradual scaling**: Increase delegation scope based on proven success
225+
226+
## Troubleshooting
227+
228+
### Permission Creation Fails
229+
230+
**Common issues:**
231+
- Insufficient balance for transaction fees
232+
- Invalid recipient agent address
233+
- Namespace path doesn't exist (for capabilities)
234+
- Attempting to delegate more than available (for emissions)
235+
236+
### Permission Not Working
237+
238+
**Check that:**
239+
- Permission is active and not expired
240+
- Recipient is using correct namespace path
241+
- No conflicting constraints or rate limits
242+
- Blockchain confirmation completed
243+
244+
### Revocation Issues
245+
246+
**Verify:**
247+
- Permission was created as revocable
248+
- You're the original delegator
249+
- No outstanding enforcement claims
250+
251+
## What's Next?
252+
253+
After creating permissions, you can:
254+
255+
- **Monitor usage**: Track how recipients use delegated permissions
256+
- **Optimize delegation**: Adjust terms based on performance
257+
- **Scale coordination**: Build complex multi-agent workflows
258+
- **Analyze economics**: Review emission delegation ROI
259+
260+
## Support and Resources
261+
262+
For help with permission management:
263+
264+
- [Torus Community Discord](https://discord.gg/torus)
265+
- [Permission System Documentation](https://docs.torus.network/explanations/v05/permissions/)
266+
267+
#### Related Topics
268+
269+
<CardGrid>
270+
<Card title="Permission System" icon="seti:config">
271+
<a href="/explanations/v05/permissions">Deep dive into architecture</a>
272+
</Card>
273+
<Card title="Emission Permissions" icon="seti:shell">
274+
<a href="/explanations/v05/emission-permissions">Economic coordination mechanisms</a>
275+
</Card>
276+
</CardGrid>

0 commit comments

Comments
 (0)