zettcode-todos 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
+ """The ``todo_write`` tool and the plan it keeps: the plugin that provides them to the agent and to the shell.
2
+
3
+ A part of the program that lives in a distribution of its own, found through the ``zettcode.plugin`` entry point.
4
+ ``[harness] todowrite`` is what gives the model the tool; the plan itself is provided as a service either way, because
5
+ the shell asks for it on every turn.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from .plugin import TodoPlan
11
+
12
+ __all__ = ["TodoPlan"]
@@ -0,0 +1,29 @@
1
+ """The plugin that keeps the plan the shell's panel draws."""
2
+
3
+ from __future__ import annotations
4
+
5
+ from zettcode.engine.plugins.context import PluginContext
6
+ from zettcode.engine.plugins.plugin import Plugin, PluginSetting
7
+ from zettcode.engine.plugins.services import TODOS
8
+
9
+
10
+ class TodoPlan(Plugin[PluginContext]):
11
+ """The ``todo_write`` tool, and the plan it keeps, shown in the shell's panel.
12
+
13
+ The extension is provided as a service whether or not the tool is on, because the shell asks it for the
14
+ plan on every turn and an extension nobody registered simply has none to show. Only
15
+ ``[harness] todowrite`` decides whether the model is given the tool.
16
+ """
17
+
18
+ name = "todos"
19
+ description = "The todo_write tool and the plan it keeps"
20
+ setting = PluginSetting("todowrite_enabled", "harness", "todowrite")
21
+
22
+ def activate(self, ctx: PluginContext) -> None:
23
+ """Provide the extension, and hand it to the agent when the tool is on."""
24
+ from zett_agent.extensions.todo import TodoWriteExtension
25
+
26
+ extension = TodoWriteExtension()
27
+ ctx.agent.provide(TODOS, extension)
28
+ if ctx.config.todowrite_enabled:
29
+ ctx.agent.register_extension(extension)
File without changes
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.5
2
+ Name: zettcode-todos
3
+ Version: 0.4.1
4
+ Summary: The todo_write tool and the plan it keeps, 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,todos,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.7
19
+ Requires-Dist: zettcode-engine
@@ -0,0 +1,7 @@
1
+ zettcode/todos/__init__.py,sha256=hnRoN1ISgsf2Ml1tcCSzWb7T8Itutj2GRWfuHUY9qzo,476
2
+ zettcode/todos/plugin.py,sha256=pjHWPP3tk5xLZXtWihceu6N4VBHoz9DlzWT9y9h1gL0,1211
3
+ zettcode/todos/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ zettcode_todos-0.4.1.dist-info/METADATA,sha256=mz-mGF5CDziXH5_8rX4Rj80PcJi1AWR7vm3M4-7sEK8,783
5
+ zettcode_todos-0.4.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
6
+ zettcode_todos-0.4.1.dist-info/entry_points.txt,sha256=Z25nB7LCIcX4qPDIMJqybY5564TtuoVM5saHvCFhrpA,57
7
+ zettcode_todos-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
+ todos = zettcode.todos.plugin:TodoPlan