hatch-xclam 0.7.0.dev12__py3-none-any.whl → 0.7.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.
Files changed (87) hide show
  1. hatch/cli_hatch.py +120 -18
  2. hatch/mcp_host_config/__init__.py +4 -2
  3. hatch/mcp_host_config/backup.py +62 -31
  4. hatch/mcp_host_config/models.py +125 -1
  5. hatch/mcp_host_config/strategies.py +268 -1
  6. {hatch_xclam-0.7.0.dev12.dist-info → hatch_xclam-0.7.1.dist-info}/METADATA +41 -32
  7. hatch_xclam-0.7.1.dist-info/RECORD +105 -0
  8. hatch_xclam-0.7.1.dist-info/top_level.txt +2 -0
  9. tests/integration/__init__.py +5 -0
  10. tests/integration/test_mcp_kiro_integration.py +153 -0
  11. tests/regression/__init__.py +5 -0
  12. tests/regression/test_mcp_codex_backup_integration.py +162 -0
  13. tests/regression/test_mcp_codex_host_strategy.py +163 -0
  14. tests/regression/test_mcp_codex_model_validation.py +117 -0
  15. tests/regression/test_mcp_kiro_backup_integration.py +241 -0
  16. tests/regression/test_mcp_kiro_cli_integration.py +141 -0
  17. tests/regression/test_mcp_kiro_decorator_registration.py +71 -0
  18. tests/regression/test_mcp_kiro_host_strategy.py +214 -0
  19. tests/regression/test_mcp_kiro_model_validation.py +116 -0
  20. tests/regression/test_mcp_kiro_omni_conversion.py +104 -0
  21. tests/test_data_utils.py +108 -0
  22. tests/test_mcp_cli_all_host_specific_args.py +194 -1
  23. tests/test_mcp_cli_direct_management.py +8 -5
  24. hatch_xclam-0.7.0.dev12.dist-info/RECORD +0 -152
  25. hatch_xclam-0.7.0.dev12.dist-info/top_level.txt +0 -3
  26. node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py +0 -45
  27. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py +0 -365
  28. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSProject.py +0 -206
  29. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py +0 -1272
  30. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings_test.py +0 -1547
  31. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSToolFile.py +0 -59
  32. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUserFile.py +0 -152
  33. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py +0 -270
  34. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSVersion.py +0 -574
  35. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py +0 -704
  36. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common.py +0 -709
  37. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/common_test.py +0 -173
  38. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml.py +0 -169
  39. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py +0 -113
  40. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/flock_tool.py +0 -55
  41. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py +0 -0
  42. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/analyzer.py +0 -805
  43. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py +0 -1172
  44. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/cmake.py +0 -1319
  45. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/compile_commands_json.py +0 -128
  46. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py +0 -104
  47. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/eclipse.py +0 -462
  48. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypd.py +0 -89
  49. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/gypsh.py +0 -56
  50. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py +0 -2745
  51. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs.py +0 -3976
  52. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/msvs_test.py +0 -44
  53. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja.py +0 -2965
  54. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/ninja_test.py +0 -67
  55. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py +0 -1391
  56. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode_test.py +0 -26
  57. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py +0 -3112
  58. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input_test.py +0 -99
  59. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/mac_tool.py +0 -767
  60. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/msvs_emulation.py +0 -1260
  61. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ninja_syntax.py +0 -174
  62. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/simple_copy.py +0 -61
  63. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/win_tool.py +0 -373
  64. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py +0 -1939
  65. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation_test.py +0 -54
  66. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcode_ninja.py +0 -303
  67. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py +0 -3196
  68. node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/xml_fix.py +0 -65
  69. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/__init__.py +0 -15
  70. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_elffile.py +0 -108
  71. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_manylinux.py +0 -252
  72. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_musllinux.py +0 -83
  73. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_parser.py +0 -359
  74. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_structures.py +0 -61
  75. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/_tokenizer.py +0 -192
  76. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/markers.py +0 -252
  77. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/metadata.py +0 -825
  78. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/py.typed +0 -0
  79. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/requirements.py +0 -90
  80. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/specifiers.py +0 -1030
  81. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/tags.py +0 -553
  82. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/utils.py +0 -172
  83. node_modules/npm/node_modules/node-gyp/gyp/pylib/packaging/version.py +0 -563
  84. node_modules/npm/node_modules/node-gyp/gyp/test_gyp.py +0 -261
  85. {hatch_xclam-0.7.0.dev12.dist-info → hatch_xclam-0.7.1.dist-info}/WHEEL +0 -0
  86. {hatch_xclam-0.7.0.dev12.dist-info → hatch_xclam-0.7.1.dist-info}/entry_points.txt +0 -0
  87. {hatch_xclam-0.7.0.dev12.dist-info → hatch_xclam-0.7.1.dist-info}/licenses/LICENSE +0 -0
