stkit 17.0.0__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 (128) hide show
  1. stk/__init__.py +19 -0
  2. stk/__main__.py +6 -0
  3. stk/agent_login.py +78 -0
  4. stk/app.py +323 -0
  5. stk/checks.py +634 -0
  6. stk/cli/__init__.py +49 -0
  7. stk/cli/agent.py +267 -0
  8. stk/cli/base.py +79 -0
  9. stk/cli/database.py +199 -0
  10. stk/cli/develop.py +63 -0
  11. stk/cli/doctor.py +262 -0
  12. stk/cli/main.py +101 -0
  13. stk/cli/reports.py +296 -0
  14. stk/cli/smoke.py +399 -0
  15. stk/cli/users.py +259 -0
  16. stk/cli/watch.py +68 -0
  17. stk/extensions.py +29 -0
  18. stk/migrations/__init__.py +130 -0
  19. stk/migrations/env.py +58 -0
  20. stk/migrations/script.py.mako +17 -0
  21. stk/migrations/versions/stk_0001_initial_schema.py +213 -0
  22. stk/portal/views.py +34 -0
  23. stk/public/__init__.py +0 -0
  24. stk/public/models.py +0 -0
  25. stk/public/views.py +344 -0
  26. stk/scaffold/__init__.py +1 -0
  27. stk/scaffold/app/CLAUDE.md +65 -0
  28. stk/scaffold/app/Dockerfile +41 -0
  29. stk/scaffold/app/README.md +16 -0
  30. stk/scaffold/app/__app__/__init__.py +1 -0
  31. stk/scaffold/app/__app__/app.py +8 -0
  32. stk/scaffold/app/__app__/settings.py +7 -0
  33. stk/scaffold/app/claude/skills/stk-api/SKILL.md +52 -0
  34. stk/scaffold/app/claude/skills/stk-blueprint/SKILL.md +48 -0
  35. stk/scaffold/app/claude/skills/stk-deploy/SKILL.md +61 -0
  36. stk/scaffold/app/claude/skills/stk-lessons/SKILL.md +58 -0
  37. stk/scaffold/app/claude/skills/stk-migrate/SKILL.md +96 -0
  38. stk/scaffold/app/docker-compose.yml +88 -0
  39. stk/scaffold/app/dockerignore +13 -0
  40. stk/scaffold/app/env-sample +78 -0
  41. stk/scaffold/app/gitignore +8 -0
  42. stk/scaffold/app/nginx/nginx.conf +46 -0
  43. stk/scaffold/app/nginx/stk.conf +36 -0
  44. stk/scaffold/app/postgres/init-db.sh +8 -0
  45. stk/scaffold/app/pyproject.toml +23 -0
  46. stk/scaffold/app/tests/__init__.py +0 -0
  47. stk/scaffold/app/tests/test_app.py +23 -0
  48. stk/scaffold/generator.py +209 -0
  49. stk/scaffold/templates.py +437 -0
  50. stk/security.py +145 -0
  51. stk/settings.py +147 -0
  52. stk/shell.py +284 -0
  53. stk/static/VERSIONS.txt +4 -0
  54. stk/static/css/app.css +229 -0
  55. stk/static/css/layout.css +330 -0
  56. stk/static/css/vuetify.min.css +6 -0
  57. stk/static/icons/fonts/tabler-icons.woff2 +0 -0
  58. stk/static/icons/tabler-icons.min.css +4 -0
  59. stk/static/img/auth-bg.webp +0 -0
  60. stk/static/img/favicon.ico +0 -0
  61. stk/static/img/stk.svg +1664 -0
  62. stk/static/js/axios.min.js +5 -0
  63. stk/static/js/components/NotificationDropdown.js +156 -0
  64. stk/static/js/components/ThemeSwitcher.js +68 -0
  65. stk/static/js/components/TransitionExpand.js +64 -0
  66. stk/static/js/components/VerticalNavGroup.js +119 -0
  67. stk/static/js/components/VerticalNavLink.js +36 -0
  68. stk/static/js/components/VerticalNavSectionTitle.js +21 -0
  69. stk/static/js/components/index.js +47 -0
  70. stk/static/js/config.js +150 -0
  71. stk/static/js/vue.min.js +13 -0
  72. stk/static/js/vuetify.min.js +3148 -0
  73. stk/static/robots.txt +1 -0
  74. stk/tasks/__init__.py +78 -0
  75. stk/templates/401.html +14 -0
  76. stk/templates/404.html +12 -0
  77. stk/templates/500.html +13 -0
  78. stk/templates/_brand.html +1 -0
  79. stk/templates/auth_layout.html +26 -0
  80. stk/templates/cms/activities.html +135 -0
  81. stk/templates/cms/roles.html +215 -0
  82. stk/templates/cms/users.html +312 -0
  83. stk/templates/dashboard.html +132 -0
  84. stk/templates/index.html +52 -0
  85. stk/templates/layout.html +328 -0
  86. stk/templates/login-layout.html +54 -0
  87. stk/templates/security/_macros.html +39 -0
  88. stk/templates/security/_messages.html +12 -0
  89. stk/templates/security/change_password.html +100 -0
  90. stk/templates/security/confirm_email.html +44 -0
  91. stk/templates/security/email/change_notice.html +4 -0
  92. stk/templates/security/email/change_notice.txt +5 -0
  93. stk/templates/security/email/confirmation_instructions.html +3 -0
  94. stk/templates/security/email/confirmation_instructions.txt +3 -0
  95. stk/templates/security/email/login_instructions.html +5 -0
  96. stk/templates/security/email/login_instructions.txt +5 -0
  97. stk/templates/security/email/reset_instructions.html +1 -0
  98. stk/templates/security/email/reset_instructions.txt +3 -0
  99. stk/templates/security/email/reset_notice.html +1 -0
  100. stk/templates/security/email/reset_notice.txt +1 -0
  101. stk/templates/security/email/welcome.html +7 -0
  102. stk/templates/security/email/welcome.txt +7 -0
  103. stk/templates/security/forgot_password.html +63 -0
  104. stk/templates/security/login_user.html +206 -0
  105. stk/templates/security/mf_recovery.html +67 -0
  106. stk/templates/security/mf_recovery_codes.html +119 -0
  107. stk/templates/security/register_user.html +263 -0
  108. stk/templates/security/reset_password.html +53 -0
  109. stk/templates/security/send_confirmation.html +48 -0
  110. stk/templates/security/send_login.html +39 -0
  111. stk/templates/security/two_factor_select.html +78 -0
  112. stk/templates/security/two_factor_setup.html +166 -0
  113. stk/templates/security/two_factor_verify_code.html +71 -0
  114. stk/templates/security/wan_register.html +179 -0
  115. stk/templates/security/wan_signin.html +123 -0
  116. stk/templates/security/wan_verify.html +109 -0
  117. stk/user/__init__.py +0 -0
  118. stk/user/forms.py +10 -0
  119. stk/user/models.py +308 -0
  120. stk/user/views.py +339 -0
  121. stk/utils/email.py +32 -0
  122. stk/utils/ratelimit.py +67 -0
  123. stk/websocket.py +133 -0
  124. stkit-17.0.0.dist-info/METADATA +135 -0
  125. stkit-17.0.0.dist-info/RECORD +128 -0
  126. stkit-17.0.0.dist-info/WHEEL +4 -0
  127. stkit-17.0.0.dist-info/entry_points.txt +2 -0
  128. stkit-17.0.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,47 @@
