intentkit 0.6.10.dev1__py3-none-any.whl → 0.6.10.dev2__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/core/engine.py +20 -0
- intentkit/skills/xmtp/base.py +3 -1
- intentkit/skills/xmtp/transfer.py +3 -18
- {intentkit-0.6.10.dev1.dist-info → intentkit-0.6.10.dev2.dist-info}/METADATA +1 -1
- {intentkit-0.6.10.dev1.dist-info → intentkit-0.6.10.dev2.dist-info}/RECORD +8 -8
- {intentkit-0.6.10.dev1.dist-info → intentkit-0.6.10.dev2.dist-info}/WHEEL +0 -0
- {intentkit-0.6.10.dev1.dist-info → intentkit-0.6.10.dev2.dist-info}/licenses/LICENSE +0 -0
intentkit/__init__.py
CHANGED
intentkit/core/engine.py
CHANGED
|
@@ -727,6 +727,26 @@ async def stream_agent(message: ChatMessageCreate):
|
|
|
727
727
|
skill_call["response"] = textwrap.shorten(
|
|
728
728
|
str(msg.content), width=1000, placeholder="..."
|
|
729
729
|
)
|
|
730
|
+
if msg.artifact:
|
|
731
|
+
artifact_message_create = ChatMessageCreate(
|
|
732
|
+
id=str(XID()),
|
|
733
|
+
agent_id=input.agent_id,
|
|
734
|
+
chat_id=input.chat_id,
|
|
735
|
+
user_id=input.user_id,
|
|
736
|
+
author_id=input.agent_id,
|
|
737
|
+
author_type=AuthorType.SKILL,
|
|
738
|
+
model=agent.model,
|
|
739
|
+
thread_type=input.author_type,
|
|
740
|
+
reply_to=input.id,
|
|
741
|
+
message="",
|
|
742
|
+
attachments=msg.artifact,
|
|
743
|
+
time_cost=this_time - last,
|
|
744
|
+
)
|
|
745
|
+
artifact_message = (
|
|
746
|
+
await artifact_message_create.save()
|
|
747
|
+
)
|
|
748
|
+
yield artifact_message
|
|
749
|
+
last = this_time
|
|
730
750
|
skill_calls.append(skill_call)
|
|
731
751
|
break
|
|
732
752
|
skill_message_create = ChatMessageCreate(
|
intentkit/skills/xmtp/base.py
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
from typing import Literal
|
|
2
|
+
|
|
1
3
|
from intentkit.skills.base import IntentKitSkill
|
|
2
4
|
|
|
3
5
|
|
|
@@ -5,7 +7,7 @@ class XmtpBaseTool(IntentKitSkill):
|
|
|
5
7
|
"""Base class for XMTP-related skills."""
|
|
6
8
|
|
|
7
9
|
# Set response format to content_and_artifact for returning tuple
|
|
8
|
-
response_format = "content_and_artifact"
|
|
10
|
+
response_format: Literal["content", "content_and_artifact"] = "content_and_artifact"
|
|
9
11
|
|
|
10
12
|
@property
|
|
11
13
|
def category(self) -> str:
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
from typing import
|
|
1
|
+
from typing import List, Optional, Tuple, Type
|
|
2
2
|
|
|
3
|
-
from langchain_core.runnables import RunnableConfig
|
|
4
3
|
from pydantic import BaseModel, Field
|
|
5
4
|
|
|
6
5
|
from intentkit.models.chat import ChatMessageAttachment, ChatMessageAttachmentType
|
|
@@ -38,7 +37,7 @@ class XmtpTransfer(XmtpBaseTool):
|
|
|
38
37
|
|
|
39
38
|
Only supports Base mainnet network.
|
|
40
39
|
"""
|
|
41
|
-
args_schema = TransferInput
|
|
40
|
+
args_schema: Type[BaseModel] = TransferInput
|
|
42
41
|
|
|
43
42
|
async def _arun(
|
|
44
43
|
self,
|
|
@@ -48,8 +47,6 @@ class XmtpTransfer(XmtpBaseTool):
|
|
|
48
47
|
decimals: int,
|
|
49
48
|
currency: str,
|
|
50
49
|
token_contract_address: Optional[str],
|
|
51
|
-
config: RunnableConfig,
|
|
52
|
-
**kwargs: Any,
|
|
53
50
|
) -> Tuple[str, List[ChatMessageAttachment]]:
|
|
54
51
|
"""Create an XMTP transfer transaction request.
|
|
55
52
|
|
|
@@ -66,7 +63,7 @@ class XmtpTransfer(XmtpBaseTool):
|
|
|
66
63
|
Tuple of (content_message, list_of_attachments)
|
|
67
64
|
"""
|
|
68
65
|
# Get context and check network
|
|
69
|
-
context = self.
|
|
66
|
+
context = self.get_context()
|
|
70
67
|
agent = context.agent
|
|
71
68
|
|
|
72
69
|
# Check if agent is on base mainnet
|
|
@@ -76,18 +73,6 @@ class XmtpTransfer(XmtpBaseTool):
|
|
|
76
73
|
f"Current agent network: {agent.network_id}"
|
|
77
74
|
)
|
|
78
75
|
|
|
79
|
-
# Check if agent has EVM wallet address
|
|
80
|
-
if not agent.evm_wallet_address:
|
|
81
|
-
raise ValueError(
|
|
82
|
-
"Agent must have an EVM wallet address to create XMTP transactions"
|
|
83
|
-
)
|
|
84
|
-
|
|
85
|
-
# Validate from_address matches agent's wallet
|
|
86
|
-
if from_address.lower() != agent.evm_wallet_address.lower():
|
|
87
|
-
raise ValueError(
|
|
88
|
-
f"from_address must match agent's EVM wallet address: {agent.evm_wallet_address}"
|
|
89
|
-
)
|
|
90
|
-
|
|
91
76
|
# Calculate amount in smallest unit (wei for ETH, token units for ERC20)
|
|
92
77
|
amount_int = int(float(amount) * (10**decimals))
|
|
93
78
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: intentkit
|
|
3
|
-
Version: 0.6.10.
|
|
3
|
+
Version: 0.6.10.dev2
|
|
4
4
|
Summary: Intent-based AI Agent Platform - Core Package
|
|
5
5
|
Project-URL: Homepage, https://github.com/crestal-network/intentkit
|
|
6
6
|
Project-URL: Repository, https://github.com/crestal-network/intentkit
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
intentkit/__init__.py,sha256=
|
|
1
|
+
intentkit/__init__.py,sha256=6XiftMFkoi8Qyr9-S8oG93dfv5MKVt78J0saxR3x6aM,384
|
|
2
2
|
intentkit/abstracts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
intentkit/abstracts/agent.py,sha256=108gb5W8Q1Sy4G55F2_ZFv2-_CnY76qrBtpIr0Oxxqk,1489
|
|
4
4
|
intentkit/abstracts/api.py,sha256=ZUc24vaQvQVbbjznx7bV0lbbQxdQPfEV8ZxM2R6wZWo,166
|
|
@@ -17,7 +17,7 @@ intentkit/core/agent.py,sha256=GIKDn1dTenIHWMRxe-ud7hd1cQaHzbTDdypy5IAgPfU,16658
|
|
|
17
17
|
intentkit/core/api.py,sha256=3GIMJpwduLUSbVPNW6mQVxZncYHH3OlLwdiqFtYtEAE,1208
|
|
18
18
|
intentkit/core/client.py,sha256=rIwtJVVm-7piXtFNDbeykt9vWdNTecgjW0aA3N-lHnM,1495
|
|
19
19
|
intentkit/core/credit.py,sha256=vLT47NlLrGyvSU1OP8dkVXV5_VHqRNSeAK5t1FqSSYs,61742
|
|
20
|
-
intentkit/core/engine.py,sha256=
|
|
20
|
+
intentkit/core/engine.py,sha256=ibaPSez5IuNys5AT3xifBsKUwNElFiJMmsXCjuziRdE,43555
|
|
21
21
|
intentkit/core/node.py,sha256=7h9zgDSd928bzUi3m3EZnKkhbwqlbRAQUr_uz7gKB5Y,8880
|
|
22
22
|
intentkit/core/prompt.py,sha256=RfLhlUktkB2kCr3wfldqq6ZP2l8heZIMc8jVp31KIyQ,3631
|
|
23
23
|
intentkit/core/skill.py,sha256=vPK37sDRT9kzkMBymPwqZ5uEdxTTRtb_DfREIeyz-Xw,5788
|
|
@@ -389,9 +389,9 @@ intentkit/skills/web_scraper/utils.py,sha256=feGBTMWqpkoY7RFy2xDHVs5y8c2h8-XZ111
|
|
|
389
389
|
intentkit/skills/web_scraper/website_indexer.py,sha256=rTqCx-XzJtMlZnyGImPGWRdLpS13_exXc3lQu9EDjQM,17925
|
|
390
390
|
intentkit/skills/xmtp/README.md,sha256=7y3ny77l5WUI758Q3xip1akFEgBdbibkwZjeJDu5MwE,2963
|
|
391
391
|
intentkit/skills/xmtp/__init__.py,sha256=9IYXKHoVNkq3pRagB7OrQaCElAamjCeEMvDK3aJi9-M,2013
|
|
392
|
-
intentkit/skills/xmtp/base.py,sha256=
|
|
392
|
+
intentkit/skills/xmtp/base.py,sha256=85ZEuNLJmI_NmBPkbvDXQrNvJNG8dp9MbcbQYQQ3QZ8,430
|
|
393
393
|
intentkit/skills/xmtp/schema.json,sha256=XAy-_SNjt77WGtmYZ2iKcGh4viOkRQkrs_1m8oCEF5s,1421
|
|
394
|
-
intentkit/skills/xmtp/transfer.py,sha256=
|
|
394
|
+
intentkit/skills/xmtp/transfer.py,sha256=hlkUu2UkTKx1Y7mUrBT4OjkWuzDK8DwfNpxYEwdOFhc,5860
|
|
395
395
|
intentkit/skills/xmtp/xmtp.svg,sha256=MSlgZFik7pinJXrK8Xi6c1Abxq_1zyuf9kx6H5yniuk,1154
|
|
396
396
|
intentkit/utils/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
|
397
397
|
intentkit/utils/chain.py,sha256=3GBHuAbXxQr_HlOvkbB2kruYSkweucfxI5u-swXzY40,15135
|
|
@@ -401,7 +401,7 @@ intentkit/utils/random.py,sha256=DymMxu9g0kuQLgJUqalvgksnIeLdS-v0aRk5nQU0mLI,452
|
|
|
401
401
|
intentkit/utils/s3.py,sha256=9trQNkKQ5VgxWsewVsV8Y0q_pXzGRvsCYP8xauyUYkg,8549
|
|
402
402
|
intentkit/utils/slack_alert.py,sha256=s7UpRgyzLW7Pbmt8cKzTJgMA9bm4EP-1rQ5KXayHu6E,2264
|
|
403
403
|
intentkit/utils/tx.py,sha256=2yLLGuhvfBEY5n_GJ8wmIWLCzn0FsYKv5kRNzw_sLUI,1454
|
|
404
|
-
intentkit-0.6.10.
|
|
405
|
-
intentkit-0.6.10.
|
|
406
|
-
intentkit-0.6.10.
|
|
407
|
-
intentkit-0.6.10.
|
|
404
|
+
intentkit-0.6.10.dev2.dist-info/METADATA,sha256=AhQ33QbJuWZpSUnZkjKqiZSowk4ZObkgih0leO67eE4,6343
|
|
405
|
+
intentkit-0.6.10.dev2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
406
|
+
intentkit-0.6.10.dev2.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
|
|
407
|
+
intentkit-0.6.10.dev2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|