prompture 0.0.42__py3-none-any.whl → 0.0.42.dev1__py3-none-any.whl

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/_version.py CHANGED
@@ -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.42'
32
- __version_tuple__ = version_tuple = (0, 0, 42)
31
+ __version__ = version = '0.0.42.dev1'
32
+ __version_tuple__ = version_tuple = (0, 0, 42, 'dev1')
33
33
 
34
34
  __commit_id__ = commit_id = None
prompture/async_groups.py CHANGED
@@ -70,27 +70,6 @@ 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
-
94
73
  async def run_async(self, prompt: str = "") -> GroupResult:
95
74
  """Execute all agents concurrently."""
96
75
  self._stop_requested = False
@@ -234,27 +213,6 @@ class AsyncSequentialGroup:
234
213
  def stop(self) -> None:
235
214
  self._stop_requested = True
236
215
 
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
-
258
216
  async def run(self, prompt: str = "") -> GroupResult:
259
217
  """Execute all agents in sequence (async)."""
260
218
  self._stop_requested = False
@@ -393,27 +351,6 @@ class AsyncLoopGroup:
393
351
  def stop(self) -> None:
394
352
  self._stop_requested = True
395
353
 
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
-
417
354
  async def run(self, prompt: str = "") -> GroupResult:
418
355
  """Execute the loop (async)."""
419
356
  self._stop_requested = False
prompture/groups.py CHANGED
@@ -114,27 +114,6 @@ 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
-
138
117
  def save(self, path: str) -> None:
139
118
  """Run and save result to file. Convenience wrapper."""
140
119
  result = self.run()
@@ -288,27 +267,6 @@ class LoopGroup:
288
267
  """Request graceful shutdown."""
289
268
  self._stop_requested = True
290
269
 
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
-
312
270
  def run(self, prompt: str = "") -> GroupResult:
313
271
  """Execute the loop."""
314
272
  self._stop_requested = False
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: prompture
3
- Version: 0.0.42
3
+ Version: 0.0.42.dev1
4
4
  Summary: Ask LLMs to return structured JSON and run cross-model tests. API-first.
5
5
  Author-email: Juan Denis <juan@vene.co>
6
6
  License-Expression: MIT
@@ -1,12 +1,12 @@
1
1
  prompture/__init__.py,sha256=cJnkefDpiyFbU77juw4tXPdKJQWoJ-c6XBFt2v-e5Q4,7455
2
- prompture/_version.py,sha256=f7OCYKa3JxU7ivIZuRhrUjsUfgAkieENmQhgCn-5SzY,706
2
+ prompture/_version.py,sha256=SSM-qShNUjWEfdsxyswrsdNVeXKkZXRlSSnZCvyhXh8,719
3
3
  prompture/agent.py,sha256=-8qdo_Lz20GGssCe5B_QPxb5Kct71YtKHh5vZgrSYik,34748
4
4
  prompture/agent_types.py,sha256=Icl16PQI-ThGLMFCU43adtQA6cqETbsPn4KssKBI4xc,4664
5
5
  prompture/async_agent.py,sha256=_6_IRb-LGzZxGxfPVy43SIWByUoQfN-5XnUWahVP6r8,33110
6
6
  prompture/async_conversation.py,sha256=m9sdKBu1wxo5veGwO6g6Zvf1sBzpuxP-mSIEeNKlBjQ,31155
7
7
  prompture/async_core.py,sha256=hbRXLvsBJv3JAnUwGZbazsL6x022FrsJU6swmZolgxY,29745
8
8
  prompture/async_driver.py,sha256=4VQ9Q_tI6Ufw6W1CYJ5j8hVtgVdqFGuk6e2tLaSceWE,8581
9
- prompture/async_groups.py,sha256=G7d9mM2A-glD6Qd7GjA1YOzxrMty3eX8EaWzFsaS39s,22261
9
+ prompture/async_groups.py,sha256=8B383EF_qI9NzcG9zljLKjIZ_37bpNivvsmfJQoOGRk,19894
10
10
  prompture/cache.py,sha256=4dfQDMsEZ9JMQDXLOkiugPmmMJQIfKVE8rTAKDH4oL8,14401
