pythonclaw 0.6.1__tar.gz → 0.6.3__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 (131) hide show
  1. {pythonclaw-0.6.1/pythonclaw.egg-info → pythonclaw-0.6.3}/PKG-INFO +1 -1
  2. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pyproject.toml +1 -1
  3. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/channels/telegram_bot.py +1 -8
  4. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/agent.py +20 -13
  5. {pythonclaw-0.6.1 → pythonclaw-0.6.3/pythonclaw.egg-info}/PKG-INFO +1 -1
  6. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/tests/test_skills.py +1 -1
  7. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/LICENSE +0 -0
  8. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/MANIFEST.in +0 -0
  9. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/README.md +0 -0
  10. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/__init__.py +0 -0
  11. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/__main__.py +0 -0
  12. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/channels/discord_bot.py +0 -0
  13. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/channels/whatsapp_bot.py +0 -0
  14. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/config.py +0 -0
  15. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/__init__.py +0 -0
  16. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/compaction.py +0 -0
  17. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/knowledge/rag.py +0 -0
  18. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/llm/anthropic_client.py +0 -0
  19. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/llm/base.py +0 -0
  20. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/llm/gemini_client.py +0 -0
  21. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/llm/openai_compatible.py +0 -0
  22. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/llm/response.py +0 -0
  23. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/memory/manager.py +0 -0
  24. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/memory/storage.py +0 -0
  25. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/persistent_agent.py +0 -0
  26. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/retrieval/__init__.py +0 -0
  27. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/retrieval/chunker.py +0 -0
  28. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/retrieval/dense.py +0 -0
  29. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/retrieval/fusion.py +0 -0
  30. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/retrieval/reranker.py +0 -0
  31. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/retrieval/retriever.py +0 -0
  32. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/retrieval/sparse.py +0 -0
  33. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/session_store.py +0 -0
  34. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/skill_loader.py +0 -0
  35. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/skillhub.py +0 -0
  36. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/tools.py +0 -0
  37. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/core/utils.py +0 -0
  38. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/daemon.py +0 -0
  39. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/init.py +0 -0
  40. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/main.py +0 -0
  41. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/onboard.py +0 -0
  42. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/scheduler/cron.py +0 -0
  43. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/scheduler/heartbeat.py +0 -0
  44. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/server.py +0 -0
  45. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/session_manager.py +0 -0
  46. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/persona/demo_persona.md +0 -0
  47. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/communication/CATEGORY.md +0 -0
  48. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/communication/email/SKILL.md +0 -0
  49. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/communication/email/send_email.py +0 -0
  50. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/communication/slack/SKILL.md +0 -0
  51. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/communication/slack/slack_api.py +0 -0
  52. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/CATEGORY.md +0 -0
  53. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/csv_analyzer/SKILL.md +0 -0
  54. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/csv_analyzer/analyze.py +0 -0
  55. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/finance/SKILL.md +0 -0
  56. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/finance/fetch_quote.py +0 -0
  57. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/news/SKILL.md +0 -0
  58. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/news/search_news.py +0 -0
  59. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/pdf_reader/SKILL.md +0 -0
  60. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/pdf_reader/read_pdf.py +0 -0
  61. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/scraper/SKILL.md +0 -0
  62. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/scraper/scrape.py +0 -0
  63. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/weather/SKILL.md +0 -0
  64. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/weather/weather.py +0 -0
  65. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/youtube/SKILL.md +0 -0
  66. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/data/youtube/youtube_info.py +0 -0
  67. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/dev/CATEGORY.md +0 -0
  68. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/dev/code_runner/SKILL.md +0 -0
  69. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/dev/code_runner/run_code.py +0 -0
  70. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/dev/github/SKILL.md +0 -0
  71. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/dev/github/gh.py +0 -0
  72. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/dev/http_request/SKILL.md +0 -0
  73. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/dev/http_request/request.py +0 -0
  74. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/google/CATEGORY.md +0 -0
  75. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/google/workspace/SKILL.md +0 -0
  76. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/google/workspace/check_setup.sh +0 -0
  77. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/media/CATEGORY.md +0 -0
  78. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/media/image_gen/SKILL.md +0 -0
  79. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/media/image_gen/generate.py +0 -0
  80. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/media/spotify/SKILL.md +0 -0
  81. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/media/spotify/spotify_ctl.py +0 -0
  82. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/media/tts/SKILL.md +0 -0
  83. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/media/tts/speak.py +0 -0
  84. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/meta/CATEGORY.md +0 -0
  85. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/meta/skill_creator/SKILL.md +0 -0
  86. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/productivity/CATEGORY.md +0 -0
  87. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/productivity/notion/SKILL.md +0 -0
  88. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/productivity/notion/notion_api.py +0 -0
  89. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/productivity/obsidian/SKILL.md +0 -0
  90. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/productivity/obsidian/obsidian_vault.py +0 -0
  91. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/productivity/trello/SKILL.md +0 -0
  92. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/productivity/trello/trello_api.py +0 -0
  93. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/CATEGORY.md +0 -0
  94. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/change_persona/SKILL.md +0 -0
  95. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/change_setting/SKILL.md +0 -0
  96. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/change_setting/update_config.py +0 -0
  97. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/change_soul/SKILL.md +0 -0
  98. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/model_usage/SKILL.md +0 -0
  99. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/model_usage/usage_stats.py +0 -0
  100. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/onboarding/SKILL.md +0 -0
  101. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/onboarding/write_identity.py +0 -0
  102. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/random/SKILL.md +0 -0
  103. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/random/random_util.py +0 -0
  104. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/session_logs/SKILL.md +0 -0
  105. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/session_logs/search_sessions.py +0 -0
  106. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/time/SKILL.md +0 -0
  107. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/system/time/time_util.py +0 -0
  108. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/text/CATEGORY.md +0 -0
  109. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/text/translator/SKILL.md +0 -0
  110. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/text/translator/translate.py +0 -0
  111. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/web/CATEGORY.md +0 -0
  112. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/web/summarize/SKILL.md +0 -0
  113. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/web/summarize/summarize_url.py +0 -0
  114. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/skills/web/tavily/SKILL.md +0 -0
  115. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/soul/SOUL.md +0 -0
  116. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/templates/tools/TOOLS.md +0 -0
  117. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/web/__init__.py +0 -0
  118. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/web/app.py +0 -0
  119. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/web/static/favicon.png +0 -0
  120. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/web/static/index.html +0 -0
  121. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw/web/static/logo.png +0 -0
  122. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw.egg-info/SOURCES.txt +0 -0
  123. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw.egg-info/dependency_links.txt +0 -0
  124. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw.egg-info/entry_points.txt +0 -0
  125. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw.egg-info/requires.txt +0 -0
  126. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/pythonclaw.egg-info/top_level.txt +0 -0
  127. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/setup.cfg +0 -0
  128. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/tests/test_compaction.py +0 -0
  129. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/tests/test_persistence.py +0 -0
  130. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/tests/test_rag_hybrid.py +0 -0
  131. {pythonclaw-0.6.1 → pythonclaw-0.6.3}/tests/test_soul.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pythonclaw
