prompture 0.0.42.dev1__tar.gz → 0.0.43__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.
- {prompture-0.0.42.dev1/prompture.egg-info → prompture-0.0.43}/PKG-INFO +1 -1
- prompture-0.0.43/VERSION +1 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/_version.py +2 -2
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/async_groups.py +63 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/discovery.py +20 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/groups.py +42 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43/prompture.egg-info}/PKG-INFO +1 -1
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture.egg-info/SOURCES.txt +1 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.claude/skills/add-driver/SKILL.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.claude/skills/add-driver/references/driver-template.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.claude/skills/add-example/SKILL.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.claude/skills/add-field/SKILL.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.claude/skills/add-test/SKILL.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.claude/skills/run-tests/SKILL.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.claude/skills/scaffold-extraction/SKILL.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.claude/skills/update-pricing/SKILL.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.env.copy +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.github/FUNDING.yml +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.github/scripts/update_docs_version.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.github/scripts/update_wrapper_version.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.github/workflows/dev.yml +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.github/workflows/documentation.yml +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/.github/workflows/publish.yml +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/CLAUDE.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/LICENSE +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/MANIFEST.in +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/README.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/ROADMAP.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/_static/custom.css +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/_templates/footer.html +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/api/core.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/api/drivers.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/api/field_definitions.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/api/index.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/api/runner.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/api/tools.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/api/validator.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/conf.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/contributing.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/examples.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/field_definitions_reference.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/index.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/installation.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/quickstart.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/docs/source/toon_input_guide.rst +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/packages/README.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/packages/llm_to_json/README.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/packages/llm_to_json/llm_to_json/__init__.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/packages/llm_to_json/pyproject.toml +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/packages/llm_to_json/test.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/packages/llm_to_toon/README.md +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/packages/llm_to_toon/llm_to_toon/__init__.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/packages/llm_to_toon/pyproject.toml +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/packages/llm_to_toon/test.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/__init__.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/agent.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/agent_types.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/aio/__init__.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/async_agent.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/async_conversation.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/async_core.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/async_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/cache.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/callbacks.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/cli.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/conversation.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/core.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/cost_mixin.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/__init__.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/airllm_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_airllm_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_azure_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_claude_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_google_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_grok_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_groq_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_hugging_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_lmstudio_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_local_http_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_modelscope_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_moonshot_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_ollama_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_openai_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_openrouter_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_registry.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/async_zai_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/azure_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/claude_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/google_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/grok_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/groq_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/hugging_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/lmstudio_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/local_http_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/modelscope_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/moonshot_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/ollama_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/openai_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/openrouter_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/registry.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/vision_helpers.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/drivers/zai_driver.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/field_definitions.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/group_types.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/image.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/ledger.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/logging.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/model_rates.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/persistence.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/persona.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/runner.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/scaffold/__init__.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/scaffold/generator.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/scaffold/templates/Dockerfile.j2 +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/scaffold/templates/README.md.j2 +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/scaffold/templates/config.py.j2 +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/scaffold/templates/env.example.j2 +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/scaffold/templates/main.py.j2 +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/scaffold/templates/models.py.j2 +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/scaffold/templates/requirements.txt.j2 +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/serialization.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/server.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/session.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/settings.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/tools.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/tools_schema.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture/validator.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture.egg-info/dependency_links.txt +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture.egg-info/entry_points.txt +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture.egg-info/requires.txt +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/prompture.egg-info/top_level.txt +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/pyproject.toml +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/requirements.txt +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/setup.cfg +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/test.py +0 -0
- {prompture-0.0.42.dev1 → prompture-0.0.43}/test_version_diagnosis.py +0 -0
prompture-0.0.43/VERSION
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.0.43
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.0.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 0,
|
|
31
|
+
__version__ = version = '0.0.43'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 0, 43)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -70,6 +70,27 @@ class ParallelGroup:
|
|
|
70
70
|
"""Request graceful shutdown."""
|
|
71
71
|
self._stop_requested = True
|
|
72
72
|
|
|
73
|
+
@property
|
|
74
|
+
def shared_state(self) -> dict[str, Any]:
|
|
75
|
+
"""Return a copy of the current shared execution state."""
|
|
76
|
+
return dict(self._state)
|
|
77
|
+
|
|
78
|
+
def inject_state(self, state: dict[str, Any], *, recursive: bool = False) -> None:
|
|
79
|
+
"""Merge external key-value pairs into this group's shared state.
|
|
80
|
+
|
|
81
|
+
Existing keys are NOT overwritten (uses setdefault semantics).
|
|
82
|
+
|
|
83
|
+
Args:
|
|
84
|
+
state: Key-value pairs to inject.
|
|
85
|
+
recursive: If True, also inject into nested sub-groups.
|
|
86
|
+
"""
|
|
87
|
+
for k, v in state.items():
|
|
88
|
+
self._state.setdefault(k, v)
|
|
89
|
+
if recursive:
|
|
90
|
+
for agent, _ in self._agents:
|
|
91
|
+
if hasattr(agent, "inject_state"):
|
|
92
|
+
agent.inject_state(state, recursive=True)
|
|
93
|
+
|
|
73
94
|
async def run_async(self, prompt: str = "") -> GroupResult:
|
|
74
95
|
"""Execute all agents concurrently."""
|
|
75
96
|
self._stop_requested = False
|
|
@@ -213,6 +234,27 @@ class AsyncSequentialGroup:
|
|
|
213
234
|
def stop(self) -> None:
|
|
214
235
|
self._stop_requested = True
|
|
215
236
|
|
|
237
|
+
@property
|
|
238
|
+
def shared_state(self) -> dict[str, Any]:
|
|
239
|
+
"""Return a copy of the current shared execution state."""
|
|
240
|
+
return dict(self._state)
|
|
241
|
+
|
|
242
|
+
def inject_state(self, state: dict[str, Any], *, recursive: bool = False) -> None:
|
|
243
|
+
"""Merge external key-value pairs into this group's shared state.
|
|
244
|
+
|
|
245
|
+
Existing keys are NOT overwritten (uses setdefault semantics).
|
|
246
|
+
|
|
247
|
+
Args:
|
|
248
|
+
state: Key-value pairs to inject.
|
|
249
|
+
recursive: If True, also inject into nested sub-groups.
|
|
250
|
+
"""
|
|
251
|
+
for k, v in state.items():
|
|
252
|
+
self._state.setdefault(k, v)
|
|
253
|
+
if recursive:
|
|
254
|
+
for agent, _ in self._agents:
|
|
255
|
+
if hasattr(agent, "inject_state"):
|
|
256
|
+
agent.inject_state(state, recursive=True)
|
|
257
|
+
|
|
216
258
|
async def run(self, prompt: str = "") -> GroupResult:
|
|
217
259
|
"""Execute all agents in sequence (async)."""
|
|
218
260
|
self._stop_requested = False
|
|
@@ -351,6 +393,27 @@ class AsyncLoopGroup:
|
|
|
351
393
|
def stop(self) -> None:
|
|
352
394
|
self._stop_requested = True
|
|
353
395
|
|
|
396
|
+
@property
|
|
397
|
+
def shared_state(self) -> dict[str, Any]:
|
|
398
|
+
"""Return a copy of the current shared execution state."""
|
|
399
|
+
return dict(self._state)
|
|
400
|
+
|
|
401
|
+
def inject_state(self, state: dict[str, Any], *, recursive: bool = False) -> None:
|
|
402
|
+
"""Merge external key-value pairs into this group's shared state.
|
|
403
|
+
|
|
404
|
+
Existing keys are NOT overwritten (uses setdefault semantics).
|
|
405
|
+
|
|
406
|
+
Args:
|
|
407
|
+
state: Key-value pairs to inject.
|
|
408
|
+
recursive: If True, also inject into nested sub-groups.
|
|
409
|
+
"""
|
|
410
|
+
for k, v in state.items():
|
|
411
|
+
self._state.setdefault(k, v)
|
|
412
|
+
if recursive:
|
|
413
|
+
for agent, _ in self._agents:
|
|
414
|
+
if hasattr(agent, "inject_state"):
|
|
415
|
+
agent.inject_state(state, recursive=True)
|
|
416
|
+
|
|
354
417
|
async def run(self, prompt: str = "") -> GroupResult:
|
|
355
418
|
"""Execute the loop (async)."""
|
|
356
419
|
self._stop_requested = False
|
|
@@ -10,6 +10,7 @@ from typing import Any, overload
|
|
|
10
10
|
import requests
|
|
11
11
|
|
|
12
12
|
from .drivers import (
|
|
13
|
+
AirLLMDriver,
|
|
13
14
|
AzureDriver,
|
|
14
15
|
ClaudeDriver,
|
|
15
16
|
GoogleDriver,
|
|
@@ -17,9 +18,12 @@ from .drivers import (
|
|
|
17
18
|
GroqDriver,
|
|
18
19
|
LMStudioDriver,
|
|
19
20
|
LocalHTTPDriver,
|
|
21
|
+
ModelScopeDriver,
|
|
22
|
+
MoonshotDriver,
|
|
20
23
|
OllamaDriver,
|
|
21
24
|
OpenAIDriver,
|
|
22
25
|
OpenRouterDriver,
|
|
26
|
+
ZaiDriver,
|
|
23
27
|
)
|
|
24
28
|
from .settings import settings
|
|
25
29
|
|
|
@@ -71,6 +75,10 @@ def get_available_models(
|
|
|
71
75
|
"ollama": OllamaDriver,
|
|
72
76
|
"lmstudio": LMStudioDriver,
|
|
73
77
|
"local_http": LocalHTTPDriver,
|
|
78
|
+
"moonshot": MoonshotDriver,
|
|
79
|
+
"zai": ZaiDriver,
|
|
80
|
+
"modelscope": ModelScopeDriver,
|
|
81
|
+
"airllm": AirLLMDriver,
|
|
74
82
|
}
|
|
75
83
|
|
|
76
84
|
for provider, driver_cls in provider_classes.items():
|
|
@@ -102,6 +110,18 @@ def get_available_models(
|
|
|
102
110
|
elif provider == "grok":
|
|
103
111
|
if settings.grok_api_key or os.getenv("GROK_API_KEY"):
|
|
104
112
|
is_configured = True
|
|
113
|
+
elif provider == "moonshot":
|
|
114
|
+
if settings.moonshot_api_key or os.getenv("MOONSHOT_API_KEY"):
|
|
115
|
+
is_configured = True
|
|
116
|
+
elif provider == "zai":
|
|
117
|
+
if settings.zhipu_api_key or os.getenv("ZHIPU_API_KEY"):
|
|
118
|
+
is_configured = True
|
|
119
|
+
elif provider == "modelscope":
|
|
120
|
+
if settings.modelscope_api_key or os.getenv("MODELSCOPE_API_KEY"):
|
|
121
|
+
is_configured = True
|
|
122
|
+
elif provider == "airllm":
|
|
123
|
+
# AirLLM runs locally, always considered configured
|
|
124
|
+
is_configured = True
|
|
105
125
|
elif (
|
|
106
126
|
provider == "ollama"
|
|
107
127
|
or provider == "lmstudio"
|
|
@@ -114,6 +114,27 @@ class SequentialGroup:
|
|
|
114
114
|
"""Request graceful shutdown after the current agent finishes."""
|
|
115
115
|
self._stop_requested = True
|
|
116
116
|
|
|
117
|
+
@property
|
|
118
|
+
def shared_state(self) -> dict[str, Any]:
|
|
119
|
+
"""Return a copy of the current shared execution state."""
|
|
120
|
+
return dict(self._state)
|
|
121
|
+
|
|
122
|
+
def inject_state(self, state: dict[str, Any], *, recursive: bool = False) -> None:
|
|
123
|
+
"""Merge external key-value pairs into this group's shared state.
|
|
124
|
+
|
|
125
|
+
Existing keys are NOT overwritten (uses setdefault semantics).
|
|
126
|
+
|
|
127
|
+
Args:
|
|
128
|
+
state: Key-value pairs to inject.
|
|
129
|
+
recursive: If True, also inject into nested sub-groups.
|
|
130
|
+
"""
|
|
131
|
+
for k, v in state.items():
|
|
132
|
+
self._state.setdefault(k, v)
|
|
133
|
+
if recursive:
|
|
134
|
+
for agent, _ in self._agents:
|
|
135
|
+
if hasattr(agent, "inject_state"):
|
|
136
|
+
agent.inject_state(state, recursive=True)
|
|
137
|
+
|
|
117
138
|
def save(self, path: str) -> None:
|
|
118
139
|
"""Run and save result to file. Convenience wrapper."""
|
|
119
140
|
result = self.run()
|
|
@@ -267,6 +288,27 @@ class LoopGroup:
|
|
|
267
288
|
"""Request graceful shutdown."""
|
|
268
289
|
self._stop_requested = True
|
|
269
290
|
|
|
291
|
+
@property
|
|
292
|
+
def shared_state(self) -> dict[str, Any]:
|
|
293
|
+
"""Return a copy of the current shared execution state."""
|
|
294
|
+
return dict(self._state)
|
|
295
|
+
|
|
296
|
+
def inject_state(self, state: dict[str, Any], *, recursive: bool = False) -> None:
|
|
297
|
+
"""Merge external key-value pairs into this group's shared state.
|
|
298
|
+
|
|
299
|
+
Existing keys are NOT overwritten (uses setdefault semantics).
|
|
300
|
+
|
|
301
|
+
Args:
|
|
302
|
+
state: Key-value pairs to inject.
|
|
303
|
+
recursive: If True, also inject into nested sub-groups.
|
|
304
|
+
"""
|
|
305
|
+
for k, v in state.items():
|
|
306
|
+
self._state.setdefault(k, v)
|
|
307
|
+
if recursive:
|
|
308
|
+
for agent, _ in self._agents:
|
|
309
|
+
if hasattr(agent, "inject_state"):
|
|
310
|
+
agent.inject_state(state, recursive=True)
|
|
311
|
+
|
|
270
312
|
def run(self, prompt: str = "") -> GroupResult:
|
|
271
313
|
"""Execute the loop."""
|
|
272
314
|
self._stop_requested = False
|
|
File without changes
|
{prompture-0.0.42.dev1 → prompture-0.0.43}/.claude/skills/add-driver/references/driver-template.md
RENAMED
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|