@agent-relay/dashboard-server 2.0.76 → 2.0.77
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/server.js +30 -3
- package/dist/server.js.map +1 -1
- package/out/404.html +1 -1
- package/out/_next/static/chunks/259-83b77fa1b91ba5aa.js +1 -0
- package/out/_next/static/chunks/285-7e0f6b4d00cf57de.js +1 -0
- package/out/_next/static/chunks/app/app/[[...slug]]/page-e46f6a1ae5a4de44.js +1 -0
- package/out/_next/static/chunks/app/{page-5c60a00d938ac40a.js → page-2fc9cd9797ece830.js} +1 -1
- package/out/_next/static/chunks/app/providers/page-ad44a77ebe9d01c5.js +1 -0
- package/out/about.html +1 -1
- package/out/about.txt +1 -1
- package/out/app/onboarding.html +1 -1
- package/out/app/onboarding.txt +1 -1
- package/out/app.html +1 -1
- package/out/app.txt +2 -2
- package/out/blog/go-to-bed-wake-up-to-a-finished-product.html +1 -1
- package/out/blog/go-to-bed-wake-up-to-a-finished-product.txt +1 -1
- package/out/blog/let-them-cook-multi-agent-orchestration.html +1 -1
- package/out/blog/let-them-cook-multi-agent-orchestration.txt +1 -1
- package/out/blog.html +1 -1
- package/out/blog.txt +1 -1
- package/out/careers.html +1 -1
- package/out/careers.txt +1 -1
- package/out/changelog.html +1 -1
- package/out/changelog.txt +1 -1
- package/out/cloud/link.html +1 -1
- package/out/cloud/link.txt +1 -1
- package/out/complete-profile.html +1 -1
- package/out/complete-profile.txt +1 -1
- package/out/connect-repos.html +1 -1
- package/out/connect-repos.txt +1 -1
- package/out/contact.html +1 -1
- package/out/contact.txt +1 -1
- package/out/docs.html +1 -1
- package/out/docs.txt +1 -1
- package/out/history.html +1 -1
- package/out/history.txt +1 -1
- package/out/index.html +1 -1
- package/out/index.txt +2 -2
- package/out/login.html +1 -1
- package/out/login.txt +1 -1
- package/out/metrics.html +1 -1
- package/out/metrics.txt +1 -1
- package/out/pricing.html +1 -1
- package/out/pricing.txt +1 -1
- package/out/privacy.html +1 -1
- package/out/privacy.txt +1 -1
- package/out/providers/setup/claude.html +1 -1
- package/out/providers/setup/claude.txt +1 -1
- package/out/providers/setup/codex.html +1 -1
- package/out/providers/setup/codex.txt +1 -1
- package/out/providers/setup/cursor.html +1 -1
- package/out/providers/setup/cursor.txt +1 -1
- package/out/providers.html +1 -1
- package/out/providers.txt +2 -2
- package/out/security.html +1 -1
- package/out/security.txt +1 -1
- package/out/signup.html +1 -1
- package/out/signup.txt +1 -1
- package/out/terms.html +1 -1
- package/out/terms.txt +1 -1
- package/package.json +10 -10
- package/out/_next/static/chunks/259-b560f20df53128e5.js +0 -1
- package/out/_next/static/chunks/285-040c3ec4fba3b3a3.js +0 -1
- package/out/_next/static/chunks/722-85011b58b9caf88b.js +0 -1
- package/out/_next/static/chunks/app/app/[[...slug]]/page-589620c567f85400.js +0 -1
- package/out/_next/static/chunks/app/providers/page-394875a22b5ba7ce.js +0 -1
- /package/out/_next/static/{uYsrO2eF7EUfys_Pd62tF → yONrkGEJcAsR9DmXHskk0}/_buildManifest.js +0 -0
- /package/out/_next/static/{uYsrO2eF7EUfys_Pd62tF → yONrkGEJcAsR9DmXHskk0}/_ssgManifest.js +0 -0
package/dist/server.js
CHANGED
|
@@ -3842,16 +3842,16 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
3842
3842
|
app.use('/auth/cli', validateWorkspaceToken);
|
|
3843
3843
|
/**
|
|
3844
3844
|
* POST /auth/cli/:provider/start - Start CLI auth flow
|
|
3845
|
-
* Body: {
|
|
3845
|
+
* Body: { userId?: string }
|
|
3846
3846
|
*
|
|
3847
3847
|
* When userId is provided, credentials are stored per-user at /data/users/{userId}/.{provider}/
|
|
3848
3848
|
* This allows multiple users to share a workspace with their own CLI credentials.
|
|
3849
3849
|
*/
|
|
3850
3850
|
app.post('/auth/cli/:provider/start', async (req, res) => {
|
|
3851
3851
|
const { provider } = req.params;
|
|
3852
|
-
const {
|
|
3852
|
+
const { userId } = req.body || {};
|
|
3853
3853
|
try {
|
|
3854
|
-
const session = await startCLIAuth(provider, {
|
|
3854
|
+
const session = await startCLIAuth(provider, { userId });
|
|
3855
3855
|
res.json({
|
|
3856
3856
|
sessionId: session.id,
|
|
3857
3857
|
status: session.status,
|
|
@@ -4079,6 +4079,33 @@ export async function startDashboard(portOrOptions, dataDirArg, teamDirArg, dbPa
|
|
|
4079
4079
|
res.status(500).json({ error: 'Failed to write credential file' });
|
|
4080
4080
|
}
|
|
4081
4081
|
});
|
|
4082
|
+
/**
|
|
4083
|
+
* DELETE /api/credentials/apikey - Delete credential files for a provider from user's home directory
|
|
4084
|
+
* Used by cloud API when disconnecting a provider to clean up CLI credential files
|
|
4085
|
+
*/
|
|
4086
|
+
app.delete('/api/credentials/apikey', express.json(), async (req, res) => {
|
|
4087
|
+
const { userId, provider } = req.body;
|
|
4088
|
+
if (!userId || typeof userId !== 'string') {
|
|
4089
|
+
return res.status(400).json({ error: 'userId is required' });
|
|
4090
|
+
}
|
|
4091
|
+
if (!provider || typeof provider !== 'string') {
|
|
4092
|
+
return res.status(400).json({ error: 'provider is required' });
|
|
4093
|
+
}
|
|
4094
|
+
try {
|
|
4095
|
+
const { getUserDirectoryService } = await import('@agent-relay/user-directory');
|
|
4096
|
+
const userDirService = getUserDirectoryService();
|
|
4097
|
+
const deletedPaths = userDirService.deleteProviderCredentials(userId, provider);
|
|
4098
|
+
console.log(`[credentials] Deleted ${provider} credentials for user ${userId}:`, deletedPaths);
|
|
4099
|
+
res.json({
|
|
4100
|
+
success: true,
|
|
4101
|
+
deletedPaths,
|
|
4102
|
+
});
|
|
4103
|
+
}
|
|
4104
|
+
catch (err) {
|
|
4105
|
+
console.error(`[credentials] Failed to delete ${provider} credentials for user ${userId}:`, err);
|
|
4106
|
+
res.status(500).json({ error: 'Failed to delete credential files' });
|
|
4107
|
+
}
|
|
4108
|
+
});
|
|
4082
4109
|
// ===== Metrics API =====
|
|
4083
4110
|
/**
|
|
4084
4111
|
* GET /api/metrics - JSON format metrics for dashboard
|