3
- Version: 0.6.1
3
+ Version: 0.6.3
4
4
  Summary: OpenClaw reimagined in pure Python — autonomous AI agent with memory, RAG, skills, web dashboard, and multi-channel support.
5
5
  Author-email: Eric Wang <wangchen2007915@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "pythonclaw"
7
- version = "0.6.1"
7
+ version = "0.6.3"
8
8
  description = "OpenClaw reimagined in pure Python — autonomous AI agent with memory, RAG, skills, web dashboard, and multi-channel support."
9
9
  readme = "README.md"
10
10
  license = {text = "MIT"}
@@ -334,18 +334,11 @@ class TelegramBot:
334
334
  await live_msg.edit_text(before[:4096])
335
335
  else:
336
336
  await update.message.reply_text(before[:4096])
337
+ sent_any = True
337
338
  except Exception:
338
339
  pass
339
340
  live_msg = None
340
341
  live_text = ""
341
- tools = marker.group(1)
342
- try:
343
- await update.message.reply_text(
344
- f"\U0001f527 {tools}\u2026"
345
- )
346
- except Exception:
347
- pass
348
- sent_any = True
349
342
  buf = [raw[marker.end():].lstrip()]
350
343
  last_edit = now
351
344
  continue
@@ -323,23 +323,32 @@ class Agent:
323
323
  - **Memory**: `remember(key,val)`, `recall(query)`, `memory_get(path)`, `memory_list_files()`, `forget(key)`, `update_index(content)`
