intentkit 0.6.1__py3-none-any.whl → 0.6.2.dev1__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 CHANGED
@@ -3,7 +3,7 @@
3
3
  A powerful platform for building AI agents with blockchain and cryptocurrency capabilities.
4
4
  """
5
5
 
6
- __version__ = "0.6.1"
6
+ __version__ = "0.6.2-dev1"
7
7
  __author__ = "hyacinthus"
8
8
  __email__ = "hyacinthus@gmail.com"
9
9
 
intentkit/models/chat.py CHANGED
@@ -448,9 +448,9 @@ class ChatMessage(ChatMessageCreate):
448
448
  return resp
449
449
 
450
450
  @classmethod
451
- async def get(cls, chat_id: str) -> Optional["ChatMessage"]:
451
+ async def get(cls, message_id: str) -> Optional["ChatMessage"]:
452
452
  async with get_session() as db:
453
- raw = await db.get(ChatMessageTable, chat_id)
453
+ raw = await db.get(ChatMessageTable, message_id)
454
454
  if raw:
455
455
  return ChatMessage.model_validate(raw)
456
456
  return None
@@ -133,7 +133,7 @@
133
133
  "type": "string",
134
134
  "title": "Supabase URL",
135
135
  "description": "Your Supabase project URL (e.g., https://your-project.supabase.co). You can find it in Project Settings -> Data API",
136
- "x-link": "https://supabase.com/",
136
+ "x-link": "[Create Your DB](https://supabase.com/)",
137
137
  "format": "uri"
138
138
  },
139
139
  "supabase_key": {
@@ -153,7 +153,7 @@
153
153
  "public_write_tables": {
154
154
  "type": "string",
155
155
  "title": "Public Write Tables",
156
- "description": "Add tables separated by commas. When insert, update, upsert, or delete operations are enabled for public use, only tables from this list can be used. This list does not restrict the skills executed by the owner or in autonomous chat."
156
+ "description": "Add tables separated by commas. When insert, update, upsert, or delete operations are enabled for public use, only tables from this list can be used. This list does not restrict the skills executed by the owner or in autonomous chat. You can use either this option or public_key to secure your public access."
157
157
  }
158
158
  },
159
159
  "required": [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: intentkit
3
- Version: 0.6.1
3
+ Version: 0.6.2.dev1
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=-3Un4YJwcb3e0Uok1j5DREXHBSd5AtyTZOdqwc8ZpuU,378
1
+ intentkit/__init__.py,sha256=HBNDaJ4-iLgVtxsc42X7svB_Cpb5ZvDz_6CDzQuVI5Y,383
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
@@ -26,7 +26,7 @@ intentkit/models/agent_data.py,sha256=x3pYRpI0QUcaK09r0m8-06rSbQB4pKEymF5d9JCeml
26
26
  intentkit/models/agent_schema.json,sha256=M5MMMAVNJnp6kE8hjti6D0WLdFIGtIdF66_Cg6nZfJU,21724
27
27
  intentkit/models/app_setting.py,sha256=WgW-9t0EbiVemRLrVaC6evdfRU5QFSDK0elsnUU5nIo,5008
28
28
  intentkit/models/base.py,sha256=o-zRjVrak-f5Jokdvj8BjLm8gcC3yYiYMCTLegwT2lA,185
29
- intentkit/models/chat.py,sha256=H4fKBgrseOaFIp83sYYiuyYpYufQAvnoca6V4TVbibE,18013
29
+ intentkit/models/chat.py,sha256=2P9dPWEti9f7XbO6L6Kp89lcYuyymSwqzxhL4GfBmBc,18019
30
30
  intentkit/models/conversation.py,sha256=nrbDIw-3GK5BYi_xkI15FLdx4a6SNrFK8wfAGLCsrqk,9032
31
31
  intentkit/models/credit.py,sha256=tHydPpGk8c8p9TLyIb7kvII4vo2WiXvI_i6xzv9PwaQ,42091
32
32
  intentkit/models/db.py,sha256=2OpdTjQWUM9FkDP8Ni0mGLeVJ5q9ah3bGlGe9-IzDp0,3999
@@ -286,7 +286,7 @@ intentkit/skills/supabase/delete_data.py,sha256=HxQie5GUas6xdRYF_SJ1-Y8K0X1aEeMm
286
286
  intentkit/skills/supabase/fetch_data.py,sha256=cEmDhG1dJE8PXMxzZIC0ttiKT8iSIj75vN3Vwb1W66s,4774
287
287
  intentkit/skills/supabase/insert_data.py,sha256=LqGcQXVWZDtSyK_lYWEJLqYL8ZEK9hDhl2lQHbzHQ-E,2268
288
288
  intentkit/skills/supabase/invoke_function.py,sha256=dxCsROgQduJIJkDkop_SRgeMECiAPwAAWE-I8nSfDl0,2561
289
- intentkit/skills/supabase/schema.json,sha256=u1VMsTJBC2PqZxMeagyiQM2FKwONu03-Bl2zu1DsPdw,5101
289
+ intentkit/skills/supabase/schema.json,sha256=cqjo20flg6Xlv6b-2nrsJAbdCMBCJfmlfz8tGFJIlGY,5194
290
290
  intentkit/skills/supabase/supabase.svg,sha256=65_80QCtJiKKV4EAuny_xbOD5JlTONEiq9xqO00hDtM,1107
291
291
  intentkit/skills/supabase/update_data.py,sha256=Hbwsoa52GZNTPIhWdR9vj9VlcPRUn_vCMOYDzmMoPsI,4023
292
292
  intentkit/skills/supabase/upsert_data.py,sha256=JgKLFPcQkUwnQhqTZojT4Ae53hYULeGEkQ1gxZJEe-c,2538
@@ -385,12 +385,11 @@ intentkit/utils/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
385
385
  intentkit/utils/chain.py,sha256=3GBHuAbXxQr_HlOvkbB2kruYSkweucfxI5u-swXzY40,15135
386
386
  intentkit/utils/error.py,sha256=JxnzDdKjwZX6Pa-bt_qaibcrWAeF6QAoHsu2uYPmqu4,4483
387
387
  intentkit/utils/logging.py,sha256=bhwZi5vscjBTd9kaNp_L6ijrfv9Sl3lsr4ARaUB4Iec,2389
388
- intentkit/utils/middleware.py,sha256=bh6rrbm2oT7d0A0ypUwp-I3jsr_98rtYIUlS5foootE,1842
389
388
  intentkit/utils/random.py,sha256=DymMxu9g0kuQLgJUqalvgksnIeLdS-v0aRk5nQU0mLI,452
390
389
  intentkit/utils/s3.py,sha256=9trQNkKQ5VgxWsewVsV8Y0q_pXzGRvsCYP8xauyUYkg,8549
391
390
  intentkit/utils/slack_alert.py,sha256=s7UpRgyzLW7Pbmt8cKzTJgMA9bm4EP-1rQ5KXayHu6E,2264
392
391
  intentkit/utils/tx.py,sha256=2yLLGuhvfBEY5n_GJ8wmIWLCzn0FsYKv5kRNzw_sLUI,1454
393
- intentkit-0.6.1.dist-info/METADATA,sha256=-p9llZmm6JTAunT1u4PldG3e0jANGpjbKU9E-lsCrAI,7280
394
- intentkit-0.6.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
395
- intentkit-0.6.1.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
396
- intentkit-0.6.1.dist-info/RECORD,,
392
+ intentkit-0.6.2.dev1.dist-info/METADATA,sha256=e6r6BKXz70Dh3FRE0JWsACI7_gAP7Rx5C43HmwOMFhI,7285
393
+ intentkit-0.6.2.dev1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
394
+ intentkit-0.6.2.dev1.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
395
+ intentkit-0.6.2.dev1.dist-info/RECORD,,
@@ -1,61 +0,0 @@
1
- import logging
2
- from typing import Optional
3
-
4
- import jwt
5
- from fastapi import Depends, HTTPException, Request
6
- from fastapi.security import HTTPAuthorizationCredentials, HTTPBearer
7
-
8
- logger = logging.getLogger(__name__)
9
-
10
- security = HTTPBearer(auto_error=False)
11
-
12
-
13
- def create_jwt_middleware(enable: bool, jwt_secret: str):
14
- """Create a JWT verification middleware with configurable enable flag and secret.
15
-
16
- Args:
17
- enable: Whether to enable JWT verification
18
- jwt_secret: Secret key for JWT verification
19
-
20
- Returns:
21
- A middleware function that can be used with FastAPI dependencies
22
- """
23
-
24
- async def verify_jwt(
25
- request: Request,
26
- credentials: Optional[HTTPAuthorizationCredentials] = Depends(security),
27
- ) -> str:
28
- """Verify JWT token from Authorization header and return the subject claim.
29
-
30
- Returns:
31
- str: The subject claim from the JWT token
32
- """
33
- host = request.headers.get("host", "").split(":")[0]
34
- logger.debug(
35
- f"verify_jwt: enable={enable}, credentials={credentials}, host={host}"
36
- )
37
-
38
- if (
39
- not enable
40
- or host == "localhost"
41
- or host == "127.0.0.1"
42
- or host == "intent-api"
43
- or host == "intent-readonly"
44
- or host == "intent-singleton"
45
- ):
46
- return ""
47
-
48
- if not credentials:
49
- raise HTTPException(
50
- status_code=401, detail="Missing authentication credentials"
51
- )
52
-
53
- try:
54
- payload = jwt.decode(
55
- credentials.credentials, jwt_secret, algorithms=["HS256"]
56
- )
57
- return payload.get("sub", "")
58
- except jwt.InvalidTokenError:
59
- raise HTTPException(status_code=401, detail="Invalid authentication token")
60
-
61
- return verify_jwt