@danmoisan/drm-copilot-mcp 0.0.5 → 1.0.0
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.
- package/out/mcp-server.js +10268 -380
- package/package.json +2 -2
- package/resources/claude-customizations/.claude/agents/orchestrator.md +6 -2
- package/resources/claude-customizations/.claude/agents/pr-author.md +78 -0
- package/resources/claude-customizations/.claude/agents/task-researcher.md +10 -6
- package/resources/claude-customizations/.claude/hooks/enforce-checkpoint-monotonic.ps1 +68 -10
- package/resources/claude-customizations/.claude/hooks/enforce-completion-consistency.ps1 +148 -11
- package/resources/claude-customizations/.claude/hooks/enforce-completion-helpers.ps1 +163 -0
- package/resources/claude-customizations/.claude/hooks/enforce-evidence-locations.ps1 +40 -14
- package/resources/claude-customizations/.claude/hooks/enforce-orchestration-preimplementation-gate.ps1 +198 -0
- package/resources/claude-customizations/.claude/hooks/enforce-pr-author-skill.ps1 +153 -10
- package/resources/claude-customizations/.claude/hooks/validate-orchestrator-output.ps1 +68 -1
- package/resources/claude-customizations/.claude/hooks/validate-pr-author-output.ps1 +136 -0
- package/resources/claude-customizations/.claude/hooks/validate-task-researcher-output.ps1 +22 -6
- package/resources/claude-customizations/.claude/settings.json +22 -0
- package/resources/claude-customizations/.claude/skills/evidence-and-timestamp-conventions/SKILL.md +0 -1
- package/resources/claude-customizations/.claude/skills/orchestrate/SKILL.md +76 -2
- package/resources/claude-customizations/.claude/skills/research-issue/SKILL.md +5 -3
- package/resources/claude-customizations/.claude-variants/csharp-legacy/agents/csharp-typed-engineer.md +69 -0
- package/resources/claude-customizations/.claude-variants/csharp-legacy/rules/csharp.md +96 -0
- package/resources/claude-customizations/.claude-variants/csharp-legacy/skills/csharp-qa-gate/SKILL.md +77 -0
- package/resources/claude-customizations/.claude-variants/csharp-legacy/skills/invoke-csharp-engineer/SKILL.md +64 -0
- package/resources/claude-customizations/pack-manifests/core.json +65 -0
- package/resources/claude-customizations/pack-manifests/csharp-legacy.json +11 -0
- package/resources/claude-customizations/pack-manifests/csharp-modern.json +12 -0
- package/resources/claude-customizations/pack-manifests/powershell.json +14 -0
- package/resources/claude-customizations/pack-manifests/python.json +14 -0
- package/resources/claude-customizations/pack-manifests/typescript.json +9 -0
- package/resources/codex-and-agents-customizations/.agents/skills/feature-promotion-lifecycle/SKILL.md +30 -13
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrate/SKILL.md +113 -10
- package/resources/codex-and-agents-customizations/.agents/skills/orchestrator-workflow/SKILL.md +33 -8
- package/resources/codex-and-agents-customizations/.agents/skills/repo-automation-adapter/SKILL.md +12 -7
- package/resources/codex-and-agents-customizations/.codex/config.toml +65 -6
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-checkpoint-monotonic.ps1 +303 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-completion-consistency.ps1 +300 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-orchestration-preimplementation-gate.ps1 +148 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-pr-author-skill.ps1 +336 -0
- package/resources/codex-and-agents-customizations/.codex/hooks/enforce-promotion-mcp-only.ps1 +83 -17
- package/resources/config/orchestration-routing.json +5 -13
- package/resources/customizations/.github/agents/pr-author.agent.md +25 -0
- package/resources/customizations/.github/agents/task-researcher.agent.md +4 -4
- package/resources/customizations/.github/prompts/fillout-prd-feature.prompt.md +1 -1
- package/resources/customizations/.github/prompts/research-issue.prompt.md +4 -3
- package/resources/codex-and-agents-customizations/.codex/scripts/post-codex-worktree-session.ps1 +0 -5
- package/resources/scripts/dev_tools/__init__.py +0 -0
- package/resources/scripts/dev_tools/_orchestrator_state_human_interaction.py +0 -127
- package/resources/scripts/dev_tools/_orchestrator_state_routing.py +0 -216
- package/resources/scripts/dev_tools/agentic_sync.py +0 -819
- package/resources/scripts/dev_tools/codex_native_converter/__init__.py +0 -11
- package/resources/scripts/dev_tools/codex_native_converter/__main__.py +0 -6
- package/resources/scripts/dev_tools/codex_native_converter/cli.py +0 -11
- package/resources/scripts/dev_tools/new_active_feature_folder.py +0 -79
- package/resources/scripts/dev_tools/new_active_feature_folder_docs.py +0 -268
- package/resources/scripts/dev_tools/new_active_feature_folder_flow.py +0 -366
- package/resources/scripts/dev_tools/new_active_feature_folder_io.py +0 -306
- package/resources/scripts/dev_tools/new_active_feature_folder_markdown.py +0 -252
- package/resources/scripts/dev_tools/new_active_feature_folder_models.py +0 -136
- package/resources/scripts/dev_tools/new_potential_bug_entry.py +0 -465
- package/resources/scripts/dev_tools/potential_to_issue.py +0 -421
- package/resources/scripts/dev_tools/potential_to_issue_content.py +0 -212
- package/resources/scripts/dev_tools/pr_context/__init__.py +0 -0
- package/resources/scripts/dev_tools/pr_context/collector.py +0 -619
- package/resources/scripts/dev_tools/pr_context/feature_docs.py +0 -349
- package/resources/scripts/dev_tools/pr_context/git.py +0 -153
- package/resources/scripts/dev_tools/pr_context/github.py +0 -549
- package/resources/scripts/dev_tools/pr_context/models.py +0 -198
- package/resources/scripts/dev_tools/pr_context/render.py +0 -342
- package/resources/scripts/dev_tools/pr_context/render_feature_excerpts.py +0 -256
- package/resources/scripts/dev_tools/pr_context/render_pr_helpers.py +0 -291
- package/resources/scripts/dev_tools/pr_context/summary_helpers.py +0 -386
- package/resources/scripts/dev_tools/pr_context/verification_evidence.py +0 -171
- package/resources/scripts/dev_tools/prompt_mode_contract.py +0 -152
- package/resources/scripts/dev_tools/push_down_claude_customizations.py +0 -374
- package/resources/scripts/dev_tools/push_down_codex_and_agents_customizations.py +0 -139
- package/resources/scripts/dev_tools/push_down_copilot_customizations.py +0 -504
- package/resources/scripts/dev_tools/push_down_copilot_customizations_filesystem.py +0 -217
- package/resources/scripts/dev_tools/push_down_copilot_customizations_rewrites.py +0 -293
- package/resources/scripts/dev_tools/resolve_file_prompt.py +0 -457
- package/resources/scripts/dev_tools/resolve_hard_lock_prompt.py +0 -444
- package/resources/scripts/dev_tools/validate_orchestration_artifacts.py +0 -246
- package/resources/scripts/dev_tools/validate_orchestration_review_artifacts.py +0 -107
- package/resources/scripts/dev_tools/validate_orchestrator_state.py +0 -428
- package/resources/scripts/dev_tools/validate_policy_audit_artifact.py +0 -448
- package/resources/templates/codex_native_converter.py +0 -35
- package/resources/templates/collect_commit_context.py +0 -212
- package/resources/templates/collect_pr_context.py +0 -74
- package/resources/templates/hello_python.py +0 -11
- package/resources/templates/new_active_feature_folder.py +0 -67
- package/resources/templates/new_potential_bug_entry.py +0 -54
- package/resources/templates/potential_to_issue.py +0 -55
- package/resources/templates/push_down_claude_customizations.py +0 -409
- package/resources/templates/push_down_codex_and_agents_customizations.py +0 -95
- package/resources/templates/push_down_copilot_customizations.py +0 -124
- package/resources/templates/resolve_atomic_plan_prompt.py +0 -75
- package/resources/templates/resolve_hard_lock_prompt.py +0 -65
- package/resources/templates/validate_orchestration_artifacts.py +0 -55
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"""Compatibility wrapper for extension-side Codex/agents customization publishing.
|
|
2
|
-
|
|
3
|
-
Purpose:
|
|
4
|
-
Preserve the bundled-script entry point while delegating all publishing
|
|
5
|
-
behavior to the bundled package implementation.
|
|
6
|
-
"""
|
|
7
|
-
|
|
8
|
-
from __future__ import annotations
|
|
9
|
-
|
|
10
|
-
import argparse
|
|
11
|
-
import importlib
|
|
12
|
-
import sys
|
|
13
|
-
from pathlib import Path
|
|
14
|
-
from typing import Protocol
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
class _PublisherResult(Protocol):
|
|
18
|
-
"""Typed contract for the push-down summary surface accessed by this wrapper."""
|
|
19
|
-
|
|
20
|
-
artifact_path: str
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
class _FileSystemFactory(Protocol):
|
|
24
|
-
"""Construction contract for the publisher's filesystem implementation."""
|
|
25
|
-
|
|
26
|
-
def __call__(self) -> object: ...
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
class _PublisherFunction(Protocol):
|
|
30
|
-
"""Call contract matching the bundled push_down_customizations signature."""
|
|
31
|
-
|
|
32
|
-
def __call__(
|
|
33
|
-
self,
|
|
34
|
-
*,
|
|
35
|
-
repo_root: Path,
|
|
36
|
-
destination_root: Path,
|
|
37
|
-
fs: object,
|
|
38
|
-
source_root: Path,
|
|
39
|
-
artifact_root: Path,
|
|
40
|
-
) -> _PublisherResult: ...
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
def _ensure_bundled_scripts_import_path() -> None:
|
|
44
|
-
"""Prepend bundled `resources/scripts` directory to ``sys.path``."""
|
|
45
|
-
|
|
46
|
-
scripts_dir = Path(__file__).resolve().parent.parent / "scripts"
|
|
47
|
-
scripts_dir_str = str(scripts_dir)
|
|
48
|
-
|
|
49
|
-
if scripts_dir_str not in sys.path:
|
|
50
|
-
sys.path.insert(0, scripts_dir_str)
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
def main() -> int:
|
|
54
|
-
"""Execute the bundled Codex/agents publisher in-process."""
|
|
55
|
-
|
|
56
|
-
_ensure_bundled_scripts_import_path()
|
|
57
|
-
|
|
58
|
-
parser = argparse.ArgumentParser(
|
|
59
|
-
description="Bundled Codex/agents customization publisher wrapper."
|
|
60
|
-
)
|
|
61
|
-
parser.add_argument(
|
|
62
|
-
"--destination",
|
|
63
|
-
required=True,
|
|
64
|
-
help=(
|
|
65
|
-
"Destination workspace root that will receive the copied .codex "
|
|
66
|
-
"and .agents trees."
|
|
67
|
-
),
|
|
68
|
-
)
|
|
69
|
-
args = parser.parse_args()
|
|
70
|
-
|
|
71
|
-
module = importlib.import_module(
|
|
72
|
-
"dev_tools.push_down_codex_and_agents_customizations"
|
|
73
|
-
)
|
|
74
|
-
publish_fn: _PublisherFunction = module.push_down_customizations
|
|
75
|
-
fs_factory: _FileSystemFactory = module.RealPushDownFileSystem
|
|
76
|
-
|
|
77
|
-
customizations_root = (
|
|
78
|
-
Path(__file__).resolve().parent.parent / "codex-and-agents-customizations"
|
|
79
|
-
)
|
|
80
|
-
resolved_destination = Path(args.destination).expanduser().resolve()
|
|
81
|
-
artifact_root = Path.cwd().resolve()
|
|
82
|
-
|
|
83
|
-
summary = publish_fn(
|
|
84
|
-
repo_root=customizations_root,
|
|
85
|
-
destination_root=resolved_destination,
|
|
86
|
-
fs=fs_factory(),
|
|
87
|
-
source_root=customizations_root,
|
|
88
|
-
artifact_root=artifact_root,
|
|
89
|
-
)
|
|
90
|
-
print(f"Wrote push-down summary artifact to: {summary.artifact_path}")
|
|
91
|
-
return 0
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if __name__ == "__main__":
|
|
95
|
-
raise SystemExit(main())
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
"""Compatibility wrapper for extension-side push-down customization publishing.
|
|
2
|
-
|
|
3
|
-
Purpose:
|
|
4
|
-
Preserve the bundled-script entry point while delegating all publishing
|
|
5
|
-
behavior to the bundled package implementation.
|
|
6
|
-
|
|
7
|
-
Usage:
|
|
8
|
-
python push_down_copilot_customizations.py --destination <path>
|
|
9
|
-
|
|
10
|
-
Flow:
|
|
11
|
-
1. Ensure `resources/scripts/` is importable at runtime.
|
|
12
|
-
2. Import `dev_tools.push_down_copilot_customizations` from bundled sources.
|
|
13
|
-
3. Resolve `source_root` to `resources/customizations` payload.
|
|
14
|
-
4. Resolve `artifact_root` to the current working directory.
|
|
15
|
-
5. Invoke publisher in-process with `--destination` from CLI args.
|
|
16
|
-
|
|
17
|
-
Invariants / Constraints:
|
|
18
|
-
- No publishing logic is implemented in this wrapper.
|
|
19
|
-
- Argument contract is owned by the publisher module and forwarded unchanged.
|
|
20
|
-
|
|
21
|
-
Side Effects:
|
|
22
|
-
Imports bundled publisher code and executes it in the current Python process.
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
from __future__ import annotations
|
|
26
|
-
|
|
27
|
-
import argparse
|
|
28
|
-
import importlib
|
|
29
|
-
import sys
|
|
30
|
-
from pathlib import Path
|
|
31
|
-
from typing import Protocol
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
class _PublisherResult(Protocol):
|
|
35
|
-
"""Typed contract for the PushDownSummary surface accessed by this wrapper."""
|
|
36
|
-
|
|
37
|
-
artifact_path: str
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
class _FileSystemFactory(Protocol):
|
|
41
|
-
"""Construction contract for the publisher's filesystem implementation."""
|
|
42
|
-
|
|
43
|
-
def __call__(self) -> object: ...
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
class _PublisherFunction(Protocol):
|
|
47
|
-
"""Call contract matching the bundled push_down_customizations signature."""
|
|
48
|
-
|
|
49
|
-
def __call__(
|
|
50
|
-
self,
|
|
51
|
-
*,
|
|
52
|
-
repo_root: Path,
|
|
53
|
-
destination_root: Path,
|
|
54
|
-
fs: object,
|
|
55
|
-
source_root: Path,
|
|
56
|
-
artifact_root: Path,
|
|
57
|
-
) -> _PublisherResult: ...
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
def _ensure_bundled_scripts_import_path() -> None:
|
|
61
|
-
"""Prepend bundled `resources/scripts` directory to ``sys.path``.
|
|
62
|
-
|
|
63
|
-
Purpose:
|
|
64
|
-
Make extension-bundled Python packages importable regardless of the
|
|
65
|
-
destination workspace layout.
|
|
66
|
-
|
|
67
|
-
Side Effects:
|
|
68
|
-
Mutates ``sys.path`` by inserting the bundled scripts directory at
|
|
69
|
-
index 0 when not already present.
|
|
70
|
-
"""
|
|
71
|
-
scripts_dir = Path(__file__).resolve().parent.parent / "scripts"
|
|
72
|
-
scripts_dir_str = str(scripts_dir)
|
|
73
|
-
|
|
74
|
-
if scripts_dir_str not in sys.path:
|
|
75
|
-
sys.path.insert(0, scripts_dir_str)
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
def main() -> int:
|
|
79
|
-
"""Execute bundled push-down customization publisher in-process.
|
|
80
|
-
|
|
81
|
-
Purpose:
|
|
82
|
-
Keep the bundled extension script as a thin adapter and avoid duplicated
|
|
83
|
-
publishing logic while resolving source and artifact roots automatically.
|
|
84
|
-
|
|
85
|
-
Returns:
|
|
86
|
-
Exit code from bundled publisher main function.
|
|
87
|
-
|
|
88
|
-
Side Effects:
|
|
89
|
-
Imports the bundled publisher module and executes its publishing flow.
|
|
90
|
-
"""
|
|
91
|
-
_ensure_bundled_scripts_import_path()
|
|
92
|
-
|
|
93
|
-
parser = argparse.ArgumentParser(
|
|
94
|
-
description="Bundled push-down customization publisher wrapper."
|
|
95
|
-
)
|
|
96
|
-
parser.add_argument(
|
|
97
|
-
"--destination",
|
|
98
|
-
required=True,
|
|
99
|
-
help="Destination workspace root that will receive the copied .github trees.",
|
|
100
|
-
)
|
|
101
|
-
args = parser.parse_args()
|
|
102
|
-
|
|
103
|
-
# Extract typed callables from the dynamically loaded publisher module.
|
|
104
|
-
module = importlib.import_module("dev_tools.push_down_copilot_customizations")
|
|
105
|
-
publish_fn: _PublisherFunction = module.push_down_customizations
|
|
106
|
-
fs_factory: _FileSystemFactory = module.RealPushDownFileSystem
|
|
107
|
-
|
|
108
|
-
customizations_root = Path(__file__).resolve().parent.parent / "customizations"
|
|
109
|
-
resolved_destination = Path(args.destination).expanduser().resolve()
|
|
110
|
-
artifact_root = Path.cwd().resolve()
|
|
111
|
-
|
|
112
|
-
summary = publish_fn(
|
|
113
|
-
repo_root=customizations_root,
|
|
114
|
-
destination_root=resolved_destination,
|
|
115
|
-
fs=fs_factory(),
|
|
116
|
-
source_root=customizations_root,
|
|
117
|
-
artifact_root=artifact_root,
|
|
118
|
-
)
|
|
119
|
-
print(f"Wrote push-down summary artifact to: {summary.artifact_path}")
|
|
120
|
-
return 0
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
if __name__ == "__main__":
|
|
124
|
-
raise SystemExit(main())
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
"""Compatibility wrapper for extension-side atomic-plan prompt resolution.
|
|
2
|
-
|
|
3
|
-
Purpose:
|
|
4
|
-
Preserve a stable bundled-script entry point while delegating atomic-plan
|
|
5
|
-
prompt resolution to the bundled resolver module under `resources/scripts`.
|
|
6
|
-
|
|
7
|
-
Usage:
|
|
8
|
-
python resolve_atomic_plan_prompt.py --target <plan> --workspace <root>
|
|
9
|
-
|
|
10
|
-
Flow:
|
|
11
|
-
1. Ensure `resources/scripts/` is importable.
|
|
12
|
-
2. Inject the bundled atomic-plan prompt template when `--template` is absent.
|
|
13
|
-
3. Import `dev_tools.resolve_file_prompt` from bundled sources.
|
|
14
|
-
4. Execute the bundled resolver in-process and return its exit code.
|
|
15
|
-
"""
|
|
16
|
-
|
|
17
|
-
from __future__ import annotations
|
|
18
|
-
|
|
19
|
-
import importlib
|
|
20
|
-
import sys
|
|
21
|
-
from pathlib import Path
|
|
22
|
-
from typing import TYPE_CHECKING, cast
|
|
23
|
-
|
|
24
|
-
if TYPE_CHECKING:
|
|
25
|
-
from collections.abc import Callable
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
def _ensure_bundled_scripts_import_path() -> None:
|
|
29
|
-
"""Prepend bundled `resources/scripts` directory to `sys.path`."""
|
|
30
|
-
scripts_dir = Path(__file__).resolve().parent.parent / "scripts"
|
|
31
|
-
scripts_dir_str = str(scripts_dir)
|
|
32
|
-
if scripts_dir_str not in sys.path:
|
|
33
|
-
sys.path.insert(0, scripts_dir_str)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
def main() -> int:
|
|
37
|
-
"""Execute bundled atomic-plan prompt resolution in-process.
|
|
38
|
-
|
|
39
|
-
Purpose:
|
|
40
|
-
Keep the wrapper free of prompt-resolution business logic while ensuring
|
|
41
|
-
the bundled atomic-plan prompt template is supplied when the caller does
|
|
42
|
-
not pass `--template` explicitly.
|
|
43
|
-
|
|
44
|
-
Args:
|
|
45
|
-
None.
|
|
46
|
-
|
|
47
|
-
Returns:
|
|
48
|
-
int: Exit code returned by the bundled resolver module.
|
|
49
|
-
|
|
50
|
-
Raises:
|
|
51
|
-
None explicitly. Import or resolver failures propagate to the caller.
|
|
52
|
-
|
|
53
|
-
Side Effects:
|
|
54
|
-
Mutates `sys.argv` additively when `--template` is absent and imports the
|
|
55
|
-
bundled resolver module in the current Python process.
|
|
56
|
-
"""
|
|
57
|
-
_ensure_bundled_scripts_import_path()
|
|
58
|
-
|
|
59
|
-
template_path = (
|
|
60
|
-
Path(__file__).resolve().parent.parent
|
|
61
|
-
/ "customizations"
|
|
62
|
-
/ ".github"
|
|
63
|
-
/ "prompts"
|
|
64
|
-
/ "generate-atomic-plan.prompt.md"
|
|
65
|
-
)
|
|
66
|
-
if "--template" not in sys.argv:
|
|
67
|
-
sys.argv.extend(["--template", str(template_path)])
|
|
68
|
-
|
|
69
|
-
module = importlib.import_module("dev_tools.resolve_file_prompt")
|
|
70
|
-
module_main = cast("Callable[[], int]", module.main)
|
|
71
|
-
return int(module_main())
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
if __name__ == "__main__":
|
|
75
|
-
raise SystemExit(main())
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
"""Compatibility wrapper for extension-side hard-lock prompt resolution.
|
|
2
|
-
|
|
3
|
-
Purpose:
|
|
4
|
-
Preserve the bundled-script entry point while delegating hard-lock prompt
|
|
5
|
-
resolution behavior to the bundled package implementation.
|
|
6
|
-
|
|
7
|
-
Usage:
|
|
8
|
-
python resolve_hard_lock_prompt.py --target <plan> --workspace <workspace>
|
|
9
|
-
|
|
10
|
-
Flow:
|
|
11
|
-
1. Ensure `resources/scripts/` is importable at runtime.
|
|
12
|
-
2. Inject the bundled `.github/codex` template root when the caller omitted it.
|
|
13
|
-
3. Import `dev_tools.resolve_hard_lock_prompt` from bundled sources.
|
|
14
|
-
4. Invoke the bundled CLI entrypoint in-process with the active CLI args.
|
|
15
|
-
|
|
16
|
-
Invariants / Constraints:
|
|
17
|
-
- No prompt-resolution business logic is implemented in this wrapper.
|
|
18
|
-
- Argument contract is owned by the bundled resolver module and forwarded
|
|
19
|
-
unchanged except for additive `--template-root` injection.
|
|
20
|
-
|
|
21
|
-
Side Effects:
|
|
22
|
-
Imports bundled resolver code and executes it in the current Python process.
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
from __future__ import annotations
|
|
26
|
-
|
|
27
|
-
import importlib
|
|
28
|
-
import sys
|
|
29
|
-
from pathlib import Path
|
|
30
|
-
from typing import TYPE_CHECKING, cast
|
|
31
|
-
|
|
32
|
-
if TYPE_CHECKING:
|
|
33
|
-
from collections.abc import Callable
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
def _ensure_bundled_scripts_import_path() -> None:
|
|
37
|
-
"""Prepend bundled `resources/scripts` directory to ``sys.path``."""
|
|
38
|
-
scripts_dir = Path(__file__).resolve().parent.parent / "scripts"
|
|
39
|
-
scripts_dir_str = str(scripts_dir)
|
|
40
|
-
|
|
41
|
-
if scripts_dir_str not in sys.path:
|
|
42
|
-
sys.path.insert(0, scripts_dir_str)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
def main() -> int:
|
|
46
|
-
"""Execute bundled hard-lock prompt resolution in-process.
|
|
47
|
-
|
|
48
|
-
Injects `--template-root` pointing to the extension's bundled hard-lock
|
|
49
|
-
prompt templates when the caller did not already provide one.
|
|
50
|
-
"""
|
|
51
|
-
_ensure_bundled_scripts_import_path()
|
|
52
|
-
|
|
53
|
-
template_root = str(
|
|
54
|
-
Path(__file__).resolve().parent.parent / "customizations" / ".github" / "codex"
|
|
55
|
-
)
|
|
56
|
-
if "--template-root" not in sys.argv:
|
|
57
|
-
sys.argv.extend(["--template-root", template_root])
|
|
58
|
-
|
|
59
|
-
module = importlib.import_module("dev_tools.resolve_hard_lock_prompt")
|
|
60
|
-
module_main = cast("Callable[[], int]", module.main)
|
|
61
|
-
return int(module_main())
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
if __name__ == "__main__":
|
|
65
|
-
raise SystemExit(main())
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"""Compatibility wrapper for extension-side orchestration artifact validation.
|
|
2
|
-
|
|
3
|
-
Purpose:
|
|
4
|
-
Preserve the bundled-script entry point while delegating validation
|
|
5
|
-
behavior to the bundled package implementation.
|
|
6
|
-
|
|
7
|
-
Usage:
|
|
8
|
-
python validate_orchestration_artifacts.py <artifact_type> <path>
|
|
9
|
-
[--require-complete]
|
|
10
|
-
|
|
11
|
-
Flow:
|
|
12
|
-
1. Ensure ``resources/scripts/`` is importable at runtime.
|
|
13
|
-
2. Import ``dev_tools.validate_orchestration_artifacts`` from bundled sources.
|
|
14
|
-
3. Invoke the bundled CLI entrypoint in-process with the active CLI args.
|
|
15
|
-
|
|
16
|
-
Invariants / Constraints:
|
|
17
|
-
- No validation business logic is implemented in this wrapper.
|
|
18
|
-
- Argument contract is owned by the bundled validator module and forwarded
|
|
19
|
-
unchanged.
|
|
20
|
-
|
|
21
|
-
Side Effects:
|
|
22
|
-
Imports bundled validator code and executes it in the current Python process.
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
from __future__ import annotations
|
|
26
|
-
|
|
27
|
-
import importlib
|
|
28
|
-
import sys
|
|
29
|
-
from pathlib import Path
|
|
30
|
-
from typing import TYPE_CHECKING, cast
|
|
31
|
-
|
|
32
|
-
if TYPE_CHECKING:
|
|
33
|
-
from collections.abc import Callable
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
def _ensure_bundled_scripts_import_path() -> None:
|
|
37
|
-
"""Prepend bundled ``resources/scripts`` directory to ``sys.path``."""
|
|
38
|
-
scripts_dir = Path(__file__).resolve().parent.parent / "scripts"
|
|
39
|
-
scripts_dir_str = str(scripts_dir)
|
|
40
|
-
|
|
41
|
-
if scripts_dir_str not in sys.path:
|
|
42
|
-
sys.path.insert(0, scripts_dir_str)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
def main() -> int:
|
|
46
|
-
"""Execute bundled orchestration artifact validation in-process."""
|
|
47
|
-
_ensure_bundled_scripts_import_path()
|
|
48
|
-
|
|
49
|
-
module = importlib.import_module("dev_tools.validate_orchestration_artifacts")
|
|
50
|
-
module_main = cast("Callable[..., int]", module.main)
|
|
51
|
-
return int(module_main())
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
if __name__ == "__main__":
|
|
55
|
-
raise SystemExit(main())
|