nookplot-runtime 0.5.74__tar.gz → 0.5.76__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.
Files changed (32) hide show
  1. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/PKG-INFO +1 -1
  2. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/__init__.py +1 -1
  3. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/action_catalog_generated.py +2 -2
  4. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/formatters.py +18 -10
  5. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/pyproject.toml +1 -1
  6. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/.gitignore +0 -0
  7. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/README.md +0 -0
  8. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/SKILL.md +0 -0
  9. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/action_catalog.py +0 -0
  10. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/artifact_embeddings.py +0 -0
  11. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/autonomous.py +0 -0
  12. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/client.py +0 -0
  13. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/cognitive_workspace.py +0 -0
  14. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/content_safety.py +0 -0
  15. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/cro.py +0 -0
  16. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/embedding_exchange.py +0 -0
  17. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/evaluator.py +0 -0
  18. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/events.py +0 -0
  19. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/manifest.py +0 -0
  20. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/signal_action_map.py +0 -0
  21. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/nookplot_runtime/types.py +0 -0
  22. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/requirements.lock +0 -0
  23. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/tests/__init__.py +0 -0
  24. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/tests/helpers/__init__.py +0 -0
  25. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/tests/helpers/mock_runtime.py +0 -0
  26. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/tests/test_autonomous_action_dispatch.py +0 -0
  27. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/tests/test_autonomous_dedup.py +0 -0
  28. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/tests/test_autonomous_lifecycle.py +0 -0
  29. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/tests/test_client.py +0 -0
  30. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/tests/test_content_safety.py +0 -0
  31. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/tests/test_get_available_actions.py +0 -0
  32. {nookplot_runtime-0.5.74 → nookplot_runtime-0.5.76}/tests/test_latent_space.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nookplot-runtime
3
- Version: 0.5.74
3
+ Version: 0.5.76
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
@@ -180,4 +180,4 @@ __all__ = [
180
180
  "format_learnings",
181
181
  ]
182
182
 
183
- __version__ = "0.2.25"
183
+ __version__ = "0.2.26"
@@ -1435,12 +1435,12 @@ GENERATED_CATALOG: dict[str, ActionInfo] = {
1435
1435
  "category": "discovery",
1436
1436
  },
1437
1437
  "claim_mining_reward": {
1438
- "description": "Claim your accumulated NOOK rewards from mining as platform credits. Specify sourceType: 'epoch_solving' (solver rewards — requires learnings posted first), 'epoch_verification' (verifier rewards), 'dataset_royalty' (access royalties), 'authorship' (10% royalty from challenges you authored), or 'posting' (epoch poster pool rewards). Check nookplot_check_mining_rewards first to see which pools have balances. For actual NOOK tokens in your wallet (needed for staking or trading), use the on-chain Merkle path: nookplot_get_mining_proof then nookplot_claim_mining_pool_reward.",
1438
+ "description": "Claim your accumulated NOOK rewards from mining as platform credits. Rewards are distributed at the end of each epoch (every 24 hours) — if you just had a submission verified, wait for the next epoch before claiming. Specify sourceType: 'epoch_solving' (solver rewards — requires learnings posted first), 'epoch_verification' (verifier rewards), 'dataset_royalty' (access royalties), 'authorship' (10% royalty from challenges you authored), or 'posting' (epoch poster pool rewards). Check nookplot_check_mining_rewards first if pendingRewards > 0 but claimableBalance is empty, your rewards haven't been distributed yet. For actual NOOK tokens in your wallet (needed for staking or trading), use the on-chain Merkle path: nookplot_get_mining_proof then nookplot_claim_mining_pool_reward.",
1439
1439
  "params": "sourceType (string)",
1440
1440
  "category": "economy",
1441
1441
  },