11
11
  prompture/callbacks.py,sha256=JPDqWGzPIzv44l54ocmezlYVBnbKPDEEXRrLdluWGAo,1731
12
12
  prompture/cli.py,sha256=tNiIddRmgC1BomjY5O1VVVAwvqHVzF8IHmQrM-cG2wQ,2902
@@ -17,7 +17,7 @@ prompture/discovery.py,sha256=EWx2d-LJHmlDpm8dlpOicey6XZdDx70ZEetIlOOIlxw,9464
17
17
  prompture/driver.py,sha256=wE7K3vnqeCVT5pEEBP-3uZ6e-YyU6TXtnEKRSB25eOc,10410
18
18
  prompture/field_definitions.py,sha256=PLvxq2ot-ngJ8JbWkkZ-XLtM1wvjUQ3TL01vSEo-a6E,21368
19
19
  prompture/group_types.py,sha256=BxeFV1tI4PTH3xPOie7q3-35ivkTdB9lJUPLH0kPH7A,4731
20
- prompture/groups.py,sha256=9lMJBNOmlzRm2qmmwQLXAySsR4NF_oIUCBA6gbxr9cU,19927
20
+ prompture/groups.py,sha256=q9lpD57VWw6iQgK9S0nLVidItJZmusJkmpblM4EX9Sc,18349
21
21
  prompture/image.py,sha256=3uBxC6blXRNyY5KAJ5MkG6ow8KGAslX8WxM8Is8S8cw,5620
22
22
  prompture/ledger.py,sha256=2iXkd9PWiM9WpRCxvnHG1-nwh_IM4mCbxjF4LE92Gzs,8576
23
23
  prompture/logging.py,sha256=SkFO26_56Zai05vW8kTq3jvJudfLG2ipI5qNHaXKH3g,2574
@@ -76,9 +76,9 @@ prompture/scaffold/templates/env.example.j2,sha256=eESKr1KWgyrczO6d-nwAhQwSpf_G-
76
76
  prompture/scaffold/templates/main.py.j2,sha256=TEgc5OvsZOEX0JthkSW1NI_yLwgoeVN_x97Ibg-vyWY,2632
77
77
  prompture/scaffold/templates/models.py.j2,sha256=JrZ99GCVK6TKWapskVRSwCssGrTu5cGZ_r46fOhY2GE,858
78
78
  prompture/scaffold/templates/requirements.txt.j2,sha256=m3S5fi1hq9KG9l_9j317rjwWww0a43WMKd8VnUWv2A4,102
79
- prompture-0.0.42.dist-info/licenses/LICENSE,sha256=0HgDepH7aaHNFhHF-iXuW6_GqDfYPnVkjtiCAZ4yS8I,1060
80
- prompture-0.0.42.dist-info/METADATA,sha256=KCf2bnowZrWHiLsek-_kCkzO71vAqGZPQIjxAFaUef4,10837
81
- prompture-0.0.42.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
82
- prompture-0.0.42.dist-info/entry_points.txt,sha256=AFPG3lJR86g4IJMoWQUW5Ph7G6MLNWG3A2u2Tp9zkp8,48
83
- prompture-0.0.42.dist-info/top_level.txt,sha256=to86zq_kjfdoLeAxQNr420UWqT0WzkKoZ509J7Qr2t4,10
84
- prompture-0.0.42.dist-info/RECORD,,
79
+ prompture-0.0.42.dev1.dist-info/licenses/LICENSE,sha256=0HgDepH7aaHNFhHF-iXuW6_GqDfYPnVkjtiCAZ4yS8I,1060
80
+ prompture-0.0.42.dev1.dist-info/METADATA,sha256=8IPzdovJ1OSR92U6_J5AFOxJbEYBXs-NZ-NN451iGJU,10842
81
+ prompture-0.0.42.dev1.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
82
+ prompture-0.0.42.dev1.dist-info/entry_points.txt,sha256=AFPG3lJR86g4IJMoWQUW5Ph7G6MLNWG3A2u2Tp9zkp8,48
83
+ prompture-0.0.42.dev1.dist-info/top_level.txt,sha256=to86zq_kjfdoLeAxQNr420UWqT0WzkKoZ509J7Qr2t4,10
84
+ prompture-0.0.42.dev1.dist-info/RECORD,,