prizmkit 1.1.191 → 1.1.193

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 (165) hide show
  1. package/bundled/VERSION.json +3 -3
  2. package/bundled/adapters/antigravity/skill-adapter.js +13 -4
  3. package/bundled/adapters/codex/skill-adapter.js +28 -8
  4. package/bundled/adapters/cursor/skill-adapter.js +13 -4
  5. package/bundled/adapters/pi/skill-adapter.js +28 -7
  6. package/bundled/dev-pipeline/.env.example +4 -12
  7. package/bundled/dev-pipeline/README.md +28 -44
  8. package/bundled/dev-pipeline/assets/feature-list-example.json +0 -1
  9. package/bundled/dev-pipeline/assets/skill-subagent-integration.md +6 -6
  10. package/bundled/dev-pipeline/prizmkit_runtime/atomic_io.py +48 -0
  11. package/bundled/dev-pipeline/prizmkit_runtime/checkpoint_state.py +66 -23
  12. package/bundled/dev-pipeline/prizmkit_runtime/cli.py +10 -7
  13. package/bundled/dev-pipeline/prizmkit_runtime/commands.py +2 -21
  14. package/bundled/dev-pipeline/prizmkit_runtime/config.py +48 -78
  15. package/bundled/dev-pipeline/prizmkit_runtime/daemon.py +127 -67
  16. package/bundled/dev-pipeline/prizmkit_runtime/gitops.py +158 -462
  17. package/bundled/dev-pipeline/prizmkit_runtime/heartbeat.py +102 -50
  18. package/bundled/dev-pipeline/prizmkit_runtime/interoperability.py +1 -25
  19. package/bundled/dev-pipeline/prizmkit_runtime/paths.py +0 -6
  20. package/bundled/dev-pipeline/prizmkit_runtime/platform_detection.py +47 -21
  21. package/bundled/dev-pipeline/prizmkit_runtime/processes.py +217 -156
  22. package/bundled/dev-pipeline/prizmkit_runtime/reset.py +39 -27
  23. package/bundled/dev-pipeline/prizmkit_runtime/reset_preserve.py +34 -174
  24. package/bundled/dev-pipeline/prizmkit_runtime/results.py +25 -0
  25. package/bundled/dev-pipeline/prizmkit_runtime/runner_bookkeeping.py +133 -110
  26. package/bundled/dev-pipeline/prizmkit_runtime/runner_classification.py +15 -5
  27. package/bundled/dev-pipeline/prizmkit_runtime/runner_models.py +1 -95
  28. package/bundled/dev-pipeline/prizmkit_runtime/runner_prompts.py +0 -2
  29. package/bundled/dev-pipeline/prizmkit_runtime/runner_status.py +7 -2
  30. package/bundled/dev-pipeline/prizmkit_runtime/runners.py +540 -262
  31. package/bundled/dev-pipeline/prizmkit_runtime/runtime_commit.py +175 -135
  32. package/bundled/dev-pipeline/prizmkit_runtime/runtime_helper.py +90 -9
  33. package/bundled/dev-pipeline/prizmkit_runtime/sessions.py +214 -133
  34. package/bundled/dev-pipeline/prizmkit_runtime/status.py +1 -3
  35. package/bundled/dev-pipeline/prizmkit_runtime/stream_progress.py +2783 -0
  36. package/bundled/dev-pipeline/prizmkit_runtime/task_checkout.py +27 -102
  37. package/bundled/dev-pipeline/prizmkit_runtime/test_result.py +58 -4
  38. package/bundled/dev-pipeline/scripts/check-session-status.py +56 -20
  39. package/bundled/dev-pipeline/scripts/continuation.py +8 -7
  40. package/bundled/dev-pipeline/scripts/detect-stuck.py +47 -33
  41. package/bundled/dev-pipeline/scripts/generate-bootstrap-prompt.py +13 -16
  42. package/bundled/dev-pipeline/scripts/generate-bugfix-prompt.py +20 -10
  43. package/bundled/dev-pipeline/scripts/init-bugfix-pipeline.py +10 -7
  44. package/bundled/dev-pipeline/scripts/init-change-artifact.py +25 -4
  45. package/bundled/dev-pipeline/scripts/init-pipeline.py +14 -69
  46. package/bundled/dev-pipeline/scripts/parse-stream-progress.py +31 -2616
  47. package/bundled/dev-pipeline/scripts/patch-completion-notes.py +4 -24
  48. package/bundled/dev-pipeline/scripts/prompt_framework.py +85 -20
  49. package/bundled/dev-pipeline/scripts/status_common.py +591 -0
  50. package/bundled/dev-pipeline/scripts/update-bug-status.py +85 -463
  51. package/bundled/dev-pipeline/scripts/update-checkpoint.py +254 -65
  52. package/bundled/dev-pipeline/scripts/update-feature-status.py +76 -509
  53. package/bundled/dev-pipeline/scripts/utils.py +5 -12
  54. package/bundled/dev-pipeline/templates/bootstrap-tier3.md +5 -5
  55. package/bundled/dev-pipeline/templates/bug-fix-list-schema.json +7 -0
  56. package/bundled/dev-pipeline/templates/bugfix-bootstrap-prompt.md +7 -7
  57. package/bundled/dev-pipeline/templates/sections/artifact-manifest.md +1 -1
  58. package/bundled/dev-pipeline/templates/sections/bugfix-phase-manual-verification.md +1 -1
  59. package/bundled/dev-pipeline/templates/sections/bugfix-phase-review.md +1 -1
  60. package/bundled/dev-pipeline/templates/sections/bugfix-phase-test.md +2 -1
  61. package/bundled/dev-pipeline/templates/sections/checkpoint-system.md +1 -1
  62. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-auto.md +1 -1
  63. package/bundled/dev-pipeline/templates/sections/phase-browser-verification-opencli.md +2 -2
  64. package/bundled/dev-pipeline/templates/sections/phase-browser-verification.md +2 -2
  65. package/bundled/dev-pipeline/templates/sections/phase-prizmkit-test.md +2 -1
  66. package/bundled/dev-pipeline/templates/sections/phase-review-full.md +1 -1
  67. package/bundled/dev-pipeline/templates/sections/phase-specify-plan-full.md +3 -6
  68. package/bundled/dev-pipeline/templates/session-status-schema.json +2 -5
  69. package/bundled/skills/_metadata.json +9 -63
  70. package/bundled/skills/app-planner/SKILL.md +32 -303
  71. package/bundled/skills/app-planner/references/app-design-guide.md +0 -4
  72. package/bundled/skills/app-planner/references/generated-plan-review.md +2 -1
  73. package/bundled/skills/app-planner/references/project-brief-guide.md +14 -0
  74. package/bundled/skills/app-planner/references/project-conventions-discovery.md +4 -6
  75. package/bundled/skills/app-planner/references/project-state-detection.md +2 -3
  76. package/bundled/skills/bug-fix-workflow/SKILL.md +1 -2
  77. package/bundled/skills/bug-fix-workflow/references/bug-diagnosis.md +4 -7
  78. package/bundled/skills/bug-planner/SKILL.md +54 -435
  79. package/bundled/skills/bug-planner/references/generated-plan-review.md +3 -2
  80. package/bundled/skills/bug-planner/references/input-formats.md +32 -0
  81. package/bundled/skills/bugfix-pipeline-launcher/SKILL.md +4 -6
  82. package/bundled/skills/bugfix-pipeline-launcher/references/configuration.md +4 -28
  83. package/bundled/skills/feature-pipeline-launcher/SKILL.md +4 -6
  84. package/bundled/skills/feature-pipeline-launcher/references/configuration.md +4 -28
  85. package/bundled/skills/feature-planner/SKILL.md +60 -439
  86. package/bundled/skills/feature-planner/assets/planning-guide.md +1 -1
  87. package/bundled/skills/feature-planner/references/completeness-review.md +34 -0
  88. package/bundled/skills/feature-planner/references/decomposition-patterns.md +2 -2
  89. package/bundled/skills/feature-planner/references/error-recovery.md +1 -1
  90. package/bundled/skills/feature-planner/references/generated-plan-review.md +3 -2
  91. package/bundled/skills/feature-planner/references/incremental-feature-planning.md +3 -1
  92. package/bundled/skills/feature-workflow/SKILL.md +1 -2
  93. package/bundled/skills/prizmkit/SKILL.md +7 -1
  94. package/bundled/skills/prizmkit-code-review/SKILL.md +14 -6
  95. package/bundled/skills/prizmkit-code-review/references/independent-code-review.md +7 -4
  96. package/bundled/skills/prizmkit-code-review/references/review-report-template.md +16 -0
  97. package/bundled/skills/prizmkit-code-review/scripts/render_review_report.py +58 -20
  98. package/bundled/skills/prizmkit-implement/SKILL.md +1 -1
  99. package/bundled/skills/prizmkit-init/SKILL.md +24 -127
  100. package/bundled/skills/prizmkit-init/assets/project-brief-template.md +3 -3
  101. package/bundled/skills/prizmkit-plan/SKILL.md +6 -8
  102. package/bundled/skills/prizmkit-plan/references/clarify-guide.md +1 -1
  103. package/bundled/skills/prizmkit-plan/references/independent-plan-review.md +5 -2
  104. package/bundled/skills/prizmkit-plan/references/review-plan-spec-loop.md +6 -5
  105. package/bundled/skills/prizmkit-prizm-docs/SKILL.md +1 -13
  106. package/bundled/skills/prizmkit-prizm-docs/references/op-update.md +1 -1
  107. package/bundled/skills/prizmkit-retrospective/SKILL.md +6 -4
  108. package/bundled/skills/prizmkit-test/SKILL.md +25 -133
  109. package/bundled/skills/prizmkit-test/references/independent-test-review.md +5 -2
  110. package/bundled/skills/prizmkit-test/references/test-coverage-model.md +6 -0
  111. package/bundled/skills/prizmkit-workflow/SKILL.md +2 -3
  112. package/bundled/skills/prizmkit-workflow/references/workflow-state-protocol.md +4 -3
  113. package/bundled/skills/recovery-workflow/SKILL.md +7 -7
  114. package/bundled/skills/recovery-workflow/evals/evals.json +1 -1
  115. package/bundled/skills/recovery-workflow/references/detection.md +1 -3
  116. package/bundled/skills/recovery-workflow/scripts/detect-recovery-state.py +0 -6
  117. package/bundled/templates/project-memory-template.md +1 -2
  118. package/package.json +1 -1
  119. package/src/scaffold.js +28 -7
  120. package/bundled/dev-pipeline/SCHEMA_ANALYSIS.md +0 -53
  121. package/bundled/dev-pipeline/scripts/generate-refactor-prompt.py +0 -649
  122. package/bundled/dev-pipeline/scripts/init-refactor-pipeline.py +0 -463
  123. package/bundled/dev-pipeline/scripts/update-refactor-status.py +0 -1512
  124. package/bundled/dev-pipeline/templates/refactor-bootstrap-prompt.md +0 -240
  125. package/bundled/dev-pipeline/templates/refactor-list-schema.json +0 -266
  126. package/bundled/dev-pipeline/templates/sections/refactor-critical-paths.md +0 -15
  127. package/bundled/dev-pipeline/templates/sections/refactor-mission.md +0 -9
  128. package/bundled/dev-pipeline/templates/sections/refactor-phase-commit-report.md +0 -24
  129. package/bundled/dev-pipeline/templates/sections/refactor-phase-implement.md +0 -16
  130. package/bundled/dev-pipeline/templates/sections/refactor-phase-init.md +0 -9
  131. package/bundled/dev-pipeline/templates/sections/refactor-phase-plan.md +0 -22
  132. package/bundled/dev-pipeline/templates/sections/refactor-phase-review.md +0 -19
  133. package/bundled/dev-pipeline/templates/sections/refactor-phase-test.md +0 -24
  134. package/bundled/dev-pipeline/templates/sections/refactor-reminders.md +0 -12
  135. package/bundled/dev-pipeline/templates/sections/refactor-session-context.md +0 -6
  136. package/bundled/dev-pipeline/templates/sections/refactor-task-contract.md +0 -52
  137. package/bundled/dev-pipeline/tests/conftest.py +0 -29
  138. package/bundled/dev-pipeline/tests/live_ai_cli_log_smoke.py +0 -208
  139. package/bundled/dev-pipeline/tests/test_auto_skip.py +0 -1871
  140. package/bundled/dev-pipeline/tests/test_checkpoint_state.py +0 -1314
  141. package/bundled/dev-pipeline/tests/test_generate_bootstrap_prompt.py +0 -1712
  142. package/bundled/dev-pipeline/tests/test_generate_bugfix_prompt.py +0 -627
  143. package/bundled/dev-pipeline/tests/test_generate_refactor_prompt.py +0 -478
  144. package/bundled/dev-pipeline/tests/test_python_runner_parity.py +0 -5641
  145. package/bundled/dev-pipeline/tests/test_recovery_workflow.py +0 -322
  146. package/bundled/dev-pipeline/tests/test_repository_bootstrap.py +0 -252
  147. package/bundled/dev-pipeline/tests/test_reset_modes.py +0 -1208
  148. package/bundled/dev-pipeline/tests/test_reset_preserve.py +0 -957
  149. package/bundled/dev-pipeline/tests/test_runtime_commit.py +0 -1113
  150. package/bundled/dev-pipeline/tests/test_runtime_helper.py +0 -303
  151. package/bundled/dev-pipeline/tests/test_unified_cli.py +0 -5504
  152. package/bundled/dev-pipeline/tests/test_utils.py +0 -170
  153. package/bundled/skills/feature-planner/assets/evaluation-guide.md +0 -44
  154. package/bundled/skills/refactor-pipeline-launcher/SKILL.md +0 -219
  155. package/bundled/skills/refactor-pipeline-launcher/references/configuration.md +0 -78
  156. package/bundled/skills/refactor-planner/SKILL.md +0 -467
  157. package/bundled/skills/refactor-planner/assets/planning-guide.md +0 -291
  158. package/bundled/skills/refactor-planner/references/behavior-preservation.md +0 -187
  159. package/bundled/skills/refactor-planner/references/error-recovery.md +0 -45
  160. package/bundled/skills/refactor-planner/references/fast-path.md +0 -59
  161. package/bundled/skills/refactor-planner/references/generated-plan-review.md +0 -107
  162. package/bundled/skills/refactor-planner/references/planning-phases.md +0 -172
  163. package/bundled/skills/refactor-planner/references/refactor-scoping-guide.md +0 -230
  164. package/bundled/skills/refactor-planner/scripts/validate-and-generate-refactor.py +0 -1120
  165. package/bundled/skills/refactor-workflow/SKILL.md +0 -205
