mindroot 9.2.0__py3-none-any.whl → 9.5.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.
- mindroot/coreplugins/admin/__init__.py +3 -1
- mindroot/coreplugins/admin/agent_router.py +250 -7
- mindroot/coreplugins/admin/asset_manager.py +164 -0
- mindroot/coreplugins/admin/command_router.py +236 -1
- mindroot/coreplugins/admin/mcp_catalog_routes.py +156 -0
- mindroot/coreplugins/admin/mcp_publish_routes.py +450 -0
- mindroot/coreplugins/admin/mcp_registry_routes.py +495 -0
- mindroot/coreplugins/admin/mcp_routes.py +216 -0
- mindroot/coreplugins/admin/mod.py +62 -0
- mindroot/coreplugins/admin/oauth_callback_router.py +84 -0
- mindroot/coreplugins/admin/persona_handler.py +15 -6
- mindroot/coreplugins/admin/persona_router.py +158 -2
- mindroot/coreplugins/admin/plugin_manager.py +63 -0
- mindroot/coreplugins/admin/plugin_router.py +1 -1
- mindroot/coreplugins/admin/plugin_router_fixed.py +23 -0
- mindroot/coreplugins/admin/plugin_router_new_not_working.py +145 -0
- mindroot/coreplugins/admin/plugin_routes.py +114 -0
- mindroot/coreplugins/admin/registry_settings_routes.py +140 -0
- mindroot/coreplugins/admin/router.py +116 -15
- mindroot/coreplugins/admin/service_models.py +1 -1
- mindroot/coreplugins/admin/settings_router.py +1 -0
- mindroot/coreplugins/admin/static/css/admin-custom.css +357 -2
- mindroot/coreplugins/admin/static/css/dark.css +1 -0
- mindroot/coreplugins/admin/static/css/default.css +4 -0
- mindroot/coreplugins/admin/static/js/about-info.js +367 -0
- mindroot/coreplugins/admin/static/js/agent-form.js +83 -3
- mindroot/coreplugins/admin/static/js/api-key-script.js +307 -0
- mindroot/coreplugins/admin/static/js/mcp-manager.js +348 -0
- mindroot/coreplugins/admin/static/js/mcp-publisher.js +780 -0
- mindroot/coreplugins/admin/static/js/persona-editor.js +34 -5
- mindroot/coreplugins/admin/static/js/plugin-toggle.js +1 -1
- mindroot/coreplugins/admin/static/js/recommended-plugin-install.js +63 -0
- mindroot/coreplugins/admin/static/js/registry-auth-section.js +132 -0
- mindroot/coreplugins/admin/static/js/registry-manager-base.js +613 -0
- mindroot/coreplugins/admin/static/js/registry-manager-old.js +385 -0
- mindroot/coreplugins/admin/static/js/registry-manager-publish-old-delete.js +166 -0
- mindroot/coreplugins/admin/static/js/registry-manager.js +351 -0
- mindroot/coreplugins/admin/static/js/registry-publish-section.js +377 -0
- mindroot/coreplugins/admin/static/js/registry-search-section.js +400 -0
- mindroot/coreplugins/admin/static/js/registry-search-section.js.bak +3 -0
- mindroot/coreplugins/admin/static/js/registry-settings.js +69 -0
- mindroot/coreplugins/admin/static/js/registry-shared-services.js +857 -0
- mindroot/coreplugins/admin/static/js/registry-simple-sections.js +85 -0
- mindroot/coreplugins/admin/static/js/secure-widget-manager.js +438 -0
- mindroot/coreplugins/admin/static/logo.png +0 -0
- mindroot/coreplugins/admin/templates/admin.jinja2 +275 -110
- mindroot/coreplugins/agent/Assistant/agent.json +27 -11
- mindroot/coreplugins/agent/agent.py +2 -2
- mindroot/coreplugins/agent/command_parser.py +25 -10
- mindroot/coreplugins/agent/templates/system.jinja2 +0 -12
- mindroot/coreplugins/chat/__init__.py +4 -1
- mindroot/coreplugins/chat/router.py +132 -20
- mindroot/coreplugins/chat/router_dedup_patch.py +20 -0
- mindroot/coreplugins/chat/services.py +31 -1
- mindroot/coreplugins/chat/static/css/action-fix.css +32 -0
- mindroot/coreplugins/chat/static/css/admin-custom.css +5 -3
- mindroot/coreplugins/chat/static/css/dark.css +24 -3
- mindroot/coreplugins/chat/static/css/default.css +24 -3
- mindroot/coreplugins/chat/static/css/main.css +1 -0
- mindroot/coreplugins/chat/static/js/action.js +137 -60
- mindroot/coreplugins/chat/static/js/chat-history.js +3 -0
- mindroot/coreplugins/chat/static/js/chat.js +59 -16
- mindroot/coreplugins/chat/static/js/chat.js.diff +221 -0
- mindroot/coreplugins/chat/static/js/chatform.js +2 -2
- mindroot/coreplugins/chat/static/site.webmanifest +1 -1
- mindroot/coreplugins/chat/templates/chat.jinja2 +3 -3
- mindroot/coreplugins/chat/widget_manager.py +139 -0
- mindroot/coreplugins/chat/widget_routes.py +287 -0
- mindroot/coreplugins/check_list/inject/admin.jinja2 +1 -1
- mindroot/coreplugins/email/__init__.py +2 -0
- mindroot/coreplugins/email/email_provider.py +2 -2
- mindroot/coreplugins/email/mod.py +100 -0
- mindroot/coreplugins/email/services.py +5 -3
- mindroot/coreplugins/email/smtp_handler.py +9 -3
- mindroot/coreplugins/email/test_email_service.py +75 -0
- mindroot/coreplugins/env_manager/mod.py +61 -25
- mindroot/coreplugins/home/router.py +37 -2
- mindroot/coreplugins/home/static/imgs/logo.png +0 -0
- mindroot/coreplugins/home/static/imgs/logo.png.bak +0 -0
- mindroot/coreplugins/home/static/imgs/logo_teal.png +0 -0
- mindroot/coreplugins/home/static/imgs/logo_teal2.png +0 -0
- mindroot/coreplugins/home/static/imgs/logo_teal_detailed.png +0 -0
- mindroot/coreplugins/home/static/imgs/logo_teal_python.png +0 -0
- mindroot/coreplugins/home/templates/home.jinja2 +15 -6
- mindroot/coreplugins/index/handlers/plugin_ops.py +1 -1
- mindroot/coreplugins/index/indices/default/index.json +6 -6
- mindroot/coreplugins/jwt_auth/middleware.py +47 -1
- mindroot/coreplugins/jwt_auth/mod.py +40 -17
- mindroot/coreplugins/l8n/__init__.py +6 -0
- mindroot/coreplugins/l8n/debug_loader.py +85 -0
- mindroot/coreplugins/l8n/debug_middleware.py +74 -0
- mindroot/coreplugins/l8n/l8n_constants.py +19 -0
- mindroot/coreplugins/l8n/language_detection.py +183 -0
- mindroot/coreplugins/l8n/middleware.py +151 -0
- mindroot/coreplugins/l8n/mod.py +277 -0
- mindroot/coreplugins/l8n/monkey_patch_to_delete.py +186 -0
- mindroot/coreplugins/l8n/test_enhanced.py +298 -0
- mindroot/coreplugins/l8n/test_l8n.py +95 -0
- mindroot/coreplugins/l8n/test_l8n_standalone.py +251 -0
- mindroot/coreplugins/l8n/test_middleware.py +272 -0
- mindroot/coreplugins/l8n/utils.py +232 -0
- mindroot/coreplugins/mcp_/__init__.py +14 -0
- mindroot/coreplugins/mcp_/catalog_commands.py +328 -0
- mindroot/coreplugins/mcp_/catalog_manager.py +263 -0
- mindroot/coreplugins/mcp_/dynamic_commands.py +154 -0
- mindroot/coreplugins/mcp_/mcp_manager.py +1031 -0
- mindroot/coreplugins/mcp_/mod.py +367 -0
- mindroot/coreplugins/mcp_/oauth_storage.py +144 -0
- mindroot/coreplugins/mcp_/server_installer.py +79 -0
- mindroot/coreplugins/mcp_/setup.py +26 -0
- mindroot/coreplugins/mcp_/test_dynamic_commands.py +134 -0
- mindroot/coreplugins/mcp_/testmcpclient.py +92 -0
- mindroot/coreplugins/persona/mod.py +12 -7
- mindroot/coreplugins/signup/templates/signup.jinja2 +1 -1
- mindroot/coreplugins/subscriptions/__init__.py +1 -0
- mindroot/coreplugins/subscriptions/mod.py +14 -3
- mindroot/coreplugins/subscriptions/router.py +3 -0
- mindroot/coreplugins/user_service/__init__.py +1 -2
- mindroot/coreplugins/user_service/admin_init.py +1 -0
- mindroot/coreplugins/user_service/email_service.py +72 -17
- mindroot/coreplugins/user_service/mod.py +10 -2
- mindroot/coreplugins/user_service/password_reset_service.py +180 -27
- mindroot/coreplugins/user_service/router.py +84 -22
- mindroot/lib/auth/api_key.py +28 -0
- mindroot/lib/cli/plugins.py +94 -0
- mindroot/lib/plugins/default_plugin_manifest.json +20 -0
- mindroot/lib/plugins/installation.py +5 -5
- mindroot/lib/plugins/l8n_static_handler.py +225 -0
- mindroot/lib/plugins/loader.py +33 -3
- mindroot/lib/plugins/loader_with_l8n.py +281 -0
- mindroot/lib/plugins/manifest.py +238 -17
- mindroot/lib/providers/commands.py +3 -1
- mindroot/lib/route_decorators.py +5 -5
- mindroot/lib/templates.py +183 -11
- mindroot/lib/utils/merge_arrays.py +1 -1
- mindroot/migrate.py +49 -0
- mindroot/registry/data_access.py +1 -1
- mindroot/server.py +47 -13
- mindroot/server_missing_normal_args.py +197 -0
- mindroot/server_prev.py +173 -0
- {mindroot-9.2.0.dist-info → mindroot-9.5.0.dist-info}/METADATA +7 -2
- {mindroot-9.2.0.dist-info → mindroot-9.5.0.dist-info}/RECORD +147 -114
- mindroot/coreplugins/admin/static/favicon/about.txt +0 -6
- mindroot/coreplugins/admin/static/favicon/android-chrome-512x512.png +0 -0
- mindroot/coreplugins/admin/static/favicon/apple-touch-icon.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon-16x16.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon-32x32.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon.ico +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/about.txt +0 -6
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/android-chrome-192x192.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/android-chrome-512x512.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/apple-touch-icon.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/favicon-16x16.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/favicon-32x32.png +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/favicon.ico +0 -0
- mindroot/coreplugins/admin/static/favicon/favicon_io (1)/site.webmanifest +0 -1
- mindroot/coreplugins/admin/static/favicon/logo.png +0 -0
- mindroot/coreplugins/admin/static/favicon/site.webmanifest +0 -1
- mindroot/coreplugins/admin/static/js/backup/agent-editor.js +0 -186
- mindroot/coreplugins/admin/static/js/backup/agent-form.js +0 -1133
- mindroot/coreplugins/admin/static/js/backup/agent-list.js +0 -94
- mindroot/coreplugins/chat/static/favicon/about.txt +0 -6
- mindroot/coreplugins/chat/static/favicon/android-chrome-192x192.png +0 -0
- mindroot/coreplugins/chat/static/favicon/android-chrome-512x512.png +0 -0
- mindroot/coreplugins/chat/static/favicon/apple-touch-icon.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon-16x16.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon-32x32.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon.ico +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/about.txt +0 -6
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/android-chrome-192x192.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/android-chrome-512x512.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/apple-touch-icon.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/favicon-16x16.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/favicon-32x32.png +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/favicon.ico +0 -0
- mindroot/coreplugins/chat/static/favicon/favicon_io (1)/site.webmanifest +0 -1
- mindroot/coreplugins/chat/static/favicon/logo.png +0 -0
- mindroot/coreplugins/chat/static/favicon/site.webmanifest +0 -1
- mindroot/coreplugins/index/default.json +0 -76
- mindroot/coreplugins/user_service/file_trigger_service.py +0 -72
- mindroot/coreplugins/user_service/hooks.py +0 -23
- /mindroot/coreplugins/{admin/static/favicon/android-chrome-192x192.png → home/static/imgs/backuplogo.png} +0 -0
- {mindroot-9.2.0.dist-info → mindroot-9.5.0.dist-info}/WHEEL +0 -0
- {mindroot-9.2.0.dist-info → mindroot-9.5.0.dist-info}/entry_points.txt +0 -0
- {mindroot-9.2.0.dist-info → mindroot-9.5.0.dist-info}/licenses/LICENSE +0 -0
- {mindroot-9.2.0.dist-info → mindroot-9.5.0.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,613 @@
|
|
|
1
|
+
import { LitElement, html, css } from '/admin/static/js/lit-core.min.js';
|
|
2
|
+
import { BaseEl } from '/admin/static/js/base.js';
|
|
3
|
+
|
|
4
|
+
class RegistryManagerBase extends BaseEl {
|
|
5
|
+
static properties = {
|
|
6
|
+
isLoggedIn: { type: Boolean },
|
|
7
|
+
searchResults: { type: Array },
|
|
8
|
+
registryUrl: { type: String },
|
|
9
|
+
currentUser: { type: Object },
|
|
10
|
+
authToken: { type: String },
|
|
11
|
+
searchQuery: { type: String },
|
|
12
|
+
selectedCategory: { type: String },
|
|
13
|
+
loading: { type: Boolean },
|
|
14
|
+
error: { type: String },
|
|
15
|
+
stats: { type: Object },
|
|
16
|
+
publishSuccess: { type: String },
|
|
17
|
+
showPublishForm: { type: Boolean },
|
|
18
|
+
localPlugins: { type: Array },
|
|
19
|
+
localAgents: { type: Array },
|
|
20
|
+
agentOwnership: { type: Object },
|
|
21
|
+
toasts: { type: Array },
|
|
22
|
+
activeTab: { type: String },
|
|
23
|
+
showRegisterForm: { type: Boolean },
|
|
24
|
+
installRecommendedPlugins: { type: Boolean }
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
static styles = css`
|
|
28
|
+
:host {
|
|
29
|
+
display: block;
|
|
30
|
+
width: 100%;
|
|
31
|
+
height: 100%;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.registry-manager {
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-direction: column;
|
|
37
|
+
width: 100%;
|
|
38
|
+
max-width: 1200px;
|
|
39
|
+
margin: 0 auto;
|
|
40
|
+
gap: 20px;
|
|
41
|
+
padding: 1rem;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.section {
|
|
45
|
+
background: rgb(10, 10, 25);
|
|
46
|
+
border-radius: 8px;
|
|
47
|
+
padding: 1rem;
|
|
48
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.section h3, .section h4 {
|
|
52
|
+
margin-top: 0;
|
|
53
|
+
color: #fff;
|
|
54
|
+
display: flex;
|
|
55
|
+
align-items: center;
|
|
56
|
+
gap: 0.5rem;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.settings-section {
|
|
60
|
+
margin-bottom: 1rem;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.settings-section summary {
|
|
64
|
+
cursor: pointer;
|
|
65
|
+
padding: 0.5rem;
|
|
66
|
+
background: rgba(0, 0, 0, 0.2);
|
|
67
|
+
border-radius: 4px;
|
|
68
|
+
display: flex;
|
|
69
|
+
align-items: center;
|
|
70
|
+
gap: 0.5rem;
|
|
71
|
+
color: #fff;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.settings-section summary:hover {
|
|
75
|
+
background: rgba(0, 0, 0, 0.3);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.help-text {
|
|
79
|
+
font-size: 0.8rem;
|
|
80
|
+
color: #999;
|
|
81
|
+
margin-top: 0.5rem;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.registry-url-display {
|
|
85
|
+
font-size: 0.8rem;
|
|
86
|
+
color: #999;
|
|
87
|
+
margin-bottom: 0.5rem;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.login-form, .search-form, .publish-form {
|
|
91
|
+
display: flex;
|
|
92
|
+
flex-direction: column;
|
|
93
|
+
gap: 1rem;
|
|
94
|
+
max-width: 400px;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.form-row {
|
|
98
|
+
display: flex;
|
|
99
|
+
gap: 1rem;
|
|
100
|
+
align-items: center;
|
|
101
|
+
flex-wrap: wrap;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.form-row label {
|
|
105
|
+
color: #fff;
|
|
106
|
+
min-width: 100px;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
input, select, textarea {
|
|
110
|
+
background: #2a2a40;
|
|
111
|
+
color: #fff;
|
|
112
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
113
|
+
padding: 0.5rem;
|
|
114
|
+
border-radius: 4px;
|
|
115
|
+
flex: 1;
|
|
116
|
+
min-width: 200px;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
input:focus, select:focus, textarea:focus {
|
|
120
|
+
outline: none;
|
|
121
|
+
border-color: #4a9eff;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
button {
|
|
125
|
+
background: #2a2a40;
|
|
126
|
+
color: #fff;
|
|
127
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
128
|
+
padding: 0.5rem 1rem;
|
|
129
|
+
border-radius: 4px;
|
|
130
|
+
cursor: pointer;
|
|
131
|
+
transition: background 0.2s;
|
|
132
|
+
white-space: nowrap;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
button:hover {
|
|
136
|
+
background: #3a3a50;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
button.primary {
|
|
140
|
+
background: #4a9eff;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
button.primary:hover {
|
|
144
|
+
background: #3a8eef;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
button.success {
|
|
148
|
+
background: #28a745;
|
|
149
|
+
color: #fff !important;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
button.success:hover {
|
|
153
|
+
background: #218838;
|
|
154
|
+
color: #fff !important;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.search-results {
|
|
158
|
+
display: grid;
|
|
159
|
+
gap: 1rem;
|
|
160
|
+
margin-top: 1rem;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
.result-item {
|
|
164
|
+
background: rgba(0, 0, 0, 0.2);
|
|
165
|
+
padding: 1rem;
|
|
166
|
+
border-radius: 4px;
|
|
167
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.result-item {
|
|
171
|
+
display: flex;
|
|
172
|
+
align-items: flex-start;
|
|
173
|
+
gap: 1rem;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.result-avatar {
|
|
177
|
+
flex-shrink: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.agent-avatar-large {
|
|
181
|
+
width: 80px;
|
|
182
|
+
height: 80px;
|
|
183
|
+
border-radius: 50%;
|
|
184
|
+
object-fit: cover;
|
|
185
|
+
border: 2px solid rgba(74, 158, 255, 0.3);
|
|
186
|
+
background: rgba(0, 0, 0, 0.2);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.result-content {
|
|
190
|
+
flex: 1;
|
|
191
|
+
min-width: 0;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.agent-name-with-face {
|
|
195
|
+
font-size: 1.2rem;
|
|
196
|
+
font-weight: bold;
|
|
197
|
+
color: #4a9eff;
|
|
198
|
+
margin: 0;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.result-header {
|
|
202
|
+
display: flex;
|
|
203
|
+
justify-content: space-between;
|
|
204
|
+
align-items: flex-start;
|
|
205
|
+
margin-bottom: 0.5rem;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.result-title {
|
|
209
|
+
font-weight: bold;
|
|
210
|
+
color: #4a9eff;
|
|
211
|
+
margin: 0;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.result-version {
|
|
215
|
+
background: rgba(74, 158, 255, 0.2);
|
|
216
|
+
color: #4a9eff;
|
|
217
|
+
padding: 0.2rem 0.5rem;
|
|
218
|
+
border-radius: 3px;
|
|
219
|
+
font-size: 0.8rem;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
.result-description {
|
|
223
|
+
color: #ccc;
|
|
224
|
+
margin: 0.5rem 0;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.result-meta {
|
|
228
|
+
display: flex;
|
|
229
|
+
gap: 1rem;
|
|
230
|
+
font-size: 0.8rem;
|
|
231
|
+
color: #999;
|
|
232
|
+
margin: 0.5rem 0;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.result-tags {
|
|
236
|
+
display: flex;
|
|
237
|
+
gap: 0.5rem;
|
|
238
|
+
flex-wrap: wrap;
|
|
239
|
+
margin: 0.5rem 0;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
.tag {
|
|
243
|
+
background: rgba(255, 255, 255, 0.1);
|
|
244
|
+
padding: 0.2rem 0.5rem;
|
|
245
|
+
border-radius: 3px;
|
|
246
|
+
font-size: 0.7rem;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.result-actions {
|
|
250
|
+
display: flex;
|
|
251
|
+
gap: 0.5rem;
|
|
252
|
+
margin-top: 1rem;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.stats-grid {
|
|
256
|
+
display: grid;
|
|
257
|
+
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
|
|
258
|
+
gap: 1rem;
|
|
259
|
+
margin: 1rem 0;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.stat-card {
|
|
263
|
+
background: rgba(0, 0, 0, 0.2);
|
|
264
|
+
padding: 1rem;
|
|
265
|
+
border-radius: 4px;
|
|
266
|
+
text-align: center;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.stat-number {
|
|
270
|
+
font-size: 2rem;
|
|
271
|
+
font-weight: bold;
|
|
272
|
+
color: #4a9eff;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
.stat-label {
|
|
276
|
+
color: #ccc;
|
|
277
|
+
font-size: 0.9rem;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/* Toast notifications */
|
|
281
|
+
.toast-container {
|
|
282
|
+
position: fixed;
|
|
283
|
+
top: 20px;
|
|
284
|
+
right: 20px;
|
|
285
|
+
z-index: 1000;
|
|
286
|
+
display: flex;
|
|
287
|
+
flex-direction: column;
|
|
288
|
+
gap: 10px;
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
.toast {
|
|
292
|
+
background: rgba(0, 0, 0, 0.9);
|
|
293
|
+
color: white !important;
|
|
294
|
+
padding: 12px 20px;
|
|
295
|
+
border-radius: 6px;
|
|
296
|
+
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
297
|
+
max-width: 400px;
|
|
298
|
+
word-wrap: break-word;
|
|
299
|
+
animation: slideIn 0.3s ease-out;
|
|
300
|
+
border-left: 4px solid #4a9eff;
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
.toast.success {
|
|
304
|
+
border-left-color: #28a745;
|
|
305
|
+
background: rgba(40, 167, 69, 0.9);
|
|
306
|
+
color: white !important;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.toast.error {
|
|
310
|
+
border-left-color: #dc3545;
|
|
311
|
+
background: rgba(220, 53, 69, 0.9);
|
|
312
|
+
color: white !important;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
@keyframes slideIn {
|
|
316
|
+
from { transform: translateX(100%); opacity: 0; }
|
|
317
|
+
to { transform: translateX(0); opacity: 1; }
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
.error {
|
|
321
|
+
background: rgba(220, 53, 69, 0.2);
|
|
322
|
+
color: #dc3545;
|
|
323
|
+
padding: 0.5rem;
|
|
324
|
+
border-radius: 4px;
|
|
325
|
+
margin: 0.5rem 0;
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.success {
|
|
329
|
+
background: rgba(40, 167, 69, 0.2);
|
|
330
|
+
color: #28a745;
|
|
331
|
+
padding: 0.5rem;
|
|
332
|
+
border-radius: 4px;
|
|
333
|
+
margin: 0.5rem 0;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.loading {
|
|
337
|
+
text-align: center;
|
|
338
|
+
color: #ccc;
|
|
339
|
+
padding: 2rem;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.user-info {
|
|
343
|
+
display: flex;
|
|
344
|
+
justify-content: space-between;
|
|
345
|
+
align-items: center;
|
|
346
|
+
background: rgba(0, 0, 0, 0.2);
|
|
347
|
+
padding: 0.5rem 1rem;
|
|
348
|
+
border-radius: 4px;
|
|
349
|
+
margin-bottom: 1rem;
|
|
350
|
+
flex-wrap: wrap;
|
|
351
|
+
gap: 1rem;
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
.tabs {
|
|
355
|
+
display: flex;
|
|
356
|
+
gap: 0.5rem;
|
|
357
|
+
margin-bottom: 1rem;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.tab {
|
|
361
|
+
padding: 0.5rem 1rem;
|
|
362
|
+
background: rgba(0, 0, 0, 0.2);
|
|
363
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
364
|
+
border-radius: 4px;
|
|
365
|
+
cursor: pointer;
|
|
366
|
+
transition: background 0.2s;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
.tab.active {
|
|
370
|
+
background: #4a9eff;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
.tab:hover {
|
|
374
|
+
background: rgba(74, 158, 255, 0.3);
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
.auth-toggle {
|
|
378
|
+
text-align: center;
|
|
379
|
+
margin-top: 1rem;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
.category-tabs {
|
|
383
|
+
display: flex;
|
|
384
|
+
gap: 0.5rem;
|
|
385
|
+
margin-top: 1rem;
|
|
386
|
+
flex-wrap: wrap;
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
.category-tab {
|
|
390
|
+
display: flex;
|
|
391
|
+
align-items: center;
|
|
392
|
+
gap: 0.5rem;
|
|
393
|
+
padding: 0.75rem 1rem;
|
|
394
|
+
background: rgba(0, 0, 0, 0.2);
|
|
395
|
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
396
|
+
border-radius: 6px;
|
|
397
|
+
cursor: pointer;
|
|
398
|
+
transition: all 0.2s;
|
|
399
|
+
color: #ccc;
|
|
400
|
+
font-size: 0.9rem;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
.category-tab:hover {
|
|
404
|
+
background: rgba(74, 158, 255, 0.2);
|
|
405
|
+
border-color: rgba(74, 158, 255, 0.3);
|
|
406
|
+
color: #fff;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.category-tab.active {
|
|
410
|
+
background: #4a9eff;
|
|
411
|
+
border-color: #4a9eff;
|
|
412
|
+
color: #fff;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
.category-tab .material-icons {
|
|
416
|
+
font-size: 1.1rem;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.no-results {
|
|
420
|
+
text-align: center;
|
|
421
|
+
padding: 2rem;
|
|
422
|
+
color: #999;
|
|
423
|
+
background: rgba(0, 0, 0, 0.1);
|
|
424
|
+
border-radius: 4px;
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
.semantic-badge {
|
|
428
|
+
display: inline-flex;
|
|
429
|
+
align-items: center;
|
|
430
|
+
gap: 0.25rem;
|
|
431
|
+
background: rgba(156, 39, 176, 0.2);
|
|
432
|
+
color: #9c27b0;
|
|
433
|
+
padding: 0.25rem 0.5rem;
|
|
434
|
+
border-radius: 12px;
|
|
435
|
+
font-size: 0.75rem;
|
|
436
|
+
margin-bottom: 0.5rem;
|
|
437
|
+
border: 1px solid rgba(156, 39, 176, 0.3);
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
.oauth-badge {
|
|
441
|
+
display: inline-flex;
|
|
442
|
+
align-items: center;
|
|
443
|
+
gap: 0.25rem;
|
|
444
|
+
background: rgba(255, 152, 0, 0.2);
|
|
445
|
+
color: #ff9800;
|
|
446
|
+
padding: 0.25rem 0.5rem;
|
|
447
|
+
border-radius: 12px;
|
|
448
|
+
font-size: 0.75rem;
|
|
449
|
+
margin-left: 0.5rem;
|
|
450
|
+
border: 1px solid rgba(255, 152, 0, 0.3);
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
.oauth-badge .material-icons {
|
|
454
|
+
font-size: 0.9rem;
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
.oauth-status {
|
|
458
|
+
display: inline-flex;
|
|
459
|
+
align-items: center;
|
|
460
|
+
margin-left: 0.5rem;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
.oauth-status.needs-auth {
|
|
464
|
+
color: #ffc107;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
.oauth-status .material-icons {
|
|
468
|
+
font-size: 1rem;
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
.installed-badge {
|
|
472
|
+
display: flex;
|
|
473
|
+
align-items: center;
|
|
474
|
+
gap: 0.25rem;
|
|
475
|
+
color: #28a745;
|
|
476
|
+
}
|
|
477
|
+
`;
|
|
478
|
+
|
|
479
|
+
constructor() {
|
|
480
|
+
super();
|
|
481
|
+
this.isLoggedIn = false;
|
|
482
|
+
this.searchResults = [];
|
|
483
|
+
this.registryUrl = this.loadRegistryUrl();
|
|
484
|
+
this.currentUser = null;
|
|
485
|
+
this.authToken = localStorage.getItem('registry_token');
|
|
486
|
+
this.searchQuery = '';
|
|
487
|
+
this.selectedCategory = 'all';
|
|
488
|
+
this.loading = false;
|
|
489
|
+
this.error = '';
|
|
490
|
+
this.stats = {};
|
|
491
|
+
this.publishSuccess = '';
|
|
492
|
+
this.toasts = [];
|
|
493
|
+
this.showPublishForm = false;
|
|
494
|
+
this.localPlugins = [];
|
|
495
|
+
this.localAgents = [];
|
|
496
|
+
this.agentOwnership = null;
|
|
497
|
+
this.activeTab = 'search';
|
|
498
|
+
this.showRegisterForm = false;
|
|
499
|
+
// Automatically install recommended plugins when installing agents
|
|
500
|
+
this.installRecommendedPlugins = true;
|
|
501
|
+
|
|
502
|
+
this.checkAuthStatus();
|
|
503
|
+
this.loadStats();
|
|
504
|
+
this.loadLocalContent();
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
loadRegistryUrl() {
|
|
508
|
+
return localStorage.getItem('registry_url') ||
|
|
509
|
+
(typeof window !== 'undefined' && window.MR_REGISTRY_URL) ||
|
|
510
|
+
'https://registry.mindroot.io';
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
updateRegistryUrl(newUrl) {
|
|
514
|
+
this.registryUrl = newUrl;
|
|
515
|
+
localStorage.setItem('registry_url', newUrl);
|
|
516
|
+
this.logout();
|
|
517
|
+
this.loadStats();
|
|
518
|
+
this.requestUpdate();
|
|
519
|
+
}
|
|
520
|
+
|
|
521
|
+
async testConnection() {
|
|
522
|
+
try {
|
|
523
|
+
const response = await fetch(`${this.registryUrl}/stats`);
|
|
524
|
+
if (response.ok) {
|
|
525
|
+
this.error = '';
|
|
526
|
+
await this.loadStats();
|
|
527
|
+
const originalError = this.error;
|
|
528
|
+
this.error = 'Connection successful!';
|
|
529
|
+
this.requestUpdate();
|
|
530
|
+
setTimeout(() => {
|
|
531
|
+
this.error = originalError;
|
|
532
|
+
this.requestUpdate();
|
|
533
|
+
}, 2000);
|
|
534
|
+
} else {
|
|
535
|
+
this.error = `Connection failed: ${response.status}`;
|
|
536
|
+
}
|
|
537
|
+
} catch (error) {
|
|
538
|
+
this.error = `Connection failed: ${error.message}`;
|
|
539
|
+
}
|
|
540
|
+
this.requestUpdate();
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
async register(username, email, password) {
|
|
544
|
+
this.loading = true;
|
|
545
|
+
|
|
546
|
+
try {
|
|
547
|
+
const response = await fetch(`${this.registryUrl}/register`, {
|
|
548
|
+
method: 'POST',
|
|
549
|
+
headers: {
|
|
550
|
+
'Content-Type': 'application/json'
|
|
551
|
+
},
|
|
552
|
+
body: JSON.stringify({
|
|
553
|
+
username: username,
|
|
554
|
+
email: email,
|
|
555
|
+
password: password
|
|
556
|
+
})
|
|
557
|
+
});
|
|
558
|
+
|
|
559
|
+
if (response.ok) {
|
|
560
|
+
this.showToast('Registration successful! You can now log in.', 'success');
|
|
561
|
+
this.showRegisterForm = false;
|
|
562
|
+
// Automatically install recommended plugins when installing agents
|
|
563
|
+
this.installRecommendedPlugins = true;
|
|
564
|
+
} else {
|
|
565
|
+
const errorData = await response.json();
|
|
566
|
+
this.showToast(errorData.detail || 'Registration failed', 'error');
|
|
567
|
+
}
|
|
568
|
+
} catch (error) {
|
|
569
|
+
this.showToast('Network error: ' + error.message, 'error');
|
|
570
|
+
}
|
|
571
|
+
|
|
572
|
+
this.loading = false;
|
|
573
|
+
this.requestUpdate();
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
showToast(message, type = 'info', duration = 5000) {
|
|
577
|
+
const toast = {
|
|
578
|
+
id: Date.now() + Math.random(),
|
|
579
|
+
message,
|
|
580
|
+
type,
|
|
581
|
+
duration
|
|
582
|
+
};
|
|
583
|
+
|
|
584
|
+
this.toasts = [...this.toasts, toast];
|
|
585
|
+
this.requestUpdate();
|
|
586
|
+
|
|
587
|
+
// Auto-remove toast after duration
|
|
588
|
+
setTimeout(() => {
|
|
589
|
+
this.removeToast(toast.id);
|
|
590
|
+
}, duration);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
removeToast(toastId) {
|
|
594
|
+
this.toasts = this.toasts.filter(toast => toast.id !== toastId);
|
|
595
|
+
this.requestUpdate();
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
renderToasts() {
|
|
599
|
+
if (this.toasts.length === 0) return '';
|
|
600
|
+
|
|
601
|
+
return html`
|
|
602
|
+
<div class="toast-container">
|
|
603
|
+
${this.toasts.map(toast => html`
|
|
604
|
+
<div class="toast ${toast.type}" @click=${() => this.removeToast(toast.id)}>
|
|
605
|
+
${toast.message}
|
|
606
|
+
</div>
|
|
607
|
+
`)}
|
|
608
|
+
</div>
|
|
609
|
+
`;
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
export { RegistryManagerBase };
|