zettcode-guidance 0.4.1__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.
@@ -0,0 +1,12 @@
1
+ """Per-tool guidance in each tool's description: the plugin that hands the extension to the agent.
2
+
3
+ A part of the program that lives in a distribution of its own, found through the ``zettcode.plugin`` entry point. The
4
+ extension itself stays in the engine (`zettcode.engine.extensions.guidance`), because every child agent the engine's
5
+ ``task`` tool builds carries it, so the runtime needs the factory whether or not this part is installed.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from .plugin import ToolGuidance
11
+
12
+ __all__ = ["ToolGuidance"]
@@ -0,0 +1,32 @@
1
+ """The plugin that registers the guidance each tool carries in its own description."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from typing import TYPE_CHECKING
6
+
7
+ from zettcode.engine.plugins.context import PluginContext
8
+ from zettcode.engine.plugins.plugin import Plugin
9
+
10
+ if TYPE_CHECKING: # pragma: no cover - annotations only
11
+ from zett_agent.extensions.base import AgentExtension
12
+
13
+ from zettcode.engine.plugins.state import AgentBuild
14
+
15
+
16
+ class ToolGuidance(Plugin[PluginContext]):
17
+ """The guidance each tool carries: its call shapes, guidelines and return type, in the tool's own description."""
18
+
19
+ name = "tool-guidelines"
20
+ description = "Per-tool guidance in each tool's description"
21
+
22
+ def activate(self, ctx: PluginContext) -> None:
23
+ """Register the extension as a factory: it is built with the agent, not while the first frame is drawn."""
24
+
25
+ # Imported in the factory: the extension imports the framework's tool-guidelines module, which a launch that
26
+ # never builds an agent does not need.
27
+ def build(_: AgentBuild) -> AgentExtension:
28
+ from zettcode.engine.extensions.guidance import tool_guidance
29
+
30
+ return tool_guidance()
31
+
32
+ ctx.agent.register_extension_factory("ToolGuidelinesExtension", build)
File without changes
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.5
2
+ Name: zettcode-guidance
3
+ Version: 0.4.1
4
+ Summary: The per-tool guidance ZettCode gives the model, as a part of the agent that lives apart from it
5
+ Project-URL: Repository, https://github.com/Chang-LeHung/zettcode
6
+ Author: Chang-LeHung
7
+ License-Expression: MIT
8
+ Keywords: agent,guidance,zettcode
9
+ Classifier: Development Status :: 5 - Production/Stable
10
+ Classifier: Programming Language :: Python :: 3.10
11
+ Classifier: Programming Language :: Python :: 3.11
12
+ Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
14
+ Classifier: Programming Language :: Python :: 3.14
15
+ Classifier: Programming Language :: Python :: 3.15
16
+ Classifier: Typing :: Typed
17
+ Requires-Python: >=3.10
18
+ Requires-Dist: zett-agent<0.3,>=0.2.10
19
+ Requires-Dist: zettcode-engine
@@ -0,0 +1,7 @@
1
+ zettcode/guidance/__init__.py,sha256=z4dg5PZR4lQuwk6nOZ4WuJGEY5VkvyGCoiaV8jdc8Rw,542
2
+ zettcode/guidance/plugin.py,sha256=_uGhZOLzBpoz2Jynh5TjQdssb4WU8mlei2dOVYuK3Xw,1273
3
+ zettcode/guidance/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ zettcode_guidance-0.4.1.dist-info/METADATA,sha256=c7bWxGjBiGszezHHB3JESXptvENBGXDFzKOVmvnHdZw,795
5
+ zettcode_guidance-0.4.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
6
+ zettcode_guidance-0.4.1.dist-info/entry_points.txt,sha256=uWo066U8BhCS3qPupylWP3AcurZtg-dSUgnVgdeGOo8,74
7
+ zettcode_guidance-0.4.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.33.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,2 @@
1
+ [zettcode.plugin]
2
+ tool-guidelines = zettcode.guidance.plugin:ToolGuidance