elan-cli 0.1.0__tar.gz → 0.1.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 (28) hide show
  1. {elan_cli-0.1.0 → elan_cli-0.1.1}/PKG-INFO +1 -1
  2. {elan_cli-0.1.0 → elan_cli-0.1.1}/pyproject.toml +1 -1
  3. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/main.py +42 -0
  4. {elan_cli-0.1.0 → elan_cli-0.1.1}/.gitignore +0 -0
  5. {elan_cli-0.1.0 → elan_cli-0.1.1}/LICENSE +0 -0
  6. {elan_cli-0.1.0 → elan_cli-0.1.1}/README.md +0 -0
  7. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/__init__.py +0 -0
  8. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/adk.py +0 -0
  9. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/auth.py +0 -0
  10. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/client.py +0 -0
  11. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/config.py +0 -0
  12. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/deploy.py +0 -0
  13. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/destroy.py +0 -0
  14. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/doctor.py +0 -0
  15. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/env.py +0 -0
  16. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/files.py +0 -0
  17. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/invoke.py +0 -0
  18. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/logs.py +0 -0
  19. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/manifests.py +0 -0
  20. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/project.py +0 -0
  21. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/projects.py +0 -0
  22. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/rollback.py +0 -0
  23. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/scaffold.py +0 -0
  24. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/secret.py +0 -0
  25. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/stream.py +0 -0
  26. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/tenant.py +0 -0
  27. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/validate.py +0 -0
  28. {elan_cli-0.1.0 → elan_cli-0.1.1}/src/elan_cli/wallet.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: elan-cli
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: The command line a developer deploys an agent with
5
5
  Project-URL: Homepage, https://openelan.ai
6
6
  Project-URL: Documentation, https://openelan.ai/app/docs
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "elan-cli"
3
- version = "0.1.0"
3
+ version = "0.1.1"
4
4
  description = "The command line a developer deploys an agent with"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -16,6 +16,7 @@ from __future__ import annotations
16
16
 
17
17
  import argparse
18
18
  import sys
19
+ from importlib import metadata
19
20
  from pathlib import Path
20
21
 
21
22
  from elan_cli import adk as adk_cmd
@@ -45,9 +46,50 @@ from elan_cli.secret import SecretError
45
46
  from elan_cli.wallet import WalletError
46
47
 
47
48
 
49
+ def version_line() -> str:
50
+ """What `--version` prints, read back out of the INSTALLED distributions.
51
+
52
+ NO `__version__` CONSTANT HERE. `pyproject.toml` already declares the
53
+ number and `importlib.metadata` reads that same declaration out of the
54
+ installed package, so there is nowhere for a second copy to drift from the
55
+ first. The SDK carries its number twice only because npm has to read one
56
+ of them; this has no such reason.
57
+
58
+ THE SDK'S NUMBER IS ON THE LINE TOO, because the whole reason this flag
59
+ matters is a stale install, and the two are versioned independently —
60
+ `elan-cli` and `elan-sdk` are separate distributions with separate tag
61
+ namespaces, so a CLI whose own number looks current can be sitting on an
62
+ SDK that is not. One line is what somebody pastes into a support thread.
63
+
64
+ "unknown" RATHER THAN A RAISE, per distribution. Running from a source
65
+ tree with nothing installed still gets the rest of the line: `--version`
66
+ is the one command that must never itself be the thing that fails.
67
+
68
+ EAGER, NOT LAZY. `build_parser` runs on every invocation and argparse's
69
+ `version` action wants a string, so both lookups happen every time —
70
+ measured at 0.235 ms for the pair, against a CLI whose quickest command
71
+ opens a socket. A custom action to defer that would be more code than the
72
+ cost it saves.
73
+ """
74
+ def declared(distribution: str) -> str:
75
+ try:
76
+ return metadata.version(distribution)
77
+ except metadata.PackageNotFoundError:
78
+ return "unknown"
79
+
80
+ return f"elan {declared('elan-cli')} (elan-sdk {declared('elan-sdk')})"
81
+
82
+
48
83
  def build_parser() -> argparse.ArgumentParser:
49
84
  parser = argparse.ArgumentParser(
50
85
  prog="elan", description="Deploy an ADK agent to the platform.")
86
+ # THERE IS STILL NO VERSION NEGOTIATION, and this flag is not it. Nothing
87
+ # sends a client version to the platform — no `User-Agent`, no header, and
88
+ # nothing in `/v1/auth`'s handshake — so the platform cannot tell a caller
89
+ # it is too old. This only lets a developer answer "which one have I got",
90
+ # which is what an index install took away from them: before publication
91
+ # the answer was whatever the checkout was at.
92
+ parser.add_argument("--version", action="version", version=version_line())
51
93
  sub = parser.add_subparsers(dest="command", metavar="<command>")
52
94
 
53
95
  login = sub.add_parser("login", help="sign in with a browser, on any machine")
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes