dirigent-cli 0.16.5__tar.gz → 0.16.7__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.16.5 → dirigent_cli-0.16.7}/PKG-INFO +8 -8
  2. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/pyproject.toml +8 -8
  3. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/pyproject.toml.orig +8 -8
  4. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/commands.py +6 -5
  5. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/project.py +11 -6
  6. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/summaries.py +3 -1
  7. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/LICENSE +0 -0
  8. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/README.md +0 -0
  9. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/__init__.py +0 -0
  10. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/aliases.py +0 -0
  11. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/context.py +0 -0
  12. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/formatters.py +0 -0
  13. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/graph.py +0 -0
  14. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/health.py +0 -0
  15. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/init_form.py +0 -0
  16. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/local.py +0 -0
  17. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/main.py +0 -0
  18. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/output.py +0 -0
  19. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/params.py +0 -0
  20. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/profiles.py +0 -0
  21. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/py.typed +0 -0
  22. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/reaper.py +0 -0
  23. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/scaffold.py +0 -0
  24. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/schemas.py +0 -0
  25. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/seeding.py +0 -0
  26. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/sources.py +0 -0
  27. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/starters.py +0 -0
  28. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/stream.py +0 -0
  29. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/templates/pack/README.md.tmpl +0 -0
  30. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/templates/pack/__init__.py.tmpl +0 -0
  31. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/templates/pack/operator.py.tmpl +0 -0
  32. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/templates/pack/pyproject.toml.tmpl +0 -0
  33. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/templates/pack/test_plugin.py.tmpl +0 -0
  34. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/timing.py +0 -0
  35. {dirigent_cli-0.16.5 → dirigent_cli-0.16.7}/src/dirigent_cli/triggers.py +0 -0
@@ -1,18 +1,18 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dirigent-cli
3
- Version: 0.16.5
3
+ Version: 0.16.7
4
4
  Summary: The dirigent command line interface (dirigent / dg).
5
5
  License-Expression: LicenseRef-Proprietary
6
6
  License-File: LICENSE
7
7
  Classifier: Programming Language :: Python :: 3
8
8
  Classifier: Programming Language :: Python :: 3.13
9
- Requires-Dist: dirigent-blocks==0.16.5
10
- Requires-Dist: dirigent-client==0.16.5
11
- Requires-Dist: dirigent-common==0.16.5
12
- Requires-Dist: dirigent-core==0.16.5
13
- Requires-Dist: dirigent-examples==0.16.5
14
- Requires-Dist: dirigent-plugin==0.16.5
15
- Requires-Dist: dirigent-server==0.16.5
9
+ Requires-Dist: dirigent-blocks==0.16.7
10
+ Requires-Dist: dirigent-client==0.16.7
11
+ Requires-Dist: dirigent-common==0.16.7
12
+ Requires-Dist: dirigent-core==0.16.7
13
+ Requires-Dist: dirigent-examples==0.16.7
14
+ Requires-Dist: dirigent-plugin==0.16.7
15
+ Requires-Dist: dirigent-server==0.16.7
16
16
  Requires-Dist: httpx2>=2.12.0
17
17
  Requires-Dist: python-dotenv>=1.1.0
18
18
  Requires-Dist: pyyaml>=6.0.3
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dirigent-cli"
3
- version = "0.16.5"
3
+ version = "0.16.7"
4
4
  description = "The dirigent command line interface (dirigent / dg)."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -11,13 +11,13 @@ classifiers = [
11
11
  "Programming Language :: Python :: 3.13",
12
12
  ]
