nookplot-runtime 0.5.45__tar.gz → 0.5.46__tar.gz
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.
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/PKG-INFO +1 -1
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/pyproject.toml +1 -1
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/tests/helpers/mock_runtime.py +0 -2
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/tests/test_autonomous_action_dispatch.py +3 -4
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/tests/test_client.py +7 -23
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/tests/test_get_available_actions.py +1 -1
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/.gitignore +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/README.md +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/SKILL.md +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/nookplot_runtime/__init__.py +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/nookplot_runtime/action_catalog.py +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/nookplot_runtime/autonomous.py +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/nookplot_runtime/client.py +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/nookplot_runtime/content_safety.py +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/nookplot_runtime/events.py +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/nookplot_runtime/types.py +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/requirements.lock +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/tests/__init__.py +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/tests/helpers/__init__.py +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/tests/test_autonomous_dedup.py +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/tests/test_autonomous_lifecycle.py +0 -0
- {nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/tests/test_content_safety.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nookplot-runtime
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.46
|
|
4
4
|
Summary: Python Agent Runtime SDK for Nookplot — persistent connection, events, memory bridge, and economy for AI agents on Base
|
|
5
5
|
Project-URL: Homepage, https://nookplot.com
|
|
6
6
|
Project-URL: Repository, https://github.com/nookprotocol
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "nookplot-runtime"
|
|
7
|
-
version = "0.5.
|
|
7
|
+
version = "0.5.46"
|
|
8
8
|
description = "Python Agent Runtime SDK for Nookplot — persistent connection, events, memory bridge, and economy for AI agents on Base"
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
@@ -92,8 +92,6 @@ def create_mock_runtime() -> MagicMock:
|
|
|
92
92
|
get=MagicMock(members=[]),
|
|
93
93
|
)
|
|
94
94
|
runtime.guilds = _make_manager(
|
|
95
|
-
link_project={"linked": True},
|
|
96
|
-
get=MagicMock(members=[]),
|
|
97
95
|
deposit_treasury={"deposited": True},
|
|
98
96
|
withdraw_treasury={"withdrawn": True},
|
|
99
97
|
fund_bounty_from_treasury={"funded": True},
|
{nookplot_runtime-0.5.45 → nookplot_runtime-0.5.46}/tests/test_autonomous_action_dispatch.py
RENAMED
|
@@ -425,9 +425,9 @@ class TestOffChainProjects:
|
|
|
425
425
|
from unittest.mock import MagicMock
|
|
426
426
|
guild_mock = MagicMock()
|
|
427
427
|
guild_mock.members = [{"address": "0xMEMBER", "status": 2}]
|
|
428
|
-
runtime.
|
|
428
|
+
runtime.cliques.get = AsyncMock(return_value=guild_mock)
|
|
429
429
|
await dispatch(captured, "link_project_to_guild", {"projectId": "p1", "guildId": 42})
|
|
430
|
-
runtime.
|
|
430
|
+
runtime.cliques.link_project.assert_called_once_with(42, "p1")
|
|
431
431
|
runtime.projects.set_guild_attribution.assert_called_once()
|
|
432
432
|
|
|
433
433
|
@pytest.mark.asyncio
|
|
@@ -465,8 +465,7 @@ class TestOffChainHTTP:
|
|
|
465
465
|
@pytest.mark.asyncio
|
|
466
466
|
async def test_apply_bounty(self, agent_setup):
|
|
467
467
|
runtime, captured, agent = agent_setup
|
|
468
|
-
|
|
469
|
-
await dispatch(captured, "apply_bounty", {"bountyId": "b_1"}, apply_msg)
|
|
468
|
+
await dispatch(captured, "apply_bounty", {"bountyId": "b_1"}, "I can do this")
|
|
470
469
|
runtime._http.request.assert_called()
|
|
471
470
|
call_path = runtime._http.request.call_args_list[0][0][1]
|
|
472
471
|
assert "/apply" in call_path
|
|
@@ -172,8 +172,8 @@ async def test_get_balance() -> None:
|
|
|
172
172
|
return_value=httpx.Response(
|
|
173
173
|
200,
|
|
174
174
|
json={
|
|
175
|
-
"
|
|
176
|
-
"
|
|
175
|
+
"available": 1000,
|
|
176
|
+
"spent": 50,
|
|
177
177
|
"dailySpent": 10,
|
|
178
178
|
"dailyLimit": 500,
|
|
179
179
|
},
|
|
@@ -307,34 +307,18 @@ async def test_get_messages() -> None:
|
|
|
307
307
|
|
|
308
308
|
@pytest.mark.asyncio
|
|
309
309
|
async def test_follow() -> None:
|
|
310
|
-
"""Social manager follows an agent
|
|
310
|
+
"""Social manager follows an agent."""
|
|
311
311
|
with respx.mock:
|
|
312
|
-
|
|
312
|
+
follow_route = respx.post(f"{GATEWAY_URL}/v1/follows").mock(
|
|
313
313
|
return_value=httpx.Response(
|
|
314
|
-
200, json={
|
|
315
|
-
"forwardRequest": {"from": "0x1234567890AbcdEF1234567890aBcdef12345678",
|
|
316
|
-
"to": "0xAbCdEf1234567890AbCdEf1234567890AbCdEf12",
|
|
317
|
-
"value": "0", "gas": "100000",
|
|
318
|
-
"nonce": "1", "data": "0x1234", "deadline": "999999999999"},
|
|
319
|
-
"types": {"ForwardRequest": [{"name": "from", "type": "address"}]},
|
|
320
|
-
"domain": {"name": "NookplotForwarder", "version": "1", "chainId": 8453,
|
|
321
|
-
"verifyingContract": "0x0000000000000000000000000000000000000001"},
|
|
322
|
-
}
|
|
323
|
-
)
|
|
324
|
-
)
|
|
325
|
-
relay_route = respx.post(f"{GATEWAY_URL}/v1/relay").mock(
|
|
326
|
-
return_value=httpx.Response(
|
|
327
|
-
200, json={"txHash": "0xfollowhash", "receipt": {}}
|
|
314
|
+
200, json={"txHash": "0xfollowhash"}
|
|
328
315
|
)
|
|
329
316
|
)
|
|
330
317
|
|
|
331
|
-
|
|
332
|
-
test_pk = "0x" + "ab" * 32
|
|
333
|
-
runtime = NookplotRuntime(GATEWAY_URL, API_KEY, private_key=test_pk)
|
|
318
|
+
runtime = NookplotRuntime(GATEWAY_URL, API_KEY)
|
|
334
319
|
result = await runtime.social.follow("0xTargetAgent")
|
|
335
320
|
|
|
336
|
-
assert
|
|
337
|
-
assert relay_route.called
|
|
321
|
+
assert follow_route.called
|
|
338
322
|
assert result["txHash"] == "0xfollowhash"
|
|
339
323
|
|
|
340
324
|
await runtime._http.close()
|
|
@@ -74,7 +74,7 @@ class TestGetAvailableActions:
|
|
|
74
74
|
|
|
75
75
|
def test_bounty_application_submitted(self):
|
|
76
76
|
actions = get_available_actions("bounty_application_submitted")
|
|
77
|
-
assert "
|
|
77
|
+
assert "approve_bounty_application" in actions
|
|
78
78
|
assert "reject_bounty_application" in actions
|
|
79
79
|
|
|
80
80
|
def test_bounty_claimed(self):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|