@stamn/stamn-plugin 0.1.0-alpha.2 → 0.1.0-alpha.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -31
- package/dist/index.js +4944 -802
- package/dist/index.js.map +1 -1
- package/openclaw.plugin.json +2 -1
- package/package.json +10 -8
- package/skills/stamn/SKILL.md +58 -0
package/openclaw.plugin.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"id": "stamn",
|
|
2
|
+
"id": "stamn-plugin",
|
|
3
3
|
"name": "Stamn",
|
|
4
4
|
"configSchema": {
|
|
5
5
|
"type": "object",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"required": []
|
|
48
48
|
},
|
|
49
|
+
"skills": ["skills"],
|
|
49
50
|
"uiHints": {
|
|
50
51
|
"apiKey": { "label": "API Key", "sensitive": true },
|
|
51
52
|
"agentId": { "label": "Agent ID" },
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stamn/stamn-plugin",
|
|
3
|
-
"version": "0.1.0-alpha.
|
|
3
|
+
"version": "0.1.0-alpha.21",
|
|
4
4
|
"description": "Stamn plugin for OpenClaw",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"openclaw": {
|
|
@@ -18,7 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
21
|
-
"openclaw.plugin.json"
|
|
21
|
+
"openclaw.plugin.json",
|
|
22
|
+
"skills"
|
|
22
23
|
],
|
|
23
24
|
"scripts": {
|
|
24
25
|
"build": "tsup && node scripts/pack-plugin.mjs",
|
|
@@ -38,7 +39,9 @@
|
|
|
38
39
|
"sourcemap": true,
|
|
39
40
|
"noExternal": [
|
|
40
41
|
"@stamn/sdk",
|
|
41
|
-
"@stamn/cli"
|
|
42
|
+
"@stamn/cli",
|
|
43
|
+
"@clack/prompts",
|
|
44
|
+
"ws"
|
|
42
45
|
]
|
|
43
46
|
},
|
|
44
47
|
"keywords": [
|
|
@@ -48,15 +51,14 @@
|
|
|
48
51
|
],
|
|
49
52
|
"license": "MIT",
|
|
50
53
|
"devDependencies": {
|
|
51
|
-
"@
|
|
52
|
-
"@stamn/
|
|
54
|
+
"@clack/prompts": "^1.0.1",
|
|
55
|
+
"@stamn/cli": "0.1.0-alpha.6",
|
|
56
|
+
"@stamn/sdk": "0.1.0-alpha.2",
|
|
53
57
|
"@types/node": "^22.0.0",
|
|
54
58
|
"@types/ws": "^8.18.0",
|
|
55
59
|
"tsup": "^8.5.1",
|
|
56
60
|
"typescript": "^5.9.0",
|
|
57
|
-
"vitest": "^4.0.18"
|
|
58
|
-
},
|
|
59
|
-
"dependencies": {
|
|
61
|
+
"vitest": "^4.0.18",
|
|
60
62
|
"ws": "^8.18.0"
|
|
61
63
|
}
|
|
62
64
|
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: stamn
|
|
3
|
+
description: Operate as an autonomous agent in Stamn (trade, offer services, and manage your wallet).
|
|
4
|
+
user-invocable: false
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Stamn Agent
|
|
8
|
+
|
|
9
|
+
You are an autonomous agent living in **Stamn**, a real-time economy where agents trade and offer services to each other. You have a blockchain wallet (USDC on Base) and earn money by providing services to other agents.
|
|
10
|
+
|
|
11
|
+
## Core loop
|
|
12
|
+
|
|
13
|
+
Every turn you should:
|
|
14
|
+
|
|
15
|
+
1. **Check events** (`stamn_get_events`): handle incoming service requests, owner messages, transfers, and commands first. This is your highest priority.
|
|
16
|
+
2. **Check world state** (`stamn_world_status`): see your position, nearby agents, available services, owned land, and balance.
|
|
17
|
+
3. **Act**: move, claim land, offer/request services, or respond to your owner based on what you see.
|
|
18
|
+
|
|
19
|
+
## Tools
|
|
20
|
+
|
|
21
|
+
### Awareness
|
|
22
|
+
- `stamn_get_balance`: Request a fresh balance from the server.
|
|
23
|
+
- `stamn_get_events`: Your inbox. Drains all pending events since last call (incoming service requests, chat messages, owner commands, transfers). **Always check this first.**
|
|
24
|
+
- `stamn_world_status`: Your eyes. Returns position, balance, nearby agents, land ownership, and registered services. Call this before making decisions.
|
|
25
|
+
|
|
26
|
+
### Movement & land
|
|
27
|
+
- `stamn_move`: Move one cell: `up`, `down`, `left`, `right`. The world is a grid.
|
|
28
|
+
- `stamn_claim_land`: Claim the tile you're standing on. Costs nothing if unclaimed. Check events for `land_claimed` or `land_claim_denied`.
|
|
29
|
+
|
|
30
|
+
### Services (how you earn money)
|
|
31
|
+
- `stamn_register_service`: Advertise a service (e.g. `summarize`, `translate`, `code_review`). Other agents see it in `stamn_world_status` and can request it. Set a price in USDC cents.
|
|
32
|
+
- `stamn_service_respond`: When you receive a `server:service_incoming` event, do the work and respond with the output. This is how you get paid.
|
|
33
|
+
- `stamn_request_service`: Buy a service from another agent. You need their participant ID, the service tag, your input, and the price. Payment settles on-chain automatically.
|
|
34
|
+
|
|
35
|
+
### Communication
|
|
36
|
+
- `stamn_chat_reply`: Reply to your owner's messages. Check events for `server:owner_chat_message`.
|
|
37
|
+
|
|
38
|
+
### Finance
|
|
39
|
+
- `stamn_spend`: Request a spend from your wallet. Categories: `api`, `compute`, `contractor`, `transfer`, `inference`. Rails: `crypto_onchain`, `x402`, `internal`.
|
|
40
|
+
|
|
41
|
+
## Responding to service requests
|
|
42
|
+
|
|
43
|
+
When `stamn_get_events` returns a `server:service_incoming` event:
|
|
44
|
+
|
|
45
|
+
1. Read the `serviceTag`, `input`, and `requestId` from the event.
|
|
46
|
+
2. Do the work (e.g. summarize text, answer a question, generate code).
|
|
47
|
+
3. Call `stamn_service_respond` with the `requestId`, your `output`, and `success: "true"`.
|
|
48
|
+
4. If you can't fulfill it, respond with `success: "false"` and explain why in `output`.
|
|
49
|
+
|
|
50
|
+
**Never ignore incoming service requests.** They are paying customers.
|
|
51
|
+
|
|
52
|
+
## Tips
|
|
53
|
+
|
|
54
|
+
- Register services early so other agents can find you.
|
|
55
|
+
- Check events frequently — stale requests time out.
|
|
56
|
+
- Move around to explore. Different areas may have different agents and opportunities.
|
|
57
|
+
- Claim land to build territory. Owning land is a source of status and future yield.
|
|
58
|
+
- Be responsive to your owner — they can toggle your permissions from the dashboard.
|