13
13
  dependencies = [
14
- "dirigent-blocks==0.16.5",
15
- "dirigent-client==0.16.5",
16
- "dirigent-common==0.16.5",
17
- "dirigent-core==0.16.5",
18
- "dirigent-examples==0.16.5",
19
- "dirigent-plugin==0.16.5",
20
- "dirigent-server==0.16.5",
14
+ "dirigent-blocks==0.16.7",
15
+ "dirigent-client==0.16.7",
16
+ "dirigent-common==0.16.7",
17
+ "dirigent-core==0.16.7",
18
+ "dirigent-examples==0.16.7",
19
+ "dirigent-plugin==0.16.7",
20
+ "dirigent-server==0.16.7",
21
21
  "httpx2>=2.12.0",
22
22
  "python-dotenv>=1.1.0",
23
23
  "pyyaml>=6.0.3",
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dirigent-cli"
3
- version = "0.16.5"
3
+ version = "0.16.7"
4
4
  description = "The dirigent command line interface (dirigent / dg)."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.13"
@@ -11,13 +11,13 @@ classifiers = [
11
11
  "Programming Language :: Python :: 3.13",
12
12
  ]
13
13
  dependencies = [
14
- "dirigent-blocks==0.16.5",
15
- "dirigent-client==0.16.5",
16
- "dirigent-common==0.16.5",
17
- "dirigent-core==0.16.5",
18
- "dirigent-examples==0.16.5",
19
- "dirigent-plugin==0.16.5",
20
- "dirigent-server==0.16.5",
14
+ "dirigent-blocks==0.16.7",
15
+ "dirigent-client==0.16.7",
16
+ "dirigent-common==0.16.7",
17
+ "dirigent-core==0.16.7",
18
+ "dirigent-examples==0.16.7",
19
+ "dirigent-plugin==0.16.7",
20
+ "dirigent-server==0.16.7",
21
21
  "httpx2>=2.12.0",
22
22
  "python-dotenv>=1.1.0",
23
23
  "pyyaml>=6.0.3",
@@ -62,7 +62,7 @@ from dirigent_cli.project import (
62
62
  check_choices,
63
63
  find_project,
64
64
  scaffold,
65
- write_token_env,
65
+ write_instance_env,
66
66
  )
67
67
  from dirigent_cli.scaffold import ScaffoldedRecord, ScaffoldError, ScaffoldRecord, scaffold_pack
68
68
  from dirigent_cli.sources import (
@@ -537,9 +537,10 @@ def init_command(
537
537
  stack's services, packs, and the first admin. The flags answer the same questions for a
538
538
  script. `--template local` writes the documents and a `pyproject.toml` pinning the running
539
539
  dirigent, then creates the state directory, migrates the schema, creates the first admin
540
- and mints it a token, kept in `.env`. `--template compose` writes the documents and a
541
- container stack instead, and initialises nothing locally: the instance is the containers.
542
- `--template documents` writes the documents alone, against an instance somebody else runs.
540
+ and mints it a token and a secret key, both kept in `.env`. `--template compose` writes the
541
+ documents and a container stack instead, and initialises nothing locally: the instance is
542
+ the containers. `--template documents` writes the documents alone, against an instance
543
+ somebody else runs.
543
544
  """
544
545
  import asyncio
545
546
 
@@ -616,7 +617,7 @@ def init_command(
616
617
  migrated = migrations.head_revision(settings) or "none"
617
618
  migrations.upgrade("head", settings)
618
619
  token = asyncio.run(first_admin(settings, choices.admin, choices.password))
619
- env_file = write_token_env(root, token)
620
+ env_file = write_instance_env(root, token)
620
621
  emit_fact(
621
622
  "instance.initialised",
622
623
  message="initialised",
@@ -821,14 +821,18 @@ ROOT_IGNORE_TEMPLATE = """\
821
821
  .venv/
822
822
  __pycache__/
823
823
 
824
- # This instance's token, or the stack's key and first password. Never shared.
824
+ # This instance's token and key, or the stack's key and first password. Never shared.
825
825
  .env
826
826
  """
827
827
 
828
- TOKEN_ENV_TEMPLATE = """\
828
+ INSTANCE_ENV_TEMPLATE = """\
829
829
  # The token dg init minted for this instance's first admin. The local profile in
830
830
  # .dirigent/profiles.yaml reads it from here when the shell does not export it.
831
831
  DG_TOKEN=__TOKEN__
832
+
833
+ # The key this instance seals connection secrets with, read by every command run in this
834
+ # directory. What is stored under it cannot be opened under another one.
835
+ DIRIGENT_SECRET_KEY=__SECRET_KEY__
832
836
  """
833
837
 
834
838
  PYPROJECT_TEMPLATE = """\
@@ -923,9 +927,10 @@ def scaffold(directory: Path, choices: InitChoices, *, version: str = "0.0.0") -
923
927
  return Scaffolded(files=written, skipped=skipped)
924
928
 
925
929
 
926
- def write_token_env(directory: Path, token: str) -> Path:
927
- """Write the ``.env`` holding a new instance's token, readable by its owner alone."""
928
- return _write(directory / ".env", TOKEN_ENV_TEMPLATE.replace("__TOKEN__", token), mode=0o600)
930
+ def write_instance_env(directory: Path, token: str) -> Path:
931
+ """Write the ``.env`` holding a new instance's token and key, readable by its owner alone."""
932
+ document = INSTANCE_ENV_TEMPLATE.replace("__TOKEN__", token).replace("__SECRET_KEY__", _an_instance_key())
933
+ return _write(directory / ".env", document, mode=0o600)
929
934
 
930
935
 
931
936
  def _record(path: Path, content: str, written: list[Path], skipped: list[Path]) -> None:
@@ -953,7 +958,7 @@ def _merge_ignore(path: Path, content: str, written: list[Path], skipped: list[P
953
958
 
954
959
 
955
960
  def _an_instance_key() -> str:
956
- """Generate the key the stack seals connection secrets with."""
961
+ """Generate the key an instance seals connection secrets with."""
957
962
  return generate_key()
958
963
 
959
964
 
@@ -316,7 +316,9 @@ def _initialised(record: Record) -> RenderableType | None:
316
316
  "\n [bold]uv run dg examples list --starter[/]"
317
317
  "\n [bold]uv run dg pipeline new <starter>[/]"
318
318
  "\n [bold]uv run dg apply[/]"
319
- "\n\n[dim]No DIRIGENT_SECRET_KEY is set, so a connection carrying a credential cannot be stored until it is.[/]"
319
+ "\n\n[dim]DIRIGENT_SECRET_KEY is in .env beside it, and every command run in"
320
+ "\nthis directory reads it: it is what connection secrets are sealed with, and"
321
+ "\nunder another key the instance cannot open what it stored.[/]"
320
322
  )
321
323
  return Group(*parts)
322
324
 
File without changes
File without changes