jaymd96-pants-clawthor 0.1.1__py3-none-any.whl → 0.1.2__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.
- {jaymd96_pants_clawthor-0.1.1.dist-info → jaymd96_pants_clawthor-0.1.2.dist-info}/METADATA +1 -1
- jaymd96_pants_clawthor-0.1.2.dist-info/RECORD +8 -0
- pants_clawthor/register.py +1 -6
- pants_clawthor/rules.py +21 -13
- jaymd96_pants_clawthor-0.1.1.dist-info/RECORD +0 -8
- {jaymd96_pants_clawthor-0.1.1.dist-info → jaymd96_pants_clawthor-0.1.2.dist-info}/WHEEL +0 -0
- {jaymd96_pants_clawthor-0.1.1.dist-info → jaymd96_pants_clawthor-0.1.2.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jaymd96-pants-clawthor
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Pants plugin for compiling Clawthor Claude Code plugins
|
|
5
5
|
Project-URL: Homepage, https://github.com/anthropics/clawthor
|
|
6
6
|
Project-URL: Documentation, https://github.com/anthropics/clawthor/tree/main/pants-plugin
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
pants_clawthor/__init__.py,sha256=dK1Vo_AAC_Y-Ga9xq2EtBsy8XolwPrX4ZCM_Vb_zEF4,96
|
|
2
|
+
pants_clawthor/register.py,sha256=1-Xh9V6ZDIMS7pIPxto4wim6EpSHb2gJpEo5XDEBlmU,366
|
|
3
|
+
pants_clawthor/rules.py,sha256=Rpf9dmikcbBHzwDbfGschRZEW3RxnNcRELoXfKcKte0,1781
|
|
4
|
+
pants_clawthor/targets.py,sha256=pvApklAA94qNlkLlX5yRzkkdqBsJiKqor51y4UDeqgQ,1288
|
|
5
|
+
jaymd96_pants_clawthor-0.1.2.dist-info/METADATA,sha256=kKn7kktthocG6EYYHfwIR-tiZ40ltGf0otp1jmNk7X0,4859
|
|
6
|
+
jaymd96_pants_clawthor-0.1.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
7
|
+
jaymd96_pants_clawthor-0.1.2.dist-info/licenses/LICENSE,sha256=y8CeiP6Qd9jxidfFjPkyZhsRjs9XarMIMVDP91lZsJE,1066
|
|
8
|
+
jaymd96_pants_clawthor-0.1.2.dist-info/RECORD,,
|
pants_clawthor/register.py
CHANGED
|
@@ -1,17 +1,12 @@
|
|
|
1
1
|
"""Register clawthor plugin with Pants."""
|
|
2
2
|
|
|
3
|
-
from pants.engine.rules import collect_rules
|
|
4
|
-
from pants.engine.target import TargetRuleset
|
|
5
|
-
|
|
6
3
|
from pants_clawthor.rules import rules as clawthor_rules
|
|
7
4
|
from pants_clawthor.targets import ClaudoPluginTarget
|
|
8
5
|
|
|
9
6
|
|
|
10
7
|
def rules():
|
|
11
8
|
"""Register all rules for the clawthor plugin."""
|
|
12
|
-
return [
|
|
13
|
-
*collect_rules(clawthor_rules),
|
|
14
|
-
]
|
|
9
|
+
return [*clawthor_rules()]
|
|
15
10
|
|
|
16
11
|
|
|
17
12
|
def target_types():
|
pants_clawthor/rules.py
CHANGED
|
@@ -1,22 +1,29 @@
|
|
|
1
1
|
"""Build rules for Clawthor plugin compilation."""
|
|
2
2
|
|
|
3
|
-
import os
|
|
4
|
-
import shutil
|
|
5
3
|
import subprocess
|
|
6
|
-
from
|
|
4
|
+
from dataclasses import dataclass
|
|
7
5
|
|
|
8
|
-
from pants.engine.
|
|
9
|
-
from pants.engine.fs import Digest, MergedDigest
|
|
10
|
-
from pants.engine.process import Process, ProcessResult
|
|
11
|
-
from pants.engine.rules import rule
|
|
6
|
+
from pants.engine.rules import collect_rules, goal_rule, rule
|
|
12
7
|
from pants.engine.target import Target
|
|
13
|
-
from pants.util.dirutil import safe_mkdir
|
|
14
8
|
|
|
15
|
-
from pants_clawthor.targets import
|
|
9
|
+
from pants_clawthor.targets import (
|
|
10
|
+
ClaudoPluginDefinitionField,
|
|
11
|
+
ClaudoPluginMarketplaceModeField,
|
|
12
|
+
ClaudoPluginOutputDirField,
|
|
13
|
+
ClaudoPluginTarget,
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
@dataclass(frozen=True)
|
|
18
|
+
class ClawthorCompileResult:
|
|
19
|
+
"""Result of compiling a Clawthor definition."""
|
|
20
|
+
exit_code: int
|
|
21
|
+
stdout: str
|
|
22
|
+
stderr: str
|
|
16
23
|
|
|
17
24
|
|
|
18
25
|
@rule
|
|
19
|
-
async def compile_claude_plugin(target: ClaudoPluginTarget) ->
|
|
26
|
+
async def compile_claude_plugin(target: ClaudoPluginTarget) -> ClawthorCompileResult:
|
|
20
27
|
"""Compile a Clawthor definition into a Claude Code plugin."""
|
|
21
28
|
|
|
22
29
|
definition_file = target[ClaudoPluginDefinitionField].value
|
|
@@ -32,7 +39,7 @@ async def compile_claude_plugin(target: ClaudoPluginTarget) -> ProcessResult:
|
|
|
32
39
|
try:
|
|
33
40
|
result = subprocess.run(
|
|
34
41
|
cmd,
|
|
35
|
-
cwd=target.address.spec_path,
|
|
42
|
+
cwd=target.address.spec_path or ".",
|
|
36
43
|
capture_output=True,
|
|
37
44
|
text=True,
|
|
38
45
|
check=False,
|
|
@@ -43,7 +50,7 @@ async def compile_claude_plugin(target: ClaudoPluginTarget) -> ProcessResult:
|
|
|
43
50
|
f"Clawthor compilation failed:\n{result.stderr}"
|
|
44
51
|
)
|
|
45
52
|
|
|
46
|
-
return
|
|
53
|
+
return ClawthorCompileResult(
|
|
47
54
|
exit_code=result.returncode,
|
|
48
55
|
stdout=result.stdout,
|
|
49
56
|
stderr=result.stderr,
|
|
@@ -54,4 +61,5 @@ async def compile_claude_plugin(target: ClaudoPluginTarget) -> ProcessResult:
|
|
|
54
61
|
)
|
|
55
62
|
|
|
56
63
|
|
|
57
|
-
rules
|
|
64
|
+
def rules():
|
|
65
|
+
return collect_rules()
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
pants_clawthor/__init__.py,sha256=dK1Vo_AAC_Y-Ga9xq2EtBsy8XolwPrX4ZCM_Vb_zEF4,96
|
|
2
|
-
pants_clawthor/register.py,sha256=quSgKINdumPxMpyNGpgcFu_xeX06Z_UivIjhaoD9MGo,486
|
|
3
|
-
pants_clawthor/rules.py,sha256=LOvRBq4nqiNAcD2T0zoIqVKmD9SCqgdJwH8hjbZO97M,1667
|
|
4
|
-
pants_clawthor/targets.py,sha256=pvApklAA94qNlkLlX5yRzkkdqBsJiKqor51y4UDeqgQ,1288
|
|
5
|
-
jaymd96_pants_clawthor-0.1.1.dist-info/METADATA,sha256=0yKrganfSEMu2qQZAbOAzYGoHxScKSXJxmO_KFT_Qf4,4859
|
|
6
|
-
jaymd96_pants_clawthor-0.1.1.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
7
|
-
jaymd96_pants_clawthor-0.1.1.dist-info/licenses/LICENSE,sha256=y8CeiP6Qd9jxidfFjPkyZhsRjs9XarMIMVDP91lZsJE,1066
|
|
8
|
-
jaymd96_pants_clawthor-0.1.1.dist-info/RECORD,,
|
|
File without changes
|
{jaymd96_pants_clawthor-0.1.1.dist-info → jaymd96_pants_clawthor-0.1.2.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|