@@ -1,6 +0,0 @@
1
- ## Session Context
2
-
3
- - **Refactor ID**: {{REFACTOR_ID}} | **Session**: {{SESSION_ID}} | **Run**: {{RUN_ID}}
4
- - **Title**: {{REFACTOR_TITLE}}
5
- - **Type**: {{REFACTOR_TYPE}}
6
- - **Priority**: {{PRIORITY}} | **Complexity**: {{COMPLEXITY}}
@@ -1,52 +0,0 @@
1
- ## Refactor Task Contract
2
-
3
- ### Objective
4
-
5
- Execute {{REFACTOR_ID}}: "{{REFACTOR_TITLE}}".
6
-
7
- {{REFACTOR_DESCRIPTION}}
8
-
9
- {{USER_CONTEXT}}
10
-
11
- ### Scope
12
-
13
- **Files:**
14
- {{SCOPE_FILES}}
15
-
16
- **Modules:**
17
- {{SCOPE_MODULES}}
18
-
19
- ### Behavior Preservation
20
-
21
- - **Strategy**: {{BEHAVIOR_STRATEGY}}
22
-
23
- {{BEHAVIOR_PRESERVATION}}
24
-
25
- ### Existing Tests
26
-
27
- {{EXISTING_TESTS}}
28
-
29
- ### New Tests Needed
30
-
31
- {{NEW_TESTS_NEEDED}}
32
-
33
- ### Acceptance Criteria
34
-
35
- {{ACCEPTANCE_CRITERIA}}
36
-
37
- ### Gate Checklist
38
-
39
- {{AC_CHECKLIST}}
40
-
41
- Gate rule:
42
- - `[x]` means verified with behavior-preservation evidence.
43
- - Any remaining `[ ]` means the refactor is incomplete.
44
- - Blocked gates must be documented in `failure-log.md`; blocked is not success.
45
-
46
- ### Dependencies
47
-
48
- {{DEPENDENCIES}}
49
-
50
- ### App Global Context
51
-
52
- {{GLOBAL_CONTEXT}}
@@ -1,29 +0,0 @@
1
- """Shared fixtures and import helpers for dev-pipeline tests."""
2
-
3
- import importlib
4
- import os
5
- import sys
6
-
7
- # Add dev-pipeline/scripts to the import path so tests can import modules
8
- # without requiring package installation.
9
- _scripts_dir = os.path.join(os.path.dirname(__file__), "..", "scripts")
10
- sys.path.insert(0, _scripts_dir)
11
-
12
-
13
- def _load_hyphenated_module(module_name, filename):
14
- """Load a hyphenated .py file and register it as an importable module."""
15
- spec = importlib.util.spec_from_file_location(
16
- module_name,
17
- os.path.join(_scripts_dir, filename),
18
- )
19
- mod = importlib.util.module_from_spec(spec)
20
- sys.modules[module_name] = mod
21
- spec.loader.exec_module(mod)
22
-
23
-
24
- # Register hyphenated script files so tests can import them with underscores.
25
- _load_hyphenated_module("generate_bootstrap_prompt", "generate-bootstrap-prompt.py")
26
- _load_hyphenated_module("generate_bugfix_prompt", "generate-bugfix-prompt.py")
27
- _load_hyphenated_module("generate_refactor_prompt", "generate-refactor-prompt.py")
28
- _load_hyphenated_module("update_feature_status", "update-feature-status.py")
29
- _load_hyphenated_module("update_checkpoint", "update-checkpoint.py")
@@ -1,208 +0,0 @@
1
- #!/usr/bin/env python3
2
- """Capability-gated live smoke checks for normalized AI CLI session logging.
3
-
4
- The deterministic fixture suite remains authoritative. This script optionally
5
- exercises locally installed, authenticated, non-interactive-capable adapters in
6
- isolated temporary Git repositories.
7
- """
8
-
9
- from __future__ import annotations
10
-
11
- import argparse
12
- import json
13
- import os
14
- import shutil
15
- import subprocess
16
- import sys
17
- import tempfile
18
- from dataclasses import asdict, dataclass
19
- from pathlib import Path
20
- from typing import Callable, Iterable
21
-
22
- PIPELINE_ROOT = Path(__file__).resolve().parents[1]
23
- if str(PIPELINE_ROOT) not in sys.path:
24
- sys.path.insert(0, str(PIPELINE_ROOT))
25
-
26
- from prizmkit_runtime.sessions import AISessionConfig, AISessionLauncher # noqa: E402
27
-
28
-
29
- @dataclass(frozen=True)
30
- class SmokeProfile:
31
- """One installed adapter example to exercise."""
32
-
33
- name: str
34
- command: str
35
- platform: str
36
-
37
-
38
- @dataclass(frozen=True)
39
- class SmokeResult:
40
- """Machine-readable capability or execution result."""
41
-
42
- name: str
43
- status: str
44
- reason: str
45
- log_path: str = ""
46
- exit_code: int | None = None
47
-
48
-
49
- PROFILE_EXAMPLES = (
50
- ("pi", "pi", "pi"),
51
- ("codebuddy", "cbc", "codebuddy"),
52
- ("codex", "codex", "codex"),
53
- ("claude", "claude", "claude"),
54
- ("cursor", "agent", "cursor"),
55
- ("antigravity", "agy", "antigravity"),
56
- )
57
-
58
- AUTH_MARKERS = (
59
- "authentication",
60
- "unauthorized",
61
- "not logged in",
62
- "login required",
63
- "invalid api key",
64
- "missing api key",
65
- "credential",
66
- "billing",
67
- "quota",
68
- "model access",
69
- "model not found",
70
- "no access to model",
71
- "network is unreachable",
72
- "connection refused",
73
- "could not resolve",
74
- "service unavailable",
75
- )
76
-
77
- REQUIRED_LABELS = (
78
- "[ACTION]",
79
- "[OBSERVATION]",
80
- "[FINAL]",
81
- "[SESSION_END]",
82
- )
83
-
84
-
85
- def discover_profiles(
86
- which: Callable[[str], str | None] = shutil.which,
87
- examples: Iterable[tuple[str, str, str]] = PROFILE_EXAMPLES,
88
- ) -> tuple[list[SmokeProfile], list[SmokeResult]]:
89
- """Return installed profiles and explicit executable-capability skips."""
90
- installed = []
91
- skipped = []
92
- for name, executable, platform in examples:
93
- resolved = which(executable)
94
- if resolved:
95
- installed.append(SmokeProfile(name, resolved, platform))
96
- else:
97
- skipped.append(SmokeResult(name, "skipped", f"executable not found: {executable}"))
98
- return installed, skipped
99
-
100
-
101
- def smoke_prompt() -> str:
102
- """Return the isolated harmless tool-and-final-answer prompt."""
103
- return (
104
- "This is an isolated logging smoke test. Use one local shell tool to run "
105
- "`printf 'PRIZMKIT_SMOKE_TOOL_OK\\n'`. Do not read, create, edit, or delete "
106
- "project files. After the tool succeeds, answer exactly "
107
- "`PRIZMKIT_SMOKE_FINAL_OK`."
108
- )
109
-
110
-
111
- def _looks_capability_blocked(text: str) -> bool:
112
- lowered = text.lower()
113
- return any(marker in lowered for marker in AUTH_MARKERS)
114
-
115
-
116
- def run_profile(profile: SmokeProfile, *, timeout_seconds: float = 180) -> SmokeResult:
117
- """Run one live adapter in an isolated temporary repository."""
118
- with tempfile.TemporaryDirectory(prefix=f"prizmkit-{profile.name}-smoke-") as temp_dir:
119
- root = Path(temp_dir)
120
- subprocess.run(
121
- ["git", "init", "-b", "main"],
122
- cwd=root,
123
- check=True,
124
- stdout=subprocess.DEVNULL,
125
- stderr=subprocess.DEVNULL,
126
- )
127
- prompt = root / "prompt.md"
128
- prompt.write_text(smoke_prompt(), encoding="utf-8")
129
- session_log = root / ".prizmkit" / "state" / "smoke" / "logs" / "session.log"
130
- progress = session_log.with_name("progress.json")
131
- result = AISessionLauncher(
132
- AISessionConfig(
133
- cli_command=profile.command,
134
- platform=profile.platform,
135
- model=None,
136
- prompt_path=prompt,
137
- cwd=root,
138
- log_path=session_log,
139
- progress_path=progress,
140
- use_stream_json=True,
141
- effort=None if profile.platform == "cursor" else "low",
142
- total_timeout_seconds=timeout_seconds,
143
- )
144
- ).run()
145
- text = session_log.read_text(encoding="utf-8", errors="replace") if session_log.is_file() else ""
146
- missing = [label for label in REQUIRED_LABELS if label not in text]
147
- if _looks_capability_blocked(text):
148
- return SmokeResult(
149
- profile.name,
150
- "skipped",
151
- "authentication, model, quota, network, or account capability unavailable",
152
- str(session_log),
153
- result.exit_code,
154
- )
155
- if result.timed_out:
156
- return SmokeResult(profile.name, "failed", "live smoke timed out without a capability-block marker", str(session_log), result.exit_code)
157
- if result.exit_code not in (0, None):
158
- return SmokeResult(profile.name, "failed", f"AI CLI exited with {result.exit_code}", str(session_log), result.exit_code)
159
- if missing:
160
- return SmokeResult(
161
- profile.name,
162
- "failed",
163
- "missing normalized labels: " + ", ".join(missing),
164
- str(session_log),
165
- result.exit_code,
166
- )
167
- if "PRIZMKIT_SMOKE_TOOL_OK" not in text or "PRIZMKIT_SMOKE_FINAL_OK" not in text:
168
- return SmokeResult(
169
- profile.name,
170
- "failed",
171
- "tool or final-answer sentinel missing",
172
- str(session_log),
173
- result.exit_code,
174
- )
175
- return SmokeResult(profile.name, "passed", "normalized live tool session verified", str(session_log), result.exit_code)
176
-
177
-
178
- def main(argv: list[str] | None = None) -> int:
179
- parser = argparse.ArgumentParser(description=__doc__)
180
- parser.add_argument("--run", action="store_true", help="authorize live AI CLI calls")
181
- parser.add_argument("--only", action="append", default=[], help="run only a named installed example")
182
- parser.add_argument("--timeout", type=float, default=180, help="per-profile timeout in seconds")
183
- args = parser.parse_args(argv)
184
-
185
- installed, results = discover_profiles()
186
- selected = set(args.only)
187
- if selected:
188
- installed = [profile for profile in installed if profile.name in selected]
189
- known = {profile.name for profile in installed} | {result.name for result in results}
190
- for name in sorted(selected - known):
191
- results.append(SmokeResult(name, "skipped", "unknown or unavailable profile example"))
192
-
193
- authorized = args.run or os.environ.get("PRIZMKIT_RUN_LIVE_AI_SMOKE") == "1"
194
- if not authorized:
195
- results.extend(
196
- SmokeResult(profile.name, "skipped", "live calls not authorized; pass --run or set PRIZMKIT_RUN_LIVE_AI_SMOKE=1")
197
- for profile in installed
198
- )
199
- else:
200
- results.extend(run_profile(profile, timeout_seconds=args.timeout) for profile in installed)
201
-
202
- payload = {"results": [asdict(result) for result in sorted(results, key=lambda item: item.name)]}
203
- print(json.dumps(payload, ensure_ascii=False, indent=2))
204
- return 1 if any(result.status == "failed" for result in results) else 0
205
-
206
-
207
- if __name__ == "__main__":
208
- raise SystemExit(main())