agent-orcha 0.0.7 → 0.0.8
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.
- package/README.md +86 -28
- package/dist/lib/agents/agent-executor.d.ts.map +1 -1
- package/dist/lib/agents/agent-executor.js +23 -7
- package/dist/lib/agents/agent-executor.js.map +1 -1
- package/dist/lib/agents/react-loop.d.ts.map +1 -1
- package/dist/lib/agents/react-loop.js +27 -0
- package/dist/lib/agents/react-loop.js.map +1 -1
- package/dist/lib/functions/simple-function-wrapper.js +3 -3
- package/dist/lib/functions/simple-function-wrapper.js.map +1 -1
- package/dist/lib/knowledge/knowledge-store.d.ts +1 -1
- package/dist/lib/knowledge/knowledge-store.d.ts.map +1 -1
- package/dist/lib/knowledge/knowledge-store.js +25 -4
- package/dist/lib/knowledge/knowledge-store.js.map +1 -1
- package/dist/lib/knowledge/loaders/file-loaders.d.ts +0 -1
- package/dist/lib/knowledge/loaders/file-loaders.d.ts.map +1 -1
- package/dist/lib/knowledge/loaders/file-loaders.js +7 -15
- package/dist/lib/knowledge/loaders/file-loaders.js.map +1 -1
- package/dist/lib/knowledge/sqlite-store.d.ts.map +1 -1
- package/dist/lib/knowledge/sqlite-store.js +19 -10
- package/dist/lib/knowledge/sqlite-store.js.map +1 -1
- package/dist/lib/knowledge/types.d.ts +13 -13
- package/dist/lib/llm/index.d.ts +1 -1
- package/dist/lib/llm/index.d.ts.map +1 -1
- package/dist/lib/llm/index.js +1 -1
- package/dist/lib/llm/index.js.map +1 -1
- package/dist/lib/llm/llm-config.d.ts +51 -8
- package/dist/lib/llm/llm-config.d.ts.map +1 -1
- package/dist/lib/llm/llm-config.js +161 -17
- package/dist/lib/llm/llm-config.js.map +1 -1
- package/dist/lib/llm/llm-factory.d.ts +1 -2
- package/dist/lib/llm/llm-factory.d.ts.map +1 -1
- package/dist/lib/llm/llm-factory.js +41 -8
- package/dist/lib/llm/llm-factory.js.map +1 -1
- package/dist/lib/llm/providers/openai-chat-model.d.ts +10 -0
- package/dist/lib/llm/providers/openai-chat-model.d.ts.map +1 -1
- package/dist/lib/llm/providers/openai-chat-model.js +37 -5
- package/dist/lib/llm/providers/openai-chat-model.js.map +1 -1
- package/dist/lib/llm/providers/openai-embeddings.d.ts.map +1 -1
- package/dist/lib/llm/providers/openai-embeddings.js +41 -10
- package/dist/lib/llm/providers/openai-embeddings.js.map +1 -1
- package/dist/lib/local-llm/binary-manager.d.ts +66 -0
- package/dist/lib/local-llm/binary-manager.d.ts.map +1 -0
- package/dist/lib/local-llm/binary-manager.js +441 -0
- package/dist/lib/local-llm/binary-manager.js.map +1 -0
- package/dist/lib/local-llm/engine-interface.d.ts +47 -0
- package/dist/lib/local-llm/engine-interface.d.ts.map +1 -0
- package/dist/lib/local-llm/engine-interface.js +2 -0
- package/dist/lib/local-llm/engine-interface.js.map +1 -0
- package/dist/lib/local-llm/engine-registry.d.ts +20 -0
- package/dist/lib/local-llm/engine-registry.d.ts.map +1 -0
- package/dist/lib/local-llm/engine-registry.js +56 -0
- package/dist/lib/local-llm/engine-registry.js.map +1 -0
- package/dist/lib/local-llm/engines/llama-cpp-engine.d.ts +31 -0
- package/dist/lib/local-llm/engines/llama-cpp-engine.d.ts.map +1 -0
- package/dist/lib/local-llm/engines/llama-cpp-engine.js +164 -0
- package/dist/lib/local-llm/engines/llama-cpp-engine.js.map +1 -0
- package/dist/lib/local-llm/engines/mlx-serve-engine.d.ts +31 -0
- package/dist/lib/local-llm/engines/mlx-serve-engine.d.ts.map +1 -0
- package/dist/lib/local-llm/engines/mlx-serve-engine.js +161 -0
- package/dist/lib/local-llm/engines/mlx-serve-engine.js.map +1 -0
- package/dist/lib/local-llm/gguf-reader.d.ts +20 -0
- package/dist/lib/local-llm/gguf-reader.d.ts.map +1 -0
- package/dist/lib/local-llm/gguf-reader.js +190 -0
- package/dist/lib/local-llm/gguf-reader.js.map +1 -0
- package/dist/lib/local-llm/index.d.ts +9 -0
- package/dist/lib/local-llm/index.d.ts.map +1 -0
- package/dist/lib/local-llm/index.js +6 -0
- package/dist/lib/local-llm/index.js.map +1 -0
- package/dist/lib/local-llm/llama-server-process.d.ts +42 -0
- package/dist/lib/local-llm/llama-server-process.d.ts.map +1 -0
- package/dist/lib/local-llm/llama-server-process.js +237 -0
- package/dist/lib/local-llm/llama-server-process.js.map +1 -0
- package/dist/lib/local-llm/mlx-binary-manager.d.ts +33 -0
- package/dist/lib/local-llm/mlx-binary-manager.d.ts.map +1 -0
- package/dist/lib/local-llm/mlx-binary-manager.js +211 -0
- package/dist/lib/local-llm/mlx-binary-manager.js.map +1 -0
- package/dist/lib/local-llm/mlx-server-process.d.ts +26 -0
- package/dist/lib/local-llm/mlx-server-process.d.ts.map +1 -0
- package/dist/lib/local-llm/mlx-server-process.js +210 -0
- package/dist/lib/local-llm/mlx-server-process.js.map +1 -0
- package/dist/lib/local-llm/model-manager.d.ts +33 -0
- package/dist/lib/local-llm/model-manager.d.ts.map +1 -0
- package/dist/lib/local-llm/model-manager.js +591 -0
- package/dist/lib/local-llm/model-manager.js.map +1 -0
- package/dist/lib/local-llm/types.d.ts +51 -0
- package/dist/lib/local-llm/types.d.ts.map +1 -0
- package/dist/lib/local-llm/types.js +2 -0
- package/dist/lib/local-llm/types.js.map +1 -0
- package/dist/lib/logger.d.ts +2 -0
- package/dist/lib/logger.d.ts.map +1 -1
- package/dist/lib/logger.js +68 -5
- package/dist/lib/logger.js.map +1 -1
- package/dist/lib/orchestrator.d.ts +9 -0
- package/dist/lib/orchestrator.d.ts.map +1 -1
- package/dist/lib/orchestrator.js +151 -3
- package/dist/lib/orchestrator.js.map +1 -1
- package/dist/lib/sandbox/cdp-client.d.ts +2 -1
- package/dist/lib/sandbox/cdp-client.d.ts.map +1 -1
- package/dist/lib/sandbox/cdp-client.js +33 -7
- package/dist/lib/sandbox/cdp-client.js.map +1 -1
- package/dist/lib/sandbox/index.d.ts +1 -0
- package/dist/lib/sandbox/index.d.ts.map +1 -1
- package/dist/lib/sandbox/index.js +1 -0
- package/dist/lib/sandbox/index.js.map +1 -1
- package/dist/lib/sandbox/page-readiness.d.ts.map +1 -1
- package/dist/lib/sandbox/page-readiness.js +33 -0
- package/dist/lib/sandbox/page-readiness.js.map +1 -1
- package/dist/lib/sandbox/sandbox-browser.d.ts.map +1 -1
- package/dist/lib/sandbox/sandbox-browser.js +14 -1
- package/dist/lib/sandbox/sandbox-browser.js.map +1 -1
- package/dist/lib/sandbox/sandbox-container.d.ts +39 -0
- package/dist/lib/sandbox/sandbox-container.d.ts.map +1 -0
- package/dist/lib/sandbox/sandbox-container.js +176 -0
- package/dist/lib/sandbox/sandbox-container.js.map +1 -0
- package/dist/lib/sandbox/sandbox-file.d.ts.map +1 -1
- package/dist/lib/sandbox/sandbox-file.js +5 -4
- package/dist/lib/sandbox/sandbox-file.js.map +1 -1
- package/dist/lib/sandbox/sandbox-shell.d.ts +2 -1
- package/dist/lib/sandbox/sandbox-shell.d.ts.map +1 -1
- package/dist/lib/sandbox/sandbox-shell.js +42 -24
- package/dist/lib/sandbox/sandbox-shell.js.map +1 -1
- package/dist/lib/sandbox/sandbox-web.d.ts.map +1 -1
- package/dist/lib/sandbox/sandbox-web.js +27 -2
- package/dist/lib/sandbox/sandbox-web.js.map +1 -1
- package/dist/lib/sandbox/vision-browser.d.ts.map +1 -1
- package/dist/lib/sandbox/vision-browser.js +9 -0
- package/dist/lib/sandbox/vision-browser.js.map +1 -1
- package/dist/lib/sea/app-window.d.ts +7 -0
- package/dist/lib/sea/app-window.d.ts.map +1 -0
- package/dist/lib/sea/app-window.js +95 -0
- package/dist/lib/sea/app-window.js.map +1 -0
- package/dist/lib/sea/bootstrap.d.ts +18 -0
- package/dist/lib/sea/bootstrap.d.ts.map +1 -0
- package/dist/lib/sea/bootstrap.js +103 -0
- package/dist/lib/sea/bootstrap.js.map +1 -0
- package/dist/lib/sea/sqlite-vec-shim.d.ts +3 -0
- package/dist/lib/sea/sqlite-vec-shim.d.ts.map +1 -0
- package/dist/lib/sea/sqlite-vec-shim.js +10 -0
- package/dist/lib/sea/sqlite-vec-shim.js.map +1 -0
- package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.d.ts +1 -2
- package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.d.ts.map +1 -1
- package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.js +7 -13
- package/dist/lib/tools/built-in/knowledge-entity-lookup.tool.js.map +1 -1
- package/dist/lib/tools/built-in/knowledge-graph-schema.tool.d.ts.map +1 -1
- package/dist/lib/tools/built-in/knowledge-graph-schema.tool.js +2 -4
- package/dist/lib/tools/built-in/knowledge-graph-schema.tool.js.map +1 -1
- package/dist/lib/tools/built-in/knowledge-search.tool.js +4 -4
- package/dist/lib/tools/built-in/knowledge-search.tool.js.map +1 -1
- package/dist/lib/tools/built-in/knowledge-sql.tool.d.ts.map +1 -1
- package/dist/lib/tools/built-in/knowledge-sql.tool.js +70 -37
- package/dist/lib/tools/built-in/knowledge-sql.tool.js.map +1 -1
- package/dist/lib/tools/built-in/knowledge-tools-factory.js +2 -2
- package/dist/lib/tools/built-in/knowledge-tools-factory.js.map +1 -1
- package/dist/lib/tools/built-in/knowledge-traverse.tool.d.ts +1 -2
- package/dist/lib/tools/built-in/knowledge-traverse.tool.d.ts.map +1 -1
- package/dist/lib/tools/built-in/knowledge-traverse.tool.js +5 -11
- package/dist/lib/tools/built-in/knowledge-traverse.tool.js.map +1 -1
- package/dist/lib/tools/workspace/workspace-tools.d.ts.map +1 -1
- package/dist/lib/tools/workspace/workspace-tools.js +5 -4
- package/dist/lib/tools/workspace/workspace-tools.js.map +1 -1
- package/dist/lib/types/tool-factory.d.ts.map +1 -1
- package/dist/lib/types/tool-factory.js +9 -2
- package/dist/lib/types/tool-factory.js.map +1 -1
- package/dist/lib/utils/document-extract.d.ts +10 -0
- package/dist/lib/utils/document-extract.d.ts.map +1 -0
- package/dist/lib/utils/document-extract.js +149 -0
- package/dist/lib/utils/document-extract.js.map +1 -0
- package/dist/lib/workflows/react-workflow-executor.d.ts.map +1 -1
- package/dist/lib/workflows/react-workflow-executor.js +20 -14
- package/dist/lib/workflows/react-workflow-executor.js.map +1 -1
- package/dist/lib/workflows/types.d.ts +71 -45
- package/dist/lib/workflows/types.d.ts.map +1 -1
- package/dist/lib/workflows/types.js +10 -0
- package/dist/lib/workflows/types.js.map +1 -1
- package/dist/public/assets/logo.png +0 -0
- package/dist/public/chat.html +3 -78
- package/dist/public/index.html +3 -330
- package/dist/public/src/components/AgentComposer.js +132 -132
- package/dist/public/src/components/AgentsView.js +1231 -350
- package/dist/public/src/components/AppRoot.js +101 -39
- package/dist/public/src/components/GraphView.js +11 -13
- package/dist/public/src/components/IdeView.js +133 -98
- package/dist/public/src/components/KnowledgeView.js +94 -130
- package/dist/public/src/components/LlmView.js +15 -19
- package/dist/public/src/components/LocalLlmView.js +2440 -0
- package/dist/public/src/components/LogViewer.js +155 -0
- package/dist/public/src/components/McpView.js +41 -49
- package/dist/public/src/components/MonitorView.js +79 -126
- package/dist/public/src/components/NavBar.js +16 -26
- package/dist/public/src/components/StandaloneChat.js +136 -150
- package/dist/public/src/services/ApiService.js +196 -2
- package/dist/public/src/services/SessionStore.js +6 -3
- package/dist/public/src/services/StreamManager.js +183 -0
- package/dist/public/src/store.js +1 -1
- package/dist/public/src/utils/card.js +21 -0
- package/dist/public/src/utils/markdown.js +1 -7
- package/dist/public/styles.css +2777 -0
- package/dist/src/cli/commands/init.d.ts.map +1 -1
- package/dist/src/cli/commands/init.js +7 -1
- package/dist/src/cli/commands/init.js.map +1 -1
- package/dist/src/cli/commands/start.d.ts.map +1 -1
- package/dist/src/cli/commands/start.js +28 -5
- package/dist/src/cli/commands/start.js.map +1 -1
- package/dist/src/cli/index.js +13 -2
- package/dist/src/cli/index.js.map +1 -1
- package/dist/src/index.js +7 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/routes/agents.route.d.ts.map +1 -1
- package/dist/src/routes/agents.route.js +2 -0
- package/dist/src/routes/agents.route.js.map +1 -1
- package/dist/src/routes/chat.route.d.ts.map +1 -1
- package/dist/src/routes/chat.route.js +3 -2
- package/dist/src/routes/chat.route.js.map +1 -1
- package/dist/src/routes/llm.route.d.ts.map +1 -1
- package/dist/src/routes/llm.route.js +227 -7
- package/dist/src/routes/llm.route.js.map +1 -1
- package/dist/src/routes/local-llm.route.d.ts +3 -0
- package/dist/src/routes/local-llm.route.d.ts.map +1 -0
- package/dist/src/routes/local-llm.route.js +688 -0
- package/dist/src/routes/local-llm.route.js.map +1 -0
- package/dist/src/routes/logs.route.d.ts +3 -0
- package/dist/src/routes/logs.route.d.ts.map +1 -0
- package/dist/src/routes/logs.route.js +24 -0
- package/dist/src/routes/logs.route.js.map +1 -0
- package/dist/src/routes/vnc.route.d.ts +10 -1
- package/dist/src/routes/vnc.route.d.ts.map +1 -1
- package/dist/src/routes/vnc.route.js +37 -12
- package/dist/src/routes/vnc.route.js.map +1 -1
- package/dist/src/routes/workflows.route.d.ts.map +1 -1
- package/dist/src/routes/workflows.route.js +24 -0
- package/dist/src/routes/workflows.route.js.map +1 -1
- package/dist/src/server.d.ts.map +1 -1
- package/dist/src/server.js +24 -2
- package/dist/src/server.js.map +1 -1
- package/dist/templates/agents/actor.agent.yaml +34 -0
- package/dist/templates/agents/architect.agent.yaml +0 -1
- package/dist/templates/agents/chatbot.agent.yaml +0 -1
- package/dist/templates/agents/corporate.agent.yaml +0 -1
- package/dist/templates/agents/functions.agent.yaml +29 -0
- package/dist/templates/agents/investment-analyst.agent.yaml +0 -1
- package/dist/templates/agents/music-librarian.agent.yaml +3 -27
- package/dist/templates/agents/network-security.agent.yaml +0 -1
- package/dist/templates/agents/transport-security.agent.yaml +0 -1
- package/dist/templates/agents/web-engineer.agent.yaml +3 -4
- package/dist/templates/agents/web-pilot.agent.yaml +0 -1
- package/dist/templates/knowledge/patient-records.knowledge.yaml +20 -0
- package/dist/templates/knowledge/pdf-patients/PDF_Deid_Deidentification_0.pdf +0 -0
- package/dist/templates/knowledge/pdf-patients/PDF_Deid_Deidentification_1.pdf +0 -0
- package/dist/templates/knowledge/pdf-patients/PDF_Deid_Deidentification_10.pdf +0 -0
- package/dist/templates/knowledge/pdf-patients/PDF_Deid_Deidentification_11.pdf +0 -0
- package/dist/templates/knowledge/web-docs.knowledge.yaml +1 -1
- package/dist/templates/llm.json +73 -10
- package/dist/templates/skills/orcha-builder/SKILL.md +56 -3
- package/dist/templates/workflows/example.workflow.yaml +27 -35
- package/dist/templates/workflows/react-example.workflow.yaml +14 -19
- package/dist/templates/workflows/team-chat.workflow.yaml +47 -0
- package/package.json +14 -6
- package/dist/public/src/components/SkillsView.js +0 -137
- package/dist/public/src/components/WorkflowsView.js +0 -568
|
@@ -3,23 +3,28 @@ import { Component } from '../utils/Component.js';
|
|
|
3
3
|
import { store } from '../store.js';
|
|
4
4
|
import './NavBar.js';
|
|
5
5
|
import './AgentsView.js';
|
|
6
|
-
import './WorkflowsView.js';
|
|
7
6
|
import './KnowledgeView.js';
|
|
8
7
|
import './GraphView.js';
|
|
9
8
|
import './McpView.js';
|
|
10
|
-
import './SkillsView.js';
|
|
11
9
|
import './MonitorView.js';
|
|
12
10
|
import './IdeView.js';
|
|
11
|
+
import './LocalLlmView.js';
|
|
12
|
+
import './LogViewer.js';
|
|
13
13
|
|
|
14
14
|
export class AppRoot extends Component {
|
|
15
15
|
postRender() {
|
|
16
16
|
this._checkAuth();
|
|
17
|
+
this._loadVersion();
|
|
17
18
|
|
|
18
19
|
window.addEventListener('auth:required', () => this._showLogin());
|
|
19
20
|
|
|
21
|
+
this.querySelector('#hamburger-btn').addEventListener('click', () => this._toggleSidebar());
|
|
22
|
+
this.querySelector('#sidebar-backdrop').addEventListener('click', () => this._toggleSidebar(true));
|
|
23
|
+
|
|
20
24
|
store.addEventListener('state-change', (e) => {
|
|
21
25
|
if (e.detail.key === 'activeTab') {
|
|
22
26
|
this.switchTab(e.detail.value);
|
|
27
|
+
this._toggleSidebar(true);
|
|
23
28
|
}
|
|
24
29
|
});
|
|
25
30
|
|
|
@@ -50,6 +55,7 @@ export class AppRoot extends Component {
|
|
|
50
55
|
this._showLogoutButton();
|
|
51
56
|
}
|
|
52
57
|
this._checkVnc();
|
|
58
|
+
this._checkLlmConfig();
|
|
53
59
|
} catch {
|
|
54
60
|
// Server unreachable — will fail on actual API calls
|
|
55
61
|
}
|
|
@@ -60,21 +66,13 @@ export class AppRoot extends Component {
|
|
|
60
66
|
|
|
61
67
|
const overlay = document.createElement('div');
|
|
62
68
|
overlay.id = 'auth-overlay';
|
|
63
|
-
overlay.className = '
|
|
69
|
+
overlay.className = 'auth-overlay';
|
|
64
70
|
overlay.innerHTML = `
|
|
65
|
-
<div class="
|
|
66
|
-
<h2 class="
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
<
|
|
70
|
-
<input id="auth-password" type="password" placeholder="Password"
|
|
71
|
-
class="w-full bg-[#11111b] border border-[#313244] rounded px-3 py-2 text-gray-100
|
|
72
|
-
focus:outline-none focus:border-blue-500 mb-4" />
|
|
73
|
-
<button id="auth-submit"
|
|
74
|
-
class="w-full bg-blue-600 hover:bg-blue-700 text-white font-medium py-2 px-4
|
|
75
|
-
rounded transition-colors">
|
|
76
|
-
Sign In
|
|
77
|
-
</button>
|
|
71
|
+
<div class="auth-card">
|
|
72
|
+
<h2><i class="fas fa-lock text-accent"></i> Authentication Required</h2>
|
|
73
|
+
<div id="auth-error" class="auth-error"></div>
|
|
74
|
+
<input id="auth-password" type="password" placeholder="Password" class="input" />
|
|
75
|
+
<button id="auth-submit" class="btn btn-accent w-full">Sign In</button>
|
|
78
76
|
</div>
|
|
79
77
|
`;
|
|
80
78
|
this.appendChild(overlay);
|
|
@@ -103,13 +101,13 @@ export class AppRoot extends Component {
|
|
|
103
101
|
this.switchTab(store.get('activeTab'));
|
|
104
102
|
} else {
|
|
105
103
|
errorDiv.textContent = 'Invalid password';
|
|
106
|
-
errorDiv.classList.
|
|
104
|
+
errorDiv.classList.add('visible');
|
|
107
105
|
passwordInput.value = '';
|
|
108
106
|
passwordInput.focus();
|
|
109
107
|
}
|
|
110
108
|
} catch {
|
|
111
109
|
errorDiv.textContent = 'Connection error';
|
|
112
|
-
errorDiv.classList.
|
|
110
|
+
errorDiv.classList.add('visible');
|
|
113
111
|
} finally {
|
|
114
112
|
submitBtn.disabled = false;
|
|
115
113
|
submitBtn.textContent = 'Sign In';
|
|
@@ -132,22 +130,23 @@ export class AppRoot extends Component {
|
|
|
132
130
|
try {
|
|
133
131
|
const res = await fetch('/api/vnc/status');
|
|
134
132
|
const data = await res.json();
|
|
135
|
-
if (data.enabled) this._showVncButton();
|
|
133
|
+
if (data.enabled) this._showVncButton(data.url);
|
|
136
134
|
} catch { /* ignore */ }
|
|
137
135
|
}
|
|
138
136
|
|
|
139
|
-
_showVncButton() {
|
|
137
|
+
_showVncButton(vncUrl) {
|
|
140
138
|
if (this.querySelector('#vnc-desktop-btn')) return;
|
|
141
139
|
const actions = this.querySelector('#header-actions');
|
|
142
140
|
if (!actions) return;
|
|
143
141
|
|
|
142
|
+
const targetUrl = vncUrl || '/vnc';
|
|
144
143
|
const btn = document.createElement('button');
|
|
145
144
|
btn.id = 'vnc-desktop-btn';
|
|
146
|
-
btn.className = '
|
|
145
|
+
btn.className = 'btn-ghost';
|
|
147
146
|
btn.title = 'View Browser Desktop';
|
|
148
147
|
btn.innerHTML = '<i class="fas fa-desktop"></i>';
|
|
149
148
|
btn.addEventListener('click', () => {
|
|
150
|
-
window.open(
|
|
149
|
+
window.open(targetUrl, 'vnc-desktop', 'width=1300,height=760,menubar=no,toolbar=no');
|
|
151
150
|
});
|
|
152
151
|
actions.appendChild(btn);
|
|
153
152
|
}
|
|
@@ -159,7 +158,7 @@ export class AppRoot extends Component {
|
|
|
159
158
|
|
|
160
159
|
const btn = document.createElement('button');
|
|
161
160
|
btn.id = 'auth-logout-btn';
|
|
162
|
-
btn.className = '
|
|
161
|
+
btn.className = 'btn-ghost';
|
|
163
162
|
btn.title = 'Logout';
|
|
164
163
|
btn.innerHTML = '<i class="fas fa-right-from-bracket"></i>';
|
|
165
164
|
btn.addEventListener('click', async () => {
|
|
@@ -170,6 +169,57 @@ export class AppRoot extends Component {
|
|
|
170
169
|
actions.appendChild(btn);
|
|
171
170
|
}
|
|
172
171
|
|
|
172
|
+
async _checkLlmConfig() {
|
|
173
|
+
try {
|
|
174
|
+
const res = await fetch('/api/llm/readiness');
|
|
175
|
+
const data = await res.json();
|
|
176
|
+
if (!data.ready) this._showLlmSetupModal(data.issues);
|
|
177
|
+
} catch { /* ignore */ }
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
_showLlmSetupModal(issues) {
|
|
181
|
+
if (this.querySelector('#llm-setup-overlay')) return;
|
|
182
|
+
|
|
183
|
+
const issueList = (issues || [])
|
|
184
|
+
.map(i => `<li class="flex items-start gap-2"><i class="fas fa-circle text-2xs text-accent flex-shrink-0 mt-1"></i><span>${i}</span></li>`)
|
|
185
|
+
.join('');
|
|
186
|
+
|
|
187
|
+
const overlay = document.createElement('div');
|
|
188
|
+
overlay.id = 'llm-setup-overlay';
|
|
189
|
+
overlay.className = 'auth-overlay';
|
|
190
|
+
overlay.innerHTML = `
|
|
191
|
+
<div class="llm-setup-modal">
|
|
192
|
+
<div class="llm-setup-icon">
|
|
193
|
+
<i class="fas fa-microchip text-2xl text-accent"></i>
|
|
194
|
+
</div>
|
|
195
|
+
<h2 class="text-xl font-semibold text-primary mb-2">LLM Setup Required</h2>
|
|
196
|
+
<p class="text-sm text-secondary mb-4">
|
|
197
|
+
Your models aren't ready yet. Head to the <strong class="text-primary">LLM</strong> tab to get started.
|
|
198
|
+
</p>
|
|
199
|
+
${issueList ? `<ul class="text-xs text-muted text-left space-y-1 panel-sm mb-6">${issueList}</ul>` : ''}
|
|
200
|
+
<button id="llm-setup-go" class="btn btn-accent w-full">
|
|
201
|
+
<i class="fas fa-arrow-right"></i> Go to LLM
|
|
202
|
+
</button>
|
|
203
|
+
</div>
|
|
204
|
+
`;
|
|
205
|
+
this.appendChild(overlay);
|
|
206
|
+
|
|
207
|
+
overlay.querySelector('#llm-setup-go').addEventListener('click', () => {
|
|
208
|
+
overlay.remove();
|
|
209
|
+
store.set('activeTab', 'llm');
|
|
210
|
+
window.location.hash = 'llm';
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
async _loadVersion() {
|
|
215
|
+
try {
|
|
216
|
+
const res = await fetch('/health');
|
|
217
|
+
const data = await res.json();
|
|
218
|
+
const el = this.querySelector('#app-version');
|
|
219
|
+
if (el && data.version) el.textContent = `AgentOrcha v${data.version}`;
|
|
220
|
+
} catch { /* ignore */ }
|
|
221
|
+
}
|
|
222
|
+
|
|
173
223
|
switchTab(tabId) {
|
|
174
224
|
const container = this.querySelector('#tabContent');
|
|
175
225
|
if (!container) return;
|
|
@@ -178,12 +228,11 @@ export class AppRoot extends Component {
|
|
|
178
228
|
let el;
|
|
179
229
|
switch (tabId) {
|
|
180
230
|
case 'agents': el = document.createElement('agents-view'); break;
|
|
181
|
-
case 'workflows': el = document.createElement('workflows-view'); break;
|
|
182
231
|
case 'knowledge': el = document.createElement('knowledge-view'); break;
|
|
183
232
|
case 'graph': el = document.createElement('graph-view'); break;
|
|
184
233
|
case 'mcp': el = document.createElement('mcp-view'); break;
|
|
185
|
-
case 'skills': el = document.createElement('skills-view'); break;
|
|
186
234
|
case 'monitor': el = document.createElement('monitor-view'); break;
|
|
235
|
+
case 'llm': el = document.createElement('local-llm-view'); break;
|
|
187
236
|
case 'ide': el = document.createElement('ide-view'); break;
|
|
188
237
|
default: el = document.createElement('agents-view'); break;
|
|
189
238
|
}
|
|
@@ -194,24 +243,37 @@ export class AppRoot extends Component {
|
|
|
194
243
|
container.appendChild(el);
|
|
195
244
|
}
|
|
196
245
|
|
|
246
|
+
_toggleSidebar(forceClose) {
|
|
247
|
+
const sidebar = this.querySelector('#app-sidebar');
|
|
248
|
+
const backdrop = this.querySelector('#sidebar-backdrop');
|
|
249
|
+
const open = forceClose ? false : !sidebar.classList.contains('open');
|
|
250
|
+
sidebar.classList.toggle('open', open);
|
|
251
|
+
backdrop.classList.toggle('open', open);
|
|
252
|
+
}
|
|
253
|
+
|
|
197
254
|
template() {
|
|
198
255
|
return `
|
|
199
|
-
<div class="
|
|
200
|
-
<div
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
</div>
|
|
207
|
-
<div id="header-actions" class="flex items-center gap-3"></div>
|
|
256
|
+
<div class="app-shell">
|
|
257
|
+
<div id="sidebar-backdrop"></div>
|
|
258
|
+
<div id="app-sidebar">
|
|
259
|
+
<nav-bar class="flex-1 min-h-0"></nav-bar>
|
|
260
|
+
<div class="sidebar-footer">
|
|
261
|
+
<div id="header-actions" class="flex items-center gap-2"></div>
|
|
262
|
+
<span id="app-version">AgentOrcha</span>
|
|
208
263
|
</div>
|
|
209
264
|
</div>
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
265
|
+
<div class="app-main">
|
|
266
|
+
<div class="app-mobile-header">
|
|
267
|
+
<button id="hamburger-btn" class="btn-ghost">
|
|
268
|
+
<i class="fas fa-bars text-lg"></i>
|
|
269
|
+
</button>
|
|
270
|
+
<img src="/assets/logo.png" alt="Agent Orcha" class="mobile-logo">
|
|
271
|
+
<span class="text-sm font-semibold text-primary ml-2">Agent Orcha</span>
|
|
272
|
+
</div>
|
|
273
|
+
<div id="tabContent" class="app-content">
|
|
274
|
+
<!-- Dynamic Content -->
|
|
275
|
+
</div>
|
|
276
|
+
<log-viewer class="flex-shrink-0"></log-viewer>
|
|
215
277
|
</div>
|
|
216
278
|
</div>
|
|
217
279
|
`;
|
|
@@ -82,11 +82,9 @@ export class GraphView extends Component {
|
|
|
82
82
|
renderError(message) {
|
|
83
83
|
const main = this.querySelector("#graphContainer");
|
|
84
84
|
main.innerHTML = `
|
|
85
|
-
<div class="
|
|
86
|
-
<
|
|
87
|
-
|
|
88
|
-
<p class="text-red-300">${message}</p>
|
|
89
|
-
</div>
|
|
85
|
+
<div class="empty-state h-full">
|
|
86
|
+
<i class="fas fa-exclamation-circle text-4xl text-red mb-4"></i>
|
|
87
|
+
<p class="text-red">${message}</p>
|
|
90
88
|
</div>
|
|
91
89
|
`;
|
|
92
90
|
}
|
|
@@ -223,8 +221,8 @@ export class GraphView extends Component {
|
|
|
223
221
|
label: e.type,
|
|
224
222
|
title: e.description || e.type,
|
|
225
223
|
arrows: "to",
|
|
226
|
-
color: { color: "#
|
|
227
|
-
font: { color: "#
|
|
224
|
+
color: { color: "#2e2f3a", highlight: "#5e6ad2", hover: "#3f404a" },
|
|
225
|
+
font: { color: "#5c5c64", size: 9, strokeWidth: 0 },
|
|
228
226
|
smooth: { type: "continuous" },
|
|
229
227
|
width: 1.5,
|
|
230
228
|
// Store original data
|
|
@@ -353,7 +351,7 @@ export class GraphView extends Component {
|
|
|
353
351
|
sidebarContent.innerHTML = `
|
|
354
352
|
<div class="mb-2">
|
|
355
353
|
<h3 class="text-sm font-bold text-white">${this.escapeHtml(type)}</h3>
|
|
356
|
-
<span class="text-xs text-
|
|
354
|
+
<span class="text-xs text-muted font-mono">${this.escapeHtml(nodeId)}</span>
|
|
357
355
|
</div>
|
|
358
356
|
<div class="space-y-1">
|
|
359
357
|
${[
|
|
@@ -364,7 +362,7 @@ export class GraphView extends Component {
|
|
|
364
362
|
].join("")}
|
|
365
363
|
${
|
|
366
364
|
coreProps.length === 0 && propKeys.length === 0
|
|
367
|
-
? '<p class="text-xs text-
|
|
365
|
+
? '<p class="text-xs text-muted italic">No properties</p>'
|
|
368
366
|
: ""
|
|
369
367
|
}
|
|
370
368
|
</div>
|
|
@@ -379,9 +377,9 @@ export class GraphView extends Component {
|
|
|
379
377
|
: val
|
|
380
378
|
: JSON.stringify(val);
|
|
381
379
|
return `
|
|
382
|
-
<div class="
|
|
383
|
-
<span class="text-xs text-
|
|
384
|
-
<span class="text-xs text-
|
|
380
|
+
<div class="graph-prop">
|
|
381
|
+
<span class="text-xs text-muted">${this.escapeHtml(key)}: </span>
|
|
382
|
+
<span class="text-xs text-primary break-words">${this.escapeHtml(displayVal)}</span>
|
|
385
383
|
</div>
|
|
386
384
|
`;
|
|
387
385
|
}
|
|
@@ -408,7 +406,7 @@ export class GraphView extends Component {
|
|
|
408
406
|
<div class="h-full flex flex-col">
|
|
409
407
|
<div class="flex-1 min-h-0 relative">
|
|
410
408
|
<div id="graphContainer" class="h-full w-full rounded-lg graph-canvas"></div>
|
|
411
|
-
<div id="sidebar" class="
|
|
409
|
+
<div id="sidebar" class="graph-sidebar hidden">
|
|
412
410
|
<div id="sidebarContent" class="p-3"></div>
|
|
413
411
|
</div>
|
|
414
412
|
</div>
|