kaiten-cli 0.3.3__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.
- kaiten_cli/__init__.py +5 -0
- kaiten_cli/__main__.py +9 -0
- kaiten_cli/agent_gateway.py +577 -0
- kaiten_cli/app.py +1636 -0
- kaiten_cli/completion.py +570 -0
- kaiten_cli/discovery.py +39 -0
- kaiten_cli/errors.py +79 -0
- kaiten_cli/i18n.py +92 -0
- kaiten_cli/locales/ru.json +2967 -0
- kaiten_cli/localized_click.py +160 -0
- kaiten_cli/models.py +202 -0
- kaiten_cli/profiles.py +316 -0
- kaiten_cli/registry/__init__.py +260 -0
- kaiten_cli/registry/addons.py +392 -0
- kaiten_cli/registry/audit_and_analytics.py +451 -0
- kaiten_cli/registry/automation_schema.py +44 -0
- kaiten_cli/registry/automation_schemas.json +7417 -0
- kaiten_cli/registry/automations.py +342 -0
- kaiten_cli/registry/base.py +62 -0
- kaiten_cli/registry/blockers.py +320 -0
- kaiten_cli/registry/boards.py +520 -0
- kaiten_cli/registry/card_relations.py +376 -0
- kaiten_cli/registry/card_types.py +363 -0
- kaiten_cli/registry/cards.py +1329 -0
- kaiten_cli/registry/charts.py +539 -0
- kaiten_cli/registry/checklists.py +600 -0
- kaiten_cli/registry/columns.py +558 -0
- kaiten_cli/registry/comments.py +224 -0
- kaiten_cli/registry/custom_directories.py +980 -0
- kaiten_cli/registry/custom_properties.py +1460 -0
- kaiten_cli/registry/dashboards.py +564 -0
- kaiten_cli/registry/documents.py +761 -0
- kaiten_cli/registry/external_links.py +128 -0
- kaiten_cli/registry/files.py +738 -0
- kaiten_cli/registry/github_addon.py +613 -0
- kaiten_cli/registry/iterations.py +397 -0
- kaiten_cli/registry/lanes.py +205 -0
- kaiten_cli/registry/live_contracts.py +361 -0
- kaiten_cli/registry/members.py +336 -0
- kaiten_cli/registry/module_docs.py +108 -0
- kaiten_cli/registry/projects.py +369 -0
- kaiten_cli/registry/query.py +129 -0
- kaiten_cli/registry/restrictions.py +249 -0
- kaiten_cli/registry/roles_and_groups.py +1102 -0
- kaiten_cli/registry/scim.py +263 -0
- kaiten_cli/registry/service_desk.py +1270 -0
- kaiten_cli/registry/snapshot.py +187 -0
- kaiten_cli/registry/spaces.py +272 -0
- kaiten_cli/registry/subscribers.py +168 -0
- kaiten_cli/registry/tags.py +193 -0
- kaiten_cli/registry/time_logs.py +353 -0
- kaiten_cli/registry/tree.py +352 -0
- kaiten_cli/registry/utilities.py +287 -0
- kaiten_cli/registry/webhooks.py +265 -0
- kaiten_cli/runtime/__init__.py +1 -0
- kaiten_cli/runtime/automation_validation.py +115 -0
- kaiten_cli/runtime/behaviors.py +787 -0
- kaiten_cli/runtime/cache.py +733 -0
- kaiten_cli/runtime/client.py +387 -0
- kaiten_cli/runtime/endpoints.py +59 -0
- kaiten_cli/runtime/executor.py +269 -0
- kaiten_cli/runtime/fs_security.py +168 -0
- kaiten_cli/runtime/input.py +310 -0
- kaiten_cli/runtime/output.py +59 -0
- kaiten_cli/runtime/public_validation.py +35 -0
- kaiten_cli/runtime/snapshot_build.py +527 -0
- kaiten_cli/runtime/snapshot_common.py +363 -0
- kaiten_cli/runtime/snapshot_query.py +306 -0
- kaiten_cli/runtime/snapshot_store.py +1192 -0
- kaiten_cli/runtime/snapshots.py +62 -0
- kaiten_cli/runtime/sqlite_errors.py +23 -0
- kaiten_cli/runtime/support/__init__.py +1 -0
- kaiten_cli/runtime/support/addons.py +953 -0
- kaiten_cli/runtime/support/audit.py +70 -0
- kaiten_cli/runtime/support/batch.py +234 -0
- kaiten_cli/runtime/support/card_move_url.py +213 -0
- kaiten_cli/runtime/support/cards.py +174 -0
- kaiten_cli/runtime/support/checklists.py +21 -0
- kaiten_cli/runtime/support/company_users.py +117 -0
- kaiten_cli/runtime/support/dashboards.py +35 -0
- kaiten_cli/runtime/support/documents.py +175 -0
- kaiten_cli/runtime/support/files.py +561 -0
- kaiten_cli/runtime/support/markdown_export.py +525 -0
- kaiten_cli/runtime/support/pagination.py +167 -0
- kaiten_cli/runtime/support/projects.py +66 -0
- kaiten_cli/runtime/support/relations.py +86 -0
- kaiten_cli/runtime/support/restrictions.py +62 -0
- kaiten_cli/runtime/support/spaces.py +20 -0
- kaiten_cli/runtime/support/time_logs.py +61 -0
- kaiten_cli/runtime/support/tree.py +140 -0
- kaiten_cli/runtime/support/tree_sharing.py +447 -0
- kaiten_cli/runtime/trace.py +500 -0
- kaiten_cli/runtime/transforms.py +128 -0
- kaiten_cli/schema_docs.py +22 -0
- kaiten_cli/update_check.py +519 -0
- kaiten_cli-0.3.3.dist-info/METADATA +1110 -0
- kaiten_cli-0.3.3.dist-info/RECORD +99 -0
- kaiten_cli-0.3.3.dist-info/WHEEL +4 -0
- kaiten_cli-0.3.3.dist-info/entry_points.txt +3 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
"""Compatibility facade for local snapshot and query commands.
|
|
2
|
+
|
|
3
|
+
Implementations are split by responsibility: SQLite persistence, remote snapshot
|
|
4
|
+
building, and local query/metric execution. Registry imports remain stable here.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from kaiten_cli.runtime.snapshot_build import (
|
|
8
|
+
execute_snapshot_build,
|
|
9
|
+
execute_snapshot_delete,
|
|
10
|
+
execute_snapshot_list,
|
|
11
|
+
execute_snapshot_refresh,
|
|
12
|
+
execute_snapshot_show,
|
|
13
|
+
validate_snapshot_build,
|
|
14
|
+
)
|
|
15
|
+
from kaiten_cli.runtime.snapshot_common import (
|
|
16
|
+
DEFAULT_LOCAL_LIMIT,
|
|
17
|
+
DETAIL_VIEW_FIELDS,
|
|
18
|
+
EVIDENCE_VIEW_FIELDS,
|
|
19
|
+
QUERY_CARD_VIEWS,
|
|
20
|
+
QUERY_FILTER_KEYS,
|
|
21
|
+
QUERY_GROUP_BY,
|
|
22
|
+
QUERY_METRICS,
|
|
23
|
+
SNAPSHOT_DB_SCHEMA_VERSION,
|
|
24
|
+
SNAPSHOT_PRESETS,
|
|
25
|
+
SNAPSHOT_SCHEMA_VERSION,
|
|
26
|
+
SUMMARY_VIEW_FIELDS,
|
|
27
|
+
VIEW_FIELDS,
|
|
28
|
+
WINDOW_PRESETS,
|
|
29
|
+
)
|
|
30
|
+
from kaiten_cli.runtime.snapshot_query import (
|
|
31
|
+
execute_query_cards,
|
|
32
|
+
execute_query_metrics,
|
|
33
|
+
validate_query_filter,
|
|
34
|
+
)
|
|
35
|
+
from kaiten_cli.runtime.snapshot_store import SnapshotStore, snapshot_db_path
|
|
36
|
+
|
|
37
|
+
__all__ = [
|
|
38
|
+
"DEFAULT_LOCAL_LIMIT",
|
|
39
|
+
"DETAIL_VIEW_FIELDS",
|
|
40
|
+
"EVIDENCE_VIEW_FIELDS",
|
|
41
|
+
"QUERY_CARD_VIEWS",
|
|
42
|
+
"QUERY_FILTER_KEYS",
|
|
43
|
+
"QUERY_GROUP_BY",
|
|
44
|
+
"QUERY_METRICS",
|
|
45
|
+
"SNAPSHOT_DB_SCHEMA_VERSION",
|
|
46
|
+
"SNAPSHOT_PRESETS",
|
|
47
|
+
"SNAPSHOT_SCHEMA_VERSION",
|
|
48
|
+
"SUMMARY_VIEW_FIELDS",
|
|
49
|
+
"SnapshotStore",
|
|
50
|
+
"VIEW_FIELDS",
|
|
51
|
+
"WINDOW_PRESETS",
|
|
52
|
+
"execute_query_cards",
|
|
53
|
+
"execute_query_metrics",
|
|
54
|
+
"execute_snapshot_build",
|
|
55
|
+
"execute_snapshot_delete",
|
|
56
|
+
"execute_snapshot_list",
|
|
57
|
+
"execute_snapshot_refresh",
|
|
58
|
+
"execute_snapshot_show",
|
|
59
|
+
"snapshot_db_path",
|
|
60
|
+
"validate_query_filter",
|
|
61
|
+
"validate_snapshot_build",
|
|
62
|
+
]
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"""Classification helpers for safe SQLite recovery."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
import sqlite3
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
_RESETTABLE_PRIMARY_CODES = frozenset(
|
|
9
|
+
{
|
|
10
|
+
getattr(sqlite3, "SQLITE_CORRUPT", 11),
|
|
11
|
+
getattr(sqlite3, "SQLITE_NOTADB", 26),
|
|
12
|
+
}
|
|
13
|
+
)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def is_corrupt_database_error(error: sqlite3.Error) -> bool:
|
|
17
|
+
"""Return whether rebuilding a disposable or derived database is safe."""
|
|
18
|
+
|
|
19
|
+
code = getattr(error, "sqlite_errorcode", None)
|
|
20
|
+
if isinstance(code, int):
|
|
21
|
+
return code & 0xFF in _RESETTABLE_PRIMARY_CODES
|
|
22
|
+
message = str(error).strip().lower()
|
|
23
|
+
return "file is not a database" in message or "database disk image is malformed" in message
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"""Support helpers used by the runtime layer."""
|