intentkit 0.6.7.dev3__py3-none-any.whl → 0.6.7.dev4__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/agent.py +9 -3
- {intentkit-0.6.7.dev3.dist-info → intentkit-0.6.7.dev4.dist-info}/METADATA +1 -1
- {intentkit-0.6.7.dev3.dist-info → intentkit-0.6.7.dev4.dist-info}/RECORD +6 -6
- {intentkit-0.6.7.dev3.dist-info → intentkit-0.6.7.dev4.dist-info}/WHEEL +0 -0
- {intentkit-0.6.7.dev3.dist-info → intentkit-0.6.7.dev4.dist-info}/licenses/LICENSE +0 -0
intentkit/__init__.py
CHANGED
intentkit/core/agent.py
CHANGED
|
@@ -329,12 +329,15 @@ async def add_autonomous_task(agent_id: str, task: AgentAutonomous) -> AgentAuto
|
|
|
329
329
|
# Add the new task
|
|
330
330
|
current_tasks.append(task)
|
|
331
331
|
|
|
332
|
+
# Convert all AgentAutonomous objects to dictionaries for JSON serialization
|
|
333
|
+
serializable_tasks = [task_item.model_dump() for task_item in current_tasks]
|
|
334
|
+
|
|
332
335
|
# Update the agent in the database
|
|
333
336
|
async with get_session() as session:
|
|
334
337
|
update_stmt = (
|
|
335
338
|
update(AgentTable)
|
|
336
339
|
.where(AgentTable.id == agent_id)
|
|
337
|
-
.values(autonomous=
|
|
340
|
+
.values(autonomous=serializable_tasks)
|
|
338
341
|
)
|
|
339
342
|
await session.execute(update_stmt)
|
|
340
343
|
await session.commit()
|
|
@@ -369,7 +372,7 @@ async def delete_autonomous_task(agent_id: str, task_id: str) -> None:
|
|
|
369
372
|
task_found = False
|
|
370
373
|
updated_tasks = []
|
|
371
374
|
for task_data in current_tasks:
|
|
372
|
-
if
|
|
375
|
+
if task_data.id == task_id:
|
|
373
376
|
task_found = True
|
|
374
377
|
continue
|
|
375
378
|
updated_tasks.append(task_data)
|
|
@@ -379,12 +382,15 @@ async def delete_autonomous_task(agent_id: str, task_id: str) -> None:
|
|
|
379
382
|
404, "TaskNotFound", f"Autonomous task with ID {task_id} not found."
|
|
380
383
|
)
|
|
381
384
|
|
|
385
|
+
# Convert remaining AgentAutonomous objects to dictionaries for JSON serialization
|
|
386
|
+
serializable_tasks = [task_item.model_dump() for task_item in updated_tasks]
|
|
387
|
+
|
|
382
388
|
# Update the agent in the database
|
|
383
389
|
async with get_session() as session:
|
|
384
390
|
update_stmt = (
|
|
385
391
|
update(AgentTable)
|
|
386
392
|
.where(AgentTable.id == agent_id)
|
|
387
|
-
.values(autonomous=
|
|
393
|
+
.values(autonomous=serializable_tasks)
|
|
388
394
|
)
|
|
389
395
|
await session.execute(update_stmt)
|
|
390
396
|
await session.commit()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: intentkit
|
|
3
|
-
Version: 0.6.7.
|
|
3
|
+
Version: 0.6.7.dev4
|
|
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=wwO0j6U4aBUbh0VDF2uVO4NqXcoV8XJlPDWsyP2rUo0,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
|
|
@@ -13,7 +13,7 @@ intentkit/clients/twitter.py,sha256=Lfa7srHOFnY96SXcElW0jfg7XKS_WliWnXjPZEe6SQc,
|
|
|
13
13
|
intentkit/config/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
intentkit/config/config.py,sha256=Gn3KXgFyh4u0zmb-Awpu4AxvDFaGDa_5GrFrKBbOAXk,7509
|
|
15
15
|
intentkit/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
|
-
intentkit/core/agent.py,sha256=
|
|
16
|
+
intentkit/core/agent.py,sha256=x_Kz3Vk09ZGDfxBf1sh9CINepGdUiovGGlMZEsBynPI,14553
|
|
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
|
|
@@ -393,7 +393,7 @@ intentkit/utils/random.py,sha256=DymMxu9g0kuQLgJUqalvgksnIeLdS-v0aRk5nQU0mLI,452
|
|
|
393
393
|
intentkit/utils/s3.py,sha256=9trQNkKQ5VgxWsewVsV8Y0q_pXzGRvsCYP8xauyUYkg,8549
|
|
394
394
|
intentkit/utils/slack_alert.py,sha256=s7UpRgyzLW7Pbmt8cKzTJgMA9bm4EP-1rQ5KXayHu6E,2264
|
|
395
395
|
intentkit/utils/tx.py,sha256=2yLLGuhvfBEY5n_GJ8wmIWLCzn0FsYKv5kRNzw_sLUI,1454
|
|
396
|
-
intentkit-0.6.7.
|
|
397
|
-
intentkit-0.6.7.
|
|
398
|
-
intentkit-0.6.7.
|
|
399
|
-
intentkit-0.6.7.
|
|
396
|
+
intentkit-0.6.7.dev4.dist-info/METADATA,sha256=JVvwgqnK28pEsq8qQzO4H60Ve9C7bxy220FXzUgkrI8,6321
|
|
397
|
+
intentkit-0.6.7.dev4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
398
|
+
intentkit-0.6.7.dev4.dist-info/licenses/LICENSE,sha256=Bln6DhK-LtcO4aXy-PBcdZv2f24MlJFm_qn222biJtE,1071
|
|
399
|
+
intentkit-0.6.7.dev4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|