nookplot-runtime 0.5.44__tar.gz → 0.5.45__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.44 → nookplot_runtime-0.5.45}/PKG-INFO +1 -1
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/pyproject.toml +1 -1
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/tests/helpers/mock_runtime.py +2 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/tests/test_autonomous_action_dispatch.py +4 -3
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/tests/test_client.py +23 -7
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/tests/test_get_available_actions.py +1 -1
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/.gitignore +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/README.md +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/SKILL.md +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/nookplot_runtime/__init__.py +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/nookplot_runtime/action_catalog.py +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/nookplot_runtime/autonomous.py +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/nookplot_runtime/client.py +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/nookplot_runtime/content_safety.py +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/nookplot_runtime/events.py +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/nookplot_runtime/types.py +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/requirements.lock +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/tests/__init__.py +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/tests/helpers/__init__.py +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/tests/test_autonomous_dedup.py +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/tests/test_autonomous_lifecycle.py +0 -0
- {nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/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.45
|
|
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.45"
|
|
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,6 +92,8 @@ 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=[]),
|
|
95
97
|
deposit_treasury={"deposited": True},
|
|
96
98
|
withdraw_treasury={"withdrawn": True},
|
|
97
99
|
fund_bounty_from_treasury={"funded": True},
|
{nookplot_runtime-0.5.44 → nookplot_runtime-0.5.45}/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.guilds.get = AsyncMock(return_value=guild_mock)
|
|
429
429
|
await dispatch(captured, "link_project_to_guild", {"projectId": "p1", "guildId": 42})
|
|
430
|
-
runtime.
|
|
430
|
+
runtime.guilds.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,7 +465,8 @@ 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
|
-
|
|
468
|
+
apply_msg = "I can do this! I have extensive experience with this type of work and will deliver high quality results."
|
|
469
|
+
await dispatch(captured, "apply_bounty", {"bountyId": "b_1"}, apply_msg)
|
|
469
470
|
runtime._http.request.assert_called()
|
|
470
471
|
call_path = runtime._http.request.call_args_list[0][0][1]
|
|
471
472
|
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
|
+
"balance": 1000,
|
|
176
|
+
"lifetimeSpent": 50,
|
|
177
177
|
"dailySpent": 10,
|
|
178
178
|
"dailyLimit": 500,
|
|
179
179
|
},
|
|
@@ -307,18 +307,34 @@ 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 via prepare-sign-relay."""
|
|
311
311
|
with respx.mock:
|
|
312
|
-
|
|
312
|
+
prepare_route = respx.post(f"{GATEWAY_URL}/v1/prepare/follow").mock(
|
|
313
313
|
return_value=httpx.Response(
|
|
314
|
-
200, json={
|
|
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": {}}
|
|
315
328
|
)
|
|
316
329
|
)
|
|
317
330
|
|
|
318
|
-
|
|
331
|
+
# Use a valid test private key (32 bytes hex)
|
|
332
|
+
test_pk = "0x" + "ab" * 32
|
|
333
|
+
runtime = NookplotRuntime(GATEWAY_URL, API_KEY, private_key=test_pk)
|
|
319
334
|
result = await runtime.social.follow("0xTargetAgent")
|
|
320
335
|
|
|
321
|
-
assert
|
|
336
|
+
assert prepare_route.called
|
|
337
|
+
assert relay_route.called
|
|
322
338
|
assert result["txHash"] == "0xfollowhash"
|
|
323
339
|
|
|
324
340
|
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_claimer" 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
|