Skip to content

Commit c80dc74

Browse files
Sipherclaude
andcommitted
Refactor documentation structure and enhance SDK guides
This comprehensive update restructures the documentation for better user experience and provides enhanced SDK integration guides: **Documentation Structure Improvements:** - Restructured landing page with user-friendly introduction and clear pathways - Created new getting-started section with welcome.mdx and concepts organization - Updated navigation structure in astro.config.mjs for better hierarchy - Applied refined red text standards across all how-to guides for visual consistency **SDK Documentation Enhancements:** - Enhanced setup-agent-server.mdx with environment configuration and error handling patterns - Enhanced setup-agent-client.mdx with comprehensive boilerplate integration - Fixed critical SDK import paths and method names to match actual @torus-network/sdk implementation - Added production-ready examples with proper async patterns and environment variables **New Guides and Features:** - Added complete manage-capabilities guide with create and delete functionality - Implemented segment-based capability deletion with cascade logic explanation - Updated all allocator references from standalone URLs to portal-based locations - Fixed terminology from "Allocator Page" to "Allocator tab" throughout documentation **Technical Improvements:** - Fixed RedText component spacing issue to prevent floating punctuation - Updated folder structure from participants/ to holders/ for clarity - Added proper coming soon markers for incomplete guides - Enhanced cross-references and internal linking consistency 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent b4064f7 commit c80dc74

27 files changed

+1618
-294
lines changed