1
+ /**
2
+ * stk Components Registration
3
+ * Registers all custom components globally on a Vue app
4
+ */
5
+
6
+ function registerStkComponents(app) {
7
+ // Register transition component
8
+ app.component('transition-expand', TransitionExpand);
9
+
10
+ // Register navigation components
11
+ app.component('vertical-nav-link', VerticalNavLink);
12
+ app.component('vertical-nav-group', VerticalNavGroup);
13
+ app.component('vertical-nav-section-title', VerticalNavSectionTitle);
14
+
15
+ // Register UI components
16
+ app.component('notification-dropdown', NotificationDropdown);
17
+ app.component('theme-switcher', ThemeSwitcher);
18
+
19
+ return app;
20
+ }
21
+
22
+ /**
23
+ * Helper to resolve which component to use for a nav item
24
+ */
25
+ function resolveNavComponent(item) {
26
+ if ('heading' in item) return 'vertical-nav-section-title';
27
+ if ('children' in item) return 'vertical-nav-group';
28
+ return 'vertical-nav-link';
29
+ }
30
+
31
+ /**
32
+ * Filter navigation items by user role
33
+ * @param {Array} items - Navigation items
34
+ * @param {Array} userRoles - User's roles (e.g., ['admin', 'user'])
35
+ * @returns {Array} Filtered navigation items
36
+ */
37
+ function filterNavByRole(items, userRoles = []) {
38
+ // Pure on purpose: this runs inside a computed, so mutating a nav item would
39
+ // re-trigger that computed forever (Vue 3.5 prod loops instead of warning).
40
+ return items
41
+ .filter(item => !item.role || userRoles.includes(item.role))
42
+ .map(item =>
43
+ item.children
44
+ ? { ...item, children: filterNavByRole(item.children, userRoles) }
45
+ : item
46
+ );
47
+ }
@@ -0,0 +1,150 @@
1
+ /**
2
+ * stk Framework - Central Configuration
3
+ * Monochrome brutalist palette
4
+ */
5
+
6
+ const config = {
7
+ // Common Vue settings
8
+ delimiters: ['${', '}'],
9
+
10
+ // Vuetify configuration
11
+ vuetifyConfig: {
12
+ // Tabler icon set for Vuetify's internal component icons (data-table
13
+ // sort/pagination, select dropdown, checkboxes, alerts). Without this
14
+ // Vuetify defaults to mdi aliases, which render blank since we ship no
15
+ // MDI font. Pass-through any explicit "ti ti-*" string; prefix bare names.
16
+ icons: {
17
+ defaultSet: 'tabler',
18
+ sets: {
19
+ tabler: {
20
+ component: (props) => {
21
+ const icon = props.icon || '';
22
+ const cls = (icon.startsWith('ti ') || icon.startsWith('ti-'))
23
+ ? icon
24
+ : `ti ti-${icon}`;
25
+ return Vue.h(props.tag, { class: cls });
26
+ }
27
+ }
28
+ },
29
+ aliases: {
30
+ complete: 'check',
31
+ cancel: 'circle-x',
32
+ close: 'x',
33
+ delete: 'x',
34
+ clear: 'circle-x',
35
+ success: 'circle-check',
36
+ info: 'info-circle',
37
+ warning: 'alert-triangle',
38
+ error: 'alert-circle',
39
+ prev: 'chevron-left',
40
+ next: 'chevron-right',
41
+ checkboxOn: 'square-check',
42
+ checkboxOff: 'square',
43
+ checkboxIndeterminate: 'square-minus',
44
+ delimiter: 'circle',
45
+ sortAsc: 'arrow-up',
46
+ sortDesc: 'arrow-down',
47
+ expand: 'chevron-down',
48
+ menu: 'menu-2',
49
+ subgroup: 'chevron-down',
50
+ dropdown: 'chevron-down',
51
+ radioOn: 'circle-check',
52
+ radioOff: 'circle',
53
+ edit: 'pencil',
54
+ ratingEmpty: 'star',
55
+ ratingFull: 'star-filled',
56
+ ratingHalf: 'star-half-filled',
57
+ loading: 'loader-2',
58
+ first: 'chevrons-left',
59
+ last: 'chevrons-right',
60
+ unfold: 'arrows-sort',
61
+ file: 'paperclip',
62
+ plus: 'plus',
63
+ minus: 'minus',
64
+ calendar: 'calendar',
65
+ treeviewCollapse: 'chevron-down',
66
+ treeviewExpand: 'chevron-right',
67
+ eyeDropper: 'color-picker',
68
+ upload: 'upload',
69
+ color: 'palette'
70
+ }
71
+ },
72
+ defaults: {
73
+ VTextField: {
74
+ variant: 'outlined'
75
+ },
76
+ VSelect: {
77
+ variant: 'outlined'
78
+ },
79
+ VTextarea: {
80
+ variant: 'outlined'
81
+ },
82
+ VCombobox: {
83
+ variant: 'outlined'
84
+ },
85
+ VChip: {
86
+ size: 'small',
87
+ rounded: 'sm'
88
+ },
89
+ VCard: {
90
+ elevation: 0,
91
+ rounded: 0
92
+ },
93
+ VMenu: {
94
+ offset: 10
95
+ },
96
+ VBtn: {
97
+ variant: 'elevated',
98
+ size: 'small',
99
+ rounded: 0
100
+ },
101
+ VDialog: {
102
+ rounded: 0
103
+ },
104
+ VToolbar: {
105
+ elevation: 0
106
+ },
107
+ VDataTableServer: {
108
+ itemsPerPage: 25,
109
+ itemsPerPageOptions: [25, 50, 100]
110
+ }
111
+ },
112
+ theme: {
113
+ defaultTheme: window.__settings__?.dark ? 'dark' : 'light',
114
+ themes: {
115
+ light: {
116
+ dark: false,
117
+ colors: {
118
+ primary: '#1a1a1a',
119
+ secondary: '#555555',
120
+ accent: '#333333',
121
+ error: '#b91c1c',
122
+ info: '#1a1a1a',
123
+ success: '#166534',
124
+ warning: '#a16207',
125
+ background: '#fafafa',
126
+ surface: '#fafafa',
127
+ 'surface-light': '#f0f0f0',
128
+ 'on-surface': '#1a1a1a',
129
+ }
130
+ },
131
+ dark: {
132
+ dark: true,
133
+ colors: {
134
+ primary: '#e5e5e5',
135
+ secondary: '#a3a3a3',
136
+ accent: '#d4d4d4',
137
+ error: '#fca5a5',
138
+ info: '#e5e5e5',
139
+ success: '#86efac',
140
+ warning: '#fde047',
141
+ background: '#0a0a0a',
142
+ surface: '#141414',
143
+ 'surface-light': '#262626',
144
+ 'on-surface': '#e5e5e5',
145
+ }
146
+ }
147
+ }
148
+ }
149
+ }
150
+ };