@@ -1,172 +0,0 @@
1
- # This file is dual licensed under the terms of the Apache License, Version
2
- # 2.0, and the BSD License. See the LICENSE file in the root of this repository
3
- # for complete details.
4
-
5
- import re
6
- from typing import FrozenSet, NewType, Tuple, Union, cast
7
-
8
- from .tags import Tag, parse_tag
9
- from .version import InvalidVersion, Version
10
-
11
- BuildTag = Union[Tuple[()], Tuple[int, str]]
12
- NormalizedName = NewType("NormalizedName", str)
13
-
14
-
15
- class InvalidName(ValueError):
16
- """
17
- An invalid distribution name; users should refer to the packaging user guide.
18
- """
19
-
20
-
21
- class InvalidWheelFilename(ValueError):
22
- """
23
- An invalid wheel filename was found, users should refer to PEP 427.
24
- """
25
-
26
-
27
- class InvalidSdistFilename(ValueError):
28
- """
29
- An invalid sdist filename was found, users should refer to the packaging user guide.
30
- """
31
-
32
-
33
- # Core metadata spec for `Name`
34
- _validate_regex = re.compile(
35
- r"^([A-Z0-9]|[A-Z0-9][A-Z0-9._-]*[A-Z0-9])$", re.IGNORECASE
36
- )
37
- _canonicalize_regex = re.compile(r"[-_.]+")
38
- _normalized_regex = re.compile(r"^([a-z0-9]|[a-z0-9]([a-z0-9-](?!--))*[a-z0-9])$")
39
- # PEP 427: The build number must start with a digit.
40
- _build_tag_regex = re.compile(r"(\d+)(.*)")
41
-
42
-
43
- def canonicalize_name(name: str, *, validate: bool = False) -> NormalizedName:
44
- if validate and not _validate_regex.match(name):
45
- raise InvalidName(f"name is invalid: {name!r}")
46
- # This is taken from PEP 503.
47
- value = _canonicalize_regex.sub("-", name).lower()
48
- return cast(NormalizedName, value)
49
-
50
-
51
- def is_normalized_name(name: str) -> bool:
52
- return _normalized_regex.match(name) is not None
53
-
54
-
55
- def canonicalize_version(
56
- version: Union[Version, str], *, strip_trailing_zero: bool = True
57
- ) -> str:
58
- """
59
- This is very similar to Version.__str__, but has one subtle difference
60
- with the way it handles the release segment.
61
- """
62
- if isinstance(version, str):
63
- try:
64
- parsed = Version(version)
65
- except InvalidVersion:
66
- # Legacy versions cannot be normalized
67
- return version
68
- else:
69
- parsed = version
70
-
71
- parts = []
72
-
73
- # Epoch
74
- if parsed.epoch != 0:
75
- parts.append(f"{parsed.epoch}!")
76
-
77
- # Release segment
78
- release_segment = ".".join(str(x) for x in parsed.release)
79
- if strip_trailing_zero:
80
- # NB: This strips trailing '.0's to normalize
81
- release_segment = re.sub(r"(\.0)+$", "", release_segment)
82
- parts.append(release_segment)
83
-
84
- # Pre-release
85
- if parsed.pre is not None:
86
- parts.append("".join(str(x) for x in parsed.pre))
87
-
88
- # Post-release
89
- if parsed.post is not None:
90
- parts.append(f".post{parsed.post}")
91
-
92
- # Development release
93
- if parsed.dev is not None:
94
- parts.append(f".dev{parsed.dev}")
95
-
96
- # Local version segment
97
- if parsed.local is not None:
98
- parts.append(f"+{parsed.local}")
99
-
100
- return "".join(parts)
101
-
102
-
103
- def parse_wheel_filename(
104
- filename: str,
105
- ) -> Tuple[NormalizedName, Version, BuildTag, FrozenSet[Tag]]:
106
- if not filename.endswith(".whl"):
107
- raise InvalidWheelFilename(
108
- f"Invalid wheel filename (extension must be '.whl'): {filename}"
109
- )
110
-
111
- filename = filename[:-4]
112
- dashes = filename.count("-")
113
- if dashes not in (4, 5):
114
- raise InvalidWheelFilename(
115
- f"Invalid wheel filename (wrong number of parts): {filename}"
116
- )
117
-
118
- parts = filename.split("-", dashes - 2)
119
- name_part = parts[0]
120
- # See PEP 427 for the rules on escaping the project name.
121
- if "__" in name_part or re.match(r"^[\w\d._]*$", name_part, re.UNICODE) is None:
122
- raise InvalidWheelFilename(f"Invalid project name: {filename}")
123
- name = canonicalize_name(name_part)
124
-
125
- try:
126
- version = Version(parts[1])
127
- except InvalidVersion as e:
128
- raise InvalidWheelFilename(
129
- f"Invalid wheel filename (invalid version): {filename}"
130
- ) from e
131
-
132
- if dashes == 5:
133
- build_part = parts[2]
134
- build_match = _build_tag_regex.match(build_part)
135
- if build_match is None:
136
- raise InvalidWheelFilename(
137
- f"Invalid build number: {build_part} in '{filename}'"
138
- )
139
- build = cast(BuildTag, (int(build_match.group(1)), build_match.group(2)))
140
- else:
141
- build = ()
142
- tags = parse_tag(parts[-1])
143
- return (name, version, build, tags)
144
-
145
-
146
- def parse_sdist_filename(filename: str) -> Tuple[NormalizedName, Version]:
147
- if filename.endswith(".tar.gz"):
148
- file_stem = filename[: -len(".tar.gz")]
149
- elif filename.endswith(".zip"):
150
- file_stem = filename[: -len(".zip")]
151
- else:
152
- raise InvalidSdistFilename(
153
- f"Invalid sdist filename (extension must be '.tar.gz' or '.zip'):"
154
- f" {filename}"
155
- )
156
-
157
- # We are requiring a PEP 440 version, which cannot contain dashes,
158
- # so we split on the last dash.
159
- name_part, sep, version_part = file_stem.rpartition("-")
160
- if not sep:
161
- raise InvalidSdistFilename(f"Invalid sdist filename: {filename}")
162
-
163
- name = canonicalize_name(name_part)
164
-
165
- try:
166
- version = Version(version_part)
167
- except InvalidVersion as e:
168
- raise InvalidSdistFilename(
169
- f"Invalid sdist filename (invalid version): {filename}"
170
- ) from e
171
-
172
- return (name, version)