dirigent-cli 0.15.2__tar.gz → 0.16.1__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 (35) hide show
  1. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/PKG-INFO +1 -1
  2. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/pyproject.toml +1 -1
  3. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/pyproject.toml.orig +1 -1
  4. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/local.py +2 -2
  5. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/main.py +12 -0
  6. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/project.py +4 -5
  7. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/LICENSE +0 -0
  8. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/README.md +0 -0
  9. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/__init__.py +0 -0
  10. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/aliases.py +0 -0
  11. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/commands.py +0 -0
  12. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/context.py +0 -0
  13. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/formatters.py +0 -0
  14. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/graph.py +0 -0
  15. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/health.py +0 -0
  16. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/init_form.py +0 -0
  17. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/output.py +0 -0
  18. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/params.py +0 -0
  19. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/profiles.py +0 -0
  20. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/py.typed +0 -0
  21. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/reaper.py +0 -0
  22. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/scaffold.py +0 -0
  23. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/schemas.py +0 -0
  24. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/seeding.py +0 -0
  25. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/sources.py +0 -0
  26. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/starters.py +0 -0
  27. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/stream.py +0 -0
  28. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/summaries.py +0 -0
  29. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/templates/pack/README.md.tmpl +0 -0
  30. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/templates/pack/__init__.py.tmpl +0 -0
  31. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/templates/pack/operator.py.tmpl +0 -0
  32. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/templates/pack/pyproject.toml.tmpl +0 -0
  33. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/templates/pack/test_plugin.py.tmpl +0 -0
  34. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/timing.py +0 -0
  35. {dirigent_cli-0.15.2 → dirigent_cli-0.16.1}/src/dirigent_cli/triggers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dirigent-cli
3
- Version: 0.15.2
3
+ Version: 0.16.1
4
4
  Summary: The dirigent command line interface (dirigent / dg).
5
5
  License-Expression: LicenseRef-Proprietary
6
6
  License-File: LICENSE
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dirigent-cli"
3
- version = "0.15.2"
3
+ version = "0.16.1"
4
4
  description = "The dirigent command line interface (dirigent / dg)."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dirigent-cli"
3
- version = "0.15.2"
3
+ version = "0.16.1"
4
4
  description = "The dirigent command line interface (dirigent / dg)."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -12,7 +12,6 @@ from uuid import UUID
12
12
 
13
13
  import sqlalchemy as sa
14
14
  import yaml
15
- from cryptography.fernet import Fernet
16
15
  from pydantic import BaseModel, ConfigDict, Field, SecretStr
17
16
  from sqlalchemy.ext.asyncio import AsyncSession, async_sessionmaker
18
17
 
@@ -31,6 +30,7 @@ from dirigent_core.models import ArtifactRef, Connection, LogEntry, Run, RunItem
31
30
  from dirigent_core.pipelines import apply_document
32
31
  from dirigent_core.plugins import load_plugin_host
33
32
  from dirigent_core.schemas import SchemaRefused, resolve_identity, store_schema
33
+ from dirigent_core.secrets import generate_key
34
34
  from dirigent_core.storage import scratch_prefix
35
35
  from dirigent_core.worker import Worker
36
36
 
@@ -315,7 +315,7 @@ def local_settings(root: Path, *, inherited: Settings | None = None) -> Settings
315
315
  database_url=f"sqlite+aiosqlite:///{root / 'dirigent.db'}",
316
316
  artifact_root=f"file://{root / 'artifacts'}",
317
317
  work_root=str(root / "work"),
318
- secret_key=SecretStr(Fernet.generate_key().decode()),
318
+ secret_key=SecretStr(generate_key()),
319
319
  enabled_unsafe_blocks=list(base.enabled_unsafe_blocks),
320
320
  storage_connections=dict(base.storage_connections),
321
321
  inline_artifact_max=base.inline_artifact_max,
@@ -257,6 +257,18 @@ def format_command(
257
257
  emit_rendered(item)
258
258
 
259
259
 
260
+ @app.command(name="secret-key", rich_help_panel=ADMIN_PANEL)
261
+ def secret_key_command() -> None:
262
+ """Generate a DIRIGENT_SECRET_KEY, as one plain line rather than a record.
263
+
264
+ The key is the whole output, at a terminal and in a pipe alike, so
265
+ `DIRIGENT_SECRET_KEY=$(dg secret-key)` works in a shell and in a `.env`.
266
+ """
267
+ from dirigent_core.secrets import generate_key
268
+
269
+ typer.echo(generate_key())
270
+
271
+
260
272
  @config_app.command("show")
261
273
  def config_show() -> None:
262
274
  """Show the effective configuration, with secrets redacted."""
@@ -1,7 +1,5 @@
1
1
  """Pipeline projects: a uv project of documents, and the scaffolding that creates one."""
2
2
 
3
- import base64
4
- import os
5
3
  import re
6
4
  from collections.abc import Sequence
7
5
  from pathlib import Path
@@ -11,6 +9,7 @@ import yaml
11
9
  from pydantic import BaseModel, ConfigDict, Field
12
10
 
13
11
  from dirigent_core.configdocs import example_document, project_document
12
+ from dirigent_core.secrets import generate_key
14
13
 
15
14
  if TYPE_CHECKING:
16
15
  from dirigent_core.examples import ExampleEntry
@@ -433,7 +432,7 @@ COMPOSE_S3 = """\
433
432
  volumes:
434
433
  - s3:/data
435
434
  ports:
436
- - "${S3_PORT:-9010}:9000"
435
+ - "127.0.0.1:${S3_PORT:-9010}:9000"
437
436
  healthcheck:
438
437
  # An unauthenticated request answers 403 rather than 200, and that is a serving
439
438
  # endpoint answering: -f would call it a failure, so only the connection is asserted.
@@ -734,7 +733,7 @@ S3_SECRET_KEY=dirigent
734
733
  S3_BUCKET=dirigent
735
734
  S3_CONNECTION=artifacts
736
735
 
737
- # Where the bundled S3 server is published for a person on the host; the stack itself reaches
736
+ # Where the bundled S3 server is published on the host, on loopback only; the stack itself reaches
738
737
  # it as http://s3:9000.
739
738
  S3_PORT=9010
740
739
  DIRIGENT_S3_IMAGE=rustfs/rustfs:1.0.0-rc.4
@@ -955,7 +954,7 @@ def _merge_ignore(path: Path, content: str, written: list[Path], skipped: list[P
955
954
 
956
955
  def _an_instance_key() -> str:
957
956
  """Generate the key the stack seals connection secrets with."""
958
- return base64.urlsafe_b64encode(os.urandom(32)).decode()
957
+ return generate_key()
959
958
 
960
959
 
961
960
  def _write(path: Path, content: str, *, mode: int | None = None) -> Path:
File without changes
File without changes