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.
Files changed (99) hide show
  1. kaiten_cli/__init__.py +5 -0
  2. kaiten_cli/__main__.py +9 -0
  3. kaiten_cli/agent_gateway.py +577 -0
  4. kaiten_cli/app.py +1636 -0
  5. kaiten_cli/completion.py +570 -0
  6. kaiten_cli/discovery.py +39 -0
  7. kaiten_cli/errors.py +79 -0
  8. kaiten_cli/i18n.py +92 -0
  9. kaiten_cli/locales/ru.json +2967 -0
  10. kaiten_cli/localized_click.py +160 -0
  11. kaiten_cli/models.py +202 -0
  12. kaiten_cli/profiles.py +316 -0
  13. kaiten_cli/registry/__init__.py +260 -0
  14. kaiten_cli/registry/addons.py +392 -0
  15. kaiten_cli/registry/audit_and_analytics.py +451 -0
  16. kaiten_cli/registry/automation_schema.py +44 -0
  17. kaiten_cli/registry/automation_schemas.json +7417 -0
  18. kaiten_cli/registry/automations.py +342 -0
  19. kaiten_cli/registry/base.py +62 -0
  20. kaiten_cli/registry/blockers.py +320 -0
  21. kaiten_cli/registry/boards.py +520 -0
  22. kaiten_cli/registry/card_relations.py +376 -0
  23. kaiten_cli/registry/card_types.py +363 -0
  24. kaiten_cli/registry/cards.py +1329 -0
  25. kaiten_cli/registry/charts.py +539 -0
  26. kaiten_cli/registry/checklists.py +600 -0
  27. kaiten_cli/registry/columns.py +558 -0
  28. kaiten_cli/registry/comments.py +224 -0
  29. kaiten_cli/registry/custom_directories.py +980 -0
  30. kaiten_cli/registry/custom_properties.py +1460 -0
  31. kaiten_cli/registry/dashboards.py +564 -0
  32. kaiten_cli/registry/documents.py +761 -0
  33. kaiten_cli/registry/external_links.py +128 -0
  34. kaiten_cli/registry/files.py +738 -0
  35. kaiten_cli/registry/github_addon.py +613 -0
  36. kaiten_cli/registry/iterations.py +397 -0
  37. kaiten_cli/registry/lanes.py +205 -0
  38. kaiten_cli/registry/live_contracts.py +361 -0
  39. kaiten_cli/registry/members.py +336 -0
  40. kaiten_cli/registry/module_docs.py +108 -0
  41. kaiten_cli/registry/projects.py +369 -0
  42. kaiten_cli/registry/query.py +129 -0
  43. kaiten_cli/registry/restrictions.py +249 -0
  44. kaiten_cli/registry/roles_and_groups.py +1102 -0
  45. kaiten_cli/registry/scim.py +263 -0
  46. kaiten_cli/registry/service_desk.py +1270 -0
  47. kaiten_cli/registry/snapshot.py +187 -0
  48. kaiten_cli/registry/spaces.py +272 -0
  49. kaiten_cli/registry/subscribers.py +168 -0
  50. kaiten_cli/registry/tags.py +193 -0
  51. kaiten_cli/registry/time_logs.py +353 -0
  52. kaiten_cli/registry/tree.py +352 -0
  53. kaiten_cli/registry/utilities.py +287 -0
  54. kaiten_cli/registry/webhooks.py +265 -0
  55. kaiten_cli/runtime/__init__.py +1 -0
  56. kaiten_cli/runtime/automation_validation.py +115 -0
  57. kaiten_cli/runtime/behaviors.py +787 -0
  58. kaiten_cli/runtime/cache.py +733 -0
  59. kaiten_cli/runtime/client.py +387 -0
  60. kaiten_cli/runtime/endpoints.py +59 -0
  61. kaiten_cli/runtime/executor.py +269 -0
  62. kaiten_cli/runtime/fs_security.py +168 -0
  63. kaiten_cli/runtime/input.py +310 -0
  64. kaiten_cli/runtime/output.py +59 -0
  65. kaiten_cli/runtime/public_validation.py +35 -0
  66. kaiten_cli/runtime/snapshot_build.py +527 -0
  67. kaiten_cli/runtime/snapshot_common.py +363 -0
  68. kaiten_cli/runtime/snapshot_query.py +306 -0
  69. kaiten_cli/runtime/snapshot_store.py +1192 -0
  70. kaiten_cli/runtime/snapshots.py +62 -0
  71. kaiten_cli/runtime/sqlite_errors.py +23 -0
  72. kaiten_cli/runtime/support/__init__.py +1 -0
  73. kaiten_cli/runtime/support/addons.py +953 -0
  74. kaiten_cli/runtime/support/audit.py +70 -0
  75. kaiten_cli/runtime/support/batch.py +234 -0
  76. kaiten_cli/runtime/support/card_move_url.py +213 -0
  77. kaiten_cli/runtime/support/cards.py +174 -0
  78. kaiten_cli/runtime/support/checklists.py +21 -0
  79. kaiten_cli/runtime/support/company_users.py +117 -0
  80. kaiten_cli/runtime/support/dashboards.py +35 -0
  81. kaiten_cli/runtime/support/documents.py +175 -0
  82. kaiten_cli/runtime/support/files.py +561 -0
  83. kaiten_cli/runtime/support/markdown_export.py +525 -0
  84. kaiten_cli/runtime/support/pagination.py +167 -0
  85. kaiten_cli/runtime/support/projects.py +66 -0
  86. kaiten_cli/runtime/support/relations.py +86 -0
  87. kaiten_cli/runtime/support/restrictions.py +62 -0
  88. kaiten_cli/runtime/support/spaces.py +20 -0
  89. kaiten_cli/runtime/support/time_logs.py +61 -0
  90. kaiten_cli/runtime/support/tree.py +140 -0
  91. kaiten_cli/runtime/support/tree_sharing.py +447 -0
  92. kaiten_cli/runtime/trace.py +500 -0
  93. kaiten_cli/runtime/transforms.py +128 -0
  94. kaiten_cli/schema_docs.py +22 -0
  95. kaiten_cli/update_check.py +519 -0
  96. kaiten_cli-0.3.3.dist-info/METADATA +1110 -0
  97. kaiten_cli-0.3.3.dist-info/RECORD +99 -0
  98. kaiten_cli-0.3.3.dist-info/WHEEL +4 -0
  99. 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."""