devflow-cli 6.1.1__py3-none-any.whl → 6.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.
devflow_cli/__init__.py CHANGED
@@ -1,6 +1,6 @@
1
1
  """devflow CLI — workflow de développement adaptatif."""
2
2
 
3
- VERSION = "6.1.1"
3
+ VERSION = "6.1.2"
4
4
 
5
5
  SUPPORTED_AGENTS = ["claude-code", "codex", "cursor"]
6
6
 
@@ -61,6 +61,21 @@ SAFE_TASK_RE = re.compile(
61
61
  )
62
62
  PYTHON_RE = re.compile(r"^(?:python(?:\d+(?:\.\d+)*)?|py)$", re.IGNORECASE)
63
63
  SAFE_PYTHON_MODULES = frozenset({"compileall", "pytest", "unittest"})
64
+ UV_RUN_FLAG_OPTIONS = frozenset({
65
+ "--all-extras", "--all-groups", "--frozen", "--isolated", "--locked", "--no-dev",
66
+ "--no-project", "--no-sync", "--offline", "-q", "--quiet",
67
+ })
68
+ UV_QUIET_OPTIONS = frozenset({"-q", "--quiet"})
69
+ UV_PYTHON_VERSION_RE = re.compile(r"^[0-9]+\.[0-9]+(\.[0-9]+)?$")
70
+ UV_RUN_NAME_RE = re.compile(r"^[A-Za-z0-9][A-Za-z0-9._-]*$")
71
+ # Seules options de uv run a valeur acceptees : aucune ne change le code execute, le
72
+ # repertoire ni la source des paquets. La valeur est controlee pour ne jamais etre un chemin.
73
+ UV_RUN_VALUE_OPTIONS: Mapping[str, tuple[re.Pattern[str], str]] = {
74
+ "--python": (UV_PYTHON_VERSION_RE, "numéro de version, ex. 3.12"),
75
+ "-p": (UV_PYTHON_VERSION_RE, "numéro de version, ex. 3.12"),
76
+ "--extra": (UV_RUN_NAME_RE, "nom d'extra"),
77
+ "--group": (UV_RUN_NAME_RE, "nom de groupe"),
78
+ }
64
79
  SHELL_EXECUTABLES = frozenset({
65
80
  "bash", "cmd", "cmd.exe", "dash", "fish", "ksh", "powershell",
66
81
  "powershell.exe", "pwsh", "sh", "zsh",
@@ -73,6 +88,11 @@ def validation_policy_guidance() -> list[str]:
73
88
  "Executables de validation autorises par defaut : "
74
89
  + ", ".join(sorted(DEFAULT_ALLOWED_EXECUTABLES))
75
90
  + "; python est limite a -m compileall, pytest ou unittest.",
91
+ "uv run accepte avant l'outil uniquement les options "
92
+ + ", ".join(sorted(UV_RUN_FLAG_OPTIONS | UV_RUN_VALUE_OPTIONS.keys()))
93
+ + ", en forme separee (--python 3.12, pas --python=3.12); --python/-p "
94
+ "exige un numero de version, jamais un chemin d'interpreteur; toute autre "
95
+ "option de uv run est refusee.",
76
96
  "Maven et Gradle acceptent uniquement les taches test, check, lint, verify ou build; "
77
97
  "mvn clean verify est refuse (clean est hors politique).",
78
98
  "Aucun shell implicite ni operateur |, &&, ; ou redirection; "
@@ -352,9 +372,45 @@ def _validate_allowed_shape(
352
372
  if executable == "uv":
353
373
  if subcommand != "run" or len(args) < 3:
354
374
  raise ValueError(f"{validation.id}: seul 'uv run <outil>' est autorisé")
375
+ # Les options de uv run sont analysees ici et jamais comparees a ``explicit`` :
376
+ # un opt-in sur un nom d'option ne doit pas court-circuiter l'outil imbrique.
377
+ index = 2
378
+ quiet_seen = False
379
+ while index < len(args) and args[index].startswith("-"):
380
+ option = args[index]
381
+ if option in UV_RUN_VALUE_OPTIONS:
382
+ pattern, expected = UV_RUN_VALUE_OPTIONS[option]
383
+ if index + 1 >= len(args):
384
+ raise ValueError(
385
+ f"{validation.id}: option de 'uv run' '{option}' sans valeur; "
386
+ f"attendu : {expected}"
387
+ )
388
+ if not pattern.fullmatch(args[index + 1]):
389
+ raise ValueError(
390
+ f"{validation.id}: valeur invalide pour l'option de 'uv run' "
391
+ f"'{option}'; attendu : {expected}"
392
+ )
393
+ index += 2
394
+ continue
395
+ if option not in UV_RUN_FLAG_OPTIONS:
396
+ accepted = ", ".join(sorted(UV_RUN_FLAG_OPTIONS | UV_RUN_VALUE_OPTIONS.keys()))
397
+ raise ValueError(
398
+ f"{validation.id}: option de 'uv run' refusée '{option.split('=', 1)[0]}'; "
399
+ f"options acceptées : {accepted}"
400
+ )
401
+ if option in UV_QUIET_OPTIONS:
402
+ if quiet_seen:
403
+ raise ValueError(
404
+ f"{validation.id}: option de 'uv run' '-q'/'--quiet' "
405
+ "ne peut apparaître qu'une fois"
406
+ )
407
+ quiet_seen = True
408
+ index += 1
409
+ if index >= len(args):
410
+ raise ValueError(f"{validation.id}: seul 'uv run <outil>' est autorisé")
355
411
  nested = ValidationCommand(
356
412
  validation.id,
357
- args[2:],
413
+ args[index:],
358
414
  validation.blocking,
359
415
  validation.timeout,
360
416
  validation.working_directory,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: devflow-cli
3
- Version: 6.1.1
3
+ Version: 6.1.2
4
4
  Summary: Spec-Driven Development workflow CLI
5
5
  Project-URL: Homepage, https://github.com/sopequenoteck/devflow
6
6
  Project-URL: Repository, https://github.com/sopequenoteck/devflow
@@ -1,4 +1,4 @@
1
- devflow_cli/__init__.py,sha256=VmCwbQc6bNPKKQvcsirS32ZlbjHbOt8DbCAfd3EcBfA,1002
1
+ devflow_cli/__init__.py,sha256=q9RfnymaWq6NFLqPNIMBkIwCAG45_QDkzC9mZM-JxhA,1002
2
2
  devflow_cli/cli.py,sha256=nst8kP2QneJZJg6K5bBf9uO8Nj9lYmoHrEhcxA7nsIM,2129
3
3
  devflow_cli/adapters/__init__.py,sha256=RkjHPU2Lp4hSVIq2iOmyTrv2zYU9NuiIF9wEMWzLdMI,377
4
4
  devflow_cli/adapters/agents.py,sha256=8_y70AIhmtuR8kyPN3Wpj0-i76k9wd_uaycVKTqC96g,26503
@@ -45,7 +45,7 @@ devflow_cli/core/telemetry.py,sha256=emcYo6Qikc86TYKT5Mc_9-3Thkt3nztkPZrpTy9VlvA
45
45
  devflow_cli/core/traceability.py,sha256=jfNE9MZzGkmaPer9Wa6Y18yA9Y3sqdeR-nzH9h_TB-8,2968
46
46
  devflow_cli/core/validation_approvals.py,sha256=BMjwDbkkY9K-uqk19duKWIbh7-Dk5ceprNPgQHx3lrg,8421
47
47
  devflow_cli/core/validators.py,sha256=c2T6NAe80sPh2uS8gCQfyiCkLT3eBPLizCbDsE0PgNo,9934
48
- devflow_cli/core/verification.py,sha256=a2-pAnMQqBhGnV87LwhMc03zFRjDECB7sWYGxQu21lo,16879
48
+ devflow_cli/core/verification.py,sha256=YotT8eZFGQRdRrNFwiPGnFNmA2XQ-IjGIyaVi7shA0g,19858
49
49
  devflow_cli/core/waivers.py,sha256=w3bza1OicSxAViYU2hvbrylQTNVgmN7Rd9y2L6Wm2OE,11302
50
50
  devflow_cli/core/worklog.py,sha256=w_R_K-xI7gx9lYQhcjJbI_nBQqztMHsOPWj1tQCXjjA,12668
51
51
  devflow_cli/core/worktree_snapshot.py,sha256=5ycGW5sYSeoht-ofUqoNhrscZuhTJlynfObzisJal90,4669
@@ -85,8 +85,8 @@ devflow_cli/resources/templates/contracts/api-template.md,sha256=rC5v7JBz71PznCn
85
85
  devflow_cli/resources/templates/contracts/components-template.md,sha256=XIWfEXfC72sNmL5OA3V-7xIywkNDU2DBPLfyiagOWcs,484
86
86
  devflow_cli/resources/templates/contracts/interfaces-template.md,sha256=kf8B7b6HsmN7jyRlLNU7RnZl0rTMlI5s97yVRyI-6yc,336
87
87
  devflow_cli/resources/templates/contracts/services-template.md,sha256=cFafKCyLmq_a7aR7G0LXAaMO2z4Fuflq6iKdxfVg0vg,477
88
- devflow_cli-6.1.1.dist-info/METADATA,sha256=KHMl28FYPV7eUHT9Hn6GH4VwneeUhK_H8Zb9NaD5Kqs,4061
89
- devflow_cli-6.1.1.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
90
- devflow_cli-6.1.1.dist-info/entry_points.txt,sha256=GVJ6bMvFpqyO5589iC4nFKeGTpGIW8aKn_QPPpSZ6kU,48
91
- devflow_cli-6.1.1.dist-info/licenses/LICENSE,sha256=v79PvnmqOdKhQiOa_QcWxng4q8GuGscLOwi7ygUpwpo,1070
92
- devflow_cli-6.1.1.dist-info/RECORD,,
88
+ devflow_cli-6.1.2.dist-info/METADATA,sha256=RRQAPdlUN-T0ir2Cd62_ccfWchBkcn4exwQ88iyCOXg,4061
89
+ devflow_cli-6.1.2.dist-info/WHEEL,sha256=W3fkpkm7-wf9vBI5Z-7s0eWkeM-spu78I8Neb98DeEg,87
90
+ devflow_cli-6.1.2.dist-info/entry_points.txt,sha256=GVJ6bMvFpqyO5589iC4nFKeGTpGIW8aKn_QPPpSZ6kU,48
91
+ devflow_cli-6.1.2.dist-info/licenses/LICENSE,sha256=v79PvnmqOdKhQiOa_QcWxng4q8GuGscLOwi7ygUpwpo,1070
92
+ devflow_cli-6.1.2.dist-info/RECORD,,