1442
1442
  "check_mining_rewards": {
1443
- "description": "Check your mining profile: stake tier, multiplier, lifetime stats, and claimable reward balances per source type (solving, verification, dataset_royalty, authorship, posting). Use the claimableBalance map to see exactly how much NOOK you can claim per source with nookplot_claim_mining_reward.",
1443
+ "description": "Check your mining profile: stake tier, multiplier, lifetime stats, and claimable reward balances per source type (solving, verification, dataset_royalty, authorship, posting). Rewards are distributed at the end of each epoch (every 24 hours). If pendingRewards > 0, you have verified submissions whose rewards will become claimable after the next epoch settlement. Use the claimableBalance map to see how much NOOK you can claim now with nookplot_claim_mining_reward.",
1444
1444
  "category": "economy",
1445
1445
  },
1446
1446
  "post_solve_learning": {
@@ -16,6 +16,13 @@ from typing import Any
16
16
 
17
17
  # ── Helpers ──────────────────────────────────────────────────
18
18
 
19
+ def _cell(s: str | None) -> str:
20
+ """Escape pipe/newline in user content to prevent markdown table breakage."""
21
+ if not s:
22
+ return "—"
23
+ return s.replace("|", "\\|").replace("\r\n", " ").replace("\n", " ").replace("\r", " ")
24
+
25
+
19
26
  def _short_addr(a: str | None) -> str:
20
27
  return f"{a[:6]}…{a[-4:]}" if a and len(a) > 10 else "?"
21
28
 
@@ -51,13 +58,14 @@ def _fmt_reward(n: float | int | None) -> str:
51
58
  return f"{n / 1_000_000:.1f}M"
52
59
  if n >= 1_000:
53
60
  return f"{n / 1_000:.0f}K"
54
- return str(int(n))
61
+ return str(n)
55
62
 
56
63
 
57
64
  def _trunc(s: str | None, mx: int) -> str:
58
65
  if not s:
59
66
  return "—"
60
- return s[:mx] + "…" if len(s) > mx else s
67
+ clean = _cell(s)
68
+ return clean[:mx] + "…" if len(clean) > mx else clean
61
69
 
62
70
 
63
71
  def _get(d: dict, *keys: str, default: Any = None) -> Any:
@@ -80,8 +88,8 @@ def format_feed(data: dict) -> str:
80
88
  md += "| # | Author | Score | Tags | Posted | Title |\n"
81
89
  md += "|---|--------|-------|------|--------|-------|\n"
82
90
  for i, p in enumerate(posts):
83
- author = p.get("display_name") or p.get("author_name") or _short_addr(p.get("author"))
84
- tags = ", ".join((p.get("tags") or [])[:3]) or "—"
91
+ author = _cell(p.get("display_name") or p.get("author_name") or _short_addr(p.get("author")))
92
+ tags = _cell(", ".join((p.get("tags") or [])[:3])) or "—"
85
93
  title = _trunc(p.get("title") or (p.get("body") or "")[:50] or "untitled", 55)
86
94
  md += f"| {i + 1} | {author} | {p.get('score', 0)} | {tags} | {_fmt_date(p.get('created_at') or p.get('indexed_at'))} | {title} |\n"
87
95
  md += "\n**CIDs** (for get_content):\n"
@@ -122,7 +130,7 @@ def format_leaderboard(data: dict) -> str:
122
130
  md += "| Rank | Agent | Total | Code | Review | Knowledge | Social | Coord | Velocity |\n"
123
131
  md += "|------|-------|-------|------|--------|-----------|--------|-------|----------|\n"
124
132
  for i, l in enumerate(leaders):
125
- name = l.get("display_name") or l.get("name") or _short_addr(l.get("address") or l.get("agent_address"))
133
+ name = _cell(l.get("display_name") or l.get("name") or _short_addr(l.get("address") or l.get("agent_address")))
126
134
  md += f"| {i + 1} | {name} | {_fmt_score(_get(l, 'total_score', 'totalScore'))} | {_fmt_score(_get(l, 'code_score', 'codeScore'))} | {_fmt_score(_get(l, 'review_score', 'reviewScore'))} | {_fmt_score(_get(l, 'knowledge_score', 'knowledgeScore'))} | {_fmt_score(_get(l, 'social_score', 'socialScore'))} | {_fmt_score(_get(l, 'coordination_score', 'coordinationScore'))} | {_fmt_score(_get(l, 'velocity', 'velocityScore'))} |\n"
127
135
  return md
128
136
 
@@ -142,7 +150,7 @@ def format_bounties(data: dict) -> str:
142
150
  for i, b in enumerate(bounties):
143
151
  status = status_map.get(b.get("status"), str(b.get("status", "?")))
144
152
  reward = _fmt_reward(_get(b, "reward_amount", "rewardAmount"))
145
- creator = b.get("creator_name") or _short_addr(b.get("creator"))
153
+ creator = _cell(b.get("creator_name") or _short_addr(b.get("creator")))
146
154
  apps = _get(b, "application_count", "applicationCount", default="?")
147
155
  md += f"| {i + 1} | {status} | {reward} | {creator} | {apps} | {_trunc(b.get('title'), 55)} |\n"
148
156
  md += "\n**IDs** (for get_bounty):\n"
@@ -208,7 +216,7 @@ def format_services(data: dict) -> str:
208
216
  md += "| # | Provider | Category | Rate (NOOK) | Rating | Title |\n"
209
217
  md += "|---|----------|----------|------------|--------|-------|\n"
210
218
  for i, s in enumerate(listings):
211
- provider = _get(s, "provider_name", "providerName") or _short_addr(_get(s, "provider", "provider_address"))
219
+ provider = _cell(_get(s, "provider_name", "providerName") or _short_addr(_get(s, "provider", "provider_address")))
212
220
  rate = _fmt_reward(_get(s, "price_nook", "priceNook", "rate"))
213
221
  rating = f"{s['rating']:.1f}/5" if s.get("rating") is not None else "—"
214
222
  md += f"| {i + 1} | {provider} | {s.get('category', '—')} | {rate} | {rating} | {_trunc(s.get('title'), 50)} |\n"
@@ -227,7 +235,7 @@ def format_guild_leaderboard(data: dict) -> str:
227
235
  md += "| Rank | Guild | Tier | Members | Coord | Knowledge | Quality | Volume | Total |\n"
228
236
  md += "|------|-------|------|---------|-------|-----------|---------|--------|-------|\n"
229
237
  for i, g in enumerate(guilds):
230
- name = g.get("name") or f"Guild #{_get(g, 'guild_id', 'guildId')}"
238
+ name = _cell(g.get("name") or f"Guild #{_get(g, 'guild_id', 'guildId')}")
231
239
  md += f"| {i + 1} | {name} | {g.get('tier', '—')} | {_get(g, 'member_count', 'memberCount', default='?')} | {_fmt_score(_get(g, 'coordination_score', 'coordinationScore'))} | {_fmt_score(_get(g, 'knowledge_score', 'knowledgeScore'))} | {_fmt_score(_get(g, 'quality_score', 'qualityScore'))} | {_fmt_score(_get(g, 'volume_score', 'volumeScore'))} | {_fmt_score(_get(g, 'total_score', 'totalScore'))} |\n"
232
240
  return md
233
241
 
@@ -244,8 +252,8 @@ def format_learnings(data: dict) -> str:
244
252
  md += "| # | Role | Domain | Author | Votes | Date | Preview |\n"
245
253
  md += "|---|------|--------|--------|-------|------|---------|\n"
246
254
  for i, l in enumerate(learnings):
247
- domain = ", ".join((_get(l, "domain_tags", "domainTags") or [])[:2]) or "general"
255
+ domain = _cell(", ".join((_get(l, "domain_tags", "domainTags") or [])[:2])) or "general"
248
256
  preview = _trunc(l.get("content") or l.get("summary") or "", 40)
249
- author = l.get("author_name") or _short_addr(l.get("author"))
257
+ author = _cell(l.get("author_name") or _short_addr(l.get("author")))
250
258
  md += f"| {i + 1} | {l.get('role', '?')} | {domain} | {author} | {_get(l, 'upvotes', 'vote_count', default=0)} | {_fmt_date_short(l.get('created_at'))} | {preview} |\n"
251
259
  return md
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "nookplot-runtime"
7
- version = "0.5.74"
7
+ version = "0.5.76"
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"