intentkit 0.7.5.dev14__py3-none-any.whl → 0.7.5.dev16__py3-none-any.whl
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.
Potentially problematic release.
This version of intentkit might be problematic. Click here for more details.
- intentkit/__init__.py +1 -1
- intentkit/config/config.py +4 -3
- intentkit/models/skills.csv +23 -28
- intentkit/skills/base.py +45 -0
- intentkit/skills/basename/__init__.py +49 -0
- intentkit/skills/basename/base.py +11 -0
- intentkit/skills/basename/basename.svg +11 -0
- intentkit/skills/basename/schema.json +57 -0
- intentkit/skills/cdp/__init__.py +18 -92
- intentkit/skills/cdp/schema.json +13 -301
- intentkit/skills/erc20/__init__.py +50 -0
- intentkit/skills/erc20/base.py +11 -0
- intentkit/skills/erc20/erc20.svg +5 -0
- intentkit/skills/erc20/schema.json +73 -0
- intentkit/skills/erc721/__init__.py +51 -0
- intentkit/skills/erc721/base.py +11 -0
- intentkit/skills/erc721/erc721.svg +5 -0
- intentkit/skills/erc721/schema.json +89 -0
- intentkit/skills/morpho/__init__.py +50 -0
- intentkit/skills/morpho/base.py +11 -0
- intentkit/skills/morpho/morpho.svg +12 -0
- intentkit/skills/morpho/schema.json +73 -0
- intentkit/skills/pyth/__init__.py +50 -0
- intentkit/skills/pyth/base.py +11 -0
- intentkit/skills/pyth/pyth.svg +6 -0
- intentkit/skills/pyth/schema.json +73 -0
- intentkit/skills/skills.toml +32 -0
- intentkit/skills/superfluid/__init__.py +51 -0
- intentkit/skills/superfluid/base.py +11 -0
- intentkit/skills/superfluid/schema.json +89 -0
- intentkit/skills/superfluid/superfluid.svg +6 -0
- intentkit/skills/weth/__init__.py +49 -0
- intentkit/skills/weth/base.py +11 -0
- intentkit/skills/weth/schema.json +57 -0
- intentkit/skills/weth/weth.svg +6 -0
- intentkit/skills/wow/__init__.py +51 -0
- intentkit/skills/wow/base.py +11 -0
- intentkit/skills/wow/schema.json +89 -0
- intentkit/skills/wow/wow.svg +7 -0
- {intentkit-0.7.5.dev14.dist-info → intentkit-0.7.5.dev16.dist-info}/METADATA +1 -1
- {intentkit-0.7.5.dev14.dist-info → intentkit-0.7.5.dev16.dist-info}/RECORD +43 -13
- intentkit/skills/cdp/get_balance.py +0 -110
- intentkit/skills/cdp/swap.py +0 -121
- {intentkit-0.7.5.dev14.dist-info → intentkit-0.7.5.dev16.dist-info}/WHEEL +0 -0
- {intentkit-0.7.5.dev14.dist-info → intentkit-0.7.5.dev16.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Morpho AgentKit skills."""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict
|
|
4
|
+
|
|
5
|
+
from coinbase_agentkit import morpho_action_provider
|
|
6
|
+
|
|
7
|
+
from intentkit.abstracts.skill import SkillStoreABC
|
|
8
|
+
from intentkit.skills.base import (
|
|
9
|
+
SkillConfig,
|
|
10
|
+
SkillState,
|
|
11
|
+
action_to_structured_tool,
|
|
12
|
+
get_agentkit_actions,
|
|
13
|
+
)
|
|
14
|
+
from intentkit.skills.morpho.base import MorphoBaseTool
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SkillStates(TypedDict):
|
|
18
|
+
MorphoActionProvider_deposit: SkillState
|
|
19
|
+
MorphoActionProvider_withdraw: SkillState
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Config(SkillConfig):
|
|
23
|
+
"""Configuration for Morpho skills."""
|
|
24
|
+
|
|
25
|
+
states: SkillStates
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
async def get_skills(
|
|
29
|
+
config: "Config",
|
|
30
|
+
is_private: bool,
|
|
31
|
+
store: SkillStoreABC,
|
|
32
|
+
agent_id: str,
|
|
33
|
+
**_,
|
|
34
|
+
) -> list[MorphoBaseTool]:
|
|
35
|
+
"""Get all Morpho skills."""
|
|
36
|
+
|
|
37
|
+
available_skills: list[str] = []
|
|
38
|
+
for skill_name, state in config["states"].items():
|
|
39
|
+
if state == "disabled":
|
|
40
|
+
continue
|
|
41
|
+
if state == "public" or (state == "private" and is_private):
|
|
42
|
+
available_skills.append(skill_name)
|
|
43
|
+
|
|
44
|
+
actions = await get_agentkit_actions(agent_id, store, [morpho_action_provider])
|
|
45
|
+
tools: list[MorphoBaseTool] = []
|
|
46
|
+
for skill in available_skills:
|
|
47
|
+
for action in actions:
|
|
48
|
+
if action.name.endswith(skill):
|
|
49
|
+
tools.append(action_to_structured_tool(action))
|
|
50
|
+
return tools
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
|
|
2
|
+
<defs>
|
|
3
|
+
<radialGradient id="morpho" cx="50%" cy="50%" r="70%">
|
|
4
|
+
<stop offset="0%" stop-color="#82f3ff" />
|
|
5
|
+
<stop offset="100%" stop-color="#006064" />
|
|
6
|
+
</radialGradient>
|
|
7
|
+
</defs>
|
|
8
|
+
<rect width="128" height="128" fill="#004d40" rx="16" />
|
|
9
|
+
<circle cx="64" cy="48" r="28" fill="url(#morpho)" />
|
|
10
|
+
<rect x="36" y="72" width="56" height="20" rx="10" fill="#26a69a" />
|
|
11
|
+
<text x="50%" y="84%" font-family="Arial,Helvetica,sans-serif" font-size="18" fill="#e0f2f1" font-weight="600" text-anchor="middle">Morpho</text>
|
|
12
|
+
</svg>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "Morpho",
|
|
5
|
+
"description": "Morpho lending actions via Coinbase AgentKit",
|
|
6
|
+
"x-icon": "https://ai.service.crestal.dev/skills/morpho/morpho.svg",
|
|
7
|
+
"x-tags": [
|
|
8
|
+
"Blockchain"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"enabled": {
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"title": "Enabled",
|
|
14
|
+
"description": "Whether this skill is enabled",
|
|
15
|
+
"default": true
|
|
16
|
+
},
|
|
17
|
+
"states": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"MorphoActionProvider_deposit": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"title": "Deposit",
|
|
23
|
+
"enum": [
|
|
24
|
+
"disabled",
|
|
25
|
+
"public",
|
|
26
|
+
"private"
|
|
27
|
+
],
|
|
28
|
+
"x-enum-title": [
|
|
29
|
+
"Disabled",
|
|
30
|
+
"Agent Owner + All Users",
|
|
31
|
+
"Agent Owner Only"
|
|
32
|
+
],
|
|
33
|
+
"description": "State for MorphoActionProvider_deposit",
|
|
34
|
+
"default": "disabled"
|
|
35
|
+
},
|
|
36
|
+
"MorphoActionProvider_withdraw": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"title": "Withdraw",
|
|
39
|
+
"enum": [
|
|
40
|
+
"disabled",
|
|
41
|
+
"public",
|
|
42
|
+
"private"
|
|
43
|
+
],
|
|
44
|
+
"x-enum-title": [
|
|
45
|
+
"Disabled",
|
|
46
|
+
"Agent Owner + All Users",
|
|
47
|
+
"Agent Owner Only"
|
|
48
|
+
],
|
|
49
|
+
"description": "State for MorphoActionProvider_withdraw",
|
|
50
|
+
"default": "disabled"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"description": "States for each Morpho skill (disabled, public, or private)"
|
|
54
|
+
},
|
|
55
|
+
"api_key_provider": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"title": "API Key Provider",
|
|
58
|
+
"description": "Who provides the API key",
|
|
59
|
+
"enum": [
|
|
60
|
+
"platform"
|
|
61
|
+
],
|
|
62
|
+
"x-enum-title": [
|
|
63
|
+
"Nation Hosted"
|
|
64
|
+
],
|
|
65
|
+
"default": "platform"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"required": [
|
|
69
|
+
"states",
|
|
70
|
+
"enabled"
|
|
71
|
+
],
|
|
72
|
+
"additionalProperties": true
|
|
73
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"""Pyth AgentKit skills."""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict
|
|
4
|
+
|
|
5
|
+
from coinbase_agentkit import pyth_action_provider
|
|
6
|
+
|
|
7
|
+
from intentkit.abstracts.skill import SkillStoreABC
|
|
8
|
+
from intentkit.skills.base import (
|
|
9
|
+
SkillConfig,
|
|
10
|
+
SkillState,
|
|
11
|
+
action_to_structured_tool,
|
|
12
|
+
get_agentkit_actions,
|
|
13
|
+
)
|
|
14
|
+
from intentkit.skills.pyth.base import PythBaseTool
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SkillStates(TypedDict):
|
|
18
|
+
PythActionProvider_fetch_price: SkillState
|
|
19
|
+
PythActionProvider_fetch_price_feed: SkillState
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
class Config(SkillConfig):
|
|
23
|
+
"""Configuration for Pyth skills."""
|
|
24
|
+
|
|
25
|
+
states: SkillStates
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
async def get_skills(
|
|
29
|
+
config: "Config",
|
|
30
|
+
is_private: bool,
|
|
31
|
+
store: SkillStoreABC,
|
|
32
|
+
agent_id: str,
|
|
33
|
+
**_,
|
|
34
|
+
) -> list[PythBaseTool]:
|
|
35
|
+
"""Get all Pyth skills."""
|
|
36
|
+
|
|
37
|
+
available_skills: list[str] = []
|
|
38
|
+
for skill_name, state in config["states"].items():
|
|
39
|
+
if state == "disabled":
|
|
40
|
+
continue
|
|
41
|
+
if state == "public" or (state == "private" and is_private):
|
|
42
|
+
available_skills.append(skill_name)
|
|
43
|
+
|
|
44
|
+
actions = await get_agentkit_actions(agent_id, store, [pyth_action_provider])
|
|
45
|
+
tools: list[PythBaseTool] = []
|
|
46
|
+
for skill in available_skills:
|
|
47
|
+
for action in actions:
|
|
48
|
+
if action.name.endswith(skill):
|
|
49
|
+
tools.append(action_to_structured_tool(action))
|
|
50
|
+
return tools
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
|
|
2
|
+
<rect width="128" height="128" fill="#111827" rx="16" />
|
|
3
|
+
<path d="M40 44h48l-12 40H28z" fill="#38bdf8" opacity="0.85" />
|
|
4
|
+
<path d="M88 84H40l12-40h48z" fill="#f472b6" opacity="0.75" />
|
|
5
|
+
<text x="50%" y="92" font-family="Arial,Helvetica,sans-serif" font-size="18" fill="#f8fafc" text-anchor="middle">PYTH</text>
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "Pyth",
|
|
5
|
+
"description": "Pyth oracle price data via Coinbase AgentKit",
|
|
6
|
+
"x-icon": "https://ai.service.crestal.dev/skills/pyth/pyth.svg",
|
|
7
|
+
"x-tags": [
|
|
8
|
+
"Blockchain"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"enabled": {
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"title": "Enabled",
|
|
14
|
+
"description": "Whether this skill is enabled",
|
|
15
|
+
"default": true
|
|
16
|
+
},
|
|
17
|
+
"states": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"PythActionProvider_fetch_price": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"title": "Fetch Price",
|
|
23
|
+
"enum": [
|
|
24
|
+
"disabled",
|
|
25
|
+
"public",
|
|
26
|
+
"private"
|
|
27
|
+
],
|
|
28
|
+
"x-enum-title": [
|
|
29
|
+
"Disabled",
|
|
30
|
+
"Agent Owner + All Users",
|
|
31
|
+
"Agent Owner Only"
|
|
32
|
+
],
|
|
33
|
+
"description": "State for PythActionProvider_fetch_price",
|
|
34
|
+
"default": "disabled"
|
|
35
|
+
},
|
|
36
|
+
"PythActionProvider_fetch_price_feed": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"title": "Fetch Price Feed",
|
|
39
|
+
"enum": [
|
|
40
|
+
"disabled",
|
|
41
|
+
"public",
|
|
42
|
+
"private"
|
|
43
|
+
],
|
|
44
|
+
"x-enum-title": [
|
|
45
|
+
"Disabled",
|
|
46
|
+
"Agent Owner + All Users",
|
|
47
|
+
"Agent Owner Only"
|
|
48
|
+
],
|
|
49
|
+
"description": "State for PythActionProvider_fetch_price_feed",
|
|
50
|
+
"default": "disabled"
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"description": "States for each Pyth skill (disabled, public, or private)"
|
|
54
|
+
},
|
|
55
|
+
"api_key_provider": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"title": "API Key Provider",
|
|
58
|
+
"description": "Who provides the API key",
|
|
59
|
+
"enum": [
|
|
60
|
+
"platform"
|
|
61
|
+
],
|
|
62
|
+
"x-enum-title": [
|
|
63
|
+
"Nation Hosted"
|
|
64
|
+
],
|
|
65
|
+
"default": "platform"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"required": [
|
|
69
|
+
"states",
|
|
70
|
+
"enabled"
|
|
71
|
+
],
|
|
72
|
+
"additionalProperties": true
|
|
73
|
+
}
|
intentkit/skills/skills.toml
CHANGED
|
@@ -10,6 +10,10 @@ author_wallet = "0x3cdd051eeC909f94965F9c1c657f5b70a172B2C0"
|
|
|
10
10
|
author_github = "TxCorpi0x"
|
|
11
11
|
author_wallet = "0x2Bd32A312280bF5A01140e68ca630fB76cE8A3De"
|
|
12
12
|
|
|
13
|
+
[basename]
|
|
14
|
+
author_github = "hyacinthus"
|
|
15
|
+
author_wallet = "0x445750026A4a1906b61302442E085f9cbAfe206a"
|
|
16
|
+
|
|
13
17
|
[cdp]
|
|
14
18
|
author_github = "hyacinthus"
|
|
15
19
|
author_wallet = "0x445750026A4a1906b61302442E085f9cbAfe206a"
|
|
@@ -50,6 +54,14 @@ author_wallet = "0x2Bd32A312280bF5A01140e68ca630fB76cE8A3De"
|
|
|
50
54
|
author_github = "TxCorpi0x"
|
|
51
55
|
author_wallet = "0x2Bd32A312280bF5A01140e68ca630fB76cE8A3De"
|
|
52
56
|
|
|
57
|
+
[erc20]
|
|
58
|
+
author_github = "hyacinthus"
|
|
59
|
+
author_wallet = "0x445750026A4a1906b61302442E085f9cbAfe206a"
|
|
60
|
+
|
|
61
|
+
[erc721]
|
|
62
|
+
author_github = "hyacinthus"
|
|
63
|
+
author_wallet = "0x445750026A4a1906b61302442E085f9cbAfe206a"
|
|
64
|
+
|
|
53
65
|
[github]
|
|
54
66
|
author_github = "bluntbrain"
|
|
55
67
|
author_wallet = "0x3cdd051eeC909f94965F9c1c657f5b70a172B2C0"
|
|
@@ -66,6 +78,10 @@ author_wallet = "0x445750026A4a1906b61302442E085f9cbAfe206a"
|
|
|
66
78
|
author_github = "developerfred"
|
|
67
79
|
author_wallet = "0xd1a8Dd23e356B9fAE27dF5DeF9ea025A602EC81e"
|
|
68
80
|
|
|
81
|
+
[morpho]
|
|
82
|
+
author_github = "hyacinthus"
|
|
83
|
+
author_wallet = "0x445750026A4a1906b61302442E085f9cbAfe206a"
|
|
84
|
+
|
|
69
85
|
[nation]
|
|
70
86
|
author_github = "spidemen"
|
|
71
87
|
author_wallet = "0x275960ad41DbE218bBf72cDF612F88b5C6f40648"
|
|
@@ -78,6 +94,10 @@ author_wallet = "0x445750026A4a1906b61302442E085f9cbAfe206a"
|
|
|
78
94
|
author_github = "hyacinthus"
|
|
79
95
|
author_wallet = "0x445750026A4a1906b61302442E085f9cbAfe206a"
|
|
80
96
|
|
|
97
|
+
[superfluid]
|
|
98
|
+
author_github = "hyacinthus"
|
|
99
|
+
author_wallet = "0x445750026A4a1906b61302442E085f9cbAfe206a"
|
|
100
|
+
|
|
81
101
|
[system]
|
|
82
102
|
author_github = "hyacinthus"
|
|
83
103
|
author_wallet = "0x445750026A4a1906b61302442E085f9cbAfe206a"
|
|
@@ -102,6 +122,18 @@ author_wallet = "0xF60D4B6780D5D51827602D7aC319458bc9e921F4"
|
|
|
102
122
|
author_github = "bluntbrain"
|
|
103
123
|
author_wallet = "0x3cdd051eeC909f94965F9c1c657f5b70a172B2C0"
|
|
104
124
|
|
|
125
|
+
[pyth]
|
|
126
|
+
author_github = "hyacinthus"
|
|
127
|
+
author_wallet = "0x445750026A4a1906b61302442E085f9cbAfe206a"
|
|
128
|
+
|
|
105
129
|
[token]
|
|
106
130
|
author_github = "bluntbrain"
|
|
107
131
|
author_wallet = "0x3cdd051eeC909f94965F9c1c657f5b70a172B2C0"
|
|
132
|
+
|
|
133
|
+
[weth]
|
|
134
|
+
author_github = "hyacinthus"
|
|
135
|
+
author_wallet = "0x445750026A4a1906b61302442E085f9cbAfe206a"
|
|
136
|
+
|
|
137
|
+
[wow]
|
|
138
|
+
author_github = "hyacinthus"
|
|
139
|
+
author_wallet = "0x445750026A4a1906b61302442E085f9cbAfe206a"
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"""Superfluid AgentKit skills."""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict
|
|
4
|
+
|
|
5
|
+
from coinbase_agentkit import superfluid_action_provider
|
|
6
|
+
|
|
7
|
+
from intentkit.abstracts.skill import SkillStoreABC
|
|
8
|
+
from intentkit.skills.base import (
|
|
9
|
+
SkillConfig,
|
|
10
|
+
SkillState,
|
|
11
|
+
action_to_structured_tool,
|
|
12
|
+
get_agentkit_actions,
|
|
13
|
+
)
|
|
14
|
+
from intentkit.skills.superfluid.base import SuperfluidBaseTool
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SkillStates(TypedDict):
|
|
18
|
+
SuperfluidActionProvider_create_flow: SkillState
|
|
19
|
+
SuperfluidActionProvider_delete_flow: SkillState
|
|
20
|
+
SuperfluidActionProvider_update_flow: SkillState
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
class Config(SkillConfig):
|
|
24
|
+
"""Configuration for Superfluid skills."""
|
|
25
|
+
|
|
26
|
+
states: SkillStates
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
async def get_skills(
|
|
30
|
+
config: "Config",
|
|
31
|
+
is_private: bool,
|
|
32
|
+
store: SkillStoreABC,
|
|
33
|
+
agent_id: str,
|
|
34
|
+
**_,
|
|
35
|
+
) -> list[SuperfluidBaseTool]:
|
|
36
|
+
"""Get all Superfluid skills."""
|
|
37
|
+
|
|
38
|
+
available_skills: list[str] = []
|
|
39
|
+
for skill_name, state in config["states"].items():
|
|
40
|
+
if state == "disabled":
|
|
41
|
+
continue
|
|
42
|
+
if state == "public" or (state == "private" and is_private):
|
|
43
|
+
available_skills.append(skill_name)
|
|
44
|
+
|
|
45
|
+
actions = await get_agentkit_actions(agent_id, store, [superfluid_action_provider])
|
|
46
|
+
tools: list[SuperfluidBaseTool] = []
|
|
47
|
+
for skill in available_skills:
|
|
48
|
+
for action in actions:
|
|
49
|
+
if action.name.endswith(skill):
|
|
50
|
+
tools.append(action_to_structured_tool(action))
|
|
51
|
+
return tools
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "Superfluid",
|
|
5
|
+
"description": "Superfluid streaming actions via Coinbase AgentKit",
|
|
6
|
+
"x-icon": "https://ai.service.crestal.dev/skills/superfluid/superfluid.svg",
|
|
7
|
+
"x-tags": [
|
|
8
|
+
"Blockchain"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"enabled": {
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"title": "Enabled",
|
|
14
|
+
"description": "Whether this skill is enabled",
|
|
15
|
+
"default": true
|
|
16
|
+
},
|
|
17
|
+
"states": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"SuperfluidActionProvider_create_flow": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"title": "Create Flow",
|
|
23
|
+
"enum": [
|
|
24
|
+
"disabled",
|
|
25
|
+
"public",
|
|
26
|
+
"private"
|
|
27
|
+
],
|
|
28
|
+
"x-enum-title": [
|
|
29
|
+
"Disabled",
|
|
30
|
+
"Agent Owner + All Users",
|
|
31
|
+
"Agent Owner Only"
|
|
32
|
+
],
|
|
33
|
+
"description": "State for SuperfluidActionProvider_create_flow",
|
|
34
|
+
"default": "disabled"
|
|
35
|
+
},
|
|
36
|
+
"SuperfluidActionProvider_delete_flow": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"title": "Delete Flow",
|
|
39
|
+
"enum": [
|
|
40
|
+
"disabled",
|
|
41
|
+
"public",
|
|
42
|
+
"private"
|
|
43
|
+
],
|
|
44
|
+
"x-enum-title": [
|
|
45
|
+
"Disabled",
|
|
46
|
+
"Agent Owner + All Users",
|
|
47
|
+
"Agent Owner Only"
|
|
48
|
+
],
|
|
49
|
+
"description": "State for SuperfluidActionProvider_delete_flow",
|
|
50
|
+
"default": "disabled"
|
|
51
|
+
},
|
|
52
|
+
"SuperfluidActionProvider_update_flow": {
|
|
53
|
+
"type": "string",
|
|
54
|
+
"title": "Update Flow",
|
|
55
|
+
"enum": [
|
|
56
|
+
"disabled",
|
|
57
|
+
"public",
|
|
58
|
+
"private"
|
|
59
|
+
],
|
|
60
|
+
"x-enum-title": [
|
|
61
|
+
"Disabled",
|
|
62
|
+
"Agent Owner + All Users",
|
|
63
|
+
"Agent Owner Only"
|
|
64
|
+
],
|
|
65
|
+
"description": "State for SuperfluidActionProvider_update_flow",
|
|
66
|
+
"default": "disabled"
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"description": "States for each Superfluid skill (disabled, public, or private)"
|
|
70
|
+
},
|
|
71
|
+
"api_key_provider": {
|
|
72
|
+
"type": "string",
|
|
73
|
+
"title": "API Key Provider",
|
|
74
|
+
"description": "Who provides the API key",
|
|
75
|
+
"enum": [
|
|
76
|
+
"platform"
|
|
77
|
+
],
|
|
78
|
+
"x-enum-title": [
|
|
79
|
+
"Nation Hosted"
|
|
80
|
+
],
|
|
81
|
+
"default": "platform"
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
"required": [
|
|
85
|
+
"states",
|
|
86
|
+
"enabled"
|
|
87
|
+
],
|
|
88
|
+
"additionalProperties": true
|
|
89
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
|
|
2
|
+
<rect width="128" height="128" fill="#0f172a" rx="16" />
|
|
3
|
+
<path d="M32 72c0-18 14-32 32-32s32 14 32 32" fill="none" stroke="#38bdf8" stroke-width="10" stroke-linecap="round" />
|
|
4
|
+
<path d="M32 72c0 18 14 32 32 32s32-14 32-32" fill="none" stroke="#22d3ee" stroke-width="10" stroke-linecap="round" />
|
|
5
|
+
<circle cx="64" cy="72" r="12" fill="#f8fafc" />
|
|
6
|
+
</svg>
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"""WETH AgentKit skills."""
|
|
2
|
+
|
|
3
|
+
from typing import TypedDict
|
|
4
|
+
|
|
5
|
+
from coinbase_agentkit import weth_action_provider
|
|
6
|
+
|
|
7
|
+
from intentkit.abstracts.skill import SkillStoreABC
|
|
8
|
+
from intentkit.skills.base import (
|
|
9
|
+
SkillConfig,
|
|
10
|
+
SkillState,
|
|
11
|
+
action_to_structured_tool,
|
|
12
|
+
get_agentkit_actions,
|
|
13
|
+
)
|
|
14
|
+
from intentkit.skills.weth.base import WethBaseTool
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class SkillStates(TypedDict):
|
|
18
|
+
WethActionProvider_wrap_eth: SkillState
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class Config(SkillConfig):
|
|
22
|
+
"""Configuration for WETH skills."""
|
|
23
|
+
|
|
24
|
+
states: SkillStates
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
async def get_skills(
|
|
28
|
+
config: "Config",
|
|
29
|
+
is_private: bool,
|
|
30
|
+
store: SkillStoreABC,
|
|
31
|
+
agent_id: str,
|
|
32
|
+
**_,
|
|
33
|
+
) -> list[WethBaseTool]:
|
|
34
|
+
"""Get all WETH skills."""
|
|
35
|
+
|
|
36
|
+
available_skills: list[str] = []
|
|
37
|
+
for skill_name, state in config["states"].items():
|
|
38
|
+
if state == "disabled":
|
|
39
|
+
continue
|
|
40
|
+
if state == "public" or (state == "private" and is_private):
|
|
41
|
+
available_skills.append(skill_name)
|
|
42
|
+
|
|
43
|
+
actions = await get_agentkit_actions(agent_id, store, [weth_action_provider])
|
|
44
|
+
tools: list[WethBaseTool] = []
|
|
45
|
+
for skill in available_skills:
|
|
46
|
+
for action in actions:
|
|
47
|
+
if action.name.endswith(skill):
|
|
48
|
+
tools.append(action_to_structured_tool(action))
|
|
49
|
+
return tools
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"title": "WETH",
|
|
5
|
+
"description": "Wrap ETH actions via Coinbase AgentKit",
|
|
6
|
+
"x-icon": "https://ai.service.crestal.dev/skills/weth/weth.svg",
|
|
7
|
+
"x-tags": [
|
|
8
|
+
"Blockchain"
|
|
9
|
+
],
|
|
10
|
+
"properties": {
|
|
11
|
+
"enabled": {
|
|
12
|
+
"type": "boolean",
|
|
13
|
+
"title": "Enabled",
|
|
14
|
+
"description": "Whether this skill is enabled",
|
|
15
|
+
"default": true
|
|
16
|
+
},
|
|
17
|
+
"states": {
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"WethActionProvider_wrap_eth": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"title": "Wrap ETH",
|
|
23
|
+
"enum": [
|
|
24
|
+
"disabled",
|
|
25
|
+
"public",
|
|
26
|
+
"private"
|
|
27
|
+
],
|
|
28
|
+
"x-enum-title": [
|
|
29
|
+
"Disabled",
|
|
30
|
+
"Agent Owner + All Users",
|
|
31
|
+
"Agent Owner Only"
|
|
32
|
+
],
|
|
33
|
+
"description": "State for WethActionProvider_wrap_eth",
|
|
34
|
+
"default": "disabled"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"description": "States for each WETH skill (disabled, public, or private)"
|
|
38
|
+
},
|
|
39
|
+
"api_key_provider": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"title": "API Key Provider",
|
|
42
|
+
"description": "Who provides the API key",
|
|
43
|
+
"enum": [
|
|
44
|
+
"platform"
|
|
45
|
+
],
|
|
46
|
+
"x-enum-title": [
|
|
47
|
+
"Nation Hosted"
|
|
48
|
+
],
|
|
49
|
+
"default": "platform"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"required": [
|
|
53
|
+
"states",
|
|
54
|
+
"enabled"
|
|
55
|
+
],
|
|
56
|
+
"additionalProperties": true
|
|
57
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 128 128">
|
|
2
|
+
<rect width="128" height="128" fill="#1a237e" rx="16" />
|
|
3
|
+
<polygon points="64,20 88,48 64,76 40,48" fill="#8c9eff" />
|
|
4
|
+
<polygon points="64,56 88,84 64,112 40,84" fill="#536dfe" />
|
|
5
|
+
<text x="50%" y="122" font-family="Arial,Helvetica,sans-serif" font-size="20" fill="#c5cae9" text-anchor="middle">WETH</text>
|
|
6
|
+
</svg>
|