324
324
  - **Skill creation**: `create_skill` — create generic reusable skills when none fit{web_search_section}
325
325
 
326
+ ### Task Execution Modes
327
+ Choose your approach based on task complexity:
328
+
329
+ **ReAct** (simple tasks, 1-2 steps): Act directly — call tools and respond immediately.
330
+
331
+ **Plan & Execute** (complex tasks, 3+ steps, research, multi-source analysis):
332
+ 1. Output a short numbered plan (3-6 steps) as your first response
333
+ 2. Execute each step using tools — call multiple tools in parallel when steps are independent (up to {self.MAX_PARALLEL_SKILLS} parallel skills)
334
+ 3. After each step, briefly summarize what you found before moving on
335
+ 4. After all steps, synthesize a concise final answer
336
+
337
+ You decide which mode fits. Don't announce the mode name.
338
+
326
339
  ### Rules
327
- - **Parallel skill execution**: For complex tasks, call multiple `use_skill` in ONE response (up to {self.MAX_PARALLEL_SKILLS} skills). They run in parallel for speed. Example: researching a topic? Activate `news`, `web_search`, and `summarize` simultaneously.
328
340
  - Batch independent tool calls in one response (parallel execution).
329
341
  - Minimize search rounds (1-3 max). Combine queries. Don't repeat.
330
342
  - Proactively `remember` user preferences, decisions, key facts.
331
343
  - Use `recall` when user references past context.
332
344
  - Memory auto-loaded at session start. INDEX.md = curated system info.
333
-
334
- Always verify command output.
345
+ - NEVER output tool calls as XML or text. Always use the function calling API.
335
346
 
336
347
  ### Response Guidelines
337
348
  - Answer the user's question directly and concisely.
338
- - For complex multi-step tasks: share a **brief plan** first (2-4 bullet points), then work step by step. Report progress after each major step — don't wait until the end.
339
- - Keep responses focused and concise — under 300 words when possible. Break long answers into short paragraphs.
349
+ - Keep responses focused under 300 words when possible. Break long answers into short paragraphs.
340
350
  - Do NOT mention what skills or tools you have available, unless explicitly asked.
341
351
  - Do NOT list other things you can do at the end of your response.
342
- - NEVER output tool calls as XML or text. Always use the function calling API.
343
352
  """
344
353
  # ── Auto-inject memory context ────────────────────────────────────
345
354
  boot_mem = self.memory.boot_context(max_chars=3000)
@@ -1027,17 +1036,15 @@ Don't repeat this if `bot_name` already exists in memory.
1027
1036
  tools=current_tools,
1028
1037
  tool_choice="auto",
1029
1038
  )
1030
- try:
1031
- for chunk in gen:
1039
+ response = None
1040
+ while True:
1041
+ try:
1042
+ chunk = next(gen)
1032
1043
  if chunk.get("type") == "text_delta" and on_token:
1033
1044
  on_token(chunk["text"])
1034
- except StopIteration as si:
1035
- response = si.value
1036
- else:
1037
- try:
1038
- response = gen.send(None)
1039
1045
  except StopIteration as si:
1040
1046
  response = si.value
1047
+ break
1041
1048
 
1042
1049
  if response is None:
1043
1050
  return ""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pythonclaw
3
- Version: 0.6.1
3
+ Version: 0.6.3
4
4
  Summary: OpenClaw reimagined in pure Python — autonomous AI agent with memory, RAG, skills, web dashboard, and multi-channel support.
5
5
  Author-email: Eric Wang <wangchen2007915@gmail.com>
6
6
  License: MIT
@@ -155,7 +155,7 @@ class TestCatalogBuilder:
155
155
  def test_catalog_groups_by_category(self, skills_dir):
156
156
  registry = SkillRegistry([skills_dir])
157
157
  catalog = registry.build_catalog()
158
- assert "**math**" in catalog
158
+ assert "[math]" in catalog
159
159
 
160
160
  def test_catalog_empty_shows_message(self, tmp_path):
161
161
  registry = SkillRegistry([str(tmp_path)])
File without changes
File without changes
File without changes
File without changes