nookplot-runtime 0.5.65__tar.gz → 0.5.67__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 (26) hide show
  1. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/PKG-INFO +1 -1
  2. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/nookplot_runtime/__init__.py +13 -5
  3. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/nookplot_runtime/action_catalog.py +12 -38
  4. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/nookplot_runtime/autonomous.py +60 -1882
  5. nookplot_runtime-0.5.67/nookplot_runtime/signal_action_map.py +215 -0
  6. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/pyproject.toml +1 -1
  7. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/tests/helpers/mock_runtime.py +2 -2
  8. nookplot_runtime-0.5.67/tests/test_autonomous_action_dispatch.py +319 -0
  9. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/tests/test_autonomous_lifecycle.py +3 -3
  10. nookplot_runtime-0.5.67/tests/test_get_available_actions.py +187 -0
  11. nookplot_runtime-0.5.65/tests/test_autonomous_action_dispatch.py +0 -878
  12. nookplot_runtime-0.5.65/tests/test_get_available_actions.py +0 -110
  13. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/.gitignore +0 -0
  14. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/README.md +0 -0
  15. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/SKILL.md +0 -0
  16. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/nookplot_runtime/action_catalog_generated.py +0 -0
  17. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/nookplot_runtime/client.py +0 -0
  18. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/nookplot_runtime/content_safety.py +0 -0
  19. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/nookplot_runtime/events.py +0 -0
  20. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/nookplot_runtime/types.py +0 -0
  21. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/requirements.lock +0 -0
  22. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/tests/__init__.py +0 -0
  23. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/tests/helpers/__init__.py +0 -0
  24. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/tests/test_autonomous_dedup.py +0 -0
  25. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/tests/test_client.py +0 -0
  26. {nookplot_runtime-0.5.65 → nookplot_runtime-0.5.67}/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.65
3
+ Version: 0.5.67
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
@@ -42,10 +42,15 @@ from nookplot_runtime.content_safety import (
42
42
  )
43
43
  from nookplot_runtime.action_catalog import (
44
44
  ACTION_CATALOG,
45
- TOOL_PROFILES,
46
- filter_by_profile,
47
45
  format_actions_for_prompt,
48
46
  )
47
+ from nookplot_runtime.signal_action_map import (
48
+ CORE_ACTIONS,
49
+ SIGNAL_CONTEXT_ACTIONS,
50
+ get_available_actions_from_map,
51
+ get_category_listing,
52
+ get_tools_in_category,
53
+ )
49
54
  from nookplot_runtime.types import (
50
55
  RuntimeConfig,
51
56
  ConnectResult,
@@ -132,10 +137,13 @@ __all__ = [
132
137
  "extract_safe_text",
133
138
  "UNTRUSTED_CONTENT_INSTRUCTION",
134
139
  "ACTION_CATALOG",
135
- "TOOL_PROFILES",
136
- "filter_by_profile",
137
140
  "format_actions_for_prompt",
141
+ "CORE_ACTIONS",
142
+ "SIGNAL_CONTEXT_ACTIONS",
143
+ "get_available_actions_from_map",
138
144
  "get_available_actions",
145
+ "get_category_listing",
146
+ "get_tools_in_category",
139
147
  ]
140
148
 
141
- __version__ = "0.2.22"
149
+ __version__ = "0.2.24"
@@ -159,44 +159,6 @@ ACTION_CATALOG: dict[str, ActionInfo] = {
159
159
  }
160
160
 
161
161
 
162
- # ── Tool Profiles ──
163
-
164
- TOOL_PROFILES: dict[str, list[str]] = {
165
- "core": ["identity", "discovery", "messaging", "social"],
166
- "builder": ["identity", "projects", "bounties", "discovery"],
167
- "economy": ["identity", "bounties", "marketplace", "economy"],
168
- "coordinator": ["identity", "coordination", "bounties", "projects"],
169
- "researcher": ["identity", "discovery", "memory", "autoresearch"],
170
- "full": [
171
- "identity", "discovery", "social", "messaging", "projects", "bounties",
172
- "marketplace", "coordination", "economy", "memory", "proactive", "skills",
173
- "email", "teaching", "tools", "autoresearch",
174
- ],
175
- }
176
-
177
-
178
- def filter_by_profile(actions: list[str]) -> list[str]:
179
- """Filter an action list to only include actions in the active tool profile.
180
-
181
- Reads ``NOOKPLOT_TOOL_PROFILE`` env var (default: ``"full"``).
182
- Actions without a category (meta-actions like reply, ignore) pass through.
183
- """
184
- import os
185
- profile_name = os.environ.get("NOOKPLOT_TOOL_PROFILE", "full")
186
- cats = TOOL_PROFILES.get(profile_name, TOOL_PROFILES["full"])
187
- active_cats = set(cats)
188
- result: list[str] = []
189
- for a in actions:
190
- info = ACTION_CATALOG.get(a)
191
- # No catalog entry or no category → meta-action, always include
192
- if not info or not info.get("category"):
193
- result.append(a)
194
- continue
195
- if info["category"] in active_cats:
196
- result.append(a)
197
- return result
198
-
199
-
200
162
  def format_actions_for_prompt(actions: list[str]) -> str:
201
163
  """Format a list of action names into a descriptive string for LLM prompts.
202
164
 
@@ -206,6 +168,8 @@ def format_actions_for_prompt(actions: list[str]) -> str:
206
168
  - create_bounty: Create a bounty with a reward ... Params: title, description, reward, communityId
207
169
  - reply: Send a text reply ... Params: content
208
170
  - ignore: Skip this event and take no action.
171
+
172
+ Appends a browse hint when ``browse_tools`` is in the action list.
209
173
  """
210
174
  lines: list[str] = []
211
175
  for action in actions:
@@ -215,4 +179,14 @@ def format_actions_for_prompt(actions: list[str]) -> str:
215
179
  continue
216
180
  param_str = f" Params: {info['params']}" if info.get("params") else ""
217
181
  lines.append(f"- {action}: {info['description']}.{param_str}")
182
+
183
+ # Add browse hint when browse_tools is available
184
+ if "browse_tools" in actions:
185
+ lines.append("")
186
+ lines.append(
187
+ "Tip: Use browse_tools to discover more tools by category "
188
+ "(projects, bounties, coordination, autoresearch, marketplace, "
189
+ "email, teaching, skills, economy, etc.)"
190
+ )
191
+
218
192
  return "\n".join(lines)