astro.config.mjs

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,9 @@ export default defineConfig({
2525
{
2626
label: "Getting Started",
2727
items: [
28-
{ label: "Introduction", slug: "index" },
28+
{ label: "Welcome", slug: "index" },
2929
{ label: "Tokenomics", slug: "getting-started/tokenomics" },
30-
{
31-
label: "Concepts & Terminology",
32-
slug: "getting-started/concepts",
33-
},
30+
{ label: "Understanding Torus", slug: "getting-started/concepts" },
3431
],
3532
},
3633
{
@@ -55,10 +52,10 @@ export default defineConfig({
5552
collapsed: false,
5653
items: [
5754
{ label: "Agent Registration", slug: "explanations/builders/agent-registration" },
58-
{ label: "Agent Server", slug: "explanations/builders/agent-server" },
59-
{ label: "Agent Client", slug: "explanations/builders/agent-client" },
6055
{ label: "Agent Editing", slug: "explanations/builders/agent-editing" },
6156
{ label: "Demand Signaling", slug: "explanations/builders/demand-signaling" },
57+
{ label: "Agent Server", slug: "explanations/builders/agent-server" },
58+
{ label: "Agent Client", slug: "explanations/builders/agent-client" },
6259
],
6360
},
6461
{
@@ -78,21 +75,23 @@ export default defineConfig({
7875
label: "Holders",
7976
collapsed: false,
8077
items: [
81-
{ label: "Setup a Wallet", slug: "how-to-guides/participants/setup-a-wallet" },
82-
{ label: "Bridge from Base", slug: "how-to-guides/participants/bridge-from-base" },
83-
{ label: "Stake your Torus", slug: "how-to-guides/participants/stake-your-torus" },
78+
{ label: "Setup a Wallet", slug: "how-to-guides/holders/setup-a-wallet" },
79+
{ label: "Bridge from Base", slug: "how-to-guides/holders/bridge-from-base" },
80+
{ label: "Stake your Torus", slug: "how-to-guides/holders/stake-your-torus" },
8481
],
8582
},
8683
{
8784
label: "Builders",
8885
collapsed: false,
8986
items: [
90-
{ label: "Setup CLI", slug: "how-to-guides/builders/setup-cli" },
9187
{ label: "Register an Agent", slug: "how-to-guides/builders/register-an-agent" },
92-
{ label: "Setup Agent Server", slug: "how-to-guides/builders/setup-agent-server" },
93-
{ label: "Setup Agent Client", slug: "how-to-guides/builders/setup-agent-client" },
9488
{ label: "Edit your Agent", slug: "how-to-guides/builders/edit-your-agent" },
89+
{ label: "Manage Capabilities", slug: "how-to-guides/builders/manage-capabilities" },
9590
{ label: "Create a Signal", slug: "how-to-guides/builders/create-signal" },
91+
// { label: "Manage Permissions", slug: "how-to-guides/builders/manage-permissions" },
92+
// { label: "Delegate Emission Streams", slug: "how-to-guides/builders/delegate-emission-streams" },
93+
{ label: "Setup Agent Server", slug: "how-to-guides/builders/setup-agent-server" },
94+
{ label: "Setup Agent Client", slug: "how-to-guides/builders/setup-agent-client" },
9695
],
9796
},
9897
{
@@ -104,15 +103,6 @@ export default defineConfig({
104103
},
105104
],
106105
},
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-
// },
116106
{
117107
label: "Development",
118108
items: [
@@ -135,6 +125,7 @@ export default defineConfig({
135125
label: "CLI Reference",
136126
collapsed: false,
137127
items: [
128+
{ label: "Setup CLI", slug: "development/cli/setup-cli" },
138129
{ label: "Key Management", slug: "development/cli/key-management" },
139130
{ label: "Balance Operations", slug: "development/cli/balance-operations" },
140131
],
146 KB
Loading
159 KB
Loading

src/components/RedText.astro

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
export interface Props {
3+
variant?: 'attention' | 'light' | 'soft';
4+
class?: string;
5+
}
6+
7+
const { variant = 'light', class: className = '' } = Astro.props;
8+
9+
const variantClasses = {
10+
attention: 'text-red-attention',
11+
light: 'text-red-light',
12+
soft: 'text-red-soft'
13+
};
14+
15+
const redClass = variantClasses[variant];
16+
---
17+
18+
<span class={`${redClass} ${className}`} style="display: inline;"><slot /></span>

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/development/web/overview-and-setup.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The ecosystem is built using a monorepo with [Turborepo](https://turbo.build/rep
1818

1919
<Aside type="tip">
2020
To access environments pointing to the testnet nodes, add the `.testnet`
21-
subdomain to the URL, eg. `https://allocator.testnet.torus.network/`
21+
subdomain to the URL, eg. `https://portal.testnet.torus.network/root-allocator`
2222
</Aside>
2323

2424
## Prerequisites

src/content/docs/development/web/querying-data.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ description: Learn how to query the stake weight between keys
66
import { CardGrid, LinkCard, Aside } from "@astrojs/starlight/components";
77

88
Our API allows you to retrieve information about the stake allocation between keys and agents.
9-
You can query this data by making a GET request to: `https://allocator.torus.network/api/allocated-weight`.
9+
You can query this data by making a GET request to: `https://portal.torus.network/api/allocated-weight`.
1010

1111
## API Response Format
1212

@@ -29,12 +29,12 @@ The API response has the following structure:
2929

3030
To filter the response for a specific allocating key, append the userKey query parameter to the API endpoint:
3131

32-
```allocator.torus.network/api/allocated-weight?userKey=<SS58Address>```
32+
```portal.torus.network/api/allocated-weight?userKey=<SS58Address>```
3333
- Filter by Agent Key
3434

3535
To filter the response for specific agents, append the agentKey query parameter to the API endpoint:
3636

37-
```allocator.torus.network/api/allocated-weight?agentKey=<SS58Address>```
37+
```portal.torus.network/api/allocated-weight?agentKey=<SS58Address>```
3838

3939

4040
<Aside type="note">

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ The burn mechanism maintains network quality by creating economic barriers to sp
3838

3939
### Discovery and Capabilities
4040

41-
Registered agents become discoverable through the public agent registry and can be viewed on the [Allocator page](https://allocator.torus.network/).
41+
Registered agents become discoverable through the public agent registry and can be viewed on the [Allocator tab](https://portal.torus.network/root-allocator).
4242
They can participate in the permission system, create named capabilities for other agents to invoke, and engage in governance proposals.
4343
Agent metadata is stored off-chain via IPFS but referenced on-chain through content hashes.
4444

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: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
---
2+
title: Concepts & Terminology
3+
description: Key terms and concepts used throughout the Torus ecosystem
4+
---
5+
6+
import { Aside } from "@astrojs/starlight/components";
7+
8+
9+
This glossary defines the key terms and concepts used throughout Torus documentation. Understanding these terms will help you navigate the ecosystem more effectively.
10+
11+
## Core Concepts
12+
13+
### Agent
14+
An autonomous entity in the Torus network that can perform actions, provide services, and participate in swarms. Agents can be registered users, automated services, or any entity capable of interacting with the protocol.
15+
16+
### Swarm
17+
A coordinated group of agents working together toward a common goal. Swarms form organically around specific objectives and can operate at multiple scales within the network.
18+
19+
### Hypergraph
20+
The emergent network structure formed by all agents, their relationships, permissions, and interactions. The hypergraph represents the complete state of coordination within Torus.
21+
22+
### Root Agent
23+
A special type of agent with elevated permissions to receive emissions directly from the protocol and set goals for swarm formation. Root agents lead major initiatives and coordinate large-scale activities.
24+
25+
## Permissions & Capabilities
26+
27+
### Capability
28+
A specific function or service that an agent can provide to others. Capabilities are registered on-chain and define what an agent can do within the network.
29+
30+
### Permission
31+
The right to use or delegate a specific capability. Permissions can be granted, revoked, and delegated between agents to enable complex coordination patterns.
32+
33+
### Delegation
34+
The process of granting permission to use a capability to another agent. Delegation enables specialization and collaborative work within swarms.
35+
36+
### Control Space
37+
The coordination layer where agents register capabilities, manage permissions, and coordinate activities. It serves as the control plane for the entire network.
38+
39+
## Economic Terms
40+
41+
### TORUS Token
42+
The native token of the Torus network used for staking, governance, and accessing network services.
43+
44+
### Staking
45+
The process of locking TORUS tokens to participate in network security and earn rewards. Staked tokens can be allocated to support specific agents.
46+
47+
### Emissions
48+
Token rewards distributed to agents and stakeholders based on their contributions to the network. Emissions flow from root agents to the broader ecosystem.
49+
50+
### Allocation
51+
The distribution of staked tokens to support specific agents or initiatives. Allocations determine how emissions flow through the network.
52+
53+
## Technical Terms
54+
55+
### Agent Server
56+
A service that hosts agent capabilities and provides APIs for other agents to interact with. Agent servers make capabilities discoverable and usable across the network.
57+
58+
### Agent Client
59+
A component that allows agents to discover and interact with capabilities provided by other agents. Clients handle authentication and communication protocols.
60+
61+
### Signal
62+
A message broadcast by an agent expressing demand for specific capabilities or announcing the availability of services. Signals help coordinate supply and demand within swarms.
63+
64+
### Substrate
65+
The blockchain framework that powers the Torus network. Substrate provides the runtime environment for the protocol's core functionality.
66+
67+
## Governance Terms
68+
69+
### DAO (Decentralized Autonomous Organization)
70+
The governance structure through which major protocol decisions are made. The Torus DAO enables stakeholder participation in network evolution.
71+
72+
### Proposal
73+
A formal suggestion for protocol changes, new features, or resource allocation submitted to the DAO for consideration and voting.
74+
75+
### Governance Token
76+
TORUS tokens used for voting on proposals and participating in decentralized governance processes.
77+
78+
<Aside>
79+
**New terms being added regularly.** As the Torus ecosystem evolves, new concepts and terminology emerge. Check back here for updates or suggest additions through our community channels.
80+
</Aside>

0 commit comments

Comments
 (0)