elemctl 0.43.1__tar.gz → 0.43.2__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.
- {elemctl-0.43.1 → elemctl-0.43.2}/PKG-INFO +1 -1
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/changelog.md +6 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/changelog.ru.md +7 -1
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/__init__.py +2 -2
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/build.py +14 -14
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/cli.py +29 -29
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/client.py +27 -27
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/config.py +6 -6
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/deploy.py +12 -12
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/errors.py +1 -1
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/i18n.py +8 -8
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/mcp_server.py +82 -82
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/plugins.py +18 -18
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/probe.py +14 -14
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/transport.py +9 -9
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/versions.py +1 -1
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl.egg-info/PKG-INFO +1 -1
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_build.py +8 -8
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_cli.py +28 -28
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_cli_docs.py +3 -3
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_client.py +10 -10
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_config.py +3 -3
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_deploy.py +2 -2
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_i18n.py +6 -6
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_mcp.py +37 -37
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_plugins.py +4 -4
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_probe.py +4 -4
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_selfupdate.py +7 -7
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_transport.py +4 -4
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_user_lists.py +8 -8
- {elemctl-0.43.1 → elemctl-0.43.2}/tools/extract_adapter.py +2 -2
- {elemctl-0.43.1 → elemctl-0.43.2}/.env.example +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/LICENSE +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/MANIFEST.in +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/NOTICE +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/ORIGIN.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/README.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/SPEC.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/SPEC.ru.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/cli.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/cli.ru.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/config.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/config.ru.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/index.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/index.ru.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/library.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/library.ru.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/mcp.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/mcp.ru.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/platform.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/docs/platform.ru.md +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/pyproject.toml +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/setup.cfg +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/__main__.py +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/auth.py +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/schema.py +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl/selfupdate.py +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl.egg-info/SOURCES.txt +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl.egg-info/dependency_links.txt +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl.egg-info/entry_points.txt +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl.egg-info/requires.txt +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/src/elemctl.egg-info/top_level.txt +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_changelog_link.py +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_conventions.py +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_docs_coverage.py +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_extract_adapter.py +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_rebuild_docs.py +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_release_notes.py +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_schema.py +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_versions.py +0 -0
- {elemctl-0.43.1 → elemctl-0.43.2}/tests/test_workflows.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: elemctl
|
|
3
|
-
Version: 0.43.
|
|
3
|
+
Version: 0.43.2
|
|
4
4
|
Summary: CLI, MCP server and library for the Console API v2 of the 1C:Enterprise.Element platform (1cmycloud): applications, builds from source, one-command deploy with verification, a compile probe
|
|
5
5
|
Author: KeyFire
|
|
6
6
|
License-Expression: MIT
|
|
@@ -21,6 +21,12 @@ entry either – say what the behaviour was, not which id or response field was
|
|
|
21
21
|
The link is written by `python scripts/changelog-link.py <number>`, which rebuilds the generated
|
|
22
22
|
pages of the site in the same run – writing it by hand is how the mirrors get left behind.
|
|
23
23
|
|
|
24
|
+
## 2026-09-23 – 0.43.2
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- Python comments and docstrings consistently use hyphens. Ordinary string literals remain unchanged.
|
|
28
|
+
([#40](https://github.com/keyfire/elemctl/pull/40))
|
|
29
|
+
|
|
24
30
|
## 2026-09-22 – 0.43.1
|
|
25
31
|
|
|
26
32
|
### Fixed
|
|
@@ -21,7 +21,13 @@ sidebar:
|
|
|
21
21
|
Ссылку пишет `python scripts/changelog-link.py <номер>` – он же тут же пересобирает
|
|
22
22
|
сгенерированные страницы сайта: правка руками как раз и оставляет зеркала позади.
|
|
23
23
|
|
|
24
|
-
## 2026
|
|
24
|
+
## 23.09.2026 – 0.43.2
|
|
25
|
+
|
|
26
|
+
### Изменено
|
|
27
|
+
- В комментариях и документирующих строках Python используется обычный дефис. Остальные строковые литералы сохранены.
|
|
28
|
+
([#40](https://github.com/keyfire/elemctl/pull/40))
|
|
29
|
+
|
|
30
|
+
## 22.09.2026 – 0.43.1
|
|
25
31
|
|
|
26
32
|
### Исправлено
|
|
27
33
|
- **`self-update` сообщает об оборванном ответе PyPI и не затрагивает установленный пакет.**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""elemctl
|
|
1
|
+
"""elemctl - a CLI, an MCP server and a library for Console API v2 of the
|
|
2
2
|
1C:Enterprise.Element platform (1cmycloud).
|
|
3
3
|
|
|
4
4
|
Public API of the library:
|
|
@@ -18,7 +18,7 @@ from .errors import (
|
|
|
18
18
|
TransportError,
|
|
19
19
|
)
|
|
20
20
|
|
|
21
|
-
__version__ = "0.43.
|
|
21
|
+
__version__ = "0.43.2"
|
|
22
22
|
|
|
23
23
|
__all__ = [
|
|
24
24
|
"ApiError",
|
|
@@ -60,7 +60,7 @@ SOAP_CLIENT_KINDS = ("КлиентSoapСервиса", "SoapServiceClient")
|
|
|
60
60
|
# by extension.
|
|
61
61
|
RESOURCES_DIR = "Ресурсы"
|
|
62
62
|
|
|
63
|
-
# Directories excluded entirely (plus every hidden one
|
|
63
|
+
# Directories excluded entirely (plus every hidden one - starting with a dot).
|
|
64
64
|
EXCLUDED_DIRS = {".git", ".claude", ".github", "__pycache__", "node_modules", ".venv"}
|
|
65
65
|
|
|
66
66
|
# Files excluded by exact name.
|
|
@@ -69,7 +69,7 @@ EXCLUDED_FILES = {".gitignore", ".env", ".DS_Store"}
|
|
|
69
69
|
# Files excluded by extension (prebuilt build archives).
|
|
70
70
|
EXCLUDED_SUFFIXES = (".xasm", ".xlib")
|
|
71
71
|
|
|
72
|
-
# The CI environment variables carrying the run number
|
|
72
|
+
# The CI environment variables carrying the run number - the source of the build
|
|
73
73
|
# version suffix when neither an explicit version nor a last build is given: every
|
|
74
74
|
# CI run happens in a clean working directory, so local numbering would always
|
|
75
75
|
# yield "-1".
|
|
@@ -105,9 +105,9 @@ class LibraryRef:
|
|
|
105
105
|
class BuildResult:
|
|
106
106
|
"""The result of a local archive build.
|
|
107
107
|
|
|
108
|
-
version_source
|
|
108
|
+
version_source - where the build version came from: "flag" (set explicitly),
|
|
109
109
|
"last-build" (auto-increment from the last build), the name of a CI variable
|
|
110
|
-
(the run number from the environment) or "default". dirty_files
|
|
110
|
+
(the run number from the environment) or "default". dirty_files - the files
|
|
111
111
|
with uncommitted changes in the project directory; None when git is
|
|
112
112
|
unavailable or the directory is not inside a repository.
|
|
113
113
|
"""
|
|
@@ -132,7 +132,7 @@ class BuildResult:
|
|
|
132
132
|
def parse_flat_yaml(text):
|
|
133
133
|
"""Parse the flat top-level "key: value" pairs of a YAML text.
|
|
134
134
|
|
|
135
|
-
Nested lines (the indented ones), blank lines and comments are skipped
|
|
135
|
+
Nested lines (the indented ones), blank lines and comments are skipped -
|
|
136
136
|
for Проект.yaml that is enough.
|
|
137
137
|
"""
|
|
138
138
|
values = {}
|
|
@@ -334,7 +334,7 @@ def collect_project_files(project_dir):
|
|
|
334
334
|
|
|
335
335
|
Outside the resource directories an allowlist of extensions applies; inside a
|
|
336
336
|
`Ресурсы` directory (at any level, including its subdirectories) files of any
|
|
337
|
-
extension are taken
|
|
337
|
+
extension are taken - a resource may be an arbitrary file: .pdf, .htm, .mxl etc.
|
|
338
338
|
"""
|
|
339
339
|
return collect_with_skipped(project_dir)[0]
|
|
340
340
|
|
|
@@ -432,7 +432,7 @@ def _detached_branch(environ=None):
|
|
|
432
432
|
def git_metadata(project_dir, environ=None):
|
|
433
433
|
"""The commit hash and the branch name of the git repository holding the project.
|
|
434
434
|
|
|
435
|
-
When git is unavailable (no command, not a repository)
|
|
435
|
+
When git is unavailable (no command, not a repository) - empty strings.
|
|
436
436
|
|
|
437
437
|
A detached checkout is answered by the CI, not by git: `rev-parse --abbrev-ref HEAD`
|
|
438
438
|
says the literal `HEAD` there, and that is what every assembly built on a runner used
|
|
@@ -452,7 +452,7 @@ def git_dirty_files(project_dir):
|
|
|
452
452
|
|
|
453
453
|
A build captures the disk as it is at the moment it starts, so a divergence
|
|
454
454
|
from HEAD has to be visible to the caller. Returned is the list of paths from
|
|
455
|
-
git status --porcelain limited to the directory; None
|
|
455
|
+
git status --porcelain limited to the directory; None - when git is unavailable
|
|
456
456
|
or the directory is not inside a repository (as opposed to an empty list,
|
|
457
457
|
meaning "clean").
|
|
458
458
|
"""
|
|
@@ -510,8 +510,8 @@ def build_assembly(
|
|
|
510
510
|
|
|
511
511
|
The version: the explicit version, otherwise an auto-increment from
|
|
512
512
|
last_build_version, otherwise a suffix taken from the CI run number (the
|
|
513
|
-
CI_BUILD_NUMBER_VARS variables), and with none of that
|
|
514
|
-
branch and commit override the git metadata (None
|
|
513
|
+
CI_BUILD_NUMBER_VARS variables), and with none of that - "{base version}-1".
|
|
514
|
+
branch and commit override the git metadata (None - take it from git). kind
|
|
515
515
|
overrides the project kind ("application"/"library").
|
|
516
516
|
"""
|
|
517
517
|
directory = find_project_dir(project_dir) if project_dir else find_project_dir()
|
|
@@ -643,10 +643,10 @@ def read_assembly_project(path):
|
|
|
643
643
|
|
|
644
644
|
|
|
645
645
|
def inspect_assembly(path):
|
|
646
|
-
"""Inspect a prebuilt assembly archive (.xasm/.xlib)
|
|
646
|
+
"""Inspect a prebuilt assembly archive (.xasm/.xlib) - the inverse of build_assembly.
|
|
647
647
|
|
|
648
648
|
Returns the manifest, the project properties, its subsystems and the types
|
|
649
|
-
available to the project that plugged it in (ОбластьВидимости: Глобально)
|
|
649
|
+
available to the project that plugged it in (ОбластьВидимости: Глобально) -
|
|
650
650
|
with their qualified names. The namespace of a type is
|
|
651
651
|
{vendor}::{name}::{subsystem}[::{package}], where a package is a nested
|
|
652
652
|
directory of a subsystem (a package has no descriptor file of its own).
|
|
@@ -686,7 +686,7 @@ def inspect_assembly(path):
|
|
|
686
686
|
"vendor": vendor,
|
|
687
687
|
"name": name,
|
|
688
688
|
"version": manifest.get("Version", ""),
|
|
689
|
-
# There is no ВерсияТехнологии in Проект.yaml
|
|
689
|
+
# There is no ВерсияТехнологии in Проект.yaml - compatibility is set by
|
|
690
690
|
# РежимСовместимости, and it is exactly what is matched against the target project.
|
|
691
691
|
"compatibility": descriptor_value(project, "РежимСовместимости", "CompatibilityMode"),
|
|
692
692
|
"representation": descriptor_value(project, "Представление", "Presentation"),
|
|
@@ -759,7 +759,7 @@ def _archive_elements(archive, names, prefix):
|
|
|
759
759
|
|
|
760
760
|
|
|
761
761
|
def _subsystems(elements, vendor, name):
|
|
762
|
-
"""The project's subsystems and their packages
|
|
762
|
+
"""The project's subsystems and their packages - from the directory layout.
|
|
763
763
|
|
|
764
764
|
A subsystem is a first-level directory; Подсистема.yaml is optional (a library
|
|
765
765
|
may have none at all), so it cannot be relied upon.
|
|
@@ -63,7 +63,7 @@ _answer_stream = None
|
|
|
63
63
|
def _emit(data):
|
|
64
64
|
"""Print the answer and flush it immediately.
|
|
65
65
|
|
|
66
|
-
Off a terminal Python block-buffers stdout, while stderr goes through right away
|
|
66
|
+
Off a terminal Python block-buffers stdout, while stderr goes through right away - a
|
|
67
67
|
caller who merges the streams (`2>&1`, or stderr=STDOUT, a plain way to capture "everything
|
|
68
68
|
the tool printed" for a log) then saw a later _progress line overtake an _emit that ran
|
|
69
69
|
first in the source, and a parser hunting for the first brace found a summary line instead.
|
|
@@ -80,7 +80,7 @@ def _json_only():
|
|
|
80
80
|
"""--json: only the answer reaches stdout, everything else goes to stderr.
|
|
81
81
|
|
|
82
82
|
The promise is kept by the streams themselves rather than by discipline: a
|
|
83
|
-
print of a plugin command, a warning of a library, a stray debug line
|
|
83
|
+
print of a plugin command, a warning of a library, a stray debug line - all of
|
|
84
84
|
them land on stderr, because for the duration of the call sys.stdout IS stderr.
|
|
85
85
|
_emit keeps writing to the real stdout, which is remembered here.
|
|
86
86
|
"""
|
|
@@ -95,7 +95,7 @@ def _json_only():
|
|
|
95
95
|
|
|
96
96
|
def _progress(message):
|
|
97
97
|
# stderr is already line-buffered on every supported Python, so this changes nothing in
|
|
98
|
-
# practice
|
|
98
|
+
# practice - it is here so the order _emit relies on is an explicit guarantee in the code,
|
|
99
99
|
# not an assumption about the interpreter's default that the next reader has to go verify.
|
|
100
100
|
print(message, file=sys.stderr)
|
|
101
101
|
sys.stderr.flush()
|
|
@@ -108,7 +108,7 @@ def _fail(payload):
|
|
|
108
108
|
|
|
109
109
|
|
|
110
110
|
def _reconfigure_streams():
|
|
111
|
-
"""Switch the console output to UTF-8
|
|
111
|
+
"""Switch the console output to UTF-8 - otherwise Cyrillic breaks on Windows."""
|
|
112
112
|
for stream in (sys.stdout, sys.stderr):
|
|
113
113
|
reconfigure = getattr(stream, "reconfigure", None)
|
|
114
114
|
if reconfigure is not None:
|
|
@@ -169,14 +169,14 @@ def _refuse_connection_options(args, command):
|
|
|
169
169
|
|
|
170
170
|
`build` and `inspect` never reach the platform: the archive is assembled from
|
|
171
171
|
the sources on disk, and no version number is reserved on the server. The
|
|
172
|
-
options used to be accepted and quietly dropped
|
|
172
|
+
options used to be accepted and quietly dropped - and a call that carries
|
|
173
173
|
`--env-file` LOOKS like a build bound to a stand, which twice left the reader
|
|
174
174
|
asking whether the build talks to the server after all.
|
|
175
175
|
|
|
176
176
|
A refusal rather than a warning, for three reasons. Nothing stops working:
|
|
177
177
|
the options changed nothing, so the only calls it breaks are the ones that
|
|
178
178
|
already meant something else. A warning would land on stderr, next to the
|
|
179
|
-
progress lines, where a CI log buries it
|
|
179
|
+
progress lines, where a CI log buries it - and silence of exactly that kind is
|
|
180
180
|
what caused the doubt. And the refusal answers the question the caller really
|
|
181
181
|
had: it says outright that a local build does not go to the platform, and
|
|
182
182
|
names the commands that do.
|
|
@@ -262,7 +262,7 @@ def cmd_apps_find(args):
|
|
|
262
262
|
|
|
263
263
|
The exit code is 0 in both cases: the found field carries the verdict. A non-zero exit
|
|
264
264
|
code means the request itself failed (no access, network, configuration) and comes with
|
|
265
|
-
JSON carrying an error field on stderr
|
|
265
|
+
JSON carrying an error field on stderr - otherwise the caller cannot tell "there is no
|
|
266
266
|
stand" from "we failed to ask".
|
|
267
267
|
|
|
268
268
|
Deleted applications (status Deleted) are skipped by default, so that the id found is fit
|
|
@@ -401,7 +401,7 @@ def _report_sign_in(card):
|
|
|
401
401
|
A stand nobody can get into is not a ready stand, and the way in is not
|
|
402
402
|
guessable: the accounts used elsewhere do not work in a fresh application
|
|
403
403
|
(client.sign_in_hint). The text goes to stderr, where the rest
|
|
404
|
-
of the progress goes, and the machine-readable twin goes into the JSON
|
|
404
|
+
of the progress goes, and the machine-readable twin goes into the JSON - an
|
|
405
405
|
agent reading only stdout must learn it too.
|
|
406
406
|
"""
|
|
407
407
|
hint = sign_in_hint(card)
|
|
@@ -500,8 +500,8 @@ def cmd_apps_ensure(args):
|
|
|
500
500
|
"""Idempotently bring an application with the given name into existence.
|
|
501
501
|
|
|
502
502
|
It looks the application up by the rules of apps find (deleted ones, in
|
|
503
|
-
status Deleted, do not count): if it is already there
|
|
504
|
-
returns created: false; if it is not
|
|
503
|
+
status Deleted, do not count): if it is already there - it does nothing and
|
|
504
|
+
returns created: false; if it is not - it creates one from the creation flags
|
|
505
505
|
and returns created: true. An existing application is never re-created:
|
|
506
506
|
delete + create give a new URL and break the external links to the previous
|
|
507
507
|
one. The exit code is 0 in both cases; a failed request is JSON with an error
|
|
@@ -690,9 +690,9 @@ def cmd_builds_list(args):
|
|
|
690
690
|
|
|
691
691
|
Neither cut is silent, and there are two of them. The tool's own is the limit.
|
|
692
692
|
The platform's is its housekeeping: it deletes the builds nobody uses, whatever
|
|
693
|
-
their age, so a listing is not the project's history
|
|
693
|
+
their age, so a listing is not the project's history - it is what survived. The
|
|
694
694
|
count line says which of the two the reader is looking at (builds_summary reads
|
|
695
|
-
that off the gaps in the build numbering), and it is printed always
|
|
695
|
+
that off the gaps in the build numbering), and it is printed always - after the
|
|
696
696
|
answer, the same order apps list uses: a listing without it was read as "the
|
|
697
697
|
project has exactly these builds", and a caller capturing the two streams as one
|
|
698
698
|
must still find the answer first.
|
|
@@ -707,7 +707,7 @@ def cmd_builds_list(args):
|
|
|
707
707
|
truncated = args.limit > 0 and len(assemblies) > args.limit
|
|
708
708
|
if truncated:
|
|
709
709
|
shown = assemblies[: args.limit]
|
|
710
|
-
# Counted before --brief reshapes the cards: the whole answer, not the cut one
|
|
710
|
+
# Counted before --brief reshapes the cards: the whole answer, not the cut one -
|
|
711
711
|
# what the platform left out is judged by the numbering of everything it did
|
|
712
712
|
# return, and the count of a card does not change when its fields do.
|
|
713
713
|
shown_count = len(shown)
|
|
@@ -733,8 +733,8 @@ def cmd_builds_get(args):
|
|
|
733
733
|
def _upload_target(args, config):
|
|
734
734
|
"""The target project of the upload and the source of that choice.
|
|
735
735
|
|
|
736
|
-
The sources: "flag"
|
|
737
|
-
the environment or the .env file, None
|
|
736
|
+
The sources: "flag" - the --project-id flag, "env" - ELEMENT_PROJECT_ID from
|
|
737
|
+
the environment or the .env file, None - no project is set, the platform will
|
|
738
738
|
create a new one. The --new-project flag switches the binding from the
|
|
739
739
|
environment off; together with --project-id it is contradictory, which is a
|
|
740
740
|
call error.
|
|
@@ -950,7 +950,7 @@ def _user_list_id(client, args):
|
|
|
950
950
|
"""The id of the target user list: from the argument or from the application.
|
|
951
951
|
|
|
952
952
|
Exactly one of the two is expected. --app takes the application's own list
|
|
953
|
-
(default-user-list of its card)
|
|
953
|
+
(default-user-list of its card) - that is the everyday case: the settings of
|
|
954
954
|
the checklist are made on the list of a particular application, and its
|
|
955
955
|
presentation is named after the application anyway.
|
|
956
956
|
"""
|
|
@@ -1026,8 +1026,8 @@ def _calculation_rules(args):
|
|
|
1026
1026
|
def cmd_user_lists_calculation_rules(args):
|
|
1027
1027
|
"""The rules that build a user from the provider's answer: show the target or write them.
|
|
1028
1028
|
|
|
1029
|
-
Without values the command does not pretend to show the rules
|
|
1030
|
-
return them
|
|
1029
|
+
Without values the command does not pretend to show the rules - the platform does not
|
|
1030
|
+
return them - it names the service they would go to and says why there is nothing to
|
|
1031
1031
|
show. Writing reports honestly what was confirmed and what could not be.
|
|
1032
1032
|
"""
|
|
1033
1033
|
client = make_client(_config(args))
|
|
@@ -1061,7 +1061,7 @@ def cmd_user_lists_calculation_rules(args):
|
|
|
1061
1061
|
|
|
1062
1062
|
|
|
1063
1063
|
def cmd_user_lists_password_login(args):
|
|
1064
|
-
"""Signing in with a login and a password
|
|
1064
|
+
"""Signing in with a login and a password - the account service of type Local.
|
|
1065
1065
|
|
|
1066
1066
|
Without a flag the command answers with the current state; the answer says
|
|
1067
1067
|
`enabled: null` when the list has no such service at all (nothing to sign in
|
|
@@ -1209,7 +1209,7 @@ def cmd_tech_set(args):
|
|
|
1209
1209
|
def cmd_debug_adapter(args):
|
|
1210
1210
|
"""The path to the platform debug adapter directory brought by the plugin.
|
|
1211
1211
|
|
|
1212
|
-
The directory holds a repo/ subdirectory with the jar files of the adapter
|
|
1212
|
+
The directory holds a repo/ subdirectory with the jar files of the adapter - that is
|
|
1213
1213
|
the ready value of the xbsl.debug.adapterPath setting for the VS Code extension. A
|
|
1214
1214
|
missing plugin is an answer (found: false, code 0), not an error: a non-zero code
|
|
1215
1215
|
would mean a failure.
|
|
@@ -1223,10 +1223,10 @@ def cmd_debug_adapter(args):
|
|
|
1223
1223
|
|
|
1224
1224
|
|
|
1225
1225
|
def cmd_plugins(args):
|
|
1226
|
-
"""Plugin diagnostics: what the plugins bring
|
|
1226
|
+
"""Plugin diagnostics: what the plugins bring - adapter directories and commands.
|
|
1227
1227
|
|
|
1228
1228
|
The adapter directories are listed jar-less ones included (that is exactly
|
|
1229
|
-
what a diagnostic is for), the commands
|
|
1229
|
+
what a diagnostic is for), the commands - with the entry point they arrived
|
|
1230
1230
|
through and whether they are exposed to MCP. The failures name the plugins
|
|
1231
1231
|
left out and the reason: a plugin that did not load, or a command that would
|
|
1232
1232
|
have taken over a name of the core.
|
|
@@ -1271,15 +1271,15 @@ def cmd_mcp(args):
|
|
|
1271
1271
|
from . import mcp_server
|
|
1272
1272
|
except ImportError:
|
|
1273
1273
|
raise ElemctlError(i18n.t("cli.mcp-extra-required"))
|
|
1274
|
-
# A bad --env-file still fails right here, before the server starts
|
|
1274
|
+
# A bad --env-file still fails right here, before the server starts - the same check
|
|
1275
1275
|
# Config.from_env would raise on the first call, just not deferred to it: a typo in a
|
|
1276
1276
|
# path given explicitly on this command line is worth knowing about immediately, not
|
|
1277
1277
|
# minutes into a session. Other default-stand configuration problems (a bad
|
|
1278
1278
|
# ELEMENT_TLS_VERIFY, credentials missing entirely) are NOT resolved here on purpose: not
|
|
1279
1279
|
# _config(args), which used to build a whole Config up front and hand it to mcp_server as
|
|
1280
|
-
# a ready object
|
|
1280
|
+
# a ready object - that pinned it for the life of the process, so the default stand's
|
|
1281
1281
|
# .env, edited after the server started, was never re-read. Only the genuine overrides
|
|
1282
|
-
# (the flags actually given
|
|
1282
|
+
# (the flags actually given - base URL, client id and the rest) and --env-file, if any,
|
|
1283
1283
|
# are passed instead; every call still without its own env_file rebuilds from the file on
|
|
1284
1284
|
# an edit, the overrides applied on top each time.
|
|
1285
1285
|
if args.env_file:
|
|
@@ -1348,7 +1348,7 @@ class _AliasedPositional(argparse.Action):
|
|
|
1348
1348
|
|
|
1349
1349
|
argparse hands an optional positional its own default when the command line carried
|
|
1350
1350
|
none, and that default would land on the dest the key form had just filled. Here the
|
|
1351
|
-
default is _MISSING, and seeing it means write nothing at all
|
|
1351
|
+
default is _MISSING, and seeing it means write nothing at all - the dest keeps what
|
|
1352
1352
|
the key form put there, or stays out of the namespace when neither form was given.
|
|
1353
1353
|
"""
|
|
1354
1354
|
|
|
@@ -1363,7 +1363,7 @@ class _AliasedPositional(argparse.Action):
|
|
|
1363
1363
|
def _add_aliased_positional(parser, argument):
|
|
1364
1364
|
"""A positional plugin argument and its CLI-only key synonym (Argument.cli_alias).
|
|
1365
1365
|
|
|
1366
|
-
The MCP tool keeps the one parameter it always had (see mcp_server._plugin_tool)
|
|
1366
|
+
The MCP tool keeps the one parameter it always had (see mcp_server._plugin_tool) -
|
|
1367
1367
|
the alias changes what THIS parser accepts, nothing about the declared arguments.
|
|
1368
1368
|
A mutually exclusive group lets either form fill the same dest: both at once is a
|
|
1369
1369
|
parser refusal ("not allowed with argument ..."), and required carries over to the
|
|
@@ -1371,7 +1371,7 @@ def _add_aliased_positional(parser, argument):
|
|
|
1371
1371
|
|
|
1372
1372
|
Neither half writes a default: an option left at its own implicit default of None
|
|
1373
1373
|
would win the namespace the moment the parser builds it (the option is added second,
|
|
1374
|
-
and it is not the positional's nargs="?" default that argparse falls back to first)
|
|
1374
|
+
and it is not the positional's nargs="?" default that argparse falls back to first) -
|
|
1375
1375
|
silently overriding a non-None default the plugin declared. With both halves quiet the
|
|
1376
1376
|
dest stays out of the namespace whenever neither form is given, and _plugin_handler
|
|
1377
1377
|
already falls back to Argument.value_default for exactly that case, the same way it
|
|
@@ -1612,7 +1612,7 @@ def build_parser():
|
|
|
1612
1612
|
version=f"elemctl {__version__}")
|
|
1613
1613
|
|
|
1614
1614
|
# title= renders the list under a "commands:" heading instead of argparse's default
|
|
1615
|
-
# "positional arguments: command"
|
|
1615
|
+
# "positional arguments: command" - the same heading the sibling tools use.
|
|
1616
1616
|
sub = parser.add_subparsers(
|
|
1617
1617
|
dest="command",
|
|
1618
1618
|
metavar=i18n.t("cli.help.command-metavar"),
|
|
@@ -67,7 +67,7 @@ CALCULATION_RULE_FIELDS = ("response-kind", "presentation-rule", "phone-rule", "
|
|
|
67
67
|
def extract_assembly_id(payload):
|
|
68
68
|
"""Extract the assembly id out of a platform response.
|
|
69
69
|
|
|
70
|
-
The image-id, assembly-id and id fields are checked
|
|
70
|
+
The image-id, assembly-id and id fields are checked - in exactly that order.
|
|
71
71
|
"""
|
|
72
72
|
if not isinstance(payload, dict):
|
|
73
73
|
return None
|
|
@@ -82,7 +82,7 @@ def extract_project_id(payload):
|
|
|
82
82
|
"""Extract the project id out of a build upload response.
|
|
83
83
|
|
|
84
84
|
On an upload without a project id the platform answers with the build id and
|
|
85
|
-
an artifact
|
|
85
|
+
an artifact - that artifact IS the project the build landed in (verified by a
|
|
86
86
|
live call: the artifact-id opens as a project card). The plain id field is
|
|
87
87
|
deliberately not looked at: at the top level it is the id of the build.
|
|
88
88
|
"""
|
|
@@ -264,7 +264,7 @@ def brief_app(app):
|
|
|
264
264
|
The full card carries user lists, development-environment flags and other
|
|
265
265
|
things a listing does not need: a space of some fifty applications makes
|
|
266
266
|
tens of thousands of characters of response. The version is taken from
|
|
267
|
-
source
|
|
267
|
+
source - that is the build actually applied, the one a deploy is verified
|
|
268
268
|
against.
|
|
269
269
|
"""
|
|
270
270
|
source = app.get("source") or {}
|
|
@@ -282,7 +282,7 @@ def apps_summary(listing):
|
|
|
282
282
|
"""The count line of a listing: how many applications are alive out of how many.
|
|
283
283
|
|
|
284
284
|
Deleted applications are hidden by default, and a cut nobody is told about is
|
|
285
|
-
exactly the kind of help that misleads
|
|
285
|
+
exactly the kind of help that misleads - so the answer of list_apps_counted is
|
|
286
286
|
put into a line: how many cards the platform gave (`total`), how many of them
|
|
287
287
|
are not deleted (`live`) and, when the answer holds something else than the
|
|
288
288
|
live ones, how many are actually shown (`shown`). The CLI prints it, the MCP
|
|
@@ -355,7 +355,7 @@ def sign_in_hint(app):
|
|
|
355
355
|
|
|
356
356
|
A new application gets its OWN, EMPTY user list, password sign-in off and
|
|
357
357
|
no account service attached, so the accounts used to sign in to other
|
|
358
|
-
applications do not work here
|
|
358
|
+
applications do not work here - neither connecting another application's
|
|
359
359
|
user list (`POST /applications/{id}/userlists`) nor enabling the local
|
|
360
360
|
sign-in changes it. What does work is a CONTROL PANEL
|
|
361
361
|
account: its users are connected to the application by the platform itself
|
|
@@ -363,7 +363,7 @@ def sign_in_hint(app):
|
|
|
363
363
|
so out loud instead of leaving the caller to guess (section 6.11 of the
|
|
364
364
|
specification).
|
|
365
365
|
|
|
366
|
-
The card of an application that is still starting has no `uri` yet
|
|
366
|
+
The card of an application that is still starting has no `uri` yet - then
|
|
367
367
|
the address is missing rather than invented, and the hint says where to get
|
|
368
368
|
it. Shared by the CLI and the MCP server.
|
|
369
369
|
"""
|
|
@@ -391,7 +391,7 @@ class ElementClient:
|
|
|
391
391
|
ca_file=config.ca_file,
|
|
392
392
|
# config.no_proxy defaults to False on a Config built by hand (no from_env in
|
|
393
393
|
# sight), indistinguishable from a from_env that read ELEMCTL_NO_PROXY and
|
|
394
|
-
# resolved it to False
|
|
394
|
+
# resolved it to False - "or None" turns that default back into the transport's
|
|
395
395
|
# own fallback (the process variable), the same as constructing it without the
|
|
396
396
|
# argument at all. A resolved True still means True, unconditionally.
|
|
397
397
|
no_proxy=config.no_proxy or None,
|
|
@@ -493,21 +493,21 @@ class ElementClient:
|
|
|
493
493
|
"""The same list plus the counters the answer has to be read against.
|
|
494
494
|
|
|
495
495
|
Every filter runs on the client, case-insensitively: the platform ignores
|
|
496
|
-
the name query parameter and returns the full list
|
|
496
|
+
the name query parameter and returns the full list - verified by a live
|
|
497
497
|
call. name matches a substring of the APP_NAME_KEYS fields; status matches
|
|
498
498
|
the whole status word, and several of them may be given separated by
|
|
499
499
|
commas ("running,stopped").
|
|
500
500
|
|
|
501
501
|
Deleted applications stay in the platform list under the Deleted status
|
|
502
502
|
keeping their former id, and a stand a few months old carries hundreds of
|
|
503
|
-
them against a handful of live ones
|
|
503
|
+
them against a handful of live ones - so they are hidden unless
|
|
504
504
|
include_deleted is True. Asking for the Deleted status by name counts as
|
|
505
505
|
asking for them: a filter that answers with nothing is worse than no
|
|
506
506
|
filter at all.
|
|
507
507
|
|
|
508
508
|
Hiding cards without saying so is a trap of its own, hence the counters:
|
|
509
|
-
`total`
|
|
510
|
-
are not deleted, `shown`
|
|
509
|
+
`total` - how many the platform answered with, `live` - how many of those
|
|
510
|
+
are not deleted, `shown` - how many are left in `items`. The callers that
|
|
511
511
|
face a human report them (apps_summary); the library keeps the list.
|
|
512
512
|
"""
|
|
513
513
|
payload = self._api("GET", "/applications")
|
|
@@ -543,7 +543,7 @@ class ElementClient:
|
|
|
543
543
|
The name is checked against the name, display-name and
|
|
544
544
|
publication-context fields. Deleted applications (the Deleted status)
|
|
545
545
|
are skipped by default: a later get or deploy on their former id
|
|
546
|
-
answers 404. include_deleted=True brings the former behaviour back
|
|
546
|
+
answers 404. include_deleted=True brings the former behaviour back -
|
|
547
547
|
the search covers all applications, deleted ones included. The card
|
|
548
548
|
from the list is returned, or None.
|
|
549
549
|
"""
|
|
@@ -629,7 +629,7 @@ class ElementClient:
|
|
|
629
629
|
|
|
630
630
|
Irreversible: a re-created application gets a different URL. If the
|
|
631
631
|
development environment holds unpublished changes, the platform answers
|
|
632
|
-
400 FAILED_PRECONDITION
|
|
632
|
+
400 FAILED_PRECONDITION - in that case a hint is added to the error.
|
|
633
633
|
"""
|
|
634
634
|
try:
|
|
635
635
|
return self._api("DELETE", f"/applications/{app_id}")
|
|
@@ -655,7 +655,7 @@ class ElementClient:
|
|
|
655
655
|
A wrapper over POST /applications/{app_id}/actions/debug (ApplicationDebugInfo).
|
|
656
656
|
Requires debugging enabled on the server (config/debug.yml: enabled: true);
|
|
657
657
|
the address points at the platform debug server (the WebSocket protocol),
|
|
658
|
-
the token is a one-time session key. This is not application management
|
|
658
|
+
the token is a one-time session key. This is not application management -
|
|
659
659
|
only reading the debugger connection parameters.
|
|
660
660
|
"""
|
|
661
661
|
return self._api("POST", f"/applications/{app_id}/actions/debug")
|
|
@@ -728,7 +728,7 @@ class ElementClient:
|
|
|
728
728
|
# -- technology version ------------------------------------------------
|
|
729
729
|
|
|
730
730
|
def get_technology_version(self, app_id):
|
|
731
|
-
"""The technology version
|
|
731
|
+
"""The technology version - out of the application card."""
|
|
732
732
|
card = self.get_app(app_id) or {}
|
|
733
733
|
return card.get("technology-version")
|
|
734
734
|
|
|
@@ -770,7 +770,7 @@ class ElementClient:
|
|
|
770
770
|
|
|
771
771
|
A UUID passes through without any requests; any other value is looked up
|
|
772
772
|
by an exact, case-insensitive presentation match. Nothing found is an
|
|
773
|
-
error, several matches is an error listing the ids
|
|
773
|
+
error, several matches is an error listing the ids - the rules of
|
|
774
774
|
resolve_app_id, for the same reason: a command that changes a setting
|
|
775
775
|
must not guess which list it changes.
|
|
776
776
|
"""
|
|
@@ -814,7 +814,7 @@ class ElementClient:
|
|
|
814
814
|
"""Turn self-registration on or off; return the settings as they became.
|
|
815
815
|
|
|
816
816
|
The platform expects the whole settings object, so the current one is
|
|
817
|
-
read first and only the flag is replaced
|
|
817
|
+
read first and only the flag is replaced - the phone-required and
|
|
818
818
|
email-required requirements stay as they were.
|
|
819
819
|
"""
|
|
820
820
|
settings = dict(self.get_self_registration(list_id) or {})
|
|
@@ -833,7 +833,7 @@ class ElementClient:
|
|
|
833
833
|
"""Update one account service of the list; the body is the whole entry.
|
|
834
834
|
|
|
835
835
|
The entry is addressed by its account-service-id, and the platform wants
|
|
836
|
-
it back in full
|
|
836
|
+
it back in full - so the caller passes a card read from
|
|
837
837
|
list_account_services with the fields it needs changed.
|
|
838
838
|
"""
|
|
839
839
|
service_id = service.get("account-service-id")
|
|
@@ -863,10 +863,10 @@ class ElementClient:
|
|
|
863
863
|
|
|
864
864
|
The report is deliberately blunt about what was and was NOT confirmed. The
|
|
865
865
|
platform does not return these rules in a GET of the service, so "the rules are
|
|
866
|
-
in place" cannot be asserted through the API by anyone
|
|
866
|
+
in place" cannot be asserted through the API by anyone - this method included.
|
|
867
867
|
What IS checked: the request was accepted, and re-reading the service shows the
|
|
868
868
|
REST of its card unchanged. A PUT carries the whole entry, so a mistake here
|
|
869
|
-
would quietly drop a neighbouring field
|
|
869
|
+
would quietly drop a neighbouring field - that is what the comparison catches.
|
|
870
870
|
|
|
871
871
|
The rules are applied blind on purpose: recreating the sign-in service resets
|
|
872
872
|
them, and the only way back is to write them again. Whether they took effect is
|
|
@@ -891,7 +891,7 @@ class ElementClient:
|
|
|
891
891
|
"service-type": before.get("account-service-type"),
|
|
892
892
|
"sent": dict(rules),
|
|
893
893
|
"written": True,
|
|
894
|
-
# The platform answers a GET without this key
|
|
894
|
+
# The platform answers a GET without this key - so nothing can confirm the
|
|
895
895
|
# value itself, and saying "verified" here would be a lie.
|
|
896
896
|
"rules-verified": False,
|
|
897
897
|
"returned": (after or {}).get(CALCULATION_RULES_KEY),
|
|
@@ -904,7 +904,7 @@ class ElementClient:
|
|
|
904
904
|
Behind the wording of the control panel there is the account service of
|
|
905
905
|
type Local: it is the one that authenticates by a password. A list
|
|
906
906
|
without such a service (an application that only signs in through an
|
|
907
|
-
external service) is not an error
|
|
907
|
+
external service) is not an error - there is simply nothing to change,
|
|
908
908
|
and the answer says so.
|
|
909
909
|
"""
|
|
910
910
|
for service in self.list_account_services(list_id):
|
|
@@ -933,7 +933,7 @@ class ElementClient:
|
|
|
933
933
|
the full list whatever the query. name is a case-insensitive substring
|
|
934
934
|
of the PROJECT_NAME_KEYS fields. Deleted projects stay in the platform
|
|
935
935
|
list under the `deleted` flag, and a stand a few months old carries
|
|
936
|
-
hundreds of them against a handful of live ones
|
|
936
|
+
hundreds of them against a handful of live ones - so they are hidden
|
|
937
937
|
unless include_deleted is True, which brings the former, unfiltered
|
|
938
938
|
list back.
|
|
939
939
|
"""
|
|
@@ -1206,7 +1206,7 @@ class ElementClient:
|
|
|
1206
1206
|
self._sleep(READ_RETRY_PAUSE)
|
|
1207
1207
|
|
|
1208
1208
|
def list_app_tasks(self, app_id=""):
|
|
1209
|
-
"""Application tasks; there is no server-side filter
|
|
1209
|
+
"""Application tasks; there is no server-side filter - we filter on the client.
|
|
1210
1210
|
|
|
1211
1211
|
The platform hands over the tasks of every application at once, so the answer grows
|
|
1212
1212
|
with the stand, and this is the read that breaks off. A wait for a new application
|
|
@@ -1227,7 +1227,7 @@ class ElementClient:
|
|
|
1227
1227
|
"""The error texts of the application's failed tasks, the freshest first.
|
|
1228
1228
|
|
|
1229
1229
|
The platform puts a generic "unknown error" into the application card,
|
|
1230
|
-
while the details (for a build
|
|
1230
|
+
while the details (for a build - the file, the line and the column of
|
|
1231
1231
|
every compilation error) it gives away in the task's error-message
|
|
1232
1232
|
field. That is exactly what this method is for: without it the cause
|
|
1233
1233
|
has to be looked for in the server logs.
|
|
@@ -1371,7 +1371,7 @@ class ElementClient:
|
|
|
1371
1371
|
|
|
1372
1372
|
Deletion is asynchronous: the call returns right away, and the
|
|
1373
1373
|
application lives on for a while with a DeleteApplication task. The
|
|
1374
|
-
distinction matters to whoever deletes the build afterwards
|
|
1374
|
+
distinction matters to whoever deletes the build afterwards - while the
|
|
1375
1375
|
application exists, the platform rejects that with a 500. A gone
|
|
1376
1376
|
application is a 404 to the card request or the Deleted status. Running
|
|
1377
1377
|
out of the timeout is an answer (False), not an exception: the caller is
|
|
@@ -1404,7 +1404,7 @@ class ElementClient:
|
|
|
1404
1404
|
stabilize. A stable Error is an immediate error carrying the error
|
|
1405
1405
|
texts of the tasks: the apply has failed, a restart does not cure that,
|
|
1406
1406
|
while waiting for Stopped out of Error used to simply eat the whole
|
|
1407
|
-
timeout. When the outcome is not Running
|
|
1407
|
+
timeout. When the outcome is not Running - we stop the application (if
|
|
1408
1408
|
needed), wait for Stopped, start it and wait for Running.
|
|
1409
1409
|
"""
|
|
1410
1410
|
card = self.wait_app_stable(app_id, timeout=START_TIMEOUT, log=log)
|
|
@@ -48,7 +48,7 @@ def parse_bool(value, *, name):
|
|
|
48
48
|
|
|
49
49
|
def ensure_env_file_exists(env_file):
|
|
50
50
|
"""Raise the clear ConfigError Config.from_env gives a bad explicit env_file, without
|
|
51
|
-
building a Config
|
|
51
|
+
building a Config - so the CLI's mcp command can fail fast on a bad --env-file at
|
|
52
52
|
startup, before Config.from_env's own check would only ever run on the first call.
|
|
53
53
|
|
|
54
54
|
Returns the resolved Path on success, since from_env needs it right after this check too.
|
|
@@ -112,7 +112,7 @@ class Config:
|
|
|
112
112
|
tls_strict: bool = True
|
|
113
113
|
#: Bypass the environment's proxy for every request of this configuration (ELEMCTL_NO_PROXY).
|
|
114
114
|
#: A tool-behaviour switch rather than a platform contract field, so it has no ENV_KEYS
|
|
115
|
-
#: entry of its own
|
|
115
|
+
#: entry of its own - from_env resolves it through its own explicit-argument/NO_PROXY_ENV
|
|
116
116
|
#: precedence instead.
|
|
117
117
|
no_proxy: bool = False
|
|
118
118
|
timeout: float = field(default=DEFAULT_TIMEOUT)
|
|
@@ -129,8 +129,8 @@ class Config:
|
|
|
129
129
|
def from_env(cls, env_file=None, environ=None, **overrides):
|
|
130
130
|
"""Collect the configuration: explicit arguments > environment > .env file.
|
|
131
131
|
|
|
132
|
-
env_file
|
|
133
|
-
directory is taken, if it exists. environ
|
|
132
|
+
env_file - the path to the .env; without it the .env file in the current
|
|
133
|
+
directory is taken, if it exists. environ - the source of the environment
|
|
134
134
|
variables (os.environ by default; the parameter is there for the tests).
|
|
135
135
|
"""
|
|
136
136
|
env = os.environ if environ is None else environ
|
|
@@ -163,8 +163,8 @@ class Config:
|
|
|
163
163
|
elif file_values.get(env_key) not in (None, ""):
|
|
164
164
|
values[field_name] = parse_bool(file_values[env_key], name=env_key)
|
|
165
165
|
|
|
166
|
-
# no_proxy follows the same three-source precedence as every other field above
|
|
167
|
-
# explicit argument, then process environment, then the file
|
|
166
|
+
# no_proxy follows the same three-source precedence as every other field above -
|
|
167
|
+
# explicit argument, then process environment, then the file - but not the strict
|
|
168
168
|
# parse_bool of BOOL_ENV_KEYS: it keeps the permissive reading ELEMCTL_NO_PROXY always
|
|
169
169
|
# had, so a typo does not raise where it used to just leave the proxy in place. The
|
|
170
170
|
# file source matters for MCP: a call only carries env_file, and a process variable
|