agent-nuvira 3.1.0 → 3.1.3
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/dist/agents/agents/context-gatherer.d.ts +5 -3
- package/dist/agents/agents/context-gatherer.d.ts.map +1 -1
- package/dist/agents/agents/context-gatherer.js +10 -9
- package/dist/agents/agents/context-gatherer.js.map +1 -1
- package/dist/agents/agents/reasoner.d.ts +2 -1
- package/dist/agents/agents/reasoner.d.ts.map +1 -1
- package/dist/agents/agents/reasoner.js +2 -1
- package/dist/agents/agents/reasoner.js.map +1 -1
- package/dist/agents/agents/reviewer-tool-calling.d.ts +3 -3
- package/dist/agents/agents/reviewer-tool-calling.js +3 -3
- package/dist/agents/agents/writer-tool-calling.d.ts +3 -3
- package/dist/agents/agents/writer-tool-calling.js +3 -3
- package/dist/agents/agents/writer.js +5 -5
- package/dist/agents/agents/writer.js.map +1 -1
- package/dist/agents/answer-quality-gate.d.ts +64 -0
- package/dist/agents/answer-quality-gate.d.ts.map +1 -0
- package/dist/agents/answer-quality-gate.js +94 -0
- package/dist/agents/answer-quality-gate.js.map +1 -0
- package/dist/agents/orchestrator.d.ts +6 -6
- package/dist/agents/orchestrator.d.ts.map +1 -1
- package/dist/agents/orchestrator.js +48 -24
- package/dist/agents/orchestrator.js.map +1 -1
- package/dist/agents/prompt-assembly.d.ts +3 -3
- package/dist/agents/prompt-assembly.js +3 -3
- package/dist/agents/tool-calling-agent.d.ts +3 -3
- package/dist/agents/tool-calling-agent.js +3 -3
- package/dist/cli/chat.d.ts +20 -9
- package/dist/cli/chat.d.ts.map +1 -1
- package/dist/cli/chat.js +167 -37
- package/dist/cli/chat.js.map +1 -1
- package/dist/cli/config.d.ts +16 -0
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +73 -1
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/execute.d.ts.map +1 -1
- package/dist/cli/execute.js +59 -9
- package/dist/cli/execute.js.map +1 -1
- package/dist/cli/gateway.d.ts +7 -0
- package/dist/cli/gateway.d.ts.map +1 -1
- package/dist/cli/gateway.js +45 -0
- package/dist/cli/gateway.js.map +1 -1
- package/dist/cli/loop-executor.d.ts.map +1 -1
- package/dist/cli/loop-executor.js +87 -27
- package/dist/cli/loop-executor.js.map +1 -1
- package/dist/cli/models.d.ts.map +1 -1
- package/dist/cli/models.js +63 -0
- package/dist/cli/models.js.map +1 -1
- package/dist/cli/nlu.d.ts +8 -0
- package/dist/cli/nlu.d.ts.map +1 -1
- package/dist/cli/nlu.js +57 -0
- package/dist/cli/nlu.js.map +1 -1
- package/dist/config/manager.d.ts.map +1 -1
- package/dist/config/manager.js +17 -3
- package/dist/config/manager.js.map +1 -1
- package/dist/config/types.d.ts +23 -0
- package/dist/config/types.d.ts.map +1 -1
- package/dist/gateway/adapters.d.ts +24 -0
- package/dist/gateway/adapters.d.ts.map +1 -1
- package/dist/gateway/adapters.js +19 -0
- package/dist/gateway/adapters.js.map +1 -1
- package/dist/gateway/delivery.d.ts +7 -1
- package/dist/gateway/delivery.d.ts.map +1 -1
- package/dist/gateway/delivery.js +7 -1
- package/dist/gateway/delivery.js.map +1 -1
- package/dist/gateway/gateway-log.d.ts +74 -0
- package/dist/gateway/gateway-log.d.ts.map +1 -0
- package/dist/gateway/gateway-log.js +167 -0
- package/dist/gateway/gateway-log.js.map +1 -0
- package/dist/gateway/inbox.d.ts +8 -1
- package/dist/gateway/inbox.d.ts.map +1 -1
- package/dist/gateway/inbox.js.map +1 -1
- package/dist/gateway/registry.d.ts +212 -1
- package/dist/gateway/registry.d.ts.map +1 -1
- package/dist/gateway/registry.js +913 -46
- package/dist/gateway/registry.js.map +1 -1
- package/dist/gateway/whatsapp/baileys-bridge.d.ts +98 -1
- package/dist/gateway/whatsapp/baileys-bridge.d.ts.map +1 -1
- package/dist/gateway/whatsapp/baileys-bridge.js +264 -63
- package/dist/gateway/whatsapp/baileys-bridge.js.map +1 -1
- package/dist/gateway/whatsapp/bridge.d.ts +32 -0
- package/dist/gateway/whatsapp/bridge.d.ts.map +1 -1
- package/dist/gateway/whatsapp/bridge.js.map +1 -1
- package/dist/inference/tool-call-utils.d.ts +146 -0
- package/dist/inference/tool-call-utils.d.ts.map +1 -1
- package/dist/inference/tool-call-utils.js +450 -3
- package/dist/inference/tool-call-utils.js.map +1 -1
- package/dist/learning/auto-router.d.ts +65 -1
- package/dist/learning/auto-router.d.ts.map +1 -1
- package/dist/learning/auto-router.js +156 -1
- package/dist/learning/auto-router.js.map +1 -1
- package/dist/learning/deferred-task.d.ts +159 -0
- package/dist/learning/deferred-task.d.ts.map +1 -0
- package/dist/learning/deferred-task.js +451 -0
- package/dist/learning/deferred-task.js.map +1 -0
- package/dist/learning/hub-skill-catalog.d.ts.map +1 -1
- package/dist/learning/hub-skill-catalog.js +10 -3
- package/dist/learning/hub-skill-catalog.js.map +1 -1
- package/dist/learning/model-first-router.d.ts.map +1 -1
- package/dist/learning/model-first-router.js +8 -0
- package/dist/learning/model-first-router.js.map +1 -1
- package/dist/learning/model-registry.d.ts +30 -0
- package/dist/learning/model-registry.d.ts.map +1 -1
- package/dist/learning/model-registry.js +61 -0
- package/dist/learning/model-registry.js.map +1 -1
- package/dist/learning/reasoning-trace.d.ts +8 -0
- package/dist/learning/reasoning-trace.d.ts.map +1 -1
- package/dist/learning/reasoning-trace.js +1 -0
- package/dist/learning/reasoning-trace.js.map +1 -1
- package/dist/learning/resilient-call.d.ts +116 -0
- package/dist/learning/resilient-call.d.ts.map +1 -1
- package/dist/learning/resilient-call.js +435 -15
- package/dist/learning/resilient-call.js.map +1 -1
- package/dist/nlu/conversation-gate.d.ts +22 -0
- package/dist/nlu/conversation-gate.d.ts.map +1 -1
- package/dist/nlu/conversation-gate.js +52 -8
- package/dist/nlu/conversation-gate.js.map +1 -1
- package/dist/nlu/intent-confirm.d.ts +82 -0
- package/dist/nlu/intent-confirm.d.ts.map +1 -0
- package/dist/nlu/intent-confirm.js +146 -0
- package/dist/nlu/intent-confirm.js.map +1 -0
- package/dist/nlu/intent.d.ts +35 -0
- package/dist/nlu/intent.d.ts.map +1 -1
- package/dist/nlu/intent.js +192 -3
- package/dist/nlu/intent.js.map +1 -1
- package/dist/nlu/learnings.d.ts +101 -0
- package/dist/nlu/learnings.d.ts.map +1 -0
- package/dist/nlu/learnings.js +283 -0
- package/dist/nlu/learnings.js.map +1 -0
- package/dist/nlu/schema.d.ts +2 -2
- package/dist/tools/ask-user.d.ts.map +1 -1
- package/dist/tools/ask-user.js +19 -3
- package/dist/tools/ask-user.js.map +1 -1
- package/dist/tools/coding-tools.d.ts.map +1 -1
- package/dist/tools/coding-tools.js +5 -0
- package/dist/tools/coding-tools.js.map +1 -1
- package/dist/tools/gateway-send.d.ts.map +1 -1
- package/dist/tools/gateway-send.js +14 -4
- package/dist/tools/gateway-send.js.map +1 -1
- package/dist/tools/loop-project-context.d.ts +3 -3
- package/dist/tools/loop-project-context.js +3 -3
- package/dist/tools/loop-skill-hint.d.ts +44 -7
- package/dist/tools/loop-skill-hint.d.ts.map +1 -1
- package/dist/tools/loop-skill-hint.js +117 -26
- package/dist/tools/loop-skill-hint.js.map +1 -1
- package/dist/tools/registry.d.ts +14 -0
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/tool-loop.d.ts +55 -2
- package/dist/tools/tool-loop.d.ts.map +1 -1
- package/dist/tools/tool-loop.js +161 -7
- package/dist/tools/tool-loop.js.map +1 -1
- package/dist/tools/toolsets.js +2 -2
- package/dist/tools/toolsets.js.map +1 -1
- package/dist/tools/unified-diff.d.ts +2 -2
- package/dist/tools/unified-diff.js +2 -2
- package/dist/web-dashboard/chat-console.d.ts +41 -0
- package/dist/web-dashboard/chat-console.d.ts.map +1 -1
- package/dist/web-dashboard/chat-console.js +133 -24
- package/dist/web-dashboard/chat-console.js.map +1 -1
- package/dist/web-dashboard/chat-retry.d.ts +143 -0
- package/dist/web-dashboard/chat-retry.d.ts.map +1 -0
- package/dist/web-dashboard/chat-retry.js +219 -0
- package/dist/web-dashboard/chat-retry.js.map +1 -0
- package/dist/web-dashboard/server.d.ts +21 -2
- package/dist/web-dashboard/server.d.ts.map +1 -1
- package/dist/web-dashboard/server.js +138 -2
- package/dist/web-dashboard/server.js.map +1 -1
- package/dist/web-dashboard/src/types.d.ts +6 -3
- package/dist/web-dashboard/src/types.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/web-dashboard/public/assets/{index-Pzkg6L8v.js → index-Co7Hk2FT.js} +60 -60
- package/src/web-dashboard/public/assets/index-Co7Hk2FT.js.map +1 -0
- package/src/web-dashboard/public/index.html +1 -1
- package/dist/app.js +0 -26
- package/dist/auth-api.d.ts +0 -2
- package/dist/auth-api.d.ts.map +0 -1
- package/dist/auth-api.js +0 -61
- package/dist/auth-api.js.map +0 -1
- package/dist/auth.test.d.ts +0 -1
- package/dist/auth.test.d.ts.map +0 -1
- package/dist/auth.test.js +0 -3
- package/dist/auth.test.js.map +0 -1
- package/dist/config/auth.js +0 -18
- package/dist/config/jwt.js +0 -24
- package/dist/config/keys.js +0 -14
- package/dist/file.d.ts +0 -1
- package/dist/file.d.ts.map +0 -1
- package/dist/file.js +0 -2
- package/dist/file.js.map +0 -1
- package/dist/middleware/auth.js +0 -30
- package/dist/passport.js +0 -34
- package/dist/routes/auth.d.ts +0 -3
- package/dist/routes/auth.d.ts.map +0 -1
- package/dist/routes/auth.js +0 -47
- package/dist/routes/auth.js.map +0 -1
- package/dist/routes/user.js +0 -31
- package/dist/server.js +0 -17
- package/dist/web-dashboard/src/App.js +0 -85
- package/dist/web-dashboard/src/admin-auth.test.js +0 -186
- package/dist/web-dashboard/src/ansi.js +0 -23
- package/dist/web-dashboard/src/ansi.test.js +0 -31
- package/dist/web-dashboard/src/api-admin-auth.test.js +0 -172
- package/dist/web-dashboard/src/api-admin.test.js +0 -65
- package/dist/web-dashboard/src/api-hub.test.js +0 -117
- package/dist/web-dashboard/src/api.js +0 -1421
- package/dist/web-dashboard/src/api.test.js +0 -51
- package/dist/web-dashboard/src/artifacts.js +0 -128
- package/dist/web-dashboard/src/artifacts.test.js +0 -139
- package/dist/web-dashboard/src/components/AdminPanel.js +0 -567
- package/dist/web-dashboard/src/components/AdminPanel.test.js +0 -288
- package/dist/web-dashboard/src/components/AgentHub.js +0 -1580
- package/dist/web-dashboard/src/components/AgentHub.test.js +0 -343
- package/dist/web-dashboard/src/components/BedrockOnboarding.js +0 -320
- package/dist/web-dashboard/src/components/BenchmarkCharts.js +0 -228
- package/dist/web-dashboard/src/components/ChatPage.js +0 -1586
- package/dist/web-dashboard/src/components/ChatPage.test.js +0 -899
- package/dist/web-dashboard/src/components/ContactsPage.js +0 -141
- package/dist/web-dashboard/src/components/CostDashboard.js +0 -105
- package/dist/web-dashboard/src/components/DAGView.js +0 -477
- package/dist/web-dashboard/src/components/DAGView.test.js +0 -147
- package/dist/web-dashboard/src/components/EnvVarEditor.js +0 -138
- package/dist/web-dashboard/src/components/EvalsPage.js +0 -73
- package/dist/web-dashboard/src/components/EvalsPage.test.js +0 -120
- package/dist/web-dashboard/src/components/ExecutionHistory.js +0 -201
- package/dist/web-dashboard/src/components/GatewayPage.js +0 -40
- package/dist/web-dashboard/src/components/GatewayPage.test.js +0 -74
- package/dist/web-dashboard/src/components/HealthPanel.js +0 -68
- package/dist/web-dashboard/src/components/HistoryBrowser.js +0 -34
- package/dist/web-dashboard/src/components/Layout.js +0 -50
- package/dist/web-dashboard/src/components/Markdown.js +0 -152
- package/dist/web-dashboard/src/components/Markdown.test.js +0 -126
- package/dist/web-dashboard/src/components/MarkdownZeroDep.js +0 -237
- package/dist/web-dashboard/src/components/MemoryPanel.js +0 -81
- package/dist/web-dashboard/src/components/ModelTimeline.js +0 -298
- package/dist/web-dashboard/src/components/ModelsPanel.js +0 -1484
- package/dist/web-dashboard/src/components/ModelsPanel.test.js +0 -460
- package/dist/web-dashboard/src/components/Overview.js +0 -123
- package/dist/web-dashboard/src/components/PhaseTimeline.js +0 -359
- package/dist/web-dashboard/src/components/PhaseTimeline.test.js +0 -234
- package/dist/web-dashboard/src/components/PlatformConfigSection.js +0 -384
- package/dist/web-dashboard/src/components/PlatformConfigSection.test.js +0 -106
- package/dist/web-dashboard/src/components/PlatformsPage.js +0 -250
- package/dist/web-dashboard/src/components/QuotaPanel.js +0 -159
- package/dist/web-dashboard/src/components/QuotaPanel.test.js +0 -85
- package/dist/web-dashboard/src/components/RequestsPanel.js +0 -229
- package/dist/web-dashboard/src/components/RequestsPanel.test.js +0 -103
- package/dist/web-dashboard/src/components/RoutingInsightsPanel.js +0 -938
- package/dist/web-dashboard/src/components/RoutingInsightsPanel.test.js +0 -339
- package/dist/web-dashboard/src/components/RoutingWalkthrough.js +0 -408
- package/dist/web-dashboard/src/components/RoutingWalkthrough.test.js +0 -209
- package/dist/web-dashboard/src/components/TaskConsole.js +0 -119
- package/dist/web-dashboard/src/components/TaskConsole.test.js +0 -123
- package/dist/web-dashboard/src/components/TasksPage.js +0 -256
- package/dist/web-dashboard/src/components/TasksPage.test.js +0 -103
- package/dist/web-dashboard/src/components/TracePanel.js +0 -306
- package/dist/web-dashboard/src/components/WhatsAppPanel.js +0 -195
- package/dist/web-dashboard/src/components/WhatsAppPanel.test.js +0 -122
- package/dist/web-dashboard/src/jsonOrNull.js +0 -37
- package/dist/web-dashboard/src/main.js +0 -15
- package/dist/web-dashboard/src/mask.js +0 -11
- package/dist/web-dashboard/vite.config.js +0 -23
- package/dist/web-dashboard/vitest.config.js +0 -15
- package/src/web-dashboard/public/assets/index-Pzkg6L8v.js.map +0 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>Agent-Nuvira Dashboard</title>
|
|
7
|
-
<script type="module" crossorigin src="/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/assets/index-Co7Hk2FT.js"></script>
|
|
8
8
|
<link rel="stylesheet" crossorigin href="/assets/index-Cyd6tIew.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
package/dist/app.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const express_1 = __importDefault(require("express"));
|
|
7
|
-
const passport_1 = __importDefault(require("./passport"));
|
|
8
|
-
const user_1 = __importDefault(require("./routes/user"));
|
|
9
|
-
const auth_1 = __importDefault(require("./routes/auth"));
|
|
10
|
-
// Create Express application
|
|
11
|
-
const app = (0, express_1.default)();
|
|
12
|
-
// Middleware to parse JSON bodies
|
|
13
|
-
app.use(express_1.default.json());
|
|
14
|
-
// Initialize Passport.js
|
|
15
|
-
app.use(passport_1.default.initialize());
|
|
16
|
-
// If you are using persistent login sessions, uncomment the following line:
|
|
17
|
-
// app.use(passport.session());
|
|
18
|
-
// Register routers
|
|
19
|
-
app.use('/api/auth', auth_1.default); // Public authentication routes
|
|
20
|
-
app.use('/api/user', user_1.default); // Protected user routes
|
|
21
|
-
// Global error handling middleware
|
|
22
|
-
app.use((err, _req, res, _next) => {
|
|
23
|
-
console.error(err);
|
|
24
|
-
res.status(500).json({ error: 'Internal Server Error' });
|
|
25
|
-
});
|
|
26
|
-
exports.default = app;
|
package/dist/auth-api.d.ts
DELETED
package/dist/auth-api.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-api.d.ts","sourceRoot":"","sources":["../src/auth-api.ts"],"names":[],"mappings":""}
|
package/dist/auth-api.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import express from 'express';
|
|
2
|
-
import jwt from 'jsonwebtoken';
|
|
3
|
-
// Define the secret key for JWT
|
|
4
|
-
const secretKey = 'my-secret-key';
|
|
5
|
-
// Create an Express app
|
|
6
|
-
const app = express();
|
|
7
|
-
// Middleware to parse JSON requests
|
|
8
|
-
app.use(express.json());
|
|
9
|
-
// In-memory user database (replace with a real database in production)
|
|
10
|
-
const users = {
|
|
11
|
-
user1: 'password1',
|
|
12
|
-
user2: 'password2',
|
|
13
|
-
};
|
|
14
|
-
// Function to generate a JWT token
|
|
15
|
-
function generateToken(payload) {
|
|
16
|
-
return jwt.sign(payload, secretKey, { expiresIn: '1h' });
|
|
17
|
-
}
|
|
18
|
-
// Function to verify a JWT token
|
|
19
|
-
function verifyToken(token) {
|
|
20
|
-
try {
|
|
21
|
-
return jwt.verify(token, secretKey);
|
|
22
|
-
}
|
|
23
|
-
catch (error) {
|
|
24
|
-
return null;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
// Login endpoint
|
|
28
|
-
app.post('/login', (req, res) => {
|
|
29
|
-
const { username, password } = req.body;
|
|
30
|
-
if (!username || !password) {
|
|
31
|
-
return res.status(400).send({ error: 'Username and password are required' });
|
|
32
|
-
}
|
|
33
|
-
if (!users[username] || users[username] !== password) {
|
|
34
|
-
return res.status(401).send({ error: 'Invalid username or password' });
|
|
35
|
-
}
|
|
36
|
-
const token = generateToken({ username });
|
|
37
|
-
res.send({ token });
|
|
38
|
-
});
|
|
39
|
-
// Auth middleware
|
|
40
|
-
function authMiddleware(req, res, next) {
|
|
41
|
-
const token = req.header('Authorization');
|
|
42
|
-
if (!token) {
|
|
43
|
-
return res.status(401).send({ error: 'Token is required' });
|
|
44
|
-
}
|
|
45
|
-
const payload = verifyToken(token);
|
|
46
|
-
if (!payload) {
|
|
47
|
-
return res.status(401).send({ error: 'Invalid token' });
|
|
48
|
-
}
|
|
49
|
-
req.username = payload.username;
|
|
50
|
-
next();
|
|
51
|
-
}
|
|
52
|
-
// Protected route
|
|
53
|
-
app.get('/protected', authMiddleware, (req, res) => {
|
|
54
|
-
res.send({ message: `Hello, ${req.username}!` });
|
|
55
|
-
});
|
|
56
|
-
// Start the server
|
|
57
|
-
const port = 3000;
|
|
58
|
-
app.listen(port, () => {
|
|
59
|
-
console.log(`Server started on port ${port}`);
|
|
60
|
-
});
|
|
61
|
-
//# sourceMappingURL=auth-api.js.map
|
package/dist/auth-api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth-api.js","sourceRoot":"","sources":["../src/auth-api.ts"],"names":[],"mappings":"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"}
|
package/dist/auth.test.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=auth.test.d.ts.map
|
package/dist/auth.test.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.test.d.ts","sourceRoot":"","sources":["../src/auth.test.ts"],"names":[],"mappings":""}
|
package/dist/auth.test.js
DELETED
package/dist/auth.test.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.test.js","sourceRoot":"","sources":["../src/auth.test.ts"],"names":[],"mappings":";AAAA,sEAAsE"}
|
package/dist/config/auth.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Authentication configuration for JWT signing.
|
|
4
|
-
*
|
|
5
|
-
* @module config/auth
|
|
6
|
-
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.authConfig = void 0;
|
|
9
|
-
/**
|
|
10
|
-
* Default authentication configuration.
|
|
11
|
-
*
|
|
12
|
-
* The secret is sourced from the `JWT_SECRET` environment variable
|
|
13
|
-
* and falls back to a hard‑coded value for development purposes.
|
|
14
|
-
*/
|
|
15
|
-
exports.authConfig = {
|
|
16
|
-
secret: process.env.JWT_SECRET ?? 'supersecret',
|
|
17
|
-
expiresIn: '1h',
|
|
18
|
-
};
|
package/dist/config/jwt.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* JWT Configuration
|
|
4
|
-
*
|
|
5
|
-
* This module centralises all JWT related settings used across the
|
|
6
|
-
* application. The values are sourced from environment variables
|
|
7
|
-
* with sensible defaults for local development. The configuration
|
|
8
|
-
* is exported as a read‑only object to prevent accidental mutation
|
|
9
|
-
* at runtime.
|
|
10
|
-
*
|
|
11
|
-
* @module config/jwt
|
|
12
|
-
*/
|
|
13
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.jwtConfig = void 0;
|
|
15
|
-
/**
|
|
16
|
-
* Default JWT configuration. In production the `JWT_SECRET`
|
|
17
|
-
* environment variable must be set; otherwise a fallback is used
|
|
18
|
-
* which is suitable only for local testing.
|
|
19
|
-
*/
|
|
20
|
-
exports.jwtConfig = {
|
|
21
|
-
secret: process.env.JWT_SECRET ?? 'dev-secret-key',
|
|
22
|
-
expiresIn: process.env.JWT_EXPIRES_IN ?? '1h',
|
|
23
|
-
algorithm: process.env.JWT_ALGORITHM ?? 'HS256',
|
|
24
|
-
};
|
package/dist/config/keys.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Secret Key Configuration
|
|
4
|
-
*
|
|
5
|
-
* This module exposes the raw secret key used for signing JWTs.
|
|
6
|
-
* It is intentionally kept separate from the full JWT configuration
|
|
7
|
-
* so that other parts of the application can import only what they
|
|
8
|
-
* need without pulling in the entire config object.
|
|
9
|
-
*
|
|
10
|
-
* @module config/keys
|
|
11
|
-
*/
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
exports.JWT_SECRET = void 0;
|
|
14
|
-
exports.JWT_SECRET = process.env.JWT_SECRET ?? 'dev-secret-key';
|
package/dist/file.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=file.d.ts.map
|
package/dist/file.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.d.ts","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":""}
|
package/dist/file.js
DELETED
package/dist/file.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file.js","sourceRoot":"","sources":["../src/file.ts"],"names":[],"mappings":""}
|
package/dist/middleware/auth.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.ensureAuthenticated = void 0;
|
|
7
|
-
const passport_1 = __importDefault(require("passport"));
|
|
8
|
-
/**
|
|
9
|
-
* Middleware to ensure the request is authenticated.
|
|
10
|
-
* It uses Passport's `authenticate` strategy (e.g., JWT) to verify the token.
|
|
11
|
-
*
|
|
12
|
-
* If authentication fails, a 401 Unauthorized response is sent.
|
|
13
|
-
* If successful, `req.user` will be populated with the authenticated user.
|
|
14
|
-
*/
|
|
15
|
-
const ensureAuthenticated = (req, res, next) => {
|
|
16
|
-
// The 'jwt' strategy should be configured in `src/passport.ts`.
|
|
17
|
-
passport_1.default.authenticate('jwt', { session: false }, (err, user, info) => {
|
|
18
|
-
if (err) {
|
|
19
|
-
console.error('Authentication error:', err);
|
|
20
|
-
return next(err);
|
|
21
|
-
}
|
|
22
|
-
if (!user) {
|
|
23
|
-
return res.status(401).json({ error: 'Unauthorized' });
|
|
24
|
-
}
|
|
25
|
-
// Attach the authenticated user to the request object for downstream handlers.
|
|
26
|
-
req.user = user;
|
|
27
|
-
return next();
|
|
28
|
-
})(req, res, next);
|
|
29
|
-
};
|
|
30
|
-
exports.ensureAuthenticated = ensureAuthenticated;
|
package/dist/passport.js
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const passport_1 = __importDefault(require("passport"));
|
|
7
|
-
const passport_jwt_1 = require("passport-jwt");
|
|
8
|
-
const userService_1 = require("./services/userService"); // Adjust the import path as needed
|
|
9
|
-
// JWT options – these should be configured via environment variables.
|
|
10
|
-
const jwtOptions = {
|
|
11
|
-
jwtFromRequest: passport_jwt_1.ExtractJwt.fromAuthHeaderAsBearerToken(),
|
|
12
|
-
secretOrKey: process.env.JWT_SECRET || 'default_secret', // Replace with a strong secret in production
|
|
13
|
-
passReqToCallback: true,
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* Verify callback for the JWT strategy.
|
|
17
|
-
* It receives the JWT payload and should return the corresponding user object.
|
|
18
|
-
*/
|
|
19
|
-
const verifyJwt = async (req, payload, done) => {
|
|
20
|
-
try {
|
|
21
|
-
// Assuming the payload contains a `sub` (subject) field with the user ID.
|
|
22
|
-
const user = await (0, userService_1.getUserById)(payload.sub);
|
|
23
|
-
if (!user) {
|
|
24
|
-
return done(null, false);
|
|
25
|
-
}
|
|
26
|
-
return done(null, user);
|
|
27
|
-
}
|
|
28
|
-
catch (error) {
|
|
29
|
-
return done(error, false);
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
// Register the JWT strategy with Passport.
|
|
33
|
-
passport_1.default.use(new passport_jwt_1.Strategy(jwtOptions, verifyJwt));
|
|
34
|
-
exports.default = passport_1.default;
|
package/dist/routes/auth.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/routes/auth.ts"],"names":[],"mappings":"AAyBA,QAAA,MAAM,MAAM,KAAmB,CAAC;AAoChC,eAAe,MAAM,CAAC"}
|
package/dist/routes/auth.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import express from 'express';
|
|
2
|
-
import jwt from 'jsonwebtoken';
|
|
3
|
-
// Hard‑coded user credentials (for demo / testing purposes only)
|
|
4
|
-
const HARD_CODED_USER = {
|
|
5
|
-
username: 'admin',
|
|
6
|
-
password: 'password123',
|
|
7
|
-
};
|
|
8
|
-
// Retrieve JWT secret from environment variables.
|
|
9
|
-
// Throw early if not configured to avoid runtime errors.
|
|
10
|
-
const JWT_SECRET = process.env.JWT_SECRET;
|
|
11
|
-
if (!JWT_SECRET) {
|
|
12
|
-
throw new Error('Environment variable JWT_SECRET must be set for authentication.');
|
|
13
|
-
}
|
|
14
|
-
// Token expiration time (e.g., 1 hour)
|
|
15
|
-
const TOKEN_EXPIRES_IN = '1h';
|
|
16
|
-
const router = express.Router();
|
|
17
|
-
/**
|
|
18
|
-
* POST /login
|
|
19
|
-
* Accepts a JSON body with `username` and `password`.
|
|
20
|
-
* If the credentials match the hard‑coded user, a JWT is issued and returned.
|
|
21
|
-
* Otherwise, a 401 Unauthorized response is sent.
|
|
22
|
-
*/
|
|
23
|
-
router.post('/login', (req, res, next) => {
|
|
24
|
-
try {
|
|
25
|
-
const { username, password } = req.body;
|
|
26
|
-
// Basic validation of request payload
|
|
27
|
-
if (typeof username !== 'string' || typeof password !== 'string') {
|
|
28
|
-
return res.status(400).json({ error: 'Invalid request payload.' });
|
|
29
|
-
}
|
|
30
|
-
// Verify credentials against the hard‑coded user
|
|
31
|
-
if (username !== HARD_CODED_USER.username || password !== HARD_CODED_USER.password) {
|
|
32
|
-
return res.status(401).json({ error: 'Invalid username or password.' });
|
|
33
|
-
}
|
|
34
|
-
// Create JWT payload – you can extend this with more claims as needed
|
|
35
|
-
const payload = { username };
|
|
36
|
-
// Sign the token
|
|
37
|
-
const token = jwt.sign(payload, JWT_SECRET, { expiresIn: TOKEN_EXPIRES_IN });
|
|
38
|
-
// Respond with the token
|
|
39
|
-
return res.status(200).json({ token });
|
|
40
|
-
}
|
|
41
|
-
catch (err) {
|
|
42
|
-
// Forward unexpected errors to Express error handler
|
|
43
|
-
return next(err);
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
export default router;
|
|
47
|
-
//# sourceMappingURL=auth.js.map
|
package/dist/routes/auth.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/routes/auth.ts"],"names":[],"mappings":"AAAA,OAAO,OAA4C,MAAM,SAAS,CAAC;AACnE,OAAO,GAAG,MAAM,cAAc,CAAC;AAQ/B,iEAAiE;AACjE,MAAM,eAAe,GAAG;IACb,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE,aAAa;CACxB,CAAC;AAEX,kDAAkD;AAClD,yDAAyD;AACzD,MAAM,UAAU,GAAG,OAAO,CAAC,GAAG,CAAC,UAAU,CAAC;AAC1C,IAAI,CAAC,UAAU,EAAE,CAAC;IAChB,MAAM,IAAI,KAAK,CAAC,iEAAiE,CAAC,CAAC;AACrF,CAAC;AAED,uCAAuC;AACvC,MAAM,gBAAgB,GAAG,IAAI,CAAC;AAE9B,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAsC,EAAE,GAAa,EAAE,IAAkB,EAAE,EAAE;IAClG,IAAI,CAAC;QACH,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC;QAExC,sCAAsC;QACtC,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YACjE,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,0BAA0B,EAAE,CAAC,CAAC;QACrE,CAAC;QAED,iDAAiD;QACjD,IAAI,QAAQ,KAAK,eAAe,CAAC,QAAQ,IAAI,QAAQ,KAAK,eAAe,CAAC,QAAQ,EAAE,CAAC;YACnF,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,+BAA+B,EAAE,CAAC,CAAC;QAC1E,CAAC;QAED,sEAAsE;QACtE,MAAM,OAAO,GAAG,EAAE,QAAQ,EAAE,CAAC;QAE7B,iBAAiB;QACjB,MAAM,KAAK,GAAG,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC,CAAC;QAE7E,yBAAyB;QACzB,OAAO,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;IACzC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,qDAAqD;QACrD,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;IACnB,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,eAAe,MAAM,CAAC"}
|
package/dist/routes/user.js
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const express_1 = require("express");
|
|
4
|
-
const auth_1 = require("../middleware/auth");
|
|
5
|
-
const router = (0, express_1.Router)();
|
|
6
|
-
/**
|
|
7
|
-
* GET /api/user/profile
|
|
8
|
-
* Returns the profile of the currently authenticated user.
|
|
9
|
-
* This route is protected by the `ensureAuthenticated` middleware.
|
|
10
|
-
*/
|
|
11
|
-
router.get('/profile', auth_1.ensureAuthenticated, async (req, res, _next) => {
|
|
12
|
-
// Assuming the user information is attached to req.user by Passport
|
|
13
|
-
const user = req.user;
|
|
14
|
-
if (!user) {
|
|
15
|
-
return res.status(404).json({ error: 'User not found' });
|
|
16
|
-
}
|
|
17
|
-
res.json({
|
|
18
|
-
id: user.id,
|
|
19
|
-
username: user.username,
|
|
20
|
-
email: user.email,
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
/**
|
|
24
|
-
* GET /api/user/settings
|
|
25
|
-
* Example of another protected endpoint.
|
|
26
|
-
*/
|
|
27
|
-
router.get('/settings', auth_1.ensureAuthenticated, async (_req, res, _next) => {
|
|
28
|
-
// Placeholder response – replace with real settings logic
|
|
29
|
-
res.json({ theme: 'dark', notificationsEnabled: true });
|
|
30
|
-
});
|
|
31
|
-
exports.default = router;
|
package/dist/server.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Server Bootstrap
|
|
4
|
-
*
|
|
5
|
-
* Starts the Express server on the configured port.
|
|
6
|
-
*
|
|
7
|
-
* @module server
|
|
8
|
-
*/
|
|
9
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
10
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
const app_1 = __importDefault(require("./app"));
|
|
14
|
-
const PORT = process.env.PORT ?? 3000;
|
|
15
|
-
app_1.default.listen(PORT, () => {
|
|
16
|
-
console.log(`Server running on port ${PORT}`);
|
|
17
|
-
});
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.default = App;
|
|
7
|
-
const react_1 = require("react");
|
|
8
|
-
const react_router_dom_1 = require("react-router-dom");
|
|
9
|
-
const api_1 = require("./api");
|
|
10
|
-
const Layout_1 = __importDefault(require("./components/Layout"));
|
|
11
|
-
const Overview_1 = __importDefault(require("./components/Overview"));
|
|
12
|
-
const DAGView_1 = __importDefault(require("./components/DAGView"));
|
|
13
|
-
const CostDashboard_1 = __importDefault(require("./components/CostDashboard"));
|
|
14
|
-
const BenchmarkCharts_1 = __importDefault(require("./components/BenchmarkCharts"));
|
|
15
|
-
const HealthPanel_1 = __importDefault(require("./components/HealthPanel"));
|
|
16
|
-
const ModelsPanel_1 = __importDefault(require("./components/ModelsPanel"));
|
|
17
|
-
const RoutingInsightsPanel_1 = __importDefault(require("./components/RoutingInsightsPanel"));
|
|
18
|
-
const RequestsPanel_1 = __importDefault(require("./components/RequestsPanel"));
|
|
19
|
-
const TracePanel_1 = __importDefault(require("./components/TracePanel"));
|
|
20
|
-
const AdminPanel_1 = __importDefault(require("./components/AdminPanel"));
|
|
21
|
-
const AgentHub_1 = __importDefault(require("./components/AgentHub"));
|
|
22
|
-
const TasksPage_1 = __importDefault(require("./components/TasksPage"));
|
|
23
|
-
const ChatPage_1 = __importDefault(require("./components/ChatPage"));
|
|
24
|
-
const EvalsPage_1 = __importDefault(require("./components/EvalsPage"));
|
|
25
|
-
const GatewayPage_1 = __importDefault(require("./components/GatewayPage"));
|
|
26
|
-
const PlatformsPage_1 = __importDefault(require("./components/PlatformsPage"));
|
|
27
|
-
const BedrockOnboarding_1 = __importDefault(require("./components/BedrockOnboarding"));
|
|
28
|
-
const ContactsPage_1 = __importDefault(require("./components/ContactsPage"));
|
|
29
|
-
const ModelTimeline_1 = __importDefault(require("./components/ModelTimeline"));
|
|
30
|
-
function App() {
|
|
31
|
-
const [data, setData] = (0, react_1.useState)(null);
|
|
32
|
-
const [connected, setConnected] = (0, react_1.useState)(false);
|
|
33
|
-
const [lastUpdated, setLastUpdated] = (0, react_1.useState)('--');
|
|
34
|
-
const handleData = (0, react_1.useCallback)((d) => {
|
|
35
|
-
setData(d);
|
|
36
|
-
setLastUpdated(new Date().toLocaleTimeString());
|
|
37
|
-
}, []);
|
|
38
|
-
const handleConnection = (0, react_1.useCallback)((c) => {
|
|
39
|
-
setConnected(c);
|
|
40
|
-
}, []);
|
|
41
|
-
(0, react_1.useEffect)(() => {
|
|
42
|
-
// Fetch initial data
|
|
43
|
-
api_1.dashboardAPI.fetchAll().then((d) => {
|
|
44
|
-
if (d)
|
|
45
|
-
handleData(d);
|
|
46
|
-
});
|
|
47
|
-
// Subscribe to SSE updates
|
|
48
|
-
const unsubData = api_1.dashboardAPI.subscribe(handleData);
|
|
49
|
-
const unsubConn = api_1.dashboardAPI.onConnectionChange(handleConnection);
|
|
50
|
-
api_1.dashboardAPI.connect();
|
|
51
|
-
return () => {
|
|
52
|
-
unsubData();
|
|
53
|
-
unsubConn();
|
|
54
|
-
api_1.dashboardAPI.disconnect();
|
|
55
|
-
};
|
|
56
|
-
}, [handleData, handleConnection]);
|
|
57
|
-
return (<Layout_1.default connected={connected} lastUpdated={lastUpdated}>
|
|
58
|
-
<react_router_dom_1.Routes>
|
|
59
|
-
{/* Phase 5 — Chat is the front door; Overview (and every other room)
|
|
60
|
-
stays reachable as a panel, never required. */}
|
|
61
|
-
<react_router_dom_1.Route path="/" element={<ChatPage_1.default />}/>
|
|
62
|
-
<react_router_dom_1.Route path="/overview" element={<Overview_1.default data={data}/>}/>
|
|
63
|
-
<react_router_dom_1.Route path="/chat" element={<react_router_dom_1.Navigate to="/" replace/>}/>
|
|
64
|
-
<react_router_dom_1.Route path="/dag" element={<DAGView_1.default data={data}/>}/>
|
|
65
|
-
<react_router_dom_1.Route path="/costs" element={<CostDashboard_1.default data={data}/>}/>
|
|
66
|
-
<react_router_dom_1.Route path="/benchmarks" element={<BenchmarkCharts_1.default data={data}/>}/>
|
|
67
|
-
<react_router_dom_1.Route path="/models" element={<ModelsPanel_1.default />}/>
|
|
68
|
-
<react_router_dom_1.Route path="/models/timeline" element={<ModelTimeline_1.default />}/>
|
|
69
|
-
<react_router_dom_1.Route path="/routing" element={<RoutingInsightsPanel_1.default data={data}/>}/>
|
|
70
|
-
<react_router_dom_1.Route path="/requests" element={<RequestsPanel_1.default data={data}/>}/>
|
|
71
|
-
<react_router_dom_1.Route path="/traces" element={<TracePanel_1.default />}/>
|
|
72
|
-
<react_router_dom_1.Route path="/hub" element={<AgentHub_1.default />}/>
|
|
73
|
-
<react_router_dom_1.Route path="/tasks" element={<TasksPage_1.default />}/>
|
|
74
|
-
<react_router_dom_1.Route path="/chat" element={<ChatPage_1.default />}/>
|
|
75
|
-
<react_router_dom_1.Route path="/evals" element={<EvalsPage_1.default data={data}/>}/>
|
|
76
|
-
<react_router_dom_1.Route path="/platforms" element={<PlatformsPage_1.default />}/>
|
|
77
|
-
<react_router_dom_1.Route path="/bedrock" element={<BedrockOnboarding_1.default canWrite={true} sessionExpired={(msg) => console.error(msg)}/>}/>
|
|
78
|
-
<react_router_dom_1.Route path="/contacts" element={<ContactsPage_1.default />}/>
|
|
79
|
-
<react_router_dom_1.Route path="/gateway" element={<GatewayPage_1.default />}/>
|
|
80
|
-
<react_router_dom_1.Route path="/system" element={<HealthPanel_1.default data={data}/>}/>
|
|
81
|
-
<react_router_dom_1.Route path="/admin" element={<AdminPanel_1.default />}/>
|
|
82
|
-
<react_router_dom_1.Route path="*" element={<react_router_dom_1.Navigate to="/" replace/>}/>
|
|
83
|
-
</react_router_dom_1.Routes>
|
|
84
|
-
</Layout_1.default>);
|
|
85
|
-
}
|