zettcode-instructions 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.
- zettcode/instructions/__init__.py +12 -0
- zettcode/instructions/plugin.py +34 -0
- zettcode/instructions/py.typed +0 -0
- zettcode_instructions-0.4.1.dist-info/METADATA +19 -0
- zettcode_instructions-0.4.1.dist-info/RECORD +7 -0
- zettcode_instructions-0.4.1.dist-info/WHEEL +4 -0
- zettcode_instructions-0.4.1.dist-info/entry_points.txt +2 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"""The workspace's ``AGENTS.md`` instructions of ZettCode: the plugin that hands them 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.
|
|
4
|
+
``[agents_md] enabled`` in the configuration is what turns it off. The extension is imported by the factory, so a launch
|
|
5
|
+
that never builds an agent does not pay for it.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from __future__ import annotations
|
|
9
|
+
|
|
10
|
+
from .plugin import ProjectInstructions
|
|
11
|
+
|
|
12
|
+
__all__ = ["ProjectInstructions"]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"""The plugin that hands the agent the workspace's project instructions."""
|
|
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, PluginSetting
|
|
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 ProjectInstructions(Plugin[PluginContext]):
|
|
17
|
+
"""The workspace's ``AGENTS.md`` files, read again for every request so an edit applies at once."""
|
|
18
|
+
|
|
19
|
+
name = "project-instructions"
|
|
20
|
+
description = "The workspace's AGENTS.md instructions"
|
|
21
|
+
setting = PluginSetting("agents_md_enabled", "agents_md")
|
|
22
|
+
|
|
23
|
+
def activate(self, ctx: PluginContext) -> None:
|
|
24
|
+
"""Hand the agent the instructions, unless the configuration turned them off."""
|
|
25
|
+
config = ctx.config
|
|
26
|
+
if not config.agents_md_enabled:
|
|
27
|
+
return
|
|
28
|
+
|
|
29
|
+
def build(_: AgentBuild) -> AgentExtension:
|
|
30
|
+
from zett_agent.extensions.agents_md import AgentsMdExtension
|
|
31
|
+
|
|
32
|
+
return AgentsMdExtension(config.workspace)
|
|
33
|
+
|
|
34
|
+
ctx.agent.register_extension_factory("AgentsMdExtension", build)
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: zettcode-instructions
|
|
3
|
+
Version: 0.4.1
|
|
4
|
+
Summary: The workspace's AGENTS.md instructions of ZettCode, 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,agents-md,instructions,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/instructions/__init__.py,sha256=PbYnECscI13cEhGkMycuEDj1EKneBsfW2Tss7IcX66w,500
|
|
2
|
+
zettcode/instructions/plugin.py,sha256=Zm5OYfNjsqr4l4B3zq9ASz-IEokxTX_-N3p--EOyCOk,1243
|
|
3
|
+
zettcode/instructions/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
zettcode_instructions-0.4.1.dist-info/METADATA,sha256=gnXNMSi_ffel2kub4_A6-6BMoF_Enar9hazSV14r3Lc,816
|
|
5
|
+
zettcode_instructions-0.4.1.dist-info/WHEEL,sha256=2iZrJkDIkeDh0k9SikKMqFuRP-ua6mb4Ir1AsER4BEw,87
|
|
6
|
+
zettcode_instructions-0.4.1.dist-info/entry_points.txt,sha256=WXtasd3WmikibSVF4rtbK6q8LiaYw7HGkIxjIO5Kjn4,90
|
|
7
|
+
zettcode_instructions-0.4.1.dist-info/RECORD,,
|