structkit 3.3.1__tar.gz → 3.3.2__tar.gz

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 (123) hide show
  1. {structkit-3.3.1/structkit.egg-info → structkit-3.3.2}/PKG-INFO +2 -2
  2. {structkit-3.3.1 → structkit-3.3.2}/README.md +1 -1
  3. {structkit-3.3.1 → structkit-3.3.2}/pyproject.toml +1 -1
  4. {structkit-3.3.1 → structkit-3.3.2/structkit.egg-info}/PKG-INFO +2 -2
  5. {structkit-3.3.1 → structkit-3.3.2}/structkit.egg-info/SOURCES.txt +2 -1
  6. structkit-3.3.2/tests/test_vendored_env.py +123 -0
  7. {structkit-3.3.1 → structkit-3.3.2}/LICENSE +0 -0
  8. {structkit-3.3.1 → structkit-3.3.2}/MANIFEST.in +0 -0
  9. {structkit-3.3.1 → structkit-3.3.2}/setup.cfg +0 -0
  10. {structkit-3.3.1 → structkit-3.3.2}/setup.py +0 -0
  11. {structkit-3.3.1 → structkit-3.3.2}/structkit/__init__.py +0 -0
  12. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/__init__.py +0 -0
  13. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/completion.py +0 -0
  14. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/config.py +0 -0
  15. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/explain.py +0 -0
  16. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/generate.py +0 -0
  17. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/generate_schema.py +0 -0
  18. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/graph.py +0 -0
  19. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/import.py +0 -0
  20. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/info.py +0 -0
  21. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/init.py +0 -0
  22. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/lint.py +0 -0
  23. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/list.py +0 -0
  24. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/mcp.py +0 -0
  25. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/search.py +0 -0
  26. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/sources.py +0 -0
  27. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/validate.py +0 -0
  28. {structkit-3.3.1 → structkit-3.3.2}/structkit/commands/vars.py +0 -0
  29. {structkit-3.3.1 → structkit-3.3.2}/structkit/completers.py +0 -0
  30. {structkit-3.3.1 → structkit-3.3.2}/structkit/config.py +0 -0
  31. {structkit-3.3.1 → structkit-3.3.2}/structkit/content_fetcher.py +0 -0
  32. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/README.md +0 -0
  33. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/ansible-playbook.yaml +0 -0
  34. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/chef-cookbook.yaml +0 -0
  35. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/ci-cd-pipelines.yaml +0 -0
  36. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/cloudformation-files.yaml +0 -0
  37. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/configs/chglog.yaml +0 -0
  38. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/configs/codeowners.yaml +0 -0
  39. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/configs/devcontainer.yaml +0 -0
  40. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/configs/editor-config.yaml +0 -0
  41. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/configs/eslint.yaml +0 -0
  42. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/configs/jshint.yaml +0 -0
  43. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/configs/kubectl.yaml +0 -0
  44. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/configs/prettier.yaml +0 -0
  45. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/docker-files.yaml +0 -0
  46. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/documentation-template.yaml +0 -0
  47. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/git-hooks.yaml +0 -0
  48. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/chatmodes/plan.yaml +0 -0
  49. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/instructions/generic.yaml +0 -0
  50. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/prompts/generic.yaml +0 -0
  51. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/prompts/react-form.yaml +0 -0
  52. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/prompts/security-api.yaml +0 -0
  53. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/prompts/struct.yaml +0 -0
  54. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/templates.yaml +0 -0
  55. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/workflows/codeql.yaml +0 -0
  56. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/workflows/execute-tf-workflow.yaml +0 -0
  57. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/workflows/labeler.yaml +0 -0
  58. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/workflows/pre-commit.yaml +0 -0
  59. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/workflows/release-drafter.yaml +0 -0
  60. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/workflows/run-struct.yaml +0 -0
  61. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/github/workflows/stale.yaml +0 -0
  62. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/helm-chart.yaml +0 -0
  63. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/kubernetes-manifests.yaml +0 -0
  64. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/project/custom-structures.yaml +0 -0
  65. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/project/generic.yaml +0 -0
  66. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/project/go.yaml +0 -0
  67. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/project/java.yaml +0 -0
  68. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/project/n8n.yaml +0 -0
  69. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/project/nodejs.yaml +0 -0
  70. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/project/python.yaml +0 -0
  71. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/project/ruby.yaml +0 -0
  72. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/project/rust.yaml +0 -0
  73. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/prompts/run-struct-trigger.yaml +0 -0
  74. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/terraform/apps/aws-accounts.yaml +0 -0
  75. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/terraform/apps/environments.yaml +0 -0
  76. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/terraform/apps/generic.yaml +0 -0
  77. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/terraform/apps/github-organization.yaml +0 -0
  78. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/terraform/apps/init.yaml +0 -0
  79. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/terraform/modules/generic.yaml +0 -0
  80. {structkit-3.3.1 → structkit-3.3.2}/structkit/contribs/vagrant-files.yaml +0 -0
  81. {structkit-3.3.1 → structkit-3.3.2}/structkit/file_item.py +0 -0
  82. {structkit-3.3.1 → structkit-3.3.2}/structkit/filters.py +0 -0
  83. {structkit-3.3.1 → structkit-3.3.2}/structkit/input_store.py +0 -0
  84. {structkit-3.3.1 → structkit-3.3.2}/structkit/logging_config.py +0 -0
  85. {structkit-3.3.1 → structkit-3.3.2}/structkit/main.py +0 -0
  86. {structkit-3.3.1 → structkit-3.3.2}/structkit/mcp_server.py +0 -0
  87. {structkit-3.3.1 → structkit-3.3.2}/structkit/model_wrapper.py +0 -0
  88. {structkit-3.3.1 → structkit-3.3.2}/structkit/project_file.py +0 -0
  89. {structkit-3.3.1 → structkit-3.3.2}/structkit/sources.py +0 -0
  90. {structkit-3.3.1 → structkit-3.3.2}/structkit/struct_refs.py +0 -0
  91. {structkit-3.3.1 → structkit-3.3.2}/structkit/template_renderer.py +0 -0
  92. {structkit-3.3.1 → structkit-3.3.2}/structkit/utils.py +0 -0
  93. {structkit-3.3.1 → structkit-3.3.2}/structkit.egg-info/dependency_links.txt +0 -0
  94. {structkit-3.3.1 → structkit-3.3.2}/structkit.egg-info/entry_points.txt +0 -0
  95. {structkit-3.3.1 → structkit-3.3.2}/structkit.egg-info/requires.txt +0 -0
  96. {structkit-3.3.1 → structkit-3.3.2}/structkit.egg-info/top_level.txt +0 -0
  97. {structkit-3.3.1 → structkit-3.3.2}/tests/test_commands.py +0 -0
  98. {structkit-3.3.1 → structkit-3.3.2}/tests/test_commands_more.py +0 -0
  99. {structkit-3.3.1 → structkit-3.3.2}/tests/test_completers.py +0 -0
  100. {structkit-3.3.1 → structkit-3.3.2}/tests/test_completion_command.py +0 -0
  101. {structkit-3.3.1 → structkit-3.3.2}/tests/test_config_command.py +0 -0
  102. {structkit-3.3.1 → structkit-3.3.2}/tests/test_config_layering.py +0 -0
  103. {structkit-3.3.1 → structkit-3.3.2}/tests/test_content_fetcher_more.py +0 -0
  104. {structkit-3.3.1 → structkit-3.3.2}/tests/test_env_var_cli_args.py +0 -0
  105. {structkit-3.3.1 → structkit-3.3.2}/tests/test_env_var_structures_path.py +0 -0
  106. {structkit-3.3.1 → structkit-3.3.2}/tests/test_explain_command.py +0 -0
  107. {structkit-3.3.1 → structkit-3.3.2}/tests/test_file_item.py +0 -0
  108. {structkit-3.3.1 → structkit-3.3.2}/tests/test_file_item_strategies.py +0 -0
  109. {structkit-3.3.1 → structkit-3.3.2}/tests/test_filters.py +0 -0
  110. {structkit-3.3.1 → structkit-3.3.2}/tests/test_filters_more.py +0 -0
  111. {structkit-3.3.1 → structkit-3.3.2}/tests/test_graph_command.py +0 -0
  112. {structkit-3.3.1 → structkit-3.3.2}/tests/test_hooks.py +0 -0
  113. {structkit-3.3.1 → structkit-3.3.2}/tests/test_init_command.py +0 -0
  114. {structkit-3.3.1 → structkit-3.3.2}/tests/test_input_store.py +0 -0
  115. {structkit-3.3.1 → structkit-3.3.2}/tests/test_mcp_integration.py +0 -0
  116. {structkit-3.3.1 → structkit-3.3.2}/tests/test_messages_and_summary.py +0 -0
  117. {structkit-3.3.1 → structkit-3.3.2}/tests/test_model_wrapper.py +0 -0
  118. {structkit-3.3.1 → structkit-3.3.2}/tests/test_project_file.py +0 -0
  119. {structkit-3.3.1 → structkit-3.3.2}/tests/test_search_command.py +0 -0
  120. {structkit-3.3.1 → structkit-3.3.2}/tests/test_sources_command.py +0 -0
  121. {structkit-3.3.1 → structkit-3.3.2}/tests/test_template_helpers.py +0 -0
  122. {structkit-3.3.1 → structkit-3.3.2}/tests/test_template_renderer.py +0 -0
  123. {structkit-3.3.1 → structkit-3.3.2}/tests/test_utils_more.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: structkit
3
- Version: 3.3.1
3
+ Version: 3.3.2
4
4
  Summary: YAML-first project scaffolding tool with remote content fetching, AI/MCP integration, and DevOps automation
5
5
  Author: httpdss
6
6
  License: Apache-2.0
@@ -104,7 +104,7 @@ These are install paths for [StructKit](https://github.com/httpdss/structkit), n
104
104
  - [Agent skills](https://github.com/httpdss/structkit-skills) — inspect, preview, generate, validate from an assistant
105
105
  - [pre-commit](https://github.com/httpdss/structkit-pre-commit) — validate structures before they land
106
106
  - [Homebrew](https://github.com/httpdss/homebrew-structkit) — `brew install httpdss/structkit/structkit`
107
- - Linux `.deb` / `.rpm` — download from [build-linux-packages](https://github.com/httpdss/structkit/actions/workflows/build-linux-packages.yaml) workflow artifacts (not attached to GitHub Releases), or build locally per [packaging/README.md](packaging/README.md)
107
+ - Linux `.deb` / `.rpm` — download from the [GitHub release](https://github.com/httpdss/structkit/releases) (attached from 3.3.1 on), or build locally per [packaging/README.md](packaging/README.md)
108
108
  - [Backstage](https://github.com/httpdss/backstage-plugin-structkit) — scaffolder actions for platform teams
109
109
  - [Hermes plugin](https://github.com/httpdss/hermes-plugin-structkit) — safe StructKit tools inside Hermes
110
110
 
@@ -46,7 +46,7 @@ These are install paths for [StructKit](https://github.com/httpdss/structkit), n
46
46
  - [Agent skills](https://github.com/httpdss/structkit-skills) — inspect, preview, generate, validate from an assistant
47
47
  - [pre-commit](https://github.com/httpdss/structkit-pre-commit) — validate structures before they land
48
48
  - [Homebrew](https://github.com/httpdss/homebrew-structkit) — `brew install httpdss/structkit/structkit`
49
- - Linux `.deb` / `.rpm` — download from [build-linux-packages](https://github.com/httpdss/structkit/actions/workflows/build-linux-packages.yaml) workflow artifacts (not attached to GitHub Releases), or build locally per [packaging/README.md](packaging/README.md)
49
+ - Linux `.deb` / `.rpm` — download from the [GitHub release](https://github.com/httpdss/structkit/releases) (attached from 3.3.1 on), or build locally per [packaging/README.md](packaging/README.md)
50
50
  - [Backstage](https://github.com/httpdss/backstage-plugin-structkit) — scaffolder actions for platform teams
51
51
  - [Hermes plugin](https://github.com/httpdss/hermes-plugin-structkit) — safe StructKit tools inside Hermes
52
52
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "structkit"
7
- version = "3.3.1"
7
+ version = "3.3.2"
8
8
  description = "YAML-first project scaffolding tool with remote content fetching, AI/MCP integration, and DevOps automation"
9
9
  readme = "README.md"
10
10
  license = {text = "Apache-2.0"}
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: structkit
3
- Version: 3.3.1
3
+ Version: 3.3.2
4
4
  Summary: YAML-first project scaffolding tool with remote content fetching, AI/MCP integration, and DevOps automation
5
5
  Author: httpdss
6
6
  License: Apache-2.0
@@ -104,7 +104,7 @@ These are install paths for [StructKit](https://github.com/httpdss/structkit), n
104
104
  - [Agent skills](https://github.com/httpdss/structkit-skills) — inspect, preview, generate, validate from an assistant
105
105
  - [pre-commit](https://github.com/httpdss/structkit-pre-commit) — validate structures before they land
106
106
  - [Homebrew](https://github.com/httpdss/homebrew-structkit) — `brew install httpdss/structkit/structkit`
107
- - Linux `.deb` / `.rpm` — download from [build-linux-packages](https://github.com/httpdss/structkit/actions/workflows/build-linux-packages.yaml) workflow artifacts (not attached to GitHub Releases), or build locally per [packaging/README.md](packaging/README.md)
107
+ - Linux `.deb` / `.rpm` — download from the [GitHub release](https://github.com/httpdss/structkit/releases) (attached from 3.3.1 on), or build locally per [packaging/README.md](packaging/README.md)
108
108
  - [Backstage](https://github.com/httpdss/backstage-plugin-structkit) — scaffolder actions for platform teams
109
109
  - [Hermes plugin](https://github.com/httpdss/hermes-plugin-structkit) — safe StructKit tools inside Hermes
110
110
 
@@ -117,4 +117,5 @@ tests/test_search_command.py
117
117
  tests/test_sources_command.py
118
118
  tests/test_template_helpers.py
119
119
  tests/test_template_renderer.py
120
- tests/test_utils_more.py
120
+ tests/test_utils_more.py
121
+ tests/test_vendored_env.py
@@ -0,0 +1,123 @@
1
+ import os
2
+ import stat
3
+ import subprocess
4
+ import sys
5
+ from pathlib import Path
6
+
7
+ import pytest
8
+
9
+ ROOT = Path(__file__).resolve().parents[1]
10
+ sys.path.insert(0, str(ROOT / "packaging"))
11
+
12
+ from validate_vendored_env import ( # noqa: E402
13
+ VendoredEnvError,
14
+ validate_vendored_env,
15
+ )
16
+
17
+
18
+ HOSTED_TOOLCACHE_PYTHON = "/opt/hostedtoolcache/Python/3.11.17/x64/bin/python"
19
+ SHIM = ROOT / "packaging" / "structkit-shim.sh"
20
+
21
+
22
+ def _make_fake_interpreter(path: Path) -> None:
23
+ path.write_text("#!/bin/sh\nexit 0\n")
24
+ path.chmod(path.stat().st_mode | stat.S_IEXEC)
25
+
26
+
27
+ def _make_stdlib(venv: Path) -> None:
28
+ stdlib = venv / "lib" / "python3.11"
29
+ stdlib.mkdir(parents=True)
30
+ (stdlib / "os.py").write_text("# stdlib marker\n")
31
+
32
+
33
+ def test_dangling_ci_python_symlink_is_rejected(tmp_path):
34
+ """Reproduce the 3.3.1 .deb failure: bin/python points at the Actions runner."""
35
+ venv = tmp_path / "venv"
36
+ (venv / "bin").mkdir(parents=True)
37
+ (venv / "bin" / "python").symlink_to(HOSTED_TOOLCACHE_PYTHON)
38
+ _make_stdlib(venv)
39
+
40
+ with pytest.raises(VendoredEnvError, match="hostedtoolcache|outside|dangling"):
41
+ validate_vendored_env(venv, execute=False)
42
+
43
+
44
+ def test_venv_without_stdlib_is_rejected(tmp_path):
45
+ venv = tmp_path / "venv"
46
+ bin_dir = venv / "bin"
47
+ bin_dir.mkdir(parents=True)
48
+ _make_fake_interpreter(bin_dir / "python")
49
+ (venv / "lib" / "python3.11" / "site-packages").mkdir(parents=True)
50
+
51
+ with pytest.raises(VendoredEnvError, match="standard library"):
52
+ validate_vendored_env(venv, execute=False)
53
+
54
+
55
+ def test_console_script_shebang_pointing_at_runner_is_rejected(tmp_path):
56
+ venv = tmp_path / "venv"
57
+ bin_dir = venv / "bin"
58
+ bin_dir.mkdir(parents=True)
59
+ _make_fake_interpreter(bin_dir / "python")
60
+ _make_stdlib(venv)
61
+ (bin_dir / "structkit").write_text(
62
+ "#!/home/runner/work/structkit/structkit/dist/venv/bin/python\n"
63
+ "from structkit.main import main\n"
64
+ )
65
+
66
+ with pytest.raises(VendoredEnvError, match="build machine"):
67
+ validate_vendored_env(venv, execute=False)
68
+
69
+
70
+ def test_relative_in_tree_python_symlink_is_accepted(tmp_path):
71
+ venv = tmp_path / "venv"
72
+ bin_dir = venv / "bin"
73
+ bin_dir.mkdir(parents=True)
74
+ _make_fake_interpreter(bin_dir / "python3.11")
75
+ (bin_dir / "python").symlink_to("python3.11")
76
+ _make_stdlib(venv)
77
+
78
+ validate_vendored_env(venv, execute=False)
79
+
80
+
81
+ def test_shim_reports_missing_env_for_dangling_python(tmp_path):
82
+ venv_bin = tmp_path / "venv" / "bin"
83
+ venv_bin.mkdir(parents=True)
84
+ (venv_bin / "python").symlink_to(HOSTED_TOOLCACHE_PYTHON)
85
+
86
+ env = os.environ.copy()
87
+ env["STRUCTKIT_HOME"] = str(tmp_path)
88
+ result = subprocess.run(
89
+ ["bash", str(SHIM), "--help"],
90
+ capture_output=True,
91
+ text=True,
92
+ env=env,
93
+ check=False,
94
+ )
95
+
96
+ assert result.returncode == 1
97
+ assert "Python environment not found" in result.stderr
98
+ assert str(tmp_path) in result.stderr
99
+ assert "/usr/lib/structkit" not in result.stderr
100
+
101
+
102
+ def test_shim_invokes_bundled_python(tmp_path):
103
+ venv_bin = tmp_path / "venv" / "bin"
104
+ venv_bin.mkdir(parents=True)
105
+ python = venv_bin / "python"
106
+ python.write_text("#!/bin/sh\nprintf 'shim-ok %s\\n' \"$*\"\n")
107
+ python.chmod(python.stat().st_mode | stat.S_IEXEC)
108
+ (venv_bin / "structkit").write_text("# console script placeholder\n")
109
+
110
+ env = os.environ.copy()
111
+ env["STRUCTKIT_HOME"] = str(tmp_path)
112
+ result = subprocess.run(
113
+ ["bash", str(SHIM), "--help"],
114
+ capture_output=True,
115
+ text=True,
116
+ env=env,
117
+ check=False,
118
+ )
119
+
120
+ assert result.returncode == 0
121
+ assert "shim-ok" in result.stdout
122
+ assert str(venv_bin / "structkit") in result.stdout
123
+ assert "--help" in result